gcloud oracle-database autonomous-databases create

NAME
gcloud oracle-database autonomous-databases create - create a new AutonomousDatabase
SYNOPSIS
gcloud oracle-database autonomous-databases createAUTONOMOUS_DATABASE[--admin-password=ADMIN_PASSWORD][--async][--cidr=CIDR][--database=DATABASE][--display-name=DISPLAY_NAME][--labels=[LABELS,…]][--location=LOCATION][--network=NETWORK][--odb-network=ODB_NETWORK][--odb-subnet=ODB_SUBNET][--request-id=REQUEST_ID][[--properties-db-workload=PROPERTIES_DB_WORKLOAD--properties-license-type=PROPERTIES_LICENSE_TYPE :--properties-allowlisted-ips=[PROPERTIES_ALLOWLISTED_IPS,…]--properties-backup-retention-period-days=PROPERTIES_BACKUP_RETENTION_PERIOD_DAYS--properties-character-set=PROPERTIES_CHARACTER_SET--properties-compute-count=PROPERTIES_COMPUTE_COUNT--properties-cpu-core-count=PROPERTIES_CPU_CORE_COUNT--properties-customer-contacts=[email=EMAIL]--properties-data-storage-size-gb=PROPERTIES_DATA_STORAGE_SIZE_GB--properties-data-storage-size-tb=PROPERTIES_DATA_STORAGE_SIZE_TB--properties-db-edition=PROPERTIES_DB_EDITION--properties-db-version=PROPERTIES_DB_VERSION--properties-is-auto-scaling-enabled--properties-is-storage-auto-scaling-enabled--properties-maintenance-schedule-type=PROPERTIES_MAINTENANCE_SCHEDULE_TYPE--properties-mtls-connection-required--properties-n-character-set=PROPERTIES_N_CHARACTER_SET--properties-private-endpoint-ip=PROPERTIES_PRIVATE_ENDPOINT_IP--properties-private-endpoint-label=PROPERTIES_PRIVATE_ENDPOINT_LABEL--properties-secret-id=PROPERTIES_SECRET_ID--properties-vault-id=PROPERTIES_VAULT_ID--encryption-key-provider=ENCRYPTION_KEY_PROVIDER [--encryption-key-kms=ENCRYPTION_KEY_KMS :--key-ring=KEY_RING]]][--source-config-automatic-backups-replication-enabled--source-config-autonomous-database=SOURCE_CONFIG_AUTONOMOUS_DATABASE][GCLOUD_WIDE_FLAG]
DESCRIPTION
Create a new AutonomousDatabase.
EXAMPLES
To create AutonomousDatabase with idmy-instance in the locationus-east4 with display-namemy instance, odb-networkprojects/network-project/locations/us-east4/odbNetworks/my-odbnetwork,odb-subnetprojects/network-project/locations/us-east4/odbNetworks/my-odbnetwork/odbSubnets/my-odbsubnet,networkprojects/my-project/locations/global/networks/default,locationus-east4, databasetestadb, admin-password123Abpassdord, cidr12.2.0.0/24,properties-compute-count2, properties-db-version19c,properties-license-typeLICENSE_INCLUDED, properties-db-workloadDW. run: To set the network configuration use one of the followingoptions:

ODBNetwork based configuration(This is the recommended way):

gcloudoracle-databaseautonomous-databasescreatemy-instance--location=us-east4--display-name="my instance"--location=us-east4--database=testadb--admin-password=123Abpassdord--properties-compute-count=2--properties-db-version=19c--properties-license-type=LICENSE_INCLUDED--properties-db-workload=DW--odb-network=projects/network-project/locations/us-east4/odbNetworks/my-odbnetwork--odb-subnet=projects/network-project/locations/us-east4/odbNetworks/my-odbnetwork/odbSubnets/my-odbsubnet

Network and CIDR based configuration:

gcloudoracle-databaseautonomous-databasescreatemy-instance--location=us-east4--display-name="my instance"--network=projects/my-project/locations/global/networks/default--cidr=12.2.0.0/24--location=us-east4--database=testadb--admin-password=123Abpassdord--properties-compute-count=2--properties-db-version=19c--properties-license-type=LICENSE_INCLUDED--properties-db-workload=DW
POSITIONAL ARGUMENTS
AutonomousDatabase resource - Identifier. The name of the Autonomous Databaseresource in the following format:projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}This represents a Cloud resource. (NOTE) Some attributes are not given argumentsin this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentautonomous_database on the command line with afully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argumentautonomous_database on the command line with afully specified name;
  • provide the argument--location on the command line.

This must be specified.

AUTONOMOUS_DATABASE
ID of the autonomousDatabase or fully qualified identifier for theautonomousDatabase.

