autonomous_databases
Creates, updates, deletes, gets or lists an autonomous_databases resource.
Overview
| Name | autonomous_databases |
| Type | Resource |
| Id | google.oracledatabase.autonomous_databases |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the Autonomous Database resource in the following format: projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} |
adminPassword | string | Optional. Immutable. The password for the default ADMIN user. Note: Only one of admin_password_secret_version or admin_password can be populated. |
adminPasswordSecretVersion | string | Optional. Immutable. The resource name of a secret version in Secret Manager which contains the database admin user's password. Format: projects/{project}/secrets/{secret}/versions/{version}. Note: Only one of admin_password_secret_version or admin_password can be populated. |
cidr | string | Optional. Immutable. The subnet CIDR range for the Autonomous Database. |
createTime | string (google-datetime) | Output only. The date and time that the Autonomous Database was created. |
database | string | Optional. Immutable. The name of the Autonomous Database. The database name must be unique in the project. The name must begin with a letter and can contain a maximum of 30 alphanumeric characters. |
disasterRecoverySupportedLocations | array | Output only. List of supported GCP region to clone the Autonomous Database for disaster recovery. Format: project/{project}/locations/{location}. |
displayName | string | Optional. Immutable. The display name for the Autonomous Database. The name does not have to be unique within your project. |
entitlementId | string | Output only. The ID of the subscription entitlement associated with the Autonomous Database. |
labels | object | Optional. The labels or tags associated with the Autonomous Database. |
network | string | Optional. Immutable. The name of the VPC network used by the Autonomous Database in the following format: projects/{project}/global/networks/{network} |
odbNetwork | string | Optional. Immutable. The name of the OdbNetwork associated with the Autonomous Database. Format: projects/{project}/locations/{location}/odbNetworks/{odb_network} It is optional but if specified, this should match the parent ODBNetwork of the OdbSubnet. |
odbSubnet | string | Optional. Immutable. The name of the OdbSubnet associated with the Autonomous Database. Format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet} |
peerAutonomousDatabases | array | Output only. The peer Autonomous Database names of the given Autonomous Database. |
properties | object | Optional. The properties of the Autonomous Database. (id: AutonomousDatabaseProperties) |
sourceConfig | object | Optional. Immutable. The source Autonomous Database configuration for the standby Autonomous Database. The source Autonomous Database is configured while creating the Peer Autonomous Database and can't be updated after creation. (id: SourceConfig) |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the Autonomous Database resource in the following format: projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} |
adminPassword | string | Optional. Immutable. The password for the default ADMIN user. Note: Only one of admin_password_secret_version or admin_password can be populated. |
adminPasswordSecretVersion | string | Optional. Immutable. The resource name of a secret version in Secret Manager which contains the database admin user's password. Format: projects/{project}/secrets/{secret}/versions/{version}. Note: Only one of admin_password_secret_version or admin_password can be populated. |
cidr | string | Optional. Immutable. The subnet CIDR range for the Autonomous Database. |
createTime | string (google-datetime) | Output only. The date and time that the Autonomous Database was created. |
database | string | Optional. Immutable. The name of the Autonomous Database. The database name must be unique in the project. The name must begin with a letter and can contain a maximum of 30 alphanumeric characters. |
disasterRecoverySupportedLocations | array | Output only. List of supported GCP region to clone the Autonomous Database for disaster recovery. Format: project/{project}/locations/{location}. |
displayName | string | Optional. Immutable. The display name for the Autonomous Database. The name does not have to be unique within your project. |
entitlementId | string | Output only. The ID of the subscription entitlement associated with the Autonomous Database. |
labels | object | Optional. The labels or tags associated with the Autonomous Database. |
network | string | Optional. Immutable. The name of the VPC network used by the Autonomous Database in the following format: projects/{project}/global/networks/{network} |
odbNetwork | string | Optional. Immutable. The name of the OdbNetwork associated with the Autonomous Database. Format: projects/{project}/locations/{location}/odbNetworks/{odb_network} It is optional but if specified, this should match the parent ODBNetwork of the OdbSubnet. |
odbSubnet | string | Optional. Immutable. The name of the OdbSubnet associated with the Autonomous Database. Format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet} |
peerAutonomousDatabases | array | Output only. The peer Autonomous Database names of the given Autonomous Database. |
properties | object | Optional. The properties of the Autonomous Database. (id: AutonomousDatabaseProperties) |
sourceConfig | object | Optional. Immutable. The source Autonomous Database configuration for the standby Autonomous Database. The source Autonomous Database is configured while creating the Peer Autonomous Database and can't be updated after creation. (id: SourceConfig) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, autonomousDatabasesId | Gets the details of a single Autonomous Database. | |
list | select | projectsId, locationsId | filter, orderBy, pageSize, pageToken | Lists the Autonomous Databases in a given project and location. |
create | insert | projectsId, locationsId | autonomousDatabaseId, requestId | Creates a new Autonomous Database in a given project and location. |
patch | update | projectsId, locationsId, autonomousDatabasesId | requestId, updateMask | Updates the parameters of a single Autonomous Database. |
delete | delete | projectsId, locationsId, autonomousDatabasesId | requestId | Deletes a single Autonomous Database. |
failover | exec | projectsId, locationsId, autonomousDatabasesId | Initiates a failover to target autonomous database from the associated primary database. | |
generate_wallet | exec | projectsId, locationsId, autonomousDatabasesId | Generates a wallet for an Autonomous Database. | |
refresh | exec | projectsId, locationsId, autonomousDatabasesId | Refreshes the refreshable clone of an Autonomous Database. | |
restart | exec | projectsId, locationsId, autonomousDatabasesId | Restarts an Autonomous Database. | |
restore | exec | projectsId, locationsId, autonomousDatabasesId | Restores a single Autonomous Database. | |
start | exec | projectsId, locationsId, autonomousDatabasesId | Starts an Autonomous Database. | |
stop | exec | projectsId, locationsId, autonomousDatabasesId | Stops an Autonomous Database. | |
switchover | exec | projectsId, locationsId, autonomousDatabasesId | Initiates a switchover of specified autonomous database to the associated peer database. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
autonomousDatabasesId | string | |
locationsId | string | |
projectsId | string | |
autonomousDatabaseId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets the details of a single Autonomous Database.
SELECT
name,
adminPassword,
adminPasswordSecretVersion,
cidr,
createTime,
database,
disasterRecoverySupportedLocations,
displayName,
entitlementId,
labels,
network,
odbNetwork,
odbSubnet,
peerAutonomousDatabases,
properties,
sourceConfig
FROM google.oracledatabase.autonomous_databases
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND autonomousDatabasesId = '{{ autonomousDatabasesId }}' -- required
;
Lists the Autonomous Databases in a given project and location.
SELECT
name,
adminPassword,
adminPasswordSecretVersion,
cidr,
createTime,
database,
disasterRecoverySupportedLocations,
displayName,
entitlementId,
labels,
network,
odbNetwork,
odbSubnet,
peerAutonomousDatabases,
properties,
sourceConfig
FROM google.oracledatabase.autonomous_databases
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a new Autonomous Database in a given project and location.
INSERT INTO google.oracledatabase.autonomous_databases (
data__adminPassword,
data__adminPasswordSecretVersion,
data__cidr,
data__database,
data__displayName,
data__labels,
data__name,
data__network,
data__odbNetwork,
data__odbSubnet,
data__properties,
data__sourceConfig,
projectsId,
locationsId,
autonomousDatabaseId,
requestId
)
SELECT
'{{ adminPassword }}',
'{{ adminPasswordSecretVersion }}',
'{{ cidr }}',
'{{ database }}',
'{{ displayName }}',
'{{ labels }}',
'{{ name }}',
'{{ network }}',
'{{ odbNetwork }}',
'{{ odbSubnet }}',
'{{ properties }}',
'{{ sourceConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ autonomousDatabaseId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: autonomous_databases
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the autonomous_databases resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the autonomous_databases resource.
- name: adminPassword
value: "{{ adminPassword }}"
description: |
Optional. Immutable. The password for the default ADMIN user. Note: Only one of `admin_password_secret_version` or `admin_password` can be populated.
- name: adminPasswordSecretVersion
value: "{{ adminPasswordSecretVersion }}"
description: |
Optional. Immutable. The resource name of a secret version in Secret Manager which contains the database admin user's password. Format: projects/{project}/secrets/{secret}/versions/{version}. Note: Only one of `admin_password_secret_version` or `admin_password` can be populated.
- name: cidr
value: "{{ cidr }}"
description: |
Optional. Immutable. The subnet CIDR range for the Autonomous Database.
- name: database
value: "{{ database }}"
description: |
Optional. Immutable. The name of the Autonomous Database. The database name must be unique in the project. The name must begin with a letter and can contain a maximum of 30 alphanumeric characters.
- name: displayName
value: "{{ displayName }}"
description: |
Optional. Immutable. The display name for the Autonomous Database. The name does not have to be unique within your project.
- name: labels
value: "{{ labels }}"
description: |
Optional. The labels or tags associated with the Autonomous Database.
- name: name
value: "{{ name }}"
description: |
Identifier. The name of the Autonomous Database resource in the following format: projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}
- name: network
value: "{{ network }}"
description: |
Optional. Immutable. The name of the VPC network used by the Autonomous Database in the following format: projects/{project}/global/networks/{network}
- name: odbNetwork
value: "{{ odbNetwork }}"
description: |
Optional. Immutable. The name of the OdbNetwork associated with the Autonomous Database. Format: projects/{project}/locations/{location}/odbNetworks/{odb_network} It is optional but if specified, this should match the parent ODBNetwork of the OdbSubnet.
- name: odbSubnet
value: "{{ odbSubnet }}"
description: |
Optional. Immutable. The name of the OdbSubnet associated with the Autonomous Database. Format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
- name: properties
description: |
Optional. The properties of the Autonomous Database.
value:
actualUsedDataStorageSizeTb: {{ actualUsedDataStorageSizeTb }}
allocatedStorageSizeTb: {{ allocatedStorageSizeTb }}
allowlistedIps:
- "{{ allowlistedIps }}"
apexDetails:
apexVersion: "{{ apexVersion }}"
ordsVersion: "{{ ordsVersion }}"
arePrimaryAllowlistedIpsUsed: {{ arePrimaryAllowlistedIpsUsed }}
autonomousContainerDatabaseId: "{{ autonomousContainerDatabaseId }}"
availableUpgradeVersions:
- "{{ availableUpgradeVersions }}"
backupRetentionPeriodDays: {{ backupRetentionPeriodDays }}
characterSet: "{{ characterSet }}"
computeCount: {{ computeCount }}
connectionStrings:
allConnectionStrings:
high: "{{ high }}"
low: "{{ low }}"
medium: "{{ medium }}"
dedicated: "{{ dedicated }}"
high: "{{ high }}"
low: "{{ low }}"
medium: "{{ medium }}"
profiles:
- consumerGroup: "{{ consumerGroup }}"
displayName: "{{ displayName }}"
hostFormat: "{{ hostFormat }}"
isRegional: {{ isRegional }}
protocol: "{{ protocol }}"
sessionMode: "{{ sessionMode }}"
syntaxFormat: "{{ syntaxFormat }}"
tlsAuthentication: "{{ tlsAuthentication }}"
value: "{{ value }}"
connectionUrls:
apexUri: "{{ apexUri }}"
databaseTransformsUri: "{{ databaseTransformsUri }}"
graphStudioUri: "{{ graphStudioUri }}"
machineLearningNotebookUri: "{{ machineLearningNotebookUri }}"
machineLearningUserManagementUri: "{{ machineLearningUserManagementUri }}"
mongoDbUri: "{{ mongoDbUri }}"
ordsUri: "{{ ordsUri }}"
sqlDevWebUri: "{{ sqlDevWebUri }}"
cpuCoreCount: {{ cpuCoreCount }}
customerContacts:
- email: "{{ email }}"
dataGuardRoleChangedTime: "{{ dataGuardRoleChangedTime }}"
dataSafeState: "{{ dataSafeState }}"
dataStorageSizeGb: {{ dataStorageSizeGb }}
dataStorageSizeTb: {{ dataStorageSizeTb }}
databaseManagementState: "{{ databaseManagementState }}"
dbEdition: "{{ dbEdition }}"
dbVersion: "{{ dbVersion }}"
dbWorkload: "{{ dbWorkload }}"
disasterRecoveryRoleChangedTime: "{{ disasterRecoveryRoleChangedTime }}"
encryptionKey:
kmsKey: "{{ kmsKey }}"
provider: "{{ provider }}"
encryptionKeyHistoryEntries:
- activationTime: "{{ activationTime }}"
encryptionKey:
kmsKey: "{{ kmsKey }}"
provider: "{{ provider }}"
failedDataRecoveryDuration: "{{ failedDataRecoveryDuration }}"
isAutoScalingEnabled: {{ isAutoScalingEnabled }}
isLocalDataGuardEnabled: {{ isLocalDataGuardEnabled }}
isStorageAutoScalingEnabled: {{ isStorageAutoScalingEnabled }}
licenseType: "{{ licenseType }}"
lifecycleDetails: "{{ lifecycleDetails }}"
localAdgAutoFailoverMaxDataLossLimit: {{ localAdgAutoFailoverMaxDataLossLimit }}
localAdgAutoFailoverMaxDataLossLimitDuration: {{ localAdgAutoFailoverMaxDataLossLimitDuration }}
localDataGuardEnabled: {{ localDataGuardEnabled }}
localDisasterRecoveryType: "{{ localDisasterRecoveryType }}"
localStandbyDb:
dataGuardRoleChangedTime: "{{ dataGuardRoleChangedTime }}"
disasterRecoveryRoleChangedTime: "{{ disasterRecoveryRoleChangedTime }}"
lagTimeDuration: "{{ lagTimeDuration }}"
lifecycleDetails: "{{ lifecycleDetails }}"
state: "{{ state }}"
maintenanceBeginTime: "{{ maintenanceBeginTime }}"
maintenanceEndTime: "{{ maintenanceEndTime }}"
maintenanceScheduleType: "{{ maintenanceScheduleType }}"
memoryPerOracleComputeUnitGbs: {{ memoryPerOracleComputeUnitGbs }}
memoryTableGbs: {{ memoryTableGbs }}
mtlsConnectionRequired: {{ mtlsConnectionRequired }}
nCharacterSet: "{{ nCharacterSet }}"
nextLongTermBackupTime: "{{ nextLongTermBackupTime }}"
ociUrl: "{{ ociUrl }}"
ocid: "{{ ocid }}"
openMode: "{{ openMode }}"
operationsInsightsState: "{{ operationsInsightsState }}"
peerDbIds:
- "{{ peerDbIds }}"
permissionLevel: "{{ permissionLevel }}"
privateEndpoint: "{{ privateEndpoint }}"
privateEndpointIp: "{{ privateEndpointIp }}"
privateEndpointLabel: "{{ privateEndpointLabel }}"
refreshableClone: {{ refreshableClone }}
refreshableMode: "{{ refreshableMode }}"
refreshableState: "{{ refreshableState }}"
role: "{{ role }}"
scheduledOperationDetails:
- dayOfWeek: "{{ dayOfWeek }}"
startTime:
hours: {{ hours }}
minutes: {{ minutes }}
nanos: {{ nanos }}
seconds: {{ seconds }}
stopTime:
hours: {{ hours }}
minutes: {{ minutes }}
nanos: {{ nanos }}
seconds: {{ seconds }}
secretId: "{{ secretId }}"
serviceAgentEmail: "{{ serviceAgentEmail }}"
sqlWebDeveloperUrl: "{{ sqlWebDeveloperUrl }}"
state: "{{ state }}"
supportedCloneRegions:
- "{{ supportedCloneRegions }}"
totalAutoBackupStorageSizeGbs: {{ totalAutoBackupStorageSizeGbs }}
usedDataStorageSizeTbs: {{ usedDataStorageSizeTbs }}
vaultId: "{{ vaultId }}"
- name: sourceConfig
description: |
Optional. Immutable. The source Autonomous Database configuration for the standby Autonomous Database. The source Autonomous Database is configured while creating the Peer Autonomous Database and can't be updated after creation.
value:
autoRefreshFrequencySeconds: {{ autoRefreshFrequencySeconds }}
autoRefreshPointLagSeconds: {{ autoRefreshPointLagSeconds }}
autoRefreshStartTime: "{{ autoRefreshStartTime }}"
automaticBackupsReplicationEnabled: {{ automaticBackupsReplicationEnabled }}
autonomousDatabase: "{{ autonomousDatabase }}"
autonomousDatabaseBackup: "{{ autonomousDatabaseBackup }}"
backupTime: "{{ backupTime }}"
cloneType: "{{ cloneType }}"
refreshableMode: "{{ refreshableMode }}"
sourceType: "{{ sourceType }}"
useLatestAvailableBackup: {{ useLatestAvailableBackup }}
- name: autonomousDatabaseId
value: "{{ autonomousDatabaseId }}"
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Updates the parameters of a single Autonomous Database.
UPDATE google.oracledatabase.autonomous_databases
SET
data__adminPassword = '{{ adminPassword }}',
data__adminPasswordSecretVersion = '{{ adminPasswordSecretVersion }}',
data__cidr = '{{ cidr }}',
data__database = '{{ database }}',
data__displayName = '{{ displayName }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__network = '{{ network }}',
data__odbNetwork = '{{ odbNetwork }}',
data__odbSubnet = '{{ odbSubnet }}',
data__properties = '{{ properties }}',
data__sourceConfig = '{{ sourceConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND autonomousDatabasesId = '{{ autonomousDatabasesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single Autonomous Database.
DELETE FROM google.oracledatabase.autonomous_databases
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND autonomousDatabasesId = '{{ autonomousDatabasesId }}' --required
AND requestId = '{{ requestId }}'
;
Lifecycle Methods
- failover
- generate_wallet
- refresh
- restart
- restore
- start
- stop
- switchover
Initiates a failover to target autonomous database from the associated primary database.
EXEC google.oracledatabase.autonomous_databases.failover
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"peerAutonomousDatabase": "{{ peerAutonomousDatabase }}"
}'
;
Generates a wallet for an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.generate_wallet
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"isRegional": {{ isRegional }},
"password": "{{ password }}",
"type": "{{ type }}"
}'
;
Refreshes the refreshable clone of an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.refresh
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"refreshCutoffTime": "{{ refreshCutoffTime }}"
}'
;
Restarts an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.restart
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
;
Restores a single Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.restore
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"restoreTime": "{{ restoreTime }}"
}'
;
Starts an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.start
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
;
Stops an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.stop
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
;
Initiates a switchover of specified autonomous database to the associated peer database.
EXEC google.oracledatabase.autonomous_databases.switchover
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"peerAutonomousDatabase": "{{ peerAutonomousDatabase }}"
}'
;