odb_subnets
Creates, updates, deletes, gets or lists an odb_subnets
resource.
Overview
Name | odb_subnets |
Type | Resource |
Id | google.oracledatabase.odb_subnets |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the OdbSubnet resource in the following format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet} |
cidrRange | string | Required. The CIDR range of the subnet. |
createTime | string (google-datetime) | Output only. The date and time that the OdbNetwork was created. |
labels | object | Optional. Labels or tags associated with the resource. |
purpose | string | Required. Purpose of the subnet. |
state | string | Output only. State of the ODB Subnet. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of the OdbSubnet resource in the following format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet} |
cidrRange | string | Required. The CIDR range of the subnet. |
createTime | string (google-datetime) | Output only. The date and time that the OdbNetwork was created. |
labels | object | Optional. Labels or tags associated with the resource. |
purpose | string | Required. Purpose of the subnet. |
state | string | Output only. State of the ODB Subnet. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , odbNetworksId , odbSubnetsId | Gets details of a single ODB Subnet. | |
list | select | projectsId , locationsId , odbNetworksId | pageSize , pageToken , filter , orderBy | Lists all the ODB Subnets in a given ODB Network. |
create | insert | projectsId , locationsId , odbNetworksId | odbSubnetId , requestId | Creates a new ODB Subnet in a given ODB Network. |
delete | delete | projectsId , locationsId , odbNetworksId , odbSubnetsId | requestId | Deletes a single ODB Subnet. |
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 |
---|---|---|
locationsId | string | |
odbNetworksId | string | |
odbSubnetsId | string | |
projectsId | string | |
filter | string | |
odbSubnetId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string |
SELECT
examples
- get
- list
Gets details of a single ODB Subnet.
SELECT
name,
cidrRange,
createTime,
labels,
purpose,
state
FROM google.oracledatabase.odb_subnets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND odbNetworksId = '{{ odbNetworksId }}' -- required
AND odbSubnetsId = '{{ odbSubnetsId }}' -- required;
Lists all the ODB Subnets in a given ODB Network.
SELECT
name,
cidrRange,
createTime,
labels,
purpose,
state
FROM google.oracledatabase.odb_subnets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND odbNetworksId = '{{ odbNetworksId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new ODB Subnet in a given ODB Network.
INSERT INTO google.oracledatabase.odb_subnets (
data__name,
data__cidrRange,
data__purpose,
data__labels,
projectsId,
locationsId,
odbNetworksId,
odbSubnetId,
requestId
)
SELECT
'{{ name }}',
'{{ cidrRange }}',
'{{ purpose }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ odbNetworksId }}',
'{{ odbSubnetId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: odb_subnets
props:
- name: projectsId
value: string
description: Required parameter for the odb_subnets resource.
- name: locationsId
value: string
description: Required parameter for the odb_subnets resource.
- name: odbNetworksId
value: string
description: Required parameter for the odb_subnets resource.
- name: name
value: string
description: >
Identifier. The name of the OdbSubnet resource in the following format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
- name: cidrRange
value: string
description: >
Required. The CIDR range of the subnet.
- name: purpose
value: string
description: >
Required. Purpose of the subnet.
valid_values: ['PURPOSE_UNSPECIFIED', 'CLIENT_SUBNET', 'BACKUP_SUBNET']
- name: labels
value: object
description: >
Optional. Labels or tags associated with the resource.
- name: odbSubnetId
value: string
- name: requestId
value: string
DELETE
examples
- delete
Deletes a single ODB Subnet.
DELETE FROM google.oracledatabase.odb_subnets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND odbNetworksId = '{{ odbNetworksId }}' --required
AND odbSubnetsId = '{{ odbSubnetsId }}' --required
AND requestId = '{{ requestId }}';