# 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_self_registration_profile_response = identity_domains_client.create_self_registration_profile(
    authorization="EXAMPLE-authorization-Value",
    resource_type_schema_version="EXAMPLE-resourceTypeSchemaVersion-Value",
    attributes="EXAMPLE-attributes-Value",
    attribute_sets=["all"],
    self_registration_profile=oci.identity_domains.models.SelfRegistrationProfile(
        schemas=["EXAMPLE--Value"],
        name="EXAMPLE-name-Value",
        activation_email_required=True,
        number_of_days_redirect_url_is_valid=52,
        show_on_login_page=True,
        redirect_url="EXAMPLE-redirectUrl-Value",
        consent_text_present=True,
        display_name=[
            oci.identity_domains.models.SelfRegistrationProfileDisplayName(
                locale="EXAMPLE-locale-Value",
                value="EXAMPLE-value-Value",
                default=True)],
        email_template=oci.identity_domains.models.SelfRegistrationProfileEmailTemplate(
            value="EXAMPLE-value-Value",
            display="EXAMPLE-display-Value",
            ref=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="User",
            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=["delete"],
        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",
        active=False,
        allowed_email_domains=["EXAMPLE--Value"],
        disallowed_email_domains=["EXAMPLE--Value"],
        header_logo="EXAMPLE-headerLogo-Value",
        footer_logo="EXAMPLE-footerLogo-Value",
        after_submit_text=[
            oci.identity_domains.models.SelfRegistrationProfileAfterSubmitText(
                locale="EXAMPLE-locale-Value",
                value="EXAMPLE-value-Value",
                default=True)],
        user_attributes=[
            oci.identity_domains.models.SelfRegistrationProfileUserAttributes(
                value="EXAMPLE-value-Value",
                seq_number=570,
                fully_qualified_attribute_name="EXAMPLE-fullyQualifiedAttributeName-Value",
                deletable=True,
                metadata="EXAMPLE-metadata-Value")],
        default_groups=[
            oci.identity_domains.models.SelfRegistrationProfileDefaultGroups(
                value="EXAMPLE-value-Value",
                ref=None,
                display="EXAMPLE-display-Value")],
        header_text=[
            oci.identity_domains.models.SelfRegistrationProfileHeaderText(
                locale="EXAMPLE-locale-Value",
                value="EXAMPLE-value-Value",
                default=True)],
        footer_text=[
            oci.identity_domains.models.SelfRegistrationProfileFooterText(
                locale="EXAMPLE-locale-Value",
                value="EXAMPLE-value-Value",
                default=False)],
        consent_text=[
            oci.identity_domains.models.SelfRegistrationProfileConsentText(
                locale="EXAMPLE-locale-Value",
                value="EXAMPLE-value-Value",
                default=False)]),
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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