odb / Client / create_autonomous_database

create_autonomous_database

odb.Client.create_autonomous_database(**kwargs)

Creates a new Autonomous Database.

See also: AWS API Documentation

Request Syntax

response = client.create_autonomous_database(
    odbNetworkId='string',
    displayName='string',
    dbName='string',
    adminPassword='string',
    computeCount=123.0,
    dataStorageSizeInTBs=123,
    dataStorageSizeInGBs=123,
    dbWorkload='OLTP'|'AJD'|'APEX'|'LH',
    isAutoScalingEnabled=True|False,
    isAutoScalingForStorageEnabled=True|False,
    licenseModel='BRING_YOUR_OWN_LICENSE'|'LICENSE_INCLUDED',
    characterSet='string',
    ncharacterSet='string',
    dbVersion='string',
    databaseEdition='STANDARD_EDITION'|'ENTERPRISE_EDITION',
    standbyAllowlistedIpsSource='PRIMARY'|'SEPARATE'|'NOT_APPLICABLE',
    autonomousMaintenanceScheduleType='EARLY'|'REGULAR',
    backupRetentionPeriodInDays=123,
    byolComputeCountLimit=123.0,
    cpuCoreCount=123,
    customerContactsToSendToOCI=[
        {
            'email': 'string'
        },
    ],
    privateEndpointIp='string',
    privateEndpointLabel='string',
    resourcePoolLeaderId='string',
    resourcePoolSummary={
        'isDisabled': True|False,
        'poolSize': 123,
        'poolStorageSizeInTBs': 123,
        'availableStorageCapacityInTBs': 123.0,
        'totalComputeCapacity': 123,
        'availableComputeCapacity': 123
    },
    scheduledOperations=[
        {
            'dayOfWeek': {
                'name': 'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY'
            },
            'scheduledStartTime': 'string',
            'scheduledStopTime': 'string'
        },
    ],
    standbyAllowlistedIps=[
        'string',
    ],
    allowlistedIps=[
        'string',
    ],
    transportableTablespace={
        'ttsBundleUrl': 'string'
    },
    isBackupRetentionLocked=True|False,
    isLocalDataGuardEnabled=True|False,
    isMtlsConnectionRequired=True|False,
    dbToolsDetails=[
        {
            'isEnabled': True|False,
            'name': 'string',
            'computeCount': 123.0,
            'maxIdleTimeInMinutes': 123
        },
    ],
    source='NONE'|'DATABASE'|'BACKUP_FROM_ID'|'BACKUP_FROM_TIMESTAMP'|'CROSS_REGION_DATAGUARD'|'CROSS_REGION_DISASTER_RECOVERY'|'CLONE_TO_REFRESHABLE',
    sourceConfiguration={
        'databaseClone': {
            'sourceAutonomousDatabaseId': 'string',
            'cloneType': 'FULL'|'METADATA'|'PARTIAL'
        },
        'restoreFromBackup': {
            'autonomousDatabaseBackupId': 'string',
            'cloneType': 'FULL'|'METADATA'|'PARTIAL',
            'cloneTableSpaceList': [
                123,
            ]
        },
        'pointInTimeRestore': {
            'sourceAutonomousDatabaseId': 'string',
            'cloneType': 'FULL'|'METADATA'|'PARTIAL',
            'timestamp': datetime(2015, 1, 1),
            'useLatestAvailableBackupTimestamp': True|False,
            'cloneTableSpaceList': [
                123,
            ]
        },
        'crossRegionDataGuard': {
            'sourceAutonomousDatabaseArn': 'string'
        },
        'crossRegionDisasterRecovery': {
            'sourceAutonomousDatabaseArn': 'string',
            'remoteDisasterRecoveryType': 'ADG'|'BACKUP_BASED',
            'isReplicateAutomaticBackups': True|False
        },
        'cloneToRefreshable': {
            'sourceAutonomousDatabaseId': 'string',
            'refreshableMode': 'AUTOMATIC'|'MANUAL',
            'autoRefreshFrequencyInSeconds': 123,
            'autoRefreshPointLagInSeconds': 123,
            'timeOfAutoRefreshStart': datetime(2015, 1, 1),
            'openMode': 'READ_ONLY'|'READ_WRITE',
            'cloneType': 'FULL'|'METADATA'|'PARTIAL'
        }
    },
    encryptionKeyProvider='ORACLE_MANAGED'|'AWS_KMS',
    encryptionKeyConfiguration={
        'awsEncryptionKey': {
            'iamRoleArn': 'string',
            'externalIdType': 'database_ocid'|'compartment_ocid'|'tenant_ocid',
            'kmsKeyId': 'string'
        }
    },
    clientToken='string',
    tags={
        'string': 'string'
    }
)
Parameters:
  • odbNetworkId (string) – The unique identifier of the ODB network to be used for the Autonomous Database.

  • displayName (string) – The user-friendly name for the Autonomous Database. The name does not have to be unique.

  • dbName (string) – 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.

  • adminPassword (string) – The password for the ADMIN user of the Autonomous Database.

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

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

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

  • dbWorkload (string) – The intended use of the Autonomous Database, such as transaction processing, data warehouse, JSON database, or APEX.

  • isAutoScalingEnabled (boolean) – Specifies whether to enable automatic scaling of the compute resources for the Autonomous Database.

  • isAutoScalingForStorageEnabled (boolean) – Specifies whether to enable automatic scaling of the storage for the Autonomous Database.

  • licenseModel (string) – The Oracle license model to apply to the Autonomous Database.

  • characterSet (string) – The character set to use for the Autonomous Database.

  • ncharacterSet (string) – The national character set to use for the Autonomous Database.

  • dbVersion (string) – The Oracle Database software version to use for the Autonomous Database.

  • databaseEdition (string) – The Oracle Database edition to apply to the Autonomous Database.

  • standbyAllowlistedIpsSource (string) – The source of the allowlisted IP addresses for the standby Autonomous Database.

  • autonomousMaintenanceScheduleType (string) – The maintenance schedule type for the Autonomous Database.

  • backupRetentionPeriodInDays (integer) – The retention period, in days, for automatic backups of the Autonomous Database.

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

  • cpuCoreCount (integer) – The number of CPU cores to allocate to the Autonomous Database.

  • customerContactsToSendToOCI (list) –

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

    • (dict) –

      A contact to receive notification from Oracle about maintenance updates for a specific Exadata infrastructure.

      • email (string) –

        The email address of the contact.

  • privateEndpointIp (string) – The private endpoint IP address for the Autonomous Database.

  • privateEndpointLabel (string) – The private endpoint label for the Autonomous Database.

  • resourcePoolLeaderId (string) – The unique identifier of the resource pool leader Autonomous Database.

  • resourcePoolSummary (dict) –

    The configuration of the resource pool for the Autonomous Database.

    • isDisabled (boolean) –

      Indicates whether the resource pool is disabled.

    • poolSize (integer) –

      The number of Autonomous Databases that the resource pool can contain.

    • poolStorageSizeInTBs (integer) –

      The total storage size of the resource pool, in terabytes (TB).

    • availableStorageCapacityInTBs (float) –

      The available storage capacity in the resource pool, in TB.

    • totalComputeCapacity (integer) –

      The total compute capacity of the resource pool.

    • availableComputeCapacity (integer) –

      The available compute capacity in the resource pool.

  • scheduledOperations (list) –

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

    • (dict) –

      The scheduled start and stop times for an Autonomous Database on a specific day of the week.

      • dayOfWeek (dict) – [REQUIRED]

        The day of the week on which the scheduled operation occurs.

        • name (string) –

          The name of the day of the week.

      • scheduledStartTime (string) –

        The scheduled start time for the Autonomous Database, in UTC.

      • scheduledStopTime (string) –

        The scheduled stop time for the Autonomous Database, in UTC.

  • standbyAllowlistedIps (list) –

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

    • (string) –

  • allowlistedIps (list) –

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

    • (string) –

  • transportableTablespace (dict) –

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

    • ttsBundleUrl (string) –

      The URL of the transportable tablespace bundle to use when creating the Autonomous Database.

  • isBackupRetentionLocked (boolean) – Specifies whether to lock the backup retention period of the Autonomous Database to prevent it from being shortened.

  • isLocalDataGuardEnabled (boolean) – Specifies whether to enable local Oracle Data Guard for the Autonomous Database.

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

  • dbToolsDetails (list) –

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

    • (dict) –

      Information about a database management tool for an Autonomous Database.

      • isEnabled (boolean) –

        Indicates whether the database management tool is enabled.

      • name (string) –

        The name of the database management tool.

      • computeCount (float) –

        The compute capacity allocated to the database management tool.

      • maxIdleTimeInMinutes (integer) –

        The maximum amount of time, in minutes, that the database management tool can be idle before it is shut down.

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

  • sourceConfiguration (dict) –

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

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: databaseClone, restoreFromBackup, pointInTimeRestore, crossRegionDataGuard, crossRegionDisasterRecovery, cloneToRefreshable.

    • databaseClone (dict) –

      The configuration for creating the Autonomous Database as a clone of an existing database.

      • sourceAutonomousDatabaseId (string) – [REQUIRED]

        The unique identifier of the source Autonomous Database to clone.

      • cloneType (string) – [REQUIRED]

        The type of clone to create, either a full clone, a metadata clone, or a partial clone.

    • restoreFromBackup (dict) –

      The configuration for creating the Autonomous Database by restoring from a backup.

      • autonomousDatabaseBackupId (string) – [REQUIRED]

        The unique identifier of the Autonomous Database backup to restore from.

      • cloneType (string) – [REQUIRED]

        The type of clone to create from the backup.

      • cloneTableSpaceList (list) –

        The list of tablespace identifiers to clone from the backup.

        • (integer) –

    • pointInTimeRestore (dict) –

      The configuration for creating the Autonomous Database by restoring to a point in time.

      • sourceAutonomousDatabaseId (string) – [REQUIRED]

        The unique identifier of the source Autonomous Database to restore from.

      • cloneType (string) – [REQUIRED]

        The type of clone to create from the point-in-time restore.

      • timestamp (datetime) –

        The date and time to which to restore the Autonomous Database.

      • useLatestAvailableBackupTimestamp (boolean) –

        Indicates whether to use the latest available backup timestamp for the restore.

      • cloneTableSpaceList (list) –

        The list of tablespace identifiers to clone from the point-in-time restore.

        • (integer) –

    • crossRegionDataGuard (dict) –

      The configuration for creating the Autonomous Database as a cross-Region Oracle Data Guard peer.

      • sourceAutonomousDatabaseArn (string) – [REQUIRED]

        The Amazon Resource Name (ARN) of the source Autonomous Database for the cross-Region Oracle Data Guard configuration.

    • crossRegionDisasterRecovery (dict) –

      The configuration for creating the Autonomous Database as a cross-Region disaster recovery peer.

      • sourceAutonomousDatabaseArn (string) – [REQUIRED]

        The Amazon Resource Name (ARN) of the source Autonomous Database for the cross-Region disaster recovery configuration.

      • remoteDisasterRecoveryType (string) – [REQUIRED]

        The type of remote disaster recovery to configure, either Autonomous Data Guard or backup-based.

      • isReplicateAutomaticBackups (boolean) –

        Indicates whether automatic backups are replicated to the disaster recovery database.

    • cloneToRefreshable (dict) –

      The configuration for creating the Autonomous Database as a refreshable clone.

      • sourceAutonomousDatabaseId (string) – [REQUIRED]

        The unique identifier of the source Autonomous Database to create the refreshable clone from.

      • refreshableMode (string) –

        The refresh mode of the refreshable clone, either automatic or manual.

      • autoRefreshFrequencyInSeconds (integer) –

        The frequency, in seconds, at which the refreshable clone is automatically refreshed.

      • autoRefreshPointLagInSeconds (integer) –

        The time lag, in seconds, between the refreshable clone and its source database.

      • timeOfAutoRefreshStart (datetime) –

        The date and time at which the automatic refresh of the refreshable clone starts.

      • openMode (string) –

        The mode in which to open the refreshable clone, either read-only or read/write.

      • cloneType (string) –

        The type of clone to create.

  • encryptionKeyProvider (string) – The provider of the encryption key to use for the Autonomous Database.

  • encryptionKeyConfiguration (dict) –

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

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: awsEncryptionKey.

    • awsEncryptionKey (dict) –

      The configuration of the Amazon Web Services Key Management Service (KMS) encryption key to use.

      • iamRoleArn (string) –

        The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role that grants access to the KMS key.

      • externalIdType (string) –

        The type of external identifier associated with the encryption key.

      • kmsKeyId (string) –

        The identifier or ARN of the Amazon Web Services KMS key to use for encryption.

  • clientToken (string) –

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

    This field is autopopulated if not provided.

  • tags (dict) –

    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.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'autonomousDatabaseId': 'string',
    'displayName': 'string',
    'status': 'AVAILABLE'|'FAILED'|'PROVISIONING'|'TERMINATED'|'TERMINATING'|'UPDATING'|'MAINTENANCE_IN_PROGRESS'|'STOPPING'|'STOPPED'|'STARTING'|'UNAVAILABLE'|'RESTORE_IN_PROGRESS'|'RESTORE_FAILED'|'BACKUP_IN_PROGRESS'|'SCALE_IN_PROGRESS'|'AVAILABLE_NEEDS_ATTENTION'|'RESTARTING'|'RECREATING'|'ROLE_CHANGE_IN_PROGRESS'|'UPGRADING'|'INACCESSIBLE'|'STANDBY',
    'statusReason': 'string'
}

Response Structure

  • (dict) –

    • autonomousDatabaseId (string) –

      The unique identifier of the Autonomous Database that was created.

    • displayName (string) –

      The user-friendly name of the Autonomous Database that was created.

    • status (string) –

      The current status of the Autonomous Database.

    • statusReason (string) –

      Additional information about the current status of the Autonomous Database, if applicable.

Exceptions

  • odb.Client.exceptions.ThrottlingException

  • odb.Client.exceptions.ServiceQuotaExceededException

  • odb.Client.exceptions.ValidationException

  • odb.Client.exceptions.ConflictException

  • odb.Client.exceptions.AccessDeniedException

  • odb.Client.exceptions.InternalServerException

  • odb.Client.exceptions.ResourceNotFoundException