virtual_routers
Creates, updates, deletes, gets or lists a virtual_routers resource.
Overview
| Name | virtual_routers |
| Type | Resource |
| Id | aws.appmesh.virtual_routers |
Fields
The following fields are returned by SELECT queries:
- describe_virtual_router
- list_virtual_routers
| Name | Datatype | Description |
|---|---|---|
mesh_name | string | The name of the service mesh that the virtual router resides in. |
metadata | object | An object that represents metadata for a resource. |
spec | object | An object that represents the specification of a virtual router. |
status | object | The current status of the virtual router. |
virtual_router_name | string | The name of the virtual router. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The full Amazon Resource Name (ARN) for the virtual router. |
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 virtual router 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_router_name | string | The name of the virtual router. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_virtual_router | select | mesh_name, virtual_router_name, region | meshOwner | Describes an existing virtual router. |
list_virtual_routers | select | mesh_name, region | limit, meshOwner, nextToken | Returns a list of existing virtual routers in a service mesh. |
create_virtual_router | insert | mesh_name, region, spec, virtualRouterName | meshOwner | Creates a virtual router within a service mesh. Specify a listener for any inbound traffic that your virtual router receives. Create a virtual router for each protocol and port that you need to route. Virtual routers handle traffic for one or more virtual services within your mesh. After you create your virtual router, create and associate routes for your virtual router that direct incoming requests to different virtual nodes. For more information about virtual routers, see Virtual routers. |
update_virtual_router | update | mesh_name, virtual_router_name, region, spec | meshOwner | Updates an existing virtual router in a specified service mesh. |
delete_virtual_router | delete | mesh_name, virtual_router_name, region | meshOwner | Deletes an existing virtual router. You must delete any routes associated with the virtual router before you can delete the router itself. |
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 virtual router in. |
region | string | AWS region (default: us-east-1) |
virtual_router_name | string | The name of the virtual router to delete. |
limit | integer | The maximum number of results returned by ListVirtualRouters in paginated output. When you use this parameter, ListVirtualRouters 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 ListVirtualRouters request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, ListVirtualRouters 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 ListVirtualRouters 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_virtual_router
- list_virtual_routers
Describes an existing virtual router.
SELECT
mesh_name,
metadata,
spec,
status,
virtual_router_name
FROM aws.appmesh.virtual_routers
WHERE mesh_name = '{{ mesh_name }}' -- required
AND virtual_router_name = '{{ virtual_router_name }}' -- required
AND region = '{{ region }}' -- required
AND meshOwner = '{{ meshOwner }}'
;
Returns a list of existing virtual routers in a service mesh.
SELECT
arn,
created_at,
last_updated_at,
mesh_name,
mesh_owner,
resource_owner,
version,
virtual_router_name
FROM aws.appmesh.virtual_routers
WHERE mesh_name = '{{ mesh_name }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND meshOwner = '{{ meshOwner }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_virtual_router
- Manifest
Creates a virtual router within a service mesh. Specify a listener for any inbound traffic that your virtual router receives. Create a virtual router for each protocol and port that you need to route. Virtual routers handle traffic for one or more virtual services within your mesh. After you create your virtual router, create and associate routes for your virtual router that direct incoming requests to different virtual nodes. For more information about virtual routers, see Virtual routers.
INSERT INTO aws.appmesh.virtual_routers (
clientToken,
spec,
tags,
virtualRouterName,
mesh_name,
region,
meshOwner
)
SELECT
'{{ clientToken }}',
'{{ spec }}' /* required */,
'{{ tags }}',
'{{ virtualRouterName }}' /* required */,
'{{ mesh_name }}',
'{{ region }}',
'{{ meshOwner }}'
RETURNING
virtual_router
;
# Description fields are for documentation purposes
- name: virtual_routers
props:
- name: mesh_name
value: "{{ mesh_name }}"
description: Required parameter for the virtual_routers resource.
- name: region
value: "{{ region }}"
description: Required parameter for the virtual_routers resource.
- name: clientToken
value: "{{ clientToken }}"
- name: spec
description: |
An object that represents the specification of a virtual router.
value:
listeners:
- portMapping:
port: {{ port }}
protocol: "{{ protocol }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: virtualRouterName
value: "{{ virtualRouterName }}"
- 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_virtual_router
Updates an existing virtual router in a specified service mesh.
UPDATE aws.appmesh.virtual_routers
SET
clientToken = '{{ clientToken }}',
spec = '{{ spec }}'
WHERE
mesh_name = '{{ mesh_name }}' --required
AND virtual_router_name = '{{ virtual_router_name }}' --required
AND region = '{{ region }}' --required
AND spec = '{{ spec }}' --required
AND meshOwner = '{{ meshOwner}}'
RETURNING
virtual_router;
DELETE examples
- delete_virtual_router
Deletes an existing virtual router. You must delete any routes associated with the virtual router before you can delete the router itself.
DELETE FROM aws.appmesh.virtual_routers
WHERE mesh_name = '{{ mesh_name }}' --required
AND virtual_router_name = '{{ virtual_router_name }}' --required
AND region = '{{ region }}' --required
AND meshOwner = '{{ meshOwner }}'
;