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](https://docs.cloud.google.com/oracle/database/docs/setup-oracle-database-environment.md.txt#deploy-odb-environment).

## List ODB Network and ODB Subnets

To list ODB Network and its ODB Subnets in a project, do
the following:

### Console

1. Go to the **ODB Network** page.

   [Go to ODB Network](https://console.cloud.google.com/oracle/autonomous-databases/)

   You can view the list of your ODB Networks.
2. To view ODB Subnets of an ODB Network, click the
   ODB Network name, and go to the **Subnets** section.

### 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:

- <var translate="no">PROJECT_ID</var>: the ID of your Google Cloud project. If you're using a Shared VPC, then this is the ID of your host project.
- <var translate="no">REGION</var>: 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:

- <var translate="no">PROJECT_ID</var>: 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.
- <var translate="no">REGION</var>: the region of the ODB Network.
- <var translate="no">ODB_NETWORK_ID</var>: 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:

- <var translate="no">PROJECT_ID</var>: the ID of your Google Cloud project. If you're using a Shared VPC, then this is the ID of your host project.
- <var translate="no">REGION</var>: 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:

- <var translate="no">PROJECT_ID</var>: 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.
- <var translate="no">REGION</var>: the region of your ODB Network.
- <var translate="no">ODB_NETWORK_ID</var>: 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:

### Console

1. Go to the **ODB Network** page.

   [Go to ODB Network](https://console.cloud.google.com/oracle/autonomous-databases/)
2. Click the ODB Network for which you want to view the details.

3. On the **ODB Network details** page, you can view the details of
   the ODB Network.

4. To view the details of the subnets, go to the **Subnets** section.

5. To view change logs, select the **Operations** tab.

### 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:

- <var translate="no">ODB_NETWORK_ID</var>: the ID of your ODB Network.
- <var translate="no">PROJECT_ID</var>: 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.
- <var translate="no">REGION</var>: 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:

- <var translate="no">ODB_SUBNET_ID</var>: the ID of the ODB Subnet.
- <var translate="no">PROJECT_ID</var>: 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.
- <var translate="no">REGION</var>: the region of the ODB Network.
- <var translate="no">ODB_NETWORK_ID</var>: 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:

- <var translate="no">PROJECT_ID</var>: 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.
- <var translate="no">REGION</var>: the region of your ODB Network.
- <var translate="no">ODB_NETWORK_ID</var>: 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:

- <var translate="no">PROJECT_ID</var>: 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.
- <var translate="no">REGION</var>: the region of your ODB Network.
- <var translate="no">ODB_NETWORK_ID</var>: the ID of your ODB Network.
- <var translate="no">ODB_SUBNET_ID</var>: the ID of the ODB Subnet.