Skip to content

create_autonomous_database

create_autonomous_database(
    *,
    config_overrides: Optional[odbClientConfig] = None,
    odb_network_id: Optional[ResourceIdOrArn] = None,
    display_name: Optional[ResourceDisplayName] = None,
    db_name: Optional[str] = None,
    admin_password: Optional[SensitiveString] = None,
    compute_count: Optional[float] = None,
    data_storage_size_in_t_bs: Optional[int] = None,
    data_storage_size_in_g_bs: Optional[int] = None,
    db_workload: Optional[DbWorkload] = None,
    is_auto_scaling_enabled: Optional[bool] = None,
    is_auto_scaling_for_storage_enabled: Optional[bool] = None,
    license_model: Optional[LicenseModel] = None,
    character_set: Optional[str] = None,
    ncharacter_set: Optional[str] = None,
    db_version: Optional[str] = None,
    database_edition: Optional[DatabaseEdition] = None,
    standby_allowlisted_ips_source: Optional[StandbyAllowlistedIpsSource] = None,
    autonomous_maintenance_schedule_type: Optional[
        AutonomousMaintenanceScheduleType
    ] = None,
    backup_retention_period_in_days: Optional[int] = None,
    byol_compute_count_limit: Optional[float] = None,
    cpu_core_count: Optional[int] = None,
    customer_contacts_to_send_to_oci: Optional[CustomerContacts] = None,
    private_endpoint_ip: Optional[str] = None,
    private_endpoint_label: Optional[str] = None,
    resource_pool_leader_id: Optional[ResourceIdOrArn] = None,
    resource_pool_summary: Optional[ResourcePoolSummary] = None,
    scheduled_operations: Optional[ScheduledOperationDetailsList] = None,
    standby_allowlisted_ips: Optional[StringList] = None,
    allowlisted_ips: Optional[StringList] = None,
    transportable_tablespace: Optional[TransportableTablespace] = None,
    is_backup_retention_locked: Optional[bool] = None,
    is_local_data_guard_enabled: Optional[bool] = None,
    is_mtls_connection_required: Optional[bool] = None,
    db_tools_details: Optional[DatabaseToolList] = None,
    source: Optional[SourceType] = None,
    source_configuration: Optional[SourceConfiguration] = None,
    encryption_key_provider: Optional[EncryptionKeyProviderInput] = None,
    encryption_key_configuration: Optional[EncryptionKeyConfigurationInput] = None,
    admin_password_source: Optional[AdminPasswordSource] = None,
    admin_password_source_configuration: Optional[
        AdminPasswordSourceConfigurationInput
    ] = None,
    client_token: Optional[GeneralInputString] = None,
    tags: Optional[RequestTagMap] = None,
) -> CreateAutonomousDatabaseOutput

Creates a new Autonomous Database.

