Skip to main content

routes

Creates, updates, deletes, gets or lists a routes resource.

Overview

Nameroutes
TypeResource
Idaws.appmesh.routes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
mesh_namestringThe name of the service mesh that the route resides in.
metadataobjectAn object that represents metadata for a resource.
route_namestringThe name of the route.
specobjectAn object that represents a route specification. Specify one route type.
statusobjectThe status of the route.
virtual_router_namestringThe virtual router that the route is associated with.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_routeselectmesh_name, route_name, virtual_router_name, regionmeshOwnerDescribes an existing route.
list_routesselectmesh_name, virtual_router_name, regionlimit, meshOwner, nextTokenReturns a list of existing routes in a service mesh.
create_routeinsertmesh_name, virtual_router_name, region, routeName, specmeshOwnerCreates 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_routeupdatemesh_name, route_name, virtual_router_name, region, specmeshOwnerUpdates an existing route for a specified service mesh and virtual router.
delete_routedeletemesh_name, route_name, virtual_router_name, regionmeshOwnerDeletes 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.

NameDatatypeDescription
mesh_namestringThe name of the service mesh to delete the route in.
regionstringAWS region (default: us-east-1)
route_namestringThe name of the route to delete.
virtual_router_namestringThe name of the virtual router to delete the route in.
limitintegerThe 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.
meshOwnerstringThe 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.
nextTokenstringThe 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

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 }}'
;

INSERT examples

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
;

UPDATE examples

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

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 }}'
;