Cloud Management API 1.5
Routes
A Route defines how networking traffic should be routed from one destination to another. See next_hop_type for available endpoint targets.
Actions
index
List Routes available in this account.
- URLs
- GET /api/route_tables/:route_table_id/routes
- GET /api/routes
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.route;type=collection
Required roles
- observer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
filter | no | Array | * | * | no | See below for valid filter parameters. |
Filters
name | partial_match? | description |
---|---|---|
cloud_href | no | Returns Routes in the specified cloud |
description | yes | The description of the Route to filter on. |
network_href | no | Returns Routes in the specified Network |
next_hop_href | no | Returns Routes with the specified next_hop_href |
next_hop_ip | yes | Returns Routes with the specified next_hop_ip |
next_hop_type | no | Returns Routes with the specified next_hop_type |
next_hop_url | yes | Returns Routes with the specified next_hop_url |
route_table_href | no | Returns Routes in the specified RouteTable |
state | no | Returns Routes in the specified state |
Example Responses
Click on a format below to see an example response:
JSON XML[{
"description": "DESCRIPTION_1583034156",
"destination_cidr_block": "10.0.0.0/16",
"next_hop_type": "instance",
"state": "available",
"resource_uid": "RESOURCE_2409062953",
"created_at": "2023/10/09 11:06:02 +0000",
"updated_at": "2023/10/09 11:06:02 +0000",
"links": [
{"rel":"self","href":"/api/routes/RESOURCE_2409062953;4279184931"},
{"rel":"route_table","href":"/api/route_tables/RESOURCE_3446838169;668428100"},
{"rel":"cloud","href":"/api/clouds/888"},
{"rel":"next_hop","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"}
],
"cloud_specific_attributes": null
},{
"description": "DESCRIPTION_3200592931",
"destination_cidr_block": "10.0.0.0/16",
"next_hop_type": "instance",
"state": "available",
"resource_uid": "RESOURCE_849474362",
"created_at": "2023/10/09 11:06:03 +0000",
"updated_at": "2023/10/09 11:06:03 +0000",
"links": [
{"rel":"self","href":"/api/routes/RESOURCE_849474362;309766669"},
{"rel":"route_table","href":"/api/route_tables/RESOURCE_1438581546;1014880811"},
{"rel":"cloud","href":"/api/clouds/888"},
{"rel":"next_hop","href":"/api/clouds/888/instances/RESOURCE_1620899759;RAND"}
],
"cloud_specific_attributes": null
}]
<?xml version="1.0" encoding="UTF-8"?>
<routes>
<route>
<description>DESCRIPTION_1583034156</description>
<destination_cidr_block>10.0.0.0/16</destination_cidr_block>
<next_hop_type>instance</next_hop_type>
<state>available</state>
<resource_uid>RESOURCE_2409062953</resource_uid>
<created_at>2023/10/09 11:06:02 +0000</created_at>
<updated_at>2023/10/09 11:06:02 +0000</updated_at>
<links>
<link rel="self" href="/api/routes/RESOURCE_2409062953;4279184931"/>
<link rel="route_table" href="/api/route_tables/RESOURCE_3446838169;668428100"/>
<link rel="cloud" href="/api/clouds/888"/>
<link rel="next_hop" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND"/>
</links>
<cloud_specific_attributes/>
</route>
<route>
<description>DESCRIPTION_3200592931</description>
<destination_cidr_block>10.0.0.0/16</destination_cidr_block>
<next_hop_type>instance</next_hop_type>
<state>available</state>
<resource_uid>RESOURCE_849474362</resource_uid>
<created_at>2023/10/09 11:06:03 +0000</created_at>
<updated_at>2023/10/09 11:06:03 +0000</updated_at>
<links>
<link rel="self" href="/api/routes/RESOURCE_849474362;309766669"/>
<link rel="route_table" href="/api/route_tables/RESOURCE_1438581546;1014880811"/>
<link rel="cloud" href="/api/clouds/888"/>
<link rel="next_hop" href="/api/clouds/888/instances/RESOURCE_1620899759;RAND"/>
</links>
<cloud_specific_attributes/>
</route>
</routes>
show
Show information about a single Route.
- URLs
- GET /api/route_tables/:route_table_id/routes/:id
- GET /api/routes/:id
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.route
Required roles
- observer
Example Responses
Click on a format below to see an example response:
JSON XML{
"description": "DESCRIPTION_1583034156",
"destination_cidr_block": "10.0.0.0/16",
"next_hop_type": "instance",
"state": "available",
"resource_uid": "RESOURCE_2409062953",
"created_at": "2023/10/09 11:06:02 +0000",
"updated_at": "2023/10/09 11:06:02 +0000",
"links": [
{"rel":"self","href":"/api/routes/RESOURCE_2409062953;4279184931"},
{"rel":"route_table","href":"/api/route_tables/RESOURCE_3446838169;668428100"},
{"rel":"cloud","href":"/api/clouds/888"},
{"rel":"next_hop","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"}
],
"cloud_specific_attributes": null
}
<?xml version="1.0" encoding="UTF-8"?>
<route>
<description>DESCRIPTION_1583034156</description>
<destination_cidr_block>10.0.0.0/16</destination_cidr_block>
<next_hop_type>instance</next_hop_type>
<state>available</state>
<resource_uid>RESOURCE_2409062953</resource_uid>
<created_at>2023/10/09 11:06:02 +0000</created_at>
<updated_at>2023/10/09 11:06:02 +0000</updated_at>
<links>
<link rel="self" href="/api/routes/RESOURCE_2409062953;4279184931"/>
<link rel="route_table" href="/api/route_tables/RESOURCE_3446838169;668428100"/>
<link rel="cloud" href="/api/clouds/888"/>
<link rel="next_hop" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND"/>
</links>
<cloud_specific_attributes/>
</route>
create
Create a new Route.
- URLs
- POST /api/route_tables/:route_table_id/routes
- POST /api/routes
- HTTP response code
- 201 Created
Required roles
- security_manager
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
route | yes | Hash | * | * | no | |
route[cloud_specific_attributes] | no | Hash | * | * | no | Cloud specific attributes that have no generic rightscale abstraction |
route[cloud_specific_attributes][instance_tags] | no | Array | * | * | no | A list of instance tags to which this route applies. Omitting this value will result in creation of global route. |
route[cloud_specific_attributes][priority] | no | Integer | * | * | no | Priority is used to break ties in the case where there is more than one matching route of maximum length. A lower value is higher priority. |
route[description] | no | String | * | * | yes | The description to be set on the Route. |
route[destination_cidr_block] | yes | String | * | ^(\d{1,3}\.){3}\d{1,3}/\d{1,2}$ | no | The destination (CIDR IP address) for the Route. |
route[next_hop_href] | no | String | * | * | no | The href of the Route's next hop. Required if route[next_hop_type] is 'instance', 'network_interface', or 'network_gateway'. Not allowed otherwise. |
route[next_hop_ip] | no | String | * | ^(\d{1,3}\.){3}\d{1,3}$ | no | The IP Address of the Route's next hop. Required if route[next_hop_type] is 'ip_string'. Not allowed otherwise. |
route[next_hop_type] | yes | String | instance, network_interface, network_gateway, ip_string, url | * | no | The Route's next hop type. |
route[next_hop_url] | no | String | * | * | no | The URL of the Route's next hop. Required if route[next_hop_type] is 'url'. Not allowed otherwise. |
route[route_table_href] | yes | String | * | * | no | The RouteTable to create the Route in. |
update
Update an existing Route.
- URLs
- PUT /api/route_tables/:route_table_id/routes/:id
- PUT /api/routes/:id
- HTTP response code
- 204 No Content
Required roles
- security_manager
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
route | yes | Hash | * | * | no | |
route[description] | no | String | * | * | yes | The updated description of the Route. |
route[destination_cidr_block] | no | String | * | ^(\d{1,3}\.){3}\d{1,3}/\d{1,2}$ | no | The updated destination (CIDR IP address) for the Route. |
route[next_hop_href] | no | String | * | * | no | The updated href of the Route's next hop. Required if route[next_hop_type] is 'instance', 'network_interface', or 'network_gateway'. Not allowed otherwise. |
route[next_hop_ip] | no | String | * | ^(\d{1,3}\.){3}\d{1,3}$ | no | The updated IP Address of the Route's next hop. Required if route[next_hop_type] is 'ip_string'. Not allowed otherwise. |
route[next_hop_type] | no | String | instance, network_interface, network_gateway, ip_string | * | no | The updated Route's next hop type. |
destroy
Delete an existing Route.
- URLs
- DELETE /api/route_tables/:route_table_id/routes/:id
- DELETE /api/routes/:id
- HTTP response code
- 204 No Content
Required roles
- security_manager