Get VPCs
You can perform this workflow to retrieve the Google Cloud networks and subnetworks over which a Cloud Volumes ONTAP working environment might be created.
This workflow is applicable only for an HA working environment. |
Step 1. Select the project
Perform the workflow Get projects and choose projectId
value of the required project for projectId
query parameter.
Step 2. Select the region
Perform the Get regions workflow and choose the region
value of the required region for the region
query parameter.
Step 3. Get the VPCs
HTTP method and endpoint
This REST API call uses the following method and endpoint.
HTTP method | Path |
---|---|
GET |
/occm/api/gcp/ha/metadata/vpcs |
Curl example
curl --request GET \
--location "https://cloudmanager.cloud.netapp.com/occm/api/gcp/ha/metadata/vpcs?project=<PROJECT_ID>®ion=<REGION>" \
--header "x-agent-id: <AGENT_ID>" \
--header "Authorization: Bearer <ACCESS_TOKEN>" \
--header "Content-Type: application/json"
Additional input parameters
The JSON input example includes the minimum list of parameters.
Query parameters:
-
<PROJECT_ID>
projectId
string -
<REGION>
region
string
Output
The JSON output example includes the list of Google Cloud 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 } ]