Skip to main content

gateway_routes

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

Overview

Namegateway_routes
TypeResource
Idaws.appmesh.gateway_routes

Fields

The following fields are returned by SELECT queries:

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

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_gateway_routeselectgateway_route_name, mesh_name, virtual_gateway_name, regionmeshOwnerDescribes an existing gateway route.
list_gateway_routesselectmesh_name, virtual_gateway_name, regionlimit, meshOwner, nextTokenReturns a list of existing gateway routes that are associated to a virtual gateway.
create_gateway_routeinsertmesh_name, virtual_gateway_name, region, gatewayRouteName, specmeshOwnerCreates a gateway route. A gateway route is attached to a virtual gateway and routes traffic to an existing virtual service. If a route matches a request, it can distribute traffic to a target virtual service. For more information about gateway routes, see Gateway routes.
update_gateway_routeupdategateway_route_name, mesh_name, virtual_gateway_name, region, specmeshOwnerUpdates an existing gateway route that is associated to a specified virtual gateway in a service mesh.
delete_gateway_routedeletegateway_route_name, mesh_name, virtual_gateway_name, regionmeshOwnerDeletes an existing gateway 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
gateway_route_namestringThe name of the gateway route to delete.
mesh_namestringThe name of the service mesh to delete the gateway route from.
regionstringAWS region (default: us-east-1)
virtual_gateway_namestringThe name of the virtual gateway to delete the route from.
limitintegerThe maximum number of results returned by ListGatewayRoutes in paginated output. When you use this parameter, ListGatewayRoutes 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 ListGatewayRoutes request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, ListGatewayRoutes 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 ListGatewayRoutes 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 gateway route.

SELECT
gateway_route_name,
mesh_name,
metadata,
spec,
status,
virtual_gateway_name
FROM aws.appmesh.gateway_routes
WHERE gateway_route_name = '{{ gateway_route_name }}' -- required
AND mesh_name = '{{ mesh_name }}' -- required
AND virtual_gateway_name = '{{ virtual_gateway_name }}' -- required
AND region = '{{ region }}' -- required
AND meshOwner = '{{ meshOwner }}'
;

INSERT examples

Creates a gateway route. A gateway route is attached to a virtual gateway and routes traffic to an existing virtual service. If a route matches a request, it can distribute traffic to a target virtual service. For more information about gateway routes, see Gateway routes.

INSERT INTO aws.appmesh.gateway_routes (
clientToken,
gatewayRouteName,
spec,
tags,
mesh_name,
virtual_gateway_name,
region,
meshOwner
)
SELECT
'{{ clientToken }}',
'{{ gatewayRouteName }}' /* required */,
'{{ spec }}' /* required */,
'{{ tags }}',
'{{ mesh_name }}',
'{{ virtual_gateway_name }}',
'{{ region }}',
'{{ meshOwner }}'
RETURNING
gateway_route
;

UPDATE examples

Updates an existing gateway route that is associated to a specified virtual gateway in a service mesh.

UPDATE aws.appmesh.gateway_routes
SET
clientToken = '{{ clientToken }}',
spec = '{{ spec }}'
WHERE
gateway_route_name = '{{ gateway_route_name }}' --required
AND mesh_name = '{{ mesh_name }}' --required
AND virtual_gateway_name = '{{ virtual_gateway_name }}' --required
AND region = '{{ region }}' --required
AND spec = '{{ spec }}' --required
AND meshOwner = '{{ meshOwner}}'
RETURNING
gateway_route;

DELETE examples

Deletes an existing gateway route.

DELETE FROM aws.appmesh.gateway_routes
WHERE gateway_route_name = '{{ gateway_route_name }}' --required
AND mesh_name = '{{ mesh_name }}' --required
AND virtual_gateway_name = '{{ virtual_gateway_name }}' --required
AND region = '{{ region }}' --required
AND meshOwner = '{{ meshOwner }}'
;