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 |
|---|
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 | pageToken, pageSize, orderBy, filter | 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. |
start | exec | projectsId, locationsId, autonomousDatabasesId | Starts an Autonomous Database. | |
failover | exec | projectsId, locationsId, autonomousDatabasesId | Initiates a failover to target autonomous database from the associated primary database. | |
refresh | exec | projectsId, locationsId, autonomousDatabasesId | Refreshes the refreshable clone of an Autonomous Database. | |
stop | exec | projectsId, locationsId, autonomousDatabasesId | Stops an Autonomous Database. | |
restart | exec | projectsId, locationsId, autonomousDatabasesId | Restarts an Autonomous Database. | |
generate_wallet | exec | projectsId, locationsId, autonomousDatabasesId | Generates a wallet for an Autonomous Database. | |
switchover | exec | projectsId, locationsId, autonomousDatabasesId | Initiates a switchover of specified autonomous database to the associated peer database. | |
restore | exec | projectsId, locationsId, autonomousDatabasesId | Restores a single Autonomous 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
*
FROM google.oracledatabase.autonomous_databases
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a new Autonomous Database in a given project and location.
INSERT INTO google.oracledatabase.autonomous_databases (
data__database,
data__name,
data__adminPassword,
data__cidr,
data__network,
data__properties,
data__odbSubnet,
data__odbNetwork,
data__displayName,
data__adminPasswordSecretVersion,
data__labels,
data__sourceConfig,
projectsId,
locationsId,
autonomousDatabaseId,
requestId
)
SELECT
'{{ database }}',
'{{ name }}',
'{{ adminPassword }}',
'{{ cidr }}',
'{{ network }}',
'{{ properties }}',
'{{ odbSubnet }}',
'{{ odbNetwork }}',
'{{ displayName }}',
'{{ adminPasswordSecretVersion }}',
'{{ labels }}',
'{{ 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: 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: name
value: "{{ name }}"
description: |
Identifier. The name of the Autonomous Database resource in the following format: projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}
- 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: cidr
value: "{{ cidr }}"
description: |
Optional. Immutable. The subnet CIDR range for the 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: properties
description: |
Optional. The properties of the Autonomous Database.
value:
refreshableClone: {{ refreshableClone }}
characterSet: "{{ characterSet }}"
vaultId: "{{ vaultId }}"
localAdgAutoFailoverMaxDataLossLimit: {{ localAdgAutoFailoverMaxDataLossLimit }}
sqlWebDeveloperUrl: "{{ sqlWebDeveloperUrl }}"
ocid: "{{ ocid }}"
backupRetentionPeriodDays: {{ backupRetentionPeriodDays }}
licenseType: "{{ licenseType }}"
memoryTableGbs: {{ memoryTableGbs }}
totalAutoBackupStorageSizeGbs: {{ totalAutoBackupStorageSizeGbs }}
dataStorageSizeGb: {{ dataStorageSizeGb }}
dataGuardRoleChangedTime: "{{ dataGuardRoleChangedTime }}"
role: "{{ role }}"
privateEndpointIp: "{{ privateEndpointIp }}"
nextLongTermBackupTime: "{{ nextLongTermBackupTime }}"
autonomousContainerDatabaseId: "{{ autonomousContainerDatabaseId }}"
operationsInsightsState: "{{ operationsInsightsState }}"
maintenanceBeginTime: "{{ maintenanceBeginTime }}"
databaseManagementState: "{{ databaseManagementState }}"
mtlsConnectionRequired: {{ mtlsConnectionRequired }}
actualUsedDataStorageSizeTb: {{ actualUsedDataStorageSizeTb }}
permissionLevel: "{{ permissionLevel }}"
customerContacts:
- email: "{{ email }}"
encryptionKey:
kmsKey: "{{ kmsKey }}"
provider: "{{ provider }}"
isStorageAutoScalingEnabled: {{ isStorageAutoScalingEnabled }}
arePrimaryAllowlistedIpsUsed: {{ arePrimaryAllowlistedIpsUsed }}
lifecycleDetails: "{{ lifecycleDetails }}"
openMode: "{{ openMode }}"
failedDataRecoveryDuration: "{{ failedDataRecoveryDuration }}"
allocatedStorageSizeTb: {{ allocatedStorageSizeTb }}
connectionUrls:
apexUri: "{{ apexUri }}"
machineLearningUserManagementUri: "{{ machineLearningUserManagementUri }}"
sqlDevWebUri: "{{ sqlDevWebUri }}"
databaseTransformsUri: "{{ databaseTransformsUri }}"
graphStudioUri: "{{ graphStudioUri }}"
ordsUri: "{{ ordsUri }}"
machineLearningNotebookUri: "{{ machineLearningNotebookUri }}"
mongoDbUri: "{{ mongoDbUri }}"
localDisasterRecoveryType: "{{ localDisasterRecoveryType }}"
supportedCloneRegions:
- "{{ supportedCloneRegions }}"
scheduledOperationDetails:
- dayOfWeek: "{{ dayOfWeek }}"
stopTime:
seconds: {{ seconds }}
nanos: {{ nanos }}
minutes: {{ minutes }}
hours: {{ hours }}
startTime:
seconds: {{ seconds }}
nanos: {{ nanos }}
minutes: {{ minutes }}
hours: {{ hours }}
usedDataStorageSizeTbs: {{ usedDataStorageSizeTbs }}
nCharacterSet: "{{ nCharacterSet }}"
secretId: "{{ secretId }}"
allowlistedIps:
- "{{ allowlistedIps }}"
disasterRecoveryRoleChangedTime: "{{ disasterRecoveryRoleChangedTime }}"
isAutoScalingEnabled: {{ isAutoScalingEnabled }}
maintenanceEndTime: "{{ maintenanceEndTime }}"
peerDbIds:
- "{{ peerDbIds }}"
refreshableState: "{{ refreshableState }}"
localAdgAutoFailoverMaxDataLossLimitDuration: {{ localAdgAutoFailoverMaxDataLossLimitDuration }}
apexDetails:
apexVersion: "{{ apexVersion }}"
ordsVersion: "{{ ordsVersion }}"
privateEndpoint: "{{ privateEndpoint }}"
connectionStrings:
medium: "{{ medium }}"
allConnectionStrings:
low: "{{ low }}"
medium: "{{ medium }}"
high: "{{ high }}"
high: "{{ high }}"
low: "{{ low }}"
profiles:
- displayName: "{{ displayName }}"
sessionMode: "{{ sessionMode }}"
tlsAuthentication: "{{ tlsAuthentication }}"
consumerGroup: "{{ consumerGroup }}"
protocol: "{{ protocol }}"
hostFormat: "{{ hostFormat }}"
syntaxFormat: "{{ syntaxFormat }}"
isRegional: {{ isRegional }}
value: "{{ value }}"
dedicated: "{{ dedicated }}"
cpuCoreCount: {{ cpuCoreCount }}
maintenanceScheduleType: "{{ maintenanceScheduleType }}"
dataSafeState: "{{ dataSafeState }}"
localDataGuardEnabled: {{ localDataGuardEnabled }}
computeCount: {{ computeCount }}
availableUpgradeVersions:
- "{{ availableUpgradeVersions }}"
dbWorkload: "{{ dbWorkload }}"
dbVersion: "{{ dbVersion }}"
refreshableMode: "{{ refreshableMode }}"
privateEndpointLabel: "{{ privateEndpointLabel }}"
isLocalDataGuardEnabled: {{ isLocalDataGuardEnabled }}
memoryPerOracleComputeUnitGbs: {{ memoryPerOracleComputeUnitGbs }}
localStandbyDb:
dataGuardRoleChangedTime: "{{ dataGuardRoleChangedTime }}"
lagTimeDuration: "{{ lagTimeDuration }}"
disasterRecoveryRoleChangedTime: "{{ disasterRecoveryRoleChangedTime }}"
state: "{{ state }}"
lifecycleDetails: "{{ lifecycleDetails }}"
serviceAgentEmail: "{{ serviceAgentEmail }}"
dbEdition: "{{ dbEdition }}"
state: "{{ state }}"
ociUrl: "{{ ociUrl }}"
dataStorageSizeTb: {{ dataStorageSizeTb }}
encryptionKeyHistoryEntries:
- encryptionKey:
kmsKey: "{{ kmsKey }}"
provider: "{{ provider }}"
activationTime: "{{ activationTime }}"
- 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: 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: 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: 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: labels
value: "{{ labels }}"
description: |
Optional. The labels or tags associated with the Autonomous Database.
- 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:
autonomousDatabaseBackup: "{{ autonomousDatabaseBackup }}"
useLatestAvailableBackup: {{ useLatestAvailableBackup }}
autoRefreshStartTime: "{{ autoRefreshStartTime }}"
autoRefreshPointLagSeconds: {{ autoRefreshPointLagSeconds }}
autonomousDatabase: "{{ autonomousDatabase }}"
autoRefreshFrequencySeconds: {{ autoRefreshFrequencySeconds }}
automaticBackupsReplicationEnabled: {{ automaticBackupsReplicationEnabled }}
backupTime: "{{ backupTime }}"
sourceType: "{{ sourceType }}"
cloneType: "{{ cloneType }}"
refreshableMode: "{{ refreshableMode }}"
- 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__database = '{{ database }}',
data__name = '{{ name }}',
data__adminPassword = '{{ adminPassword }}',
data__cidr = '{{ cidr }}',
data__network = '{{ network }}',
data__properties = '{{ properties }}',
data__odbSubnet = '{{ odbSubnet }}',
data__odbNetwork = '{{ odbNetwork }}',
data__displayName = '{{ displayName }}',
data__adminPasswordSecretVersion = '{{ adminPasswordSecretVersion }}',
data__labels = '{{ labels }}',
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
- start
- failover
- refresh
- stop
- restart
- generate_wallet
- switchover
- restore
Starts an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.start
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
;
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 }}"
}'
;
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 }}"
}'
;
Stops an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.stop
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
;
Restarts an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.restart
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
;
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 }},
"type": "{{ type }}",
"password": "{{ password }}"
}'
;
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 }}"
}'
;
Restores a single Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.restore
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"restoreTime": "{{ restoreTime }}"
}'
;