Skip to main content

Get route tables

Contributors netapp-ranuk

You can use the route tables endpoint to retrieve the route tables labels for each VPC and their subnet association information.

Note We use the Get route tables workflow only for the high availability pair.

1. Get the region

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

2. Get the VPC

Perform the workflow Get VPCs and choose the vpcId value of the required VPC for the vpcId query parameter.

3. Get the route tables

HTTP method Path

GET

/occm/api/aws/ha/metadata/route-tables

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

Query parameters:

  • <REGION> region

  • <VPCID> vpcId

Optional parameters:

  • roleArn: String

  • cloudProviderAccountId: String

    Output

    The output includes an array of route tables.

    JSON output example
    [
        {
            "id": "rtb-3338784b",
            "main": false,
            "subnets": [],
            "tags": [
                {
                    "key": "Name",
                    "value": "route3"
                }
            ]
        },
        {
            "id": "rtb-e13a7a99",
            "main": false,
            "subnets": [],
            "tags": [
                {
                    "key": "Name",
                    "value": "route2"
                }
            ]
        },
        {
            "id": "rtb-7a3b7b02",
            "main": false,
            "subnets": [],
            "tags": [
                {
                    "key": "Name",
                    "value": "route4"
                }
            ]
        },
        {
            "id": "rtb-0a41155f5c924872e",
            "main": false,
            "subnets": [],
            "tags": [
                {
                    "key": "Name",
                    "value": "long"
                }
            ]
        },
        {
            "id": "rtb-d0e847b6",
            "main": false,
            "subnets": [],
            "tags": [
                {
                    "key": "Name",
                    "value": "IC Route"
                }
            ]
        },
        {
            "id": "rtb-3333734b",
            "main": false,
            "subnets": [],
            "tags": [
                {
                    "key": "Name",
                    "value": "route1"
                }
            ]
        },
        {
            "id": "rtb-02a45467",
            "main": true,
            "subnets": [],
            "tags": [
                {
                    "key": "Name",
                    "value": "main"
                }
            ]
        }
    ]