routes
Creates, updates, deletes, gets or lists a routes resource.
Overview
| Name | routes |
| Type | Resource |
| Id | aws.appmesh.routes |
Fields
The following fields are returned by SELECT queries:
- describe_route
- list_routes
| Name | Datatype | Description |
|---|---|---|
mesh_name | string | The name of the service mesh that the route resides in. |
metadata | object | An object that represents metadata for a resource. |
route_name | string | The name of the route. |
spec | object | An object that represents a route specification. Specify one route type. |
status | object | The status of the route. |
virtual_router_name | string | The virtual router that the route is associated with. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The full Amazon Resource Name (ARN) for the route. |
created_at | string (date-time) | The Unix epoch timestamp in seconds for when the resource was created. |
last_updated_at | string (date-time) | The Unix epoch timestamp in seconds for when the resource was last updated. |
mesh_name | string | The name of the service mesh that the route resides in. |
mesh_owner | string | The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes. |
resource_owner | string | The Amazon Web Services IAM account ID of the resource owner. If the account ID is not your own, then it's the ID of the mesh owner or of another account that the mesh is shared with. For more information about mesh sharing, see Working with shared meshes. |
route_name | string | The name of the route. |
version | integer (int64) | The version of the resource. Resources are created at version 1, and this version is incremented each time that they're updated. |
virtual_router_name | string | The virtual router that the route is associated with. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_route | select | mesh_name, route_name, virtual_router_name, region | meshOwner | Describes an existing route. |
list_routes | select | mesh_name, virtual_router_name, region | limit, meshOwner, nextToken | Returns a list of existing routes in a service mesh. |
create_route | insert | mesh_name, virtual_router_name, region, routeName, spec | meshOwner | Creates a route that is associated with a virtual router. You can route several different protocols and define a retry policy for a route. Traffic can be routed to one or more virtual nodes. For more information about routes, see Routes. |
update_route | update | mesh_name, route_name, virtual_router_name, region, spec | meshOwner | Updates an existing route for a specified service mesh and virtual router. |
delete_route | delete | mesh_name, route_name, virtual_router_name, region | meshOwner | Deletes an existing route. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
mesh_name | string | The name of the service mesh to delete the route in. |
region | string | AWS region (default: us-east-1) |
route_name | string | The name of the route to delete. |
virtual_router_name | string | The name of the virtual router to delete the route in. |
limit | integer | The maximum number of results returned by ListRoutes in paginated output. When you use this parameter, ListRoutes returns only limit results in a single page along with a nextToken response element. You can see the remaining results of the initial request by sending another ListRoutes request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, ListRoutes returns up to 100 results and a nextToken value if applicable. |
meshOwner | string | The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then it's the ID of the account that shared the mesh with your account. For more information about mesh sharing, see Working with shared meshes. |
nextToken | string | The nextToken value returned from a previous paginated ListRoutes request where limit was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. |
SELECT examples
- describe_route
- list_routes
Describes an existing route.
SELECT
mesh_name,
metadata,
route_name,
spec,
status,
virtual_router_name
FROM aws.appmesh.routes
WHERE mesh_name = '{{ mesh_name }}' -- required
AND route_name = '{{ route_name }}' -- required
AND virtual_router_name = '{{ virtual_router_name }}' -- required
AND region = '{{ region }}' -- required
AND meshOwner = '{{ meshOwner }}'
;
Returns a list of existing routes in a service mesh.
SELECT
arn,
created_at,
last_updated_at,
mesh_name,
mesh_owner,
resource_owner,
route_name,
version,
virtual_router_name
FROM aws.appmesh.routes
WHERE mesh_name = '{{ mesh_name }}' -- required
AND virtual_router_name = '{{ virtual_router_name }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND meshOwner = '{{ meshOwner }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_route
- Manifest
Creates a route that is associated with a virtual router. You can route several different protocols and define a retry policy for a route. Traffic can be routed to one or more virtual nodes. For more information about routes, see Routes.
INSERT INTO aws.appmesh.routes (
clientToken,
routeName,
spec,
tags,
mesh_name,
virtual_router_name,
region,
meshOwner
)
SELECT
'{{ clientToken }}',
'{{ routeName }}' /* required */,
'{{ spec }}' /* required */,
'{{ tags }}',
'{{ mesh_name }}',
'{{ virtual_router_name }}',
'{{ region }}',
'{{ meshOwner }}'
RETURNING
route
;
# Description fields are for documentation purposes
- name: routes
props:
- name: mesh_name
value: "{{ mesh_name }}"
description: Required parameter for the routes resource.
- name: virtual_router_name
value: "{{ virtual_router_name }}"
description: Required parameter for the routes resource.
- name: region
value: "{{ region }}"
description: Required parameter for the routes resource.
- name: clientToken
value: "{{ clientToken }}"
- name: routeName
value: "{{ routeName }}"
- name: spec
description: |
An object that represents a route specification. Specify one route type.
value:
grpcRoute:
action:
weightedTargets:
- port: {{ port }}
virtualNode: "{{ virtualNode }}"
weight: {{ weight }}
match:
metadata:
- invert: {{ invert }}
match:
exact: "{{ exact }}"
prefix: "{{ prefix }}"
range: "{{ range }}"
regex: "{{ regex }}"
suffix: "{{ suffix }}"
name: "{{ name }}"
methodName: "{{ methodName }}"
port: {{ port }}
serviceName: "{{ serviceName }}"
retryPolicy:
grpcRetryEvents:
- "{{ grpcRetryEvents }}"
httpRetryEvents:
- "{{ httpRetryEvents }}"
maxRetries: {{ maxRetries }}
perRetryTimeout:
unit: "{{ unit }}"
value: {{ value }}
tcpRetryEvents:
- "{{ tcpRetryEvents }}"
timeout:
idle:
unit: "{{ unit }}"
value: {{ value }}
perRequest:
unit: "{{ unit }}"
value: {{ value }}
http2Route:
action:
weightedTargets:
- port: {{ port }}
virtualNode: "{{ virtualNode }}"
weight: {{ weight }}
match:
headers:
- invert: {{ invert }}
match:
exact: "{{ exact }}"
prefix: "{{ prefix }}"
range: "{{ range }}"
regex: "{{ regex }}"
suffix: "{{ suffix }}"
name: "{{ name }}"
method: "{{ method }}"
path:
exact: "{{ exact }}"
regex: "{{ regex }}"
port: {{ port }}
prefix: "{{ prefix }}"
queryParameters:
- match:
exact: "{{ exact }}"
name: "{{ name }}"
scheme: "{{ scheme }}"
retryPolicy:
httpRetryEvents:
- "{{ httpRetryEvents }}"
maxRetries: {{ maxRetries }}
perRetryTimeout:
unit: "{{ unit }}"
value: {{ value }}
tcpRetryEvents:
- "{{ tcpRetryEvents }}"
timeout:
idle:
unit: "{{ unit }}"
value: {{ value }}
perRequest:
unit: "{{ unit }}"
value: {{ value }}
httpRoute:
action:
weightedTargets:
- port: {{ port }}
virtualNode: "{{ virtualNode }}"
weight: {{ weight }}
match:
headers:
- invert: {{ invert }}
match:
exact: "{{ exact }}"
prefix: "{{ prefix }}"
range: "{{ range }}"
regex: "{{ regex }}"
suffix: "{{ suffix }}"
name: "{{ name }}"
method: "{{ method }}"
path:
exact: "{{ exact }}"
regex: "{{ regex }}"
port: {{ port }}
prefix: "{{ prefix }}"
queryParameters:
- match:
exact: "{{ exact }}"
name: "{{ name }}"
scheme: "{{ scheme }}"
retryPolicy:
httpRetryEvents:
- "{{ httpRetryEvents }}"
maxRetries: {{ maxRetries }}
perRetryTimeout:
unit: "{{ unit }}"
value: {{ value }}
tcpRetryEvents:
- "{{ tcpRetryEvents }}"
timeout:
idle:
unit: "{{ unit }}"
value: {{ value }}
perRequest:
unit: "{{ unit }}"
value: {{ value }}
priority: {{ priority }}
tcpRoute:
action:
weightedTargets:
- port: {{ port }}
virtualNode: "{{ virtualNode }}"
weight: {{ weight }}
match:
port: {{ port }}
timeout:
idle:
unit: "{{ unit }}"
value: {{ value }}
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: meshOwner
value: "{{ meshOwner }}"
description: The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.
description: The Amazon Web Services IAM account ID of the service mesh owner. If the account ID is not your own, then the account that you specify must share the mesh with your account before you can create the resource in the service mesh. For more information about mesh sharing, see Working with shared meshes.
UPDATE examples
- update_route
Updates an existing route for a specified service mesh and virtual router.
UPDATE aws.appmesh.routes
SET
clientToken = '{{ clientToken }}',
spec = '{{ spec }}'
WHERE
mesh_name = '{{ mesh_name }}' --required
AND route_name = '{{ route_name }}' --required
AND virtual_router_name = '{{ virtual_router_name }}' --required
AND region = '{{ region }}' --required
AND spec = '{{ spec }}' --required
AND meshOwner = '{{ meshOwner}}'
RETURNING
route;
DELETE examples
- delete_route
Deletes an existing route.
DELETE FROM aws.appmesh.routes
WHERE mesh_name = '{{ mesh_name }}' --required
AND route_name = '{{ route_name }}' --required
AND virtual_router_name = '{{ virtual_router_name }}' --required
AND region = '{{ region }}' --required
AND meshOwner = '{{ meshOwner }}'
;