To set theautonomous_database attribute:

  • provide the argumentautonomous_database on the command line.
FLAGS
--admin-password=ADMIN_PASSWORD
The password for the default ADMIN user.
--async
Return immediately, without waiting for the operation in progress to complete.
--cidr=CIDR
The subnet CIDR range for the Autonomous Database.
--database=DATABASE
The name of the Autonomous Database. The database name must be unique in theproject. The name must begin with a letter and can contain a maximum of 30alphanumeric characters.
--display-name=DISPLAY_NAME
The display name for the Autonomous Database. The name does not have to beunique within your project.
--labels=[LABELS,…]
The labels or tags associated with the Autonomous Database.
KEY
Keys must start with a lowercase character and contain only hyphens(-), underscores (_), lowercase characters, andnumbers.
VALUE
Values must contain only hyphens (-), underscores (_),lowercase characters, and numbers.
Shorthand Example:
--labels=string=string

JSON Example:

--labels='{"string": "string"}'

File Example:

--labels=path_to_file.(yaml|json)
--location=LOCATION
For resources [autonomous_database, encryption-key-kms, odb-network, odb-subnet,source-config-autonomous-database], provides fallback value for resourcelocation attribute. When the resource's full URI path is not provided, locationwill fallback to this flag value.
Network resource - The name of the VPC network used by the Autonomous Databasein the following format: projects/{project}/global/networks/{network} Thisrepresents a Cloud resource. (NOTE) Some attributes are not given arguments inthis group but can be set in other ways.

To set theproject attribute:

  • provide the argument--network on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.
--network=NETWORK
ID of the network or fully qualified identifier for the network.

To set thenetwork attribute:

  • provide the argument--network on the command line.
--odb-network=ODB_NETWORK
For resources [odb-network, odb-subnet], provides fallback value for resourceodb-network attribute. When the resource's full URI path is not provided,odb-network will fallback to this flag value.
OdbSubnet resource - The name of the OdbSubnet associated with the AutonomousDatabase. Format:projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}This represents a Cloud resource. (NOTE) Some attributes are not given argumentsin this group but can be set in other ways.

To set theproject attribute:

  • provide the argument--odb-subnet on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argument--odb-subnet on the command line with a fullyspecified name;
  • provide the argument--location on the command line.

To set theodb-network attribute:

  • provide the argument--odb-subnet on the command line with a fullyspecified name;
  • provide the argument--odb-network on the command line.
--odb-subnet=ODB_SUBNET
ID of the odbSubnet or fully qualified identifier for the odbSubnet.

To set theodb-subnet attribute:

  • provide the argument--odb-subnet on the command line.
--request-id=REQUEST_ID
An optional ID to identify the request. This value is used to identify duplicaterequests. If you make a request with the same request ID and the originalrequest is still in progress or completed, the server ignores the secondrequest. This prevents clients from accidentally creating duplicate commitments.

The request ID must be a valid UUID with the exception that zero UUID is notsupported (00000000-0000-0000-0000-000000000000).

The properties of an Autonomous Database.
--properties-db-workload=PROPERTIES_DB_WORKLOAD
The workload type of the Autonomous Database.PROPERTIES_DB_WORKLOAD must be one of:
ajd
Autonomous JSON Database.
apex
Autonomous Database with the Oracle APEX Application Development workload type.
dw
Autonomous Data Warehouse database.
oltp
Autonomous Transaction Processing database.
This flag argument must be specified if any of the other arguments in this groupare specified.
--properties-license-type=PROPERTIES_LICENSE_TYPE
The license type used for the Autonomous Database.PROPERTIES_LICENSE_TYPE must be one of:
bring-your-own-license
Bring your own license
license-included
License included part of offer
This flag argument must be specified if any of the other arguments in this groupare specified.
--properties-allowlisted-ips=[PROPERTIES_ALLOWLISTED_IPS,…]
The list of allowlisted IP addresses for the Autonomous Database.
--properties-backup-retention-period-days=PROPERTIES_BACKUP_RETENTION_PERIOD_DAYS
The retention period for the Autonomous Database. This field is specified indays, can range from 1 day to 60 days, and has a default value of 60 days.
--properties-character-set=PROPERTIES_CHARACTER_SET
The character set for the Autonomous Database. The default is AL32UTF8.
--properties-compute-count=PROPERTIES_COMPUTE_COUNT
The number of compute servers for the Autonomous Database.
--properties-cpu-core-count=PROPERTIES_CPU_CORE_COUNT
The number of CPU cores to be made available to the database.
--properties-customer-contacts=[email=EMAIL]
The list of customer contacts.
email
The email address used by Oracle to send notifications regarding databases andinfrastructure.
Shorthand Example:
--properties-customer-contacts=email=string--properties-customer-contacts=email=string

