Get VPCs

Contributors netapp-ranuk

You can perform this workflow to retrieve the GCP networks and subnetworks over which a Cloud Volumes ONTAP working environment might be created.

Note This workflow is applicable only for an HA working environment.

1. Select the project

Perform the workflow Get projects and choose projectId value of the required project for projectId query parameter.

2. Select the region

Perform the Get regions workflow and choose the region value of the required region for the region query parameter.

3. Get the VPCs

HTTP method Path

GET

/occm/api/gcp/ha/metadata/vpcs

curl example
curl --location --request GET 'https://cloudmanager.cloud.netapp.com/occm/api/gcp/ha/metadata/vpcs?project=<PROJECT_ID>&region=<REGION>' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>' --header 'Content-Type: application/json'
Input

Query parameters:

  • <PROJECT_ID> projectId string

  • <REGION> region string

Output

The JSON output example includes the list of GCP networks and subnetworks.

JSON output example
[
    {
        "name": "default",
        "vpcPath": "projects/occm-dev/global/networks/default",
        "subnets": [
            {
                "ipCidrRange": "10.138.0.0/20",
                "name": "default",
                "path": "projects/occm-dev/regions/us-west1/subnetworks/default",
                "availableIps": 4090,
                "minimumRequiredIps": 6
            }
        ],
        "firewalls": [
            {
                "name": "allow-all",
                "vpc": "default"
            },
            {
                "name": "allow-ssh-netapp",
                "vpc": "default"
            }
        ],
        "isShared": false
    },
    {
        "name": "eli-vpc",
        "vpcPath": "projects/occm-dev/global/networks/eli-vpc",
        "subnets": [],
        "firewalls": [
            {
                "name": "eli-vpc-allow-http",
                "vpc": "eli-vpc"
            },
            {
                "name": "eli-vpc-allow-https",
                "vpc": "eli-vpc"
            }
        ],
        "isShared": false
    }
]