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
Successful response
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. The password for the default ADMIN user. |
cidr | string | Optional. 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. 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. 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. The name of the VPC network used by the Autonomous Database in the following format: projects/{project}/global/networks/{network} |
odbNetwork | string | Optional. 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. 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. 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) |
Successful response
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. The password for the default ADMIN user. |
cidr | string | Optional. 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. 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. 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. The name of the VPC network used by the Autonomous Database in the following format: projects/{project}/global/networks/{network} |
odbNetwork | string | Optional. 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. 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. 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 | pageSize , pageToken , filter , orderBy | 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. |
delete | delete | projectsId , locationsId , autonomousDatabasesId | requestId | Deletes a single Autonomous Database. |
restore | exec | projectsId , locationsId , autonomousDatabasesId | Restores a single Autonomous Database. | |
generate_wallet | exec | projectsId , locationsId , autonomousDatabasesId | Generates a wallet for an Autonomous Database. | |
stop | exec | projectsId , locationsId , autonomousDatabasesId | Stops an Autonomous Database. | |
start | exec | projectsId , locationsId , autonomousDatabasesId | Starts an Autonomous Database. | |
restart | exec | projectsId , locationsId , autonomousDatabasesId | Restarts 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 |
SELECT
examples
- get
- list
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;
Lists the Autonomous Databases in a given project and location.
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: autonomous_databases
props:
- name: projectsId
value: string
description: Required parameter for the autonomous_databases resource.
- name: locationsId
value: string
description: Required parameter for the autonomous_databases resource.
- name: name
value: string
description: >
Identifier. The name of the Autonomous Database resource in the following format: projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}
- name: database
value: string
description: >
Optional. 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: string
description: >
Optional. The display name for the Autonomous Database. The name does not have to be unique within your project.
- name: adminPassword
value: string
description: >
Optional. The password for the default ADMIN user.
- name: properties
value: object
description: >
Optional. The properties of the Autonomous Database.
- name: labels
value: object
description: >
Optional. The labels or tags associated with the Autonomous Database.
- name: network
value: string
description: >
Optional. The name of the VPC network used by the Autonomous Database in the following format: projects/{project}/global/networks/{network}
- name: cidr
value: string
description: >
Optional. The subnet CIDR range for the Autonomous Database.
- name: odbNetwork
value: string
description: >
Optional. 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: string
description: >
Optional. The name of the OdbSubnet associated with the Autonomous Database. Format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
- name: sourceConfig
value: object
description: >
Optional. 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.
- name: autonomousDatabaseId
value: string
- name: requestId
value: string
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
- restore
- generate_wallet
- stop
- start
- restart
- switchover
Restores a single Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.restore
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"restoreTime": "{{ restoreTime }}"
}';
Generates a wallet for an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.generate_wallet
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required
@@json=
'{
"type": "{{ type }}",
"isRegional": {{ isRegional }},
"password": "{{ password }}"
}';
Stops an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.stop
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@autonomousDatabasesId='{{ autonomousDatabasesId }}' --required;
Starts an Autonomous Database.
EXEC google.oracledatabase.autonomous_databases.start
@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;
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 }}"
}';