Skip to main content

odb_subnets

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

Overview

Nameodb_subnets
TypeResource
Idgoogle.oracledatabase.odb_subnets

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The name of the OdbSubnet resource in the following format: projects/{project}/locations/{location}/odbNetworks/{odb_network}/odbSubnets/{odb_subnet}
cidrRangestringRequired. The CIDR range of the subnet.
createTimestring (google-datetime)Output only. The date and time that the OdbNetwork was created.
labelsobjectOptional. Labels or tags associated with the resource.
purposestringRequired. Purpose of the subnet.
statestringOutput only. State of the ODB Subnet.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, odbNetworksId, odbSubnetsIdGets details of a single ODB Subnet.
listselectprojectsId, locationsId, odbNetworksIdpageSize, pageToken, filter, orderByLists all the ODB Subnets in a given ODB Network.
createinsertprojectsId, locationsId, odbNetworksIdodbSubnetId, requestIdCreates a new ODB Subnet in a given ODB Network.
deletedeleteprojectsId, locationsId, odbNetworksId, odbSubnetsIdrequestIdDeletes 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.

NameDatatypeDescription
locationsIdstring
odbNetworksIdstring
odbSubnetsIdstring
projectsIdstring
filterstring
odbSubnetIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring

SELECT examples

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;

INSERT examples

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
;

DELETE examples

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 }}';