Skip to main content

Get Google Cloud regions

Contributors netapp-aoife

This workflow retrieves the Google Cloud regions in which a Cloud Volumes ONTAP system might be created.

Choose the workflow to use based on the type of Cloud Volumes ONTAP deployment:

Get regions for a single node

You can use this workflow to retrieve the Google Cloud regions in a single node system.

1. Get the list of regions

HTTP method Path

GET

/occm/api/gcp/vsa/metadata/regions

curl example
curl --location --request GET 'https://api.bluexp.netapp.com/occm/api/gcp/vsa/metadata/regions' --header 'Content-Type: application/json' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>'
Input

None

Output

The JSON output provides an example of a list of Google Cloud regions.

JSON output example
[
    {
        "displayName": "asia-east1",
        "name": "asia-east1",
        "zones": [
            {
                "name": "asia-east1-a"
            },
            {
                "name": "asia-east1-b"
            },
            {
                "name": "asia-east1-c"
            }
        ],
        "vpcs": [
            {
                "name": "default",
                "subnets": [
                    {
                        "ipCidrRange": "10.140.0.0/20",
                        "name": "default",
                        "path": "projects/occm-dev/regions/asia-east1/subnetworks/default",
                        "availableIps": 4090,
                        "minimumRequiredIps": 6
                    }
                ],
                "firewalls": [
                    {
                        "name": "allow-all",
                        "vpc": "default"
                    },
                    {
                        "name": "allow-ssh-netapp",
                        "vpc": "default"
                    }
               ]
            },
           {
                "name": "eli-vpc",
                "subnets": [
                    {
                        "ipCidrRange": "10.0.0.0/00",
                        "name": "eli-subnet",
                        "path": "projects/occm-dev/regions/asia-east1/subnetworks/eli-subnet",
                        "availableIps": 250,
                        "minimumRequiredIps": 6
                    }
                ],
                "firewalls": [
                    {
                        "name": "eli-vpc-allow-http",
                        "vpc": "eli-vpc"
                    },
                    {
                        "name": "eli-vpc-allow-https",
                        "vpc": "eli-vpc"
                    }
               ]
            },
          ],
         },
    {
        "displayName": "asia-northeast1",
        "name": "asia-northeast1",
        "zones": [
            {
                "name": "asia-northeast1-a"
            },
            {
                "name": "asia-northeast1-b"
            },
            {
                "name": "asia-northeast1-c"
            }
        ],
        "vpcs": [
            {
                "name": "default",
                "subnets": [
                    {
                        "ipCidrRange": "00.000.0.0/20",
                        "name": "default",
                        "path": "projects/occm-dev/regions/asia-northeast1/subnetworks/default",
                        "availableIps": 4090,
                        "minimumRequiredIps": 6
                    }
                ],
                "firewalls": [
                    {
                        "name": "allow-all",
                        "vpc": "default"
                    },
                    {
                        "name": "allow-ssh-netapp",
                        "vpc": "default"
                    }
                 ]
            }
        ]
   }
}

Get regions for a high availability pair

You can use this workflow to retrieve the Google Cloud regions in an HA system.

1. Get the list of regions

HTTP method Path

GET

/occm/api/gcp/ha/metadata/regions

curl example
curl --location --request GET 'https://api.bluexp.netapp.com/occm/api/gcp/ha/metadata/regions' --header 'Content-Type: application/json' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>'
Input

None

Output

The JSON output provides an example of a list of Google Cloud regions.

JSON output example
[
    {
        "displayName": "asia-east1",
        "name": "asia-east1",
        "zones": [
            {
                "name": "asia-east1-a"
            },
            {
                "name": "asia-east1-b"
            },
            {
                "name": "asia-east1-c"
            }
        ],
        "vpcs": [
            {
                "name": "default",
                "subnets": [
                    {
                        "ipCidrRange": "10.140.0.0/20",
                        "name": "default",
                        "path": "projects/occm-dev/regions/asia-east1/subnetworks/default",
                        "availableIps": 4090,
                        "minimumRequiredIps": 6
                    }
                ],
                "firewalls": [
                    {
                        "name": "allow-all",
                        "vpc": "default"
                    },
                    {
                        "name": "allow-ssh-netapp",
                        "vpc": "default"
                    }
                ]
            },
            {
                "name": "eli-vpc",
                "subnets": [
                    {
                        "ipCidrRange": "10.0.0.0/24",
                        "name": "eli-subnet",
                        "path": "projects/occm-dev/regions/asia-east1/subnetworks/eli-subnet",
                        "availableIps": 250,
                        "minimumRequiredIps": 6
                    }
                ],
                "firewalls": [
                    {
                        "name": "eli-vpc-allow-http",
                        "vpc": "eli-vpc"
                    },
                    {
                        "name": "eli-vpc-allow-https",
                        "vpc": "eli-vpc"
                    }
                ]
            }
    },
    {
        "displayName": "asia-east2",
        "name": "asia-east2",
        "zones": [
            {
                "name": "asia-east2-c"
            },
            {
                "name": "asia-east2-b"
            },
            {
                "name": "asia-east2-a"
            }
        ],
        "vpcs": [
            {
                "name": "default",
                "subnets": [
                    {
                        "ipCidrRange": "10.170.0.0/20",
                        "name": "default",
                        "path": "projects/occm-dev/regions/asia-east2/subnetworks/default",
                        "availableIps": 4090,
                        "minimumRequiredIps": 6
                    }
                ],
                "firewalls": [
                    {
                        "name": "allow-all",
                        "vpc": "default"
                    },
                    {
                        "name": "allow-ssh-netapp",
                        "vpc": "default"
                    }
                ]
            }
        ]
  }
]