Get route tables
You can use the route tables endpoint to retrieve the route tables labels for each VPC and their subnet association information.
We use the Get route tables workflow only for the high availability pair. |
Step 1. Get the region
Perform the workflow Get regions and choose the code
value of the required region for the region
query parameter.
Step 2. Get the VPC
Perform the workflow Get VPCs and choose the vpcId
value of the required VPC for the vpcId
query parameter.
Step 3. Get the route tables
You can issue the REST API call to retrieve the route tables.
This REST API call uses the following method and endpoint.
HTTP method | Path |
---|---|
GET |
/occm/api/aws/ha/metadata/route-tables |
curl --request GET \
--location "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"
In addition to the parameters common with all REST API calls, the following parameters are also used in the curl examples for this step.
Parameter | Type | Required | Description |
---|---|---|---|
<REGION> |
Query |
Yes |
Identifies the region of the working environment |
<VPCID> |
Query |
Yes |
Identifies the virtual private cloud (VPC) ID of the working environment |
|
Query |
No |
Identifies the AMazon resource name for the connection's role. |
|
Query |
No |
Identifies the cloud provider account ID. |
The output includes an array of route tables.
Example output
[ { "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" } ] } ]