# 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
put_setting_response = identity_domains_client.put_setting(
    setting_id="ocid1.test.oc1..<unique_ID>EXAMPLE-settingId-Value",
    authorization="EXAMPLE-authorization-Value",
    resource_type_schema_version="EXAMPLE-resourceTypeSchemaVersion-Value",
    attributes="EXAMPLE-attributes-Value",
    attribute_sets=["default"],
    setting=oci.identity_domains.models.Setting(
        schemas=["EXAMPLE--Value"],
        csr_access="none",
        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="User",
            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=True,
        idcs_last_upgraded_in_release="EXAMPLE-idcsLastUpgradedInRelease-Value",
        domain_ocid="EXAMPLE-domainOcid-Value",
        compartment_ocid="EXAMPLE-compartmentOcid-Value",
        tenancy_ocid="EXAMPLE-tenancyOcid-Value",
        external_id="ocid1.test.oc1..<unique_ID>EXAMPLE-externalId-Value",
        contact_emails=["EXAMPLE--Value"],
        custom_branding=True,
        preferred_language="EXAMPLE-preferredLanguage-Value",
        timezone="EXAMPLE-timezone-Value",
        diagnostic_record_for_search_identifies_returned_resources=True,
        re_auth_when_changing_my_authentication_factors=False,
        re_auth_factor=["password"],
        locale="EXAMPLE-locale-Value",
        signing_cert_public_access=False,
        sub_mapping_attr="EXAMPLE-subMappingAttr-Value",
        account_always_trust_scope=True,
        default_trust_scope="Tags",
        issuer="EXAMPLE-issuer-Value",
        prev_issuer="EXAMPLE-prevIssuer-Value",
        diagnostic_level=811,
        diagnostic_tracing_upto="EXAMPLE-diagnosticTracingUpto-Value",
        allowed_domains=["EXAMPLE--Value"],
        enable_terms_of_use=True,
        terms_of_use_url="EXAMPLE-termsOfUseUrl-Value",
        privacy_policy_url="EXAMPLE-privacyPolicyUrl-Value",
        migration_status="EXAMPLE-migrationStatus-Value",
        on_premises_provisioning=False,
        allowed_forgot_password_flow_return_urls=["EXAMPLE--Value"],
        allowed_notification_redirect_urls=["EXAMPLE--Value"],
        audit_event_retention_period=583,
        is_hosted_page=False,
        custom_html_location="EXAMPLE-customHtmlLocation-Value",
        custom_css_location="EXAMPLE-customCssLocation-Value",
        custom_translation="EXAMPLE-customTranslation-Value",
        cloud_account_name="EXAMPLE-cloudAccountName-Value",
        cloud_migration_url_enabled=True,
        cloud_migration_custom_url="EXAMPLE-cloudMigrationCustomUrl-Value",
        service_admin_cannot_list_other_users=False,
        max_no_of_app_role_members_to_return=948,
        max_no_of_app_cmva_to_return=171,
        iam_upst_session_expiry=528,
        cloud_gate_cors_settings=oci.identity_domains.models.SettingsCloudGateCorsSettings(
            cloud_gate_cors_allow_null_origin=True,
            cloud_gate_cors_enabled=False,
            cloud_gate_cors_allowed_origins=["EXAMPLE--Value"],
            cloud_gate_cors_max_age=695,
            cloud_gate_cors_exposed_headers=["EXAMPLE--Value"]),
        certificate_validation=oci.identity_domains.models.SettingsCertificateValidation(
            crl_enabled=False,
            crl_check_on_ocsp_failure_enabled=False,
            crl_location="EXAMPLE-crlLocation-Value",
            crl_refresh_interval=959,
            ocsp_enabled=True,
            ocsp_unknown_response_status_allowed=False,
            ocsp_responder_url="EXAMPLE-ocspResponderURL-Value",
            ocsp_settings_responder_url_preferred=False,
            ocsp_timeout_duration=839,
            ocsp_signing_certificate_alias="EXAMPLE-ocspSigningCertificateAlias-Value"),
        tenant_custom_claims=[
            oci.identity_domains.models.SettingsTenantCustomClaims(
                name="EXAMPLE-name-Value",
                value="EXAMPLE-value-Value",
                mode="never",
                expression=False,
                all_scopes=False,
                token_type="BOTH",
                scopes=["EXAMPLE--Value"])],
        purge_configs=[
            oci.identity_domains.models.SettingsPurgeConfigs(
                resource_name="EXAMPLE-resourceName-Value",
                retention_period=749)],
        default_company_names=[
            oci.identity_domains.models.SettingsDefaultCompanyNames(
                value="EXAMPLE-value-Value",
                locale="EXAMPLE-locale-Value")],
        default_login_texts=[
            oci.identity_domains.models.SettingsDefaultLoginTexts(
                value="EXAMPLE-value-Value",
                locale="EXAMPLE-locale-Value")],
        default_images=[
            oci.identity_domains.models.SettingsDefaultImages(
                value="EXAMPLE-value-Value",
                type="EXAMPLE-type-Value",
                display="EXAMPLE-display-Value")],
        company_names=[
            oci.identity_domains.models.SettingsCompanyNames(
                value="EXAMPLE-value-Value",
                locale="EXAMPLE-locale-Value")],
        login_texts=[
            oci.identity_domains.models.SettingsLoginTexts(
                value="EXAMPLE-value-Value",
                locale="EXAMPLE-locale-Value")],
        images=[
            oci.identity_domains.models.SettingsImages(
                value="EXAMPLE-value-Value",
                type="EXAMPLE-type-Value",
                display="EXAMPLE-display-Value")]),
    if_match="EXAMPLE-ifMatch-Value",
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

# Get the data from response
print(put_setting_response.data)