Parameters:

  • odb_network_id (Optional[ResourceIdOrArn], default: None ) –

    The unique identifier of the ODB network to be used for the Autonomous Database.

  • display_name (Optional[ResourceDisplayName], default: None ) –

    The user-friendly name for the Autonomous Database. The name does not have to be unique.

  • db_name (Optional[str], default: None ) –

    The name of the Autonomous Database. The name must begin with an alphabetic character and can contain a maximum of 30 alphanumeric characters. Special characters are not permitted. The name must be unique in the Amazon Web Services account.

  • admin_password (Optional[SensitiveString], default: None ) –

    The password for the ADMIN user of the Autonomous Database.

  • compute_count (Optional[float], default: None ) –

    The compute capacity, in number of Elastic CPUs (ECPUs) or Oracle CPUs (OCPUs), to assign to the Autonomous Database.

  • data_storage_size_in_t_bs (Optional[int], default: None ) –

    The size, in terabytes (TB), of the data volume to allocate for the Autonomous Database.

  • data_storage_size_in_g_bs (Optional[int], default: None ) –

    The size, in gigabytes (GB), of the data volume to allocate for the Autonomous Database.

  • db_workload (Optional[DbWorkload], default: None ) –

    The intended use of the Autonomous Database, such as transaction processing, data warehouse, JSON database, or APEX.

  • is_auto_scaling_enabled (Optional[bool], default: None ) –

    Specifies whether to enable automatic scaling of the compute resources for the Autonomous Database.

  • is_auto_scaling_for_storage_enabled (Optional[bool], default: None ) –

    Specifies whether to enable automatic scaling of the storage for the Autonomous Database.

  • license_model (Optional[LicenseModel], default: None ) –

    The Oracle license model to apply to the Autonomous Database.

  • character_set (Optional[str], default: None ) –

    The character set to use for the Autonomous Database.

  • ncharacter_set (Optional[str], default: None ) –

    The national character set to use for the Autonomous Database.

  • db_version (Optional[str], default: None ) –

    The Oracle Database software version to use for the Autonomous Database.

  • database_edition (Optional[DatabaseEdition], default: None ) –

    The Oracle Database edition to apply to the Autonomous Database.

  • standby_allowlisted_ips_source (Optional[StandbyAllowlistedIpsSource], default: None ) –

    The source of the allowlisted IP addresses for the standby Autonomous Database.

  • autonomous_maintenance_schedule_type (Optional[AutonomousMaintenanceScheduleType], default: None ) –

    The maintenance schedule type for the Autonomous Database.

  • backup_retention_period_in_days (Optional[int], default: None ) –

    The retention period, in days, for automatic backups of the Autonomous Database.

  • byol_compute_count_limit (Optional[float], default: None ) –

    The maximum number of compute resources that you can allocate to the Autonomous Database under the bring-your-own-license (BYOL) model.

  • cpu_core_count (Optional[int], default: None ) –

    The number of CPU cores to allocate to the Autonomous Database.

  • customer_contacts_to_send_to_oci (Optional[CustomerContacts], default: None ) –

    The list of customer contacts to receive operational notifications from Oracle Cloud Infrastructure (OCI) for the Autonomous Database.

  • private_endpoint_ip (Optional[str], default: None ) –

    The private endpoint IP address for the Autonomous Database.

  • private_endpoint_label (Optional[str], default: None ) –

    The private endpoint label for the Autonomous Database.

  • resource_pool_leader_id (Optional[ResourceIdOrArn], default: None ) –

    The unique identifier of the resource pool leader Autonomous Database.

  • resource_pool_summary (Optional[ResourcePoolSummary], default: None ) –

    The configuration of the resource pool for the Autonomous Database.

  • scheduled_operations (Optional[ScheduledOperationDetailsList], default: None ) –

    The list of scheduled start and stop times for the Autonomous Database.

  • standby_allowlisted_ips (Optional[StringList], default: None ) –

    The list of IP addresses that are allowed to access the standby Autonomous Database.

  • allowlisted_ips (Optional[StringList], default: None ) –

    The list of IP addresses that are allowed to access the Autonomous Database.

  • transportable_tablespace (Optional[TransportableTablespace], default: None ) –

    The transportable tablespace configuration to use when creating the Autonomous Database.

  • is_backup_retention_locked (Optional[bool], default: None ) –

    Specifies whether to lock the backup retention period of the Autonomous Database to prevent it from being shortened.

  • is_local_data_guard_enabled (Optional[bool], default: None ) –

    Specifies whether to enable local Oracle Data Guard for the Autonomous Database.

  • is_mtls_connection_required (Optional[bool], default: None ) –

    Specifies whether mutual TLS (mTLS) authentication is required to connect to the Autonomous Database.

  • db_tools_details (Optional[DatabaseToolList], default: None ) –

    The list of database management tools to enable for the Autonomous Database.

  • source (Optional[SourceType], default: None ) –

    The source from which to create the Autonomous Database, such as a clone, backup, or cross-Region copy.

  • source_configuration (Optional[SourceConfiguration], default: None ) –

    The configuration details for the source used to create the Autonomous Database.

  • encryption_key_provider (Optional[EncryptionKeyProviderInput], default: None ) –

    The provider of the encryption key to use for the Autonomous Database.

  • encryption_key_configuration (Optional[EncryptionKeyConfigurationInput], default: None ) –

    The configuration of the encryption key to use for the Autonomous Database.

  • admin_password_source (Optional[AdminPasswordSource], default: None ) –

    The source of the admin password for the Autonomous Database. When set to CUSTOMER_MANAGED_AWS_SECRET, the admin password is retrieved from an Amazon Web Services Secrets Manager secret.

  • admin_password_source_configuration (Optional[AdminPasswordSourceConfigurationInput], default: None ) –

    The configuration of the admin password source for the Autonomous Database.

  • client_token (Optional[GeneralInputString], default: None ) –

    A client-provided token to ensure the idempotency of the request.

  • tags (Optional[RequestTagMap], default: None ) –

    The list of resource tags to apply to the Autonomous Database. Each tag is a key-value pair with no predefined name, type, or namespace.

