Get list of virtual private clouds

Contributors netapp-ranuk

You can use this workflow to retrieve a list of the available virtual private clouds (VPCs).

Choose the correct workflow depending on the type of Cloud Volumes ONTAP deployment:

Get VPCs for single node

You can use this workflow to retrieve the VPCs for a single node working environment.

1. Select the region to use

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

2. Get the VPCs

HTTP method Path

GET

/occm/api/vsa/metadata/vpcs?region=<REGION>

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

Query parameters:

  • <REGION> region

Output

The JSON output example includes the list of virtual private clouds.

JSON output example
[
    {
        "vpcId": "vpc-b16c90d4",
        "state": "available",
        "cidrBlock": "172.31.0.0/16",
        "tags": [
            {
                "key": "Name",
                "value": "VPC for VSA"
            },
            {
                "key": "last",
                "value": "ioio"
            }
        ],
        "default": true,
        "subnets": [
            {
                "subnetId": "subnet-c1d99699",
                "cidr": "172.31.5.0/24",
                "subnetName": "subnet5",
                "availabilityZone": "us-east-1a",
                "availableIps": 247,
                "minimumRequiredIps": 8,
                "outpostArn": null
            },
            {
                "subnetId": "subnet-deebdbe3",
                "cidr": "172.31.6.0/24",
                "subnetName": "Proxy Subnet",
                "availabilityZone": "us-east-1e",
                "availableIps": 248,
                "minimumRequiredIps": 8,
                "outpostArn": null
            }
        ],
        "securityGroups": [
            {
                "securityGroupId": "xx-xxxa1ne9xxx67xcvf",
                "description": "NetApp OCCM Instance External Security Group",
                "name": "hguyiuukOCCM1590415972561-OCCMSecurityGroup-yryrytt"
            },
            {
                "securityGroupId": "xx-xxxa1ne9xxx67xcvf",
                "description": "Enable HTTP and NFS for Cloud Restore Instance",
                "name": "Cloud-Restore-Instance-account-xxxxxx-CloudRestoreInstanceSecurityGroup-sdweretttrrt"
            }
        ],
        "tenancy": "default"
    },
    {
        "vpcId": "vpc-fe5c1f98",
        "state": "available",
        "cidrBlock": "140.30.0.0/16",
        "tags": [
            {
                "key": "Name",
                "value": "VPCWIthNOS3"
            }
        ],
        "default": false,
        "subnets": [
            {
                "subnetId": "subnet-e84722d4",
                "cidr": "140.30.5.0/24",
                "subnetName": "subnet1",
                "availabilityZone": "us-east-1e",
                "availableIps": 250,
                "minimumRequiredIps": 8,
                "outpostArn": null
            }
        ],
        "securityGroups": [
            {
                "securityGroupId": "xx-xxxa1ne9xxx67xcvf",
                "description": "ONTAP Cloud firewall rules for management and data interface",
                "name": "xx-Version10-duahpJbS-NetAppExternalSecurityGroup-rtyunht"
            },
            {
                "securityGroupId": "xx-xxxa1ne9xxx67xcvf",
                "description": "default VPC security group",
                "name": "default"
            }
        ],
        "tenancy": "default"
    }
]

Get VPCs for high availability pair

You can use this workflow to retrieve the VPCs for an HA working environment.

1. Select the region to use

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

2. Get the VPCs

HTTP method Path

GET

/occm/api/aws/ha/metadata/vpcs?region=<REGION>

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

Query parameters:

  • <REGION> region

Output

The JSON output example includes the list of virtual private clouds.

JSON output example
[
    {
        "vpcId": "vpc-b16c90d4",
        "state": "available",
        "cidrBlock": "172.31.0.0/16",
        "tags": [
            {
                "key": "Name",
                "value": "VPC for VSA"
            },
            {
                "key": "last",
                "value": "ioio"
            }
        ],
        "default": true,
        "subnets": [
            {
                "subnetId": "subnet-c1d99699",
                "cidr": "172.31.5.0/24",
                "subnetName": "subnet5",
                "availabilityZone": "us-east-1a",
                "availableIps": 247,
                "minimumRequiredIps": 8,
                "outpostArn": null
            },
            {
                "subnetId": "subnet-deebdbe3",
                "cidr": "172.31.6.0/24",
                "subnetName": "Proxy Subnet",
                "availabilityZone": "us-east-1e",
                "availableIps": 248,
                "minimumRequiredIps": 8,
                "outpostArn": null
            }
        ],
        "securityGroups": [
            {
                "securityGroupId": "xx-xxxa1ne9xxx67xcvf",
                "description": "NetApp OCCM Instance External Security Group",
                "name": "lilush2000OCCM1590415972561-OCCMSecurityGroup-JDB72N6W90UG"
            },
            {
                "securityGroupId": "xx-xxxa1ne9xxx67xcvf",
                "description": "Enable HTTP and NFS for Cloud Restore Instance",
                "name": "Cloud-Restore-Instance-account-xxxxxx-CloudRestoreInstanceSecurityGroup-sdweretttrrt"
            }
        ],
        "tenancy": "default"
    },
    {
        "vpcId": "vpc-fe5c1f98",
        "state": "available",
        "cidrBlock": "140.30.0.0/16",
        "tags": [
            {
                "key": "Name",
                "value": "VPCWIthNOS3"
            }
        ],
        "default": false,
        "subnets": [
            {
                "subnetId": "subnet-e84722d4",
                "cidr": "140.30.5.0/24",
                "subnetName": "subnet1",
                "availabilityZone": "us-east-1e",
                "availableIps": 250,
                "minimumRequiredIps": 8,
                "outpostArn": null
            }
        ],
        "securityGroups": [
            {
                "securityGroupId": "xx-xxxa1ne9xxx67xcvf",
                "description": "ONTAP Cloud firewall rules for management and data interface",
                "name": "XX-Version10-yuiloJbS-NetAppExternalSecurityGroup-TYUOPR"
            },
            {
                "securityGroupId": "xx-xxxa1ne9xxx67xcvf",
                "description": "default VPC security group",
                "name": "default"
            }
        ],
        "tenancy": "default"
    }
]