Skip to main content

autonomous_databases

Creates, updates, deletes, gets or lists an autonomous_databases resource.

Overview

Nameautonomous_databases
TypeResource
Idgoogle.oracledatabase.autonomous_databases

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the Autonomous Database resource in the following format: projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}
adminPasswordstringOptional. The password for the default ADMIN user.
cidrstringOptional. The subnet CIDR range for the Autonomous Database.
createTimestring (google-datetime)Output only. The date and time that the Autonomous Database was created.
databasestringOptional. 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.
disasterRecoverySupportedLocationsarrayOutput only. List of supported GCP region to clone the Autonomous Database for disaster recovery. Format: project/{project}/locations/{location}.
displayNamestringOptional. The display name for the Autonomous Database. The name does not have to be unique within your project.
entitlementIdstringOutput only. The ID of the subscription entitlement associated with the Autonomous Database.
labelsobjectOptional. The labels or tags associated with the Autonomous Database.
networkstringOptional. The name of the VPC network used by the Autonomous Database in the following format: projects/{project}/global/networks/{network}
odbNetworkstringOptional. 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.
odbSubnetstringOptional. The name of the OdbSubnet associated with the Autonomous Database. Format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
peerAutonomousDatabasesarrayOutput only. The peer Autonomous Database names of the given Autonomous Database.
propertiesobjectOptional. The properties of the Autonomous Database. (id: AutonomousDatabaseProperties)
sourceConfigobjectOptional. 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, autonomousDatabasesIdGets the details of a single Autonomous Database.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists the Autonomous Databases in a given project and location.
createinsertprojectsId, locationsIdautonomousDatabaseId, requestIdCreates a new Autonomous Database in a given project and location.
deletedeleteprojectsId, locationsId, autonomousDatabasesIdrequestIdDeletes a single Autonomous Database.
restoreexecprojectsId, locationsId, autonomousDatabasesIdRestores a single Autonomous Database.
generate_walletexecprojectsId, locationsId, autonomousDatabasesIdGenerates a wallet for an Autonomous Database.
stopexecprojectsId, locationsId, autonomousDatabasesIdStops an Autonomous Database.
startexecprojectsId, locationsId, autonomousDatabasesIdStarts an Autonomous Database.
restartexecprojectsId, locationsId, autonomousDatabasesIdRestarts an Autonomous Database.
switchoverexecprojectsId, locationsId, autonomousDatabasesIdInitiates 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.

NameDatatypeDescription
autonomousDatabasesIdstring
locationsIdstring
projectsIdstring
autonomousDatabaseIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

Gets the details of a single Autonomous Database.

SELECT
name,
adminPassword,
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;

INSERT examples

Creates a new Autonomous Database in a given project and location.

INSERT INTO google.oracledatabase.autonomous_databases (
data__name,
data__database,
data__displayName,
data__adminPassword,
data__properties,
data__labels,
data__network,
data__cidr,
data__odbNetwork,
data__odbSubnet,
data__sourceConfig,
projectsId,
locationsId,
autonomousDatabaseId,
requestId
)
SELECT
'{{ name }}',
'{{ database }}',
'{{ displayName }}',
'{{ adminPassword }}',
'{{ properties }}',
'{{ labels }}',
'{{ network }}',
'{{ cidr }}',
'{{ odbNetwork }}',
'{{ odbSubnet }}',
'{{ sourceConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ autonomousDatabaseId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples

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

Restores a single Autonomous Database.

EXEC google.oracledatabase.autonomous_databases.restore 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"restoreTime": "{{ restoreTime }}"
}';