JSON Example:

--properties-customer-contacts='[{"email": "string"}]'

File Example:

--properties-customer-contacts=path_to_file.(yaml|json)
--properties-data-storage-size-gb=PROPERTIES_DATA_STORAGE_SIZE_GB
The size of the data stored in the database, in gigabytes.
--properties-data-storage-size-tb=PROPERTIES_DATA_STORAGE_SIZE_TB
The size of the data stored in the database, in terabytes.
--properties-db-edition=PROPERTIES_DB_EDITION
The edition of the Autonomous Databases.PROPERTIES_DB_EDITION must be one of:
enterprise-edition
Enterprise Database Edition
standard-edition
Standard Database Edition
--properties-db-version=PROPERTIES_DB_VERSION
The Oracle Database version for the Autonomous Database.
--properties-is-auto-scaling-enabled
This field indicates if auto scaling is enabled for the Autonomous Database CPUcore count.
--properties-is-storage-auto-scaling-enabled
This field indicates if auto scaling is enabled for the Autonomous Databasestorage.
--properties-maintenance-schedule-type=PROPERTIES_MAINTENANCE_SCHEDULE_TYPE
The maintenance schedule of the Autonomous Database.PROPERTIES_MAINTENANCE_SCHEDULE_TYPE must be one of:
early
An EARLY maintenance schedule patches the database before the regular scheduledmaintenance.
regular
A REGULAR maintenance schedule follows the normal maintenance cycle.
--properties-mtls-connection-required
This field specifies if the Autonomous Database requires mTLS connections.
--properties-n-character-set=PROPERTIES_N_CHARACTER_SET
The national character set for the Autonomous Database. The default isAL16UTF16.
--properties-private-endpoint-ip=PROPERTIES_PRIVATE_ENDPOINT_IP
The private endpoint IP address for the Autonomous Database.
--properties-private-endpoint-label=PROPERTIES_PRIVATE_ENDPOINT_LABEL
The private endpoint label for the Autonomous Database.
--properties-secret-id=PROPERTIES_SECRET_ID
The ID of the Oracle Cloud Infrastructure vault secret.
--properties-vault-id=PROPERTIES_VAULT_ID
The ID of the Oracle Cloud Infrastructure vault.
The encryption key used to encrypt the Autonomous Database.
--encryption-key-provider=ENCRYPTION_KEY_PROVIDER
The provider of the encryption key.ENCRYPTION_KEY_PROVIDER must be one of:
google-managed
Google Managed KMS key, if selected, please provide the KMS key name.
oracle-managed
Oracle Managed.
CryptoKey resource - The KMS key used to encrypt the Autonomous Database. Thisfield is required if the provider is GOOGLE_MANAGED. The name of the KMS keyresource in the following format:projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.The arguments in this group can be used to specify the attributes of thisresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.

To set theproject attribute:

  • provide the argument--encryption-key-kms on the command line witha fully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argument--encryption-key-kms on the command line witha fully specified name;
  • provide the argument--location on the command line.
--encryption-key-kms=ENCRYPTION_KEY_KMS
ID of the cryptoKey or fully qualified identifier for the cryptoKey.

To set thecrypto-key attribute:

  • provide the argument--encryption-key-kms on the command line.

This flag argument must be specified if any of the other arguments in this groupare specified.

--key-ring=KEY_RING
The keyRing id of the cryptoKey resource.

To set thekey-ring attribute:

  • provide the argument--encryption-key-kms on the command line witha fully specified name;
  • provide the argument--key-ring on the command line.
The source configuration for the standby Autonomous Database.
--source-config-automatic-backups-replication-enabled
This field specifies if the replication of automatic backups is enabled whencreating a Data Guard.
AutonomousDatabase resource - The name of the primary Autonomous Database thatis used to create a Peer Autonomous Database from a source. This represents aCloud resource. (NOTE) Some attributes are not given arguments in this group butcan be set in other ways.

To set theproject attribute:

  • provide the argument--source-config-autonomous-database on thecommand line with a fully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

To set thelocation attribute:

  • provide the argument--source-config-autonomous-database on thecommand line with a fully specified name;
  • provide the argument--location on the command line.
--source-config-autonomous-database=SOURCE_CONFIG_AUTONOMOUS_DATABASE
ID of the autonomousDatabase or fully qualified identifier for theautonomousDatabase.

To set theautonomous-database attribute:

  • provide the argument--source-config-autonomous-database on thecommand line.
GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.

Run$gcloud help for details.

API REFERENCE
This command uses theoracledatabase/v1 API. The full documentationfor this API can be found at:https://cloud.google.com/oracle/database/docs

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-14 UTC.