# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).
import oci
# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()
# Initialize service client with default config file
identity_domains_client = oci.identity_domains.IdentityDomainsClient(
config, "https://endpoint_of_this_service.com")
# Send the request to service, some parameters are not required, see API
# doc for more info
create_my_authentication_factor_validator_response = identity_domains_client.create_my_authentication_factor_validator(
authorization="EXAMPLE-authorization-Value",
resource_type_schema_version="EXAMPLE-resourceTypeSchemaVersion-Value",
my_authentication_factor_validator=oci.identity_domains.models.MyAuthenticationFactorValidator(
schemas=["EXAMPLE--Value"],
auth_factor="SMS",
scenario="ENROLLMENT",
id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
ocid="EXAMPLE-ocid-Value",
meta=oci.identity_domains.models.Meta(
resource_type="EXAMPLE-resourceType-Value",
created="EXAMPLE-created-Value",
last_modified="EXAMPLE-lastModified-Value",
location="EXAMPLE-location-Value",
version="EXAMPLE-version-Value"),
idcs_created_by=oci.identity_domains.models.IdcsCreatedBy(
value="EXAMPLE-value-Value",
ref=None,
type="App",
display="EXAMPLE-display-Value",
ocid="EXAMPLE-ocid-Value"),
idcs_last_modified_by=oci.identity_domains.models.IdcsLastModifiedBy(
value="EXAMPLE-value-Value",
ref=None,
type="App",
display="EXAMPLE-display-Value",
ocid="EXAMPLE-ocid-Value"),
idcs_prevented_operations=["update"],
tags=[
oci.identity_domains.models.Tags(
key="EXAMPLE-key-Value",
value="EXAMPLE-value-Value")],
delete_in_progress=False,
idcs_last_upgraded_in_release="EXAMPLE-idcsLastUpgradedInRelease-Value",
domain_ocid="EXAMPLE-domainOcid-Value",
compartment_ocid="EXAMPLE-compartmentOcid-Value",
tenancy_ocid="EXAMPLE-tenancyOcid-Value",
request_id="ocid1.test.oc1..<unique_ID>EXAMPLE-requestId-Value",
otp_code="EXAMPLE-otpCode-Value",
device_id="ocid1.test.oc1..<unique_ID>EXAMPLE-deviceId-Value",
status="SUCCESS",
user_id="ocid1.test.oc1..<unique_ID>EXAMPLE-userId-Value",
user_name="EXAMPLE-userName-Value",
display_name="EXAMPLE-displayName-Value",
message="EXAMPLE-message-Value",
type="SAML",
update_user_preference=False,
preference_type="MFA",
security_questions=[
oci.identity_domains.models.MyAuthenticationFactorValidatorSecurityQuestions(
id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
answer="EXAMPLE-answer-Value")],
name="EXAMPLE-name-Value",
platform="EXAMPLE-platform-Value",
location="EXAMPLE-location-Value",
trusted_token_id="ocid1.test.oc1..<unique_ID>EXAMPLE-trustedTokenId-Value",
kmsi_token_id="ocid1.test.oc1..<unique_ID>EXAMPLE-kmsiTokenId-Value",
policy_enabled_second_factors=["EXAMPLE--Value"],
create_trusted_agent=False,
create_kmsi_token=False,
is_acc_rec_enabled=True,
policy_trusted_frequency_mins=252,
third_party_factor=oci.identity_domains.models.MyAuthenticationFactorValidatorThirdPartyFactor(
third_party_vendor_name="EXAMPLE-thirdPartyVendorName-Value",
third_party_factor_type="EXAMPLE-thirdPartyFactorType-Value",
third_party_factor_id="ocid1.test.oc1..<unique_ID>EXAMPLE-thirdPartyFactorId-Value"),
additional_attributes=[
oci.identity_domains.models.MyAuthenticationFactorValidatorAdditionalAttributes(
name="EXAMPLE-name-Value",
value="EXAMPLE-value-Value")]),
opc_retry_token="EXAMPLE-opcRetryToken-Value")
# Get the data from response
print(create_my_authentication_factor_validator_response.data)