# 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_database_response = database_client.create_autonomous_database(
    create_autonomous_database_details=oci.database.models.CreateAutonomousDatabaseCloneDetails(
        source="DATABASE",
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        source_id="ocid1.test.oc1..<unique_ID>EXAMPLE-sourceId-Value",
        clone_type="METADATA",
        character_set="EXAMPLE-characterSet-Value",
        ncharacter_set="EXAMPLE-ncharacterSet-Value",
        db_name="EXAMPLE-dbName-Value",
        cpu_core_count=224,
        ocpu_count=5446.26,
        db_workload="APEX",
        data_storage_size_in_tbs=144,
        data_storage_size_in_gbs=591,
        is_free_tier=True,
        kms_key_id="ocid1.test.oc1..<unique_ID>EXAMPLE-kmsKeyId-Value",
        vault_id="ocid1.test.oc1..<unique_ID>EXAMPLE-vaultId-Value",
        admin_password="EXAMPLE-adminPassword-Value",
        display_name="EXAMPLE-displayName-Value",
        license_model="BRING_YOUR_OWN_LICENSE",
        is_preview_version_with_service_terms_accepted=False,
        is_auto_scaling_enabled=True,
        is_dedicated=False,
        autonomous_container_database_id="ocid1.test.oc1..<unique_ID>EXAMPLE-autonomousContainerDatabaseId-Value",
        is_access_control_enabled=True,
        whitelisted_ips=["EXAMPLE--Value"],
        are_primary_whitelisted_ips_used=True,
        standby_whitelisted_ips=["EXAMPLE--Value"],
        is_data_guard_enabled=True,
        is_local_data_guard_enabled=True,
        subnet_id="ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value",
        nsg_ids=["EXAMPLE--Value"],
        private_endpoint_label="EXAMPLE-privateEndpointLabel-Value",
        freeform_tags={
            'EXAMPLE_KEY_d0k3U': 'EXAMPLE_VALUE_akXlE19lz91M8QcUDmJD'},
        defined_tags={
            'EXAMPLE_KEY_rSm3f': {
                'EXAMPLE_KEY_Oow8A': 'EXAMPLE--Value'}},
        db_version="EXAMPLE-dbVersion-Value",
        customer_contacts=[
            oci.database.models.CustomerContact(
                email="EXAMPLE-email-Value")],
        is_mtls_connection_required=False,
        autonomous_maintenance_schedule_type="EARLY",
        scheduled_operations=[
            oci.database.models.ScheduledOperationDetails(
                day_of_week=oci.database.models.DayOfWeek(
                    name="THURSDAY"),
                scheduled_start_time="EXAMPLE-scheduledStartTime-Value",
                scheduled_stop_time="EXAMPLE-scheduledStopTime-Value")],
        is_auto_scaling_for_storage_enabled=False,
        max_cpu_core_count=438,
        database_edition="STANDARD_EDITION"),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="RECGZM9YYH0QGRQC29YP<unique_ID>")

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