This page describes how to view details of an ODB Network and ODB Subnets.
Before you begin
- Make sure that you have the required Identity and Access Management (IAM) roles and permissions to view details of an ODB Network and ODB Subnets as described in Deploy Oracle Database@Google Cloud environment.
List ODB Network and ODB Subnets
To list ODB Network and its ODB Subnets in a project, do the following:
gcloud
Use the gcloud oracle-database odb-networks list
command to list your
ODB Networks.
gcloud oracle-database odb-networks list \
--project=PROJECT_ID \
--___location=REGION
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of the ODB Network.
Use the gcloud oracle-database odb-networks odb-subnets list
command to
list the ODB Subnets of an ODB Network.
gcloud oracle-database odb-networks odb-subnets list \
--project=PROJECT_ID \
--___location=REGION \
--odb-network=ODB_NETWORK_ID
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project which contains the ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of the ODB Network.
- ODB_NETWORK_ID: the ID of the ODB Network to which the ODB Subnet belongs.
API
To list ODB Networks, run the following curl
command:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/odbNetworks"
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of your ODB Network.
To list ODB Subnets of an ODB Network, run the following
curl
command:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/odbNetworks/ODB_NETWORK_ID/odbSubnets"
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project which contains the ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of your ODB Network.
- ODB_NETWORK_ID: the ID of your ODB Network.
View ODB Network and ODB Subnet details
To view details of an ODB Network and its ODB Subnets, do the following:
gcloud
Use the gcloud oracle-database odb-networks get
command to view details
of an ODB Network.
gcloud oracle-database odb-networks get ODB_NETWORK_ID \
--project=PROJECT_ID \
--___location=REGION
Replace the following:
- ODB_NETWORK_ID: the ID of your ODB Network.
- PROJECT_ID: the ID of your Google Cloud project which contains the ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of the ODB Network.
Use the gcloud oracle-database odb-networks odb-subnets get
command to
view details of an ODB Subnet.
gcloud oracle-database odb-networks odb-subnets get ODB_SUBNET_ID \
--project=PROJECT_ID \
--___location=REGION \
--odb-network=ODB_NETWORK_ID
Replace the following:
- ODB_SUBNET_ID: the ID of the ODB Subnet.
- PROJECT_ID: the ID of your Google Cloud project which contains the ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of the ODB Network.
- ODB_NETWORK_ID: the ID of the ODB Network to which the ODB Subnet belongs.
API
To view details of an ODB Network, run the following curl
command:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/odbNetworks/ODB_NETWORK_ID"
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project which contains the ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of your ODB Network.
- ODB_NETWORK_ID: the ID of your ODB Network.
To view details of an ODB Subnet, run the following curl
command:
curl -X GET \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ "https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/odbNetworks/ODB_NETWORK_ID/odbSubnets/ODB_SUBNET_ID"
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project which contains the ODB Network. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region of your ODB Network.
- ODB_NETWORK_ID: the ID of your ODB Network.
- ODB_SUBNET_ID: the ID of the ODB Subnet.