gateway_routes
Creates, updates, deletes, gets or lists a gateway_routes resource.
Overview
| Name | gateway_routes |
| Type | Resource |
| Id | aws.appmesh.gateway_routes |
Fields
The following fields are returned by SELECT queries:
- describe_gateway_route
- list_gateway_routes
| Name | Datatype | Description |
|---|---|---|
gateway_route_name | string | The name of the gateway route. |
mesh_name | string | The name of the service mesh that the resource resides in. |
metadata | object | An object that represents metadata for a resource. |
spec | object | An object that represents a gateway route specification. Specify one gateway route type. |
status | object | The status of the gateway route. |
virtual_gateway_name | string | The virtual gateway that the gateway route is associated with. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The full Amazon Resource Name (ARN) for the gateway route. |
created_at | string (date-time) | The Unix epoch timestamp in seconds for when the resource was created. |
gateway_route_name | string | The name of the gateway route. |
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 resource 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. |
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_gateway_name | string | The virtual gateway that the gateway route is associated with. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_gateway_route | select | gateway_route_name, mesh_name, virtual_gateway_name, region | meshOwner | Describes an existing gateway route. |
list_gateway_routes | select | mesh_name, virtual_gateway_name, region | limit, meshOwner, nextToken | Returns a list of existing gateway routes that are associated to a virtual gateway. |
create_gateway_route | insert | mesh_name, virtual_gateway_name, region, gatewayRouteName, spec | meshOwner | 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. |
update_gateway_route | update | gateway_route_name, mesh_name, virtual_gateway_name, region, spec | meshOwner | Updates an existing gateway route that is associated to a specified virtual gateway in a service mesh. |
delete_gateway_route | delete | gateway_route_name, mesh_name, virtual_gateway_name, region | meshOwner | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
gateway_route_name | string | The name of the gateway route to delete. |
mesh_name | string | The name of the service mesh to delete the gateway route from. |
region | string | AWS region (default: us-east-1) |
virtual_gateway_name | string | The name of the virtual gateway to delete the route from. |
limit | integer | The 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. |
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 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
- describe_gateway_route
- list_gateway_routes
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 }}'
;
Returns a list of existing gateway routes that are associated to a virtual gateway.
SELECT
arn,
created_at,
gateway_route_name,
last_updated_at,
mesh_name,
mesh_owner,
resource_owner,
version,
virtual_gateway_name
FROM aws.appmesh.gateway_routes
WHERE mesh_name = '{{ mesh_name }}' -- required
AND virtual_gateway_name = '{{ virtual_gateway_name }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND meshOwner = '{{ meshOwner }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_gateway_route
- Manifest
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
;
# Description fields are for documentation purposes
- name: gateway_routes
props:
- name: mesh_name
value: "{{ mesh_name }}"
description: Required parameter for the gateway_routes resource.
- name: virtual_gateway_name
value: "{{ virtual_gateway_name }}"
description: Required parameter for the gateway_routes resource.
- name: region
value: "{{ region }}"
description: Required parameter for the gateway_routes resource.
- name: clientToken
value: "{{ clientToken }}"
- name: gatewayRouteName
value: "{{ gatewayRouteName }}"
- name: spec
description: |
An object that represents a gateway route specification. Specify one gateway route type.
value:
grpcRoute:
action:
rewrite:
hostname:
defaultTargetHostname: "{{ defaultTargetHostname }}"
target:
port: {{ port }}
virtualService:
virtualServiceName: "{{ virtualServiceName }}"
match:
hostname:
exact: "{{ exact }}"
suffix: "{{ suffix }}"
metadata:
- invert: {{ invert }}
match:
exact: "{{ exact }}"
prefix: "{{ prefix }}"
range: "{{ range }}"
regex: "{{ regex }}"
suffix: "{{ suffix }}"
name: "{{ name }}"
port: {{ port }}
serviceName: "{{ serviceName }}"
http2Route:
action:
rewrite:
hostname:
defaultTargetHostname: "{{ defaultTargetHostname }}"
path:
exact: "{{ exact }}"
prefix:
defaultPrefix: "{{ defaultPrefix }}"
value: "{{ value }}"
target:
port: {{ port }}
virtualService:
virtualServiceName: "{{ virtualServiceName }}"
match:
headers:
- invert: {{ invert }}
match:
exact: "{{ exact }}"
prefix: "{{ prefix }}"
range: "{{ range }}"
regex: "{{ regex }}"
suffix: "{{ suffix }}"
name: "{{ name }}"
hostname:
exact: "{{ exact }}"
suffix: "{{ suffix }}"
method: "{{ method }}"
path:
exact: "{{ exact }}"
regex: "{{ regex }}"
port: {{ port }}
prefix: "{{ prefix }}"
queryParameters:
- match:
exact: "{{ exact }}"
name: "{{ name }}"
httpRoute:
action:
rewrite:
hostname:
defaultTargetHostname: "{{ defaultTargetHostname }}"
path:
exact: "{{ exact }}"
prefix:
defaultPrefix: "{{ defaultPrefix }}"
value: "{{ value }}"
target:
port: {{ port }}
virtualService:
virtualServiceName: "{{ virtualServiceName }}"
match:
headers:
- invert: {{ invert }}
match:
exact: "{{ exact }}"
prefix: "{{ prefix }}"
range: "{{ range }}"
regex: "{{ regex }}"
suffix: "{{ suffix }}"
name: "{{ name }}"
hostname:
exact: "{{ exact }}"
suffix: "{{ suffix }}"
method: "{{ method }}"
path:
exact: "{{ exact }}"
regex: "{{ regex }}"
port: {{ port }}
prefix: "{{ prefix }}"
queryParameters:
- match:
exact: "{{ exact }}"
name: "{{ name }}"
priority: {{ priority }}
- 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_gateway_route
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
- delete_gateway_route
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 }}'
;