Raises:

  • AccessDeniedException –

    You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.

  • ConflictException –

    Occurs when a conflict with the current status of your resource. Fix any inconsistencies with your resource and try again.

  • InternalServerException –

    Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.

  • ResourceNotFoundException –

    The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.

  • ServiceQuotaExceededException –

    You have exceeded the service quota.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request has failed validation because it is missing required fields or has invalid inputs.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_odb/_services/odb.py
def create_autonomous_database(
    self,
    *,
    config_overrides: Optional[odbClientConfig] = None,
    odb_network_id: Optional[
        "capo_odb.types.resource_id_or_arn.ResourceIdOrArn"
    ] = None,
    display_name: Optional[
        "capo_odb.types.resource_display_name.ResourceDisplayName"
    ] = None,
    db_name: Optional[str] = None,
    admin_password: Optional[
        "capo_odb.types.sensitive_string.SensitiveString"
    ] = None,
    compute_count: Optional[float] = None,
    data_storage_size_in_t_bs: Optional[int] = None,
    data_storage_size_in_g_bs: Optional[int] = None,
    db_workload: Optional["capo_odb.types.db_workload.DbWorkload"] = None,
    is_auto_scaling_enabled: Optional[bool] = None,
    is_auto_scaling_for_storage_enabled: Optional[bool] = None,
    license_model: Optional["capo_odb.types.license_model.LicenseModel"] = None,
    character_set: Optional[str] = None,
    ncharacter_set: Optional[str] = None,
    db_version: Optional[str] = None,
    database_edition: Optional[
        "capo_odb.types.database_edition.DatabaseEdition"
    ] = None,
    standby_allowlisted_ips_source: Optional[
        "capo_odb.types.standby_allowlisted_ips_source.StandbyAllowlistedIpsSource"
    ] = None,
    autonomous_maintenance_schedule_type: Optional[
        "capo_odb.types.autonomous_maintenance_schedule_type.AutonomousMaintenanceScheduleType"
    ] = None,
    backup_retention_period_in_days: Optional[int] = None,
    byol_compute_count_limit: Optional[float] = None,
    cpu_core_count: Optional[int] = None,
    customer_contacts_to_send_to_oci: Optional[
        "capo_odb.types.customer_contacts.CustomerContacts"
    ] = None,
    private_endpoint_ip: Optional[str] = None,
    private_endpoint_label: Optional[str] = None,
    resource_pool_leader_id: Optional[
        "capo_odb.types.resource_id_or_arn.ResourceIdOrArn"
    ] = None,
    resource_pool_summary: Optional[
        "capo_odb.types.resource_pool_summary.ResourcePoolSummary"
    ] = None,
    scheduled_operations: Optional[
        "capo_odb.types.scheduled_operation_details_list.ScheduledOperationDetailsList"
    ] = None,
    standby_allowlisted_ips: Optional[
        "capo_odb.types.string_list.StringList"
    ] = None,
    allowlisted_ips: Optional["capo_odb.types.string_list.StringList"] = None,
    transportable_tablespace: Optional[
        "capo_odb.types.transportable_tablespace.TransportableTablespace"
    ] = None,
    is_backup_retention_locked: Optional[bool] = None,
    is_local_data_guard_enabled: Optional[bool] = None,
    is_mtls_connection_required: Optional[bool] = None,
    db_tools_details: Optional[
        "capo_odb.types.database_tool_list.DatabaseToolList"
    ] = None,
    source: Optional["capo_odb.types.source_type.SourceType"] = None,
    source_configuration: Optional[
        "capo_odb.types.source_configuration.SourceConfiguration"
    ] = None,
    encryption_key_provider: Optional[
        "capo_odb.types.encryption_key_provider_input.EncryptionKeyProviderInput"
    ] = None,
    encryption_key_configuration: Optional[
        "capo_odb.types.encryption_key_configuration_input.EncryptionKeyConfigurationInput"
    ] = None,
    admin_password_source: Optional[
        "capo_odb.types.admin_password_source.AdminPasswordSource"
    ] = None,
    admin_password_source_configuration: Optional[
        "capo_odb.types.admin_password_source_configuration_input.AdminPasswordSourceConfigurationInput"
    ] = None,
    client_token: Optional[
        "capo_odb.types.general_input_string.GeneralInputString"
    ] = None,
    tags: Optional["capo_odb.types.request_tag_map.RequestTagMap"] = None,
) -> "capo_odb.types.create_autonomous_database_output.CreateAutonomousDatabaseOutput":
    """<p>Creates a new Autonomous Database.</p>

    Args:
        odb_network_id: <p>The unique identifier of the ODB network to be used for the Autonomous Database.</p>
        display_name: <p>The user-friendly name for the Autonomous Database. The name does not have to be unique.</p>
        db_name: <p>The name of the Autonomous Database. The name must begin with an alphabetic character and can contain a maximum of 30 alphanumeric characters. Special characters are not permitted. The name must be unique in the Amazon Web Services account.</p>
        admin_password: <p>The password for the <code>ADMIN</code> user of the Autonomous Database.</p>
        compute_count: <p>The compute capacity, in number of Elastic CPUs (ECPUs) or Oracle CPUs (OCPUs), to assign to the Autonomous Database.</p>
        data_storage_size_in_t_bs: <p>The size, in terabytes (TB), of the data volume to allocate for the Autonomous Database.</p>
        data_storage_size_in_g_bs: <p>The size, in gigabytes (GB), of the data volume to allocate for the Autonomous Database.</p>
        db_workload: <p>The intended use of the Autonomous Database, such as transaction processing, data warehouse, JSON database, or APEX.</p>
        is_auto_scaling_enabled: <p>Specifies whether to enable automatic scaling of the compute resources for the Autonomous Database.</p>
        is_auto_scaling_for_storage_enabled: <p>Specifies whether to enable automatic scaling of the storage for the Autonomous Database.</p>
        license_model: <p>The Oracle license model to apply to the Autonomous Database.</p>
        character_set: <p>The character set to use for the Autonomous Database.</p>
        ncharacter_set: <p>The national character set to use for the Autonomous Database.</p>
        db_version: <p>The Oracle Database software version to use for the Autonomous Database.</p>
        database_edition: <p>The Oracle Database edition to apply to the Autonomous Database.</p>
        standby_allowlisted_ips_source: <p>The source of the allowlisted IP addresses for the standby Autonomous Database.</p>
        autonomous_maintenance_schedule_type: <p>The maintenance schedule type for the Autonomous Database.</p>
        backup_retention_period_in_days: <p>The retention period, in days, for automatic backups of the Autonomous Database.</p>
        byol_compute_count_limit: <p>The maximum number of compute resources that you can allocate to the Autonomous Database under the bring-your-own-license (BYOL) model.</p>
        cpu_core_count: <p>The number of CPU cores to allocate to the Autonomous Database.</p>
        customer_contacts_to_send_to_oci: <p>The list of customer contacts to receive operational notifications from Oracle Cloud Infrastructure (OCI) for the Autonomous Database.</p>
        private_endpoint_ip: <p>The private endpoint IP address for the Autonomous Database.</p>
        private_endpoint_label: <p>The private endpoint label for the Autonomous Database.</p>
        resource_pool_leader_id: <p>The unique identifier of the resource pool leader Autonomous Database.</p>
        resource_pool_summary: <p>The configuration of the resource pool for the Autonomous Database.</p>
        scheduled_operations: <p>The list of scheduled start and stop times for the Autonomous Database.</p>
        standby_allowlisted_ips: <p>The list of IP addresses that are allowed to access the standby Autonomous Database.</p>
        allowlisted_ips: <p>The list of IP addresses that are allowed to access the Autonomous Database.</p>
        transportable_tablespace: <p>The transportable tablespace configuration to use when creating the Autonomous Database.</p>
        is_backup_retention_locked: <p>Specifies whether to lock the backup retention period of the Autonomous Database to prevent it from being shortened.</p>
        is_local_data_guard_enabled: <p>Specifies whether to enable local Oracle Data Guard for the Autonomous Database.</p>
        is_mtls_connection_required: <p>Specifies whether mutual TLS (mTLS) authentication is required to connect to the Autonomous Database.</p>
        db_tools_details: <p>The list of database management tools to enable for the Autonomous Database.</p>
        source: <p>The source from which to create the Autonomous Database, such as a clone, backup, or cross-Region copy.</p>
        source_configuration: <p>The configuration details for the source used to create the Autonomous Database.</p>
        encryption_key_provider: <p>The provider of the encryption key to use for the Autonomous Database.</p>
        encryption_key_configuration: <p>The configuration of the encryption key to use for the Autonomous Database.</p>
        admin_password_source: <p>The source of the admin password for the Autonomous Database. When set to <code>CUSTOMER_MANAGED_AWS_SECRET</code>, the admin password is retrieved from an Amazon Web Services Secrets Manager secret.</p>
        admin_password_source_configuration: <p>The configuration of the admin password source for the Autonomous Database.</p>
        client_token: <p>A client-provided token to ensure the idempotency of the request.</p>
        tags: <p>The list of resource tags to apply to the Autonomous Database. Each tag is a key-value pair with no predefined name, type, or namespace.</p>

    Raises:
        capo_odb.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action. Make sure you have the required permissions and try again.</p>
        capo_odb.errors.conflict_exception.ConflictException: <p>Occurs when a conflict with the current status of your resource. Fix any inconsistencies with your resource and try again.</p>
        capo_odb.errors.internal_server_exception.InternalServerException: <p>Occurs when there is an internal failure in the Oracle Database@Amazon Web Services service. Wait and try again.</p>
        capo_odb.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.</p>
        capo_odb.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>You have exceeded the service quota.</p>
        capo_odb.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_odb.errors.validation_exception.ValidationException: <p>The request has failed validation because it is missing required fields or has invalid inputs.</p>
        capo_odb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_odb.types.create_autonomous_database_input.CreateAutonomousDatabaseInput]",
    ) -> OperationResponse[
        "capo_odb.types.create_autonomous_database_output.CreateAutonomousDatabaseOutput"
    ]:
        import capo_odb._operations.odb.create_autonomous_database

        output, http_response = (
            capo_odb._operations.odb.create_autonomous_database.create_autonomous_database(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_odb.types.create_autonomous_database_input.CreateAutonomousDatabaseInput",
    ) -> dict[str, Any]:
        import capo_odb.types.create_autonomous_database_input

        return capo_odb.types.create_autonomous_database_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateAutonomousDatabase", redact_input=_redact_input),
    )
    input_: capo_odb.types.create_autonomous_database_input.CreateAutonomousDatabaseInput = {}
    if odb_network_id is not None:
        input_["odb_network_id"] = odb_network_id
    if display_name is not None:
        input_["display_name"] = display_name
    if db_name is not None:
        input_["db_name"] = db_name
    if admin_password is not None:
        input_["admin_password"] = admin_password
    if compute_count is not None:
        input_["compute_count"] = compute_count
    if data_storage_size_in_t_bs is not None:
        input_["data_storage_size_in_t_bs"] = data_storage_size_in_t_bs
    if data_storage_size_in_g_bs is not None:
        input_["data_storage_size_in_g_bs"] = data_storage_size_in_g_bs
    if db_workload is not None:
        input_["db_workload"] = db_workload
    if is_auto_scaling_enabled is not None:
        input_["is_auto_scaling_enabled"] = is_auto_scaling_enabled
    if is_auto_scaling_for_storage_enabled is not None:
        input_["is_auto_scaling_for_storage_enabled"] = (
            is_auto_scaling_for_storage_enabled
        )
    if license_model is not None:
        input_["license_model"] = license_model
    if character_set is not None:
        input_["character_set"] = character_set
    if ncharacter_set is not None:
        input_["ncharacter_set"] = ncharacter_set
    if db_version is not None:
        input_["db_version"] = db_version
    if database_edition is not None:
        input_["database_edition"] = database_edition
    if standby_allowlisted_ips_source is not None:
        input_["standby_allowlisted_ips_source"] = standby_allowlisted_ips_source
    if autonomous_maintenance_schedule_type is not None:
        input_["autonomous_maintenance_schedule_type"] = (
            autonomous_maintenance_schedule_type
        )
    if backup_retention_period_in_days is not None:
        input_["backup_retention_period_in_days"] = backup_retention_period_in_days
    if byol_compute_count_limit is not None:
        input_["byol_compute_count_limit"] = byol_compute_count_limit
    if cpu_core_count is not None:
        input_["cpu_core_count"] = cpu_core_count
    if customer_contacts_to_send_to_oci is not None:
        input_["customer_contacts_to_send_to_oci"] = (
            customer_contacts_to_send_to_oci
        )
    if private_endpoint_ip is not None:
        input_["private_endpoint_ip"] = private_endpoint_ip
    if private_endpoint_label is not None:
        input_["private_endpoint_label"] = private_endpoint_label
    if resource_pool_leader_id is not None:
        input_["resource_pool_leader_id"] = resource_pool_leader_id
    if resource_pool_summary is not None:
        input_["resource_pool_summary"] = resource_pool_summary
    if scheduled_operations is not None:
        input_["scheduled_operations"] = scheduled_operations
    if standby_allowlisted_ips is not None:
        input_["standby_allowlisted_ips"] = standby_allowlisted_ips
    if allowlisted_ips is not None:
        input_["allowlisted_ips"] = allowlisted_ips
    if transportable_tablespace is not None:
        input_["transportable_tablespace"] = transportable_tablespace
    if is_backup_retention_locked is not None:
        input_["is_backup_retention_locked"] = is_backup_retention_locked
    if is_local_data_guard_enabled is not None:
        input_["is_local_data_guard_enabled"] = is_local_data_guard_enabled
    if is_mtls_connection_required is not None:
        input_["is_mtls_connection_required"] = is_mtls_connection_required
    if db_tools_details is not None:
        input_["db_tools_details"] = db_tools_details
    if source is not None:
        input_["source"] = source
    if source_configuration is not None:
        input_["source_configuration"] = source_configuration
    if encryption_key_provider is not None:
        input_["encryption_key_provider"] = encryption_key_provider
    if encryption_key_configuration is not None:
        input_["encryption_key_configuration"] = encryption_key_configuration
    if admin_password_source is not None:
        input_["admin_password_source"] = admin_password_source
    if admin_password_source_configuration is not None:
        input_["admin_password_source_configuration"] = (
            admin_password_source_configuration
        )
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output