# 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.CreateAutonomousDatabaseFromBackupDetails(
        source="BACKUP_FROM_ID",
        compartment_id="ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
        db_name="EXAMPLE-dbName-Value",
        cpu_core_count=135,
        autonomous_database_backup_id="ocid1.test.oc1..<unique_ID>EXAMPLE-autonomousDatabaseBackupId-Value",
        clone_type="METADATA",
        db_workload="APEX",
        data_storage_size_in_tbs=588,
        is_free_tier=False,
        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=True,
        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=False,
        standby_whitelisted_ips=["EXAMPLE--Value"],
        is_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_YbBBy': 'EXAMPLE_VALUE_U2cdQeCwpaTfMxd2SnFH'},
        defined_tags={
            'EXAMPLE_KEY_6r2cw': {
                'EXAMPLE_KEY_TG6Cb': 'EXAMPLE--Value'}},
        db_version="EXAMPLE-dbVersion-Value"),
    opc_retry_token="EXAMPLE-opcRetryToken-Value",
    opc_request_id="2DMPRGZYLBRWJ3BKZELX/OpcRequestIdExample/<unique_ID>")

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