# 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
database_client = oci.database.DatabaseClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
create_autonomous_container_database_response = database_client.create_autonomous_container_database(
    create_autonomous_container_database_details=oci.database.models.CreateAutonomousContainerDatabaseDetails(
        display_name="EXAMPLE-displayName-Value",
        patch_model="RELEASE_UPDATE_REVISIONS",
        db_unique_name="EXAMPLE-dbUniqueName-Value",
        db_name="EXAMPLE-dbName-Value",
        service_level_agreement_type="STANDARD",
        autonomous_exadata_infrastructure_id="ocid1.test.oc1..<unique_ID>EXAMPLE-autonomousExadataInfrastructureId-Value",
        db_version="EXAMPLE-dbVersion-Value",
        database_software_image_id="ocid1.test.oc1..<unique_ID>EXAMPLE-databaseSoftwareImageId-Value",
        peer_autonomous_exadata_infrastructure_id="ocid1.test.oc1..<unique_ID>EXAMPLE-peerAutonomousExadataInfrastructureId-Value",
        peer_autonomous_container_database_display_name="EXAMPLE-peerAutonomousContainerDatabaseDisplayName-Value",
        protection_mode="MAXIMUM_AVAILABILITY",
        fast_start_fail_over_lag_limit_in_seconds=656,
        is_automatic_failover_enabled=True,
        peer_cloud_autonomous_vm_cluster_id="ocid1.test.oc1..<unique_ID>EXAMPLE-peerCloudAutonomousVmClusterId-Value",
        peer_autonomous_vm_cluster_id="ocid1.test.oc1..<unique_ID>EXAMPLE-peerAutonomousVmClusterId-Value",
        peer_autonomous_container_database_compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-peerAutonomousContainerDatabaseCompartmentId-Value",
        peer_autonomous_container_database_backup_config=oci.database.models.PeerAutonomousContainerDatabaseBackupConfig(
            backup_destination_details=[
                oci.database.models.BackupDestinationDetails(
                    type="OBJECT_STORE",
                    id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
                    vpc_user="EXAMPLE-vpcUser-Value",
                    vpc_password="EXAMPLE-vpcPassword-Value",
                    internet_proxy="EXAMPLE-internetProxy-Value",
                    dbrs_policy_id="ocid1.test.oc1..<unique_ID>EXAMPLE-dbrsPolicyId-Value")],
            recovery_window_in_days=10),
        peer_db_unique_name="EXAMPLE-peerDbUniqueName-Value",
        autonomous_vm_cluster_id="ocid1.test.oc1..<unique_ID>EXAMPLE-autonomousVmClusterId-Value",
        cloud_autonomous_vm_cluster_id="ocid1.test.oc1..<unique_ID>EXAMPLE-cloudAutonomousVmClusterId-Value",
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        maintenance_window_details=oci.database.models.MaintenanceWindow(
            preference="CUSTOM_PREFERENCE",
            patching_mode="NONROLLING",
            is_custom_action_timeout_enabled=True,
            custom_action_timeout_in_mins=40,
            is_monthly_patching_enabled=False,
            months=[
                            oci.database.models.Month(
                                name="MARCH")],
            weeks_of_month=[3],
            days_of_week=[
                oci.database.models.DayOfWeek(
                    name="TUESDAY")],
            hours_of_day=[1],
            lead_time_in_weeks=1,
            skip_ru=[
                True,
                False]),
        standby_maintenance_buffer_in_days=2,
        version_preference="LATEST_RELEASE_UPDATE",
        is_dst_file_update_enabled=True,
        freeform_tags={
            'EXAMPLE_KEY_SXbPb': 'EXAMPLE_VALUE_DhQAVvf2XTJcYqM8fFhm'},
        defined_tags={
            'EXAMPLE_KEY_rcKOU': {
                'EXAMPLE_KEY_ljDB6': 'EXAMPLE--Value'}},
        backup_config=oci.database.models.AutonomousContainerDatabaseBackupConfig(
            backup_destination_details=[
                oci.database.models.BackupDestinationDetails(
                    type="LOCAL",
                    id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
                    vpc_user="EXAMPLE-vpcUser-Value",
                    vpc_password="EXAMPLE-vpcPassword-Value",
                    internet_proxy="EXAMPLE-internetProxy-Value",
                    dbrs_policy_id="ocid1.test.oc1..<unique_ID>EXAMPLE-dbrsPolicyId-Value")],
            recovery_window_in_days=14),
        kms_key_id="ocid1.test.oc1..<unique_ID>EXAMPLE-kmsKeyId-Value",
        kms_key_version_id="ocid1.test.oc1..<unique_ID>EXAMPLE-kmsKeyVersionId-Value",
        vault_id="ocid1.test.oc1..<unique_ID>EXAMPLE-vaultId-Value",
        key_store_id="ocid1.test.oc1..<unique_ID>EXAMPLE-keyStoreId-Value",
        db_split_threshold=305,
        vm_failover_reservation=483,
        distribution_affinity="MAXIMUM_DISTRIBUTION",
        net_services_architecture="SHARED"),
    opc_retry_token="EXAMPLE-opcRetryToken-Value")

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