virtual_nodes
Creates, updates, deletes, gets or lists a virtual_nodes resource.
Overview
| Name | virtual_nodes |
| Type | Resource |
| Id | aws.appmesh.virtual_nodes |
Fields
The following fields are returned by SELECT queries:
- describe_virtual_node
- list_virtual_nodes
| Name | Datatype | Description |
|---|---|---|
mesh_name | string | The name of the service mesh that the virtual node resides in. |
metadata | object | An object that represents metadata for a resource. |
spec | object | An object that represents the specification of a virtual node. |
status | object | The current status for the virtual node. |
virtual_node_name | string | The name of the virtual node. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The full Amazon Resource Name (ARN) for the virtual node. |
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 node 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_node_name | string | The name of the virtual node. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_virtual_node | select | mesh_name, virtual_node_name, region | meshOwner | Describes an existing virtual node. |
list_virtual_nodes | select | mesh_name, region | limit, meshOwner, nextToken | Returns a list of existing virtual nodes. |
create_virtual_node | insert | mesh_name, region, spec, virtualNodeName | meshOwner | Creates a virtual node within a service mesh. A virtual node acts as a logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. When you create a virtual node, you can specify the service discovery information for your task group, and whether the proxy running in a task group will communicate with other proxies using Transport Layer Security (TLS). You define a listener for any inbound traffic that your virtual node expects. Any virtual service that your virtual node expects to communicate to is specified as a backend. The response metadata for your new virtual node contains the arn that is associated with the virtual node. Set this value to the full ARN; for example, arn:aws:appmesh:us-west-2:123456789012:myMesh/default/virtualNode/myApp) as the APPMESH_RESOURCE_ARN environment variable for your task group's Envoy proxy container in your task definition or pod spec. This is then mapped to the node.id and node.cluster Envoy parameters. By default, App Mesh uses the name of the resource you specified in APPMESH_RESOURCE_ARN when Envoy is referring to itself in metrics and traces. You can override this behavior by setting the APPMESH_RESOURCE_CLUSTER environment variable with your own name. For more information about virtual nodes, see Virtual nodes. You must be using 1.15.0 or later of the Envoy image when setting these variables. For more information aboutApp Mesh Envoy variables, see Envoy image in the App Mesh User Guide. |
update_virtual_node | update | mesh_name, virtual_node_name, region, spec | meshOwner | Updates an existing virtual node in a specified service mesh. |
delete_virtual_node | delete | mesh_name, virtual_node_name, region | meshOwner | Deletes an existing virtual node. You must delete any virtual services that list a virtual node as a service provider before you can delete the virtual node 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 node in. |
region | string | AWS region (default: us-east-1) |
virtual_node_name | string | The name of the virtual node to delete. |
limit | integer | The maximum number of results returned by ListVirtualNodes in paginated output. When you use this parameter, ListVirtualNodes 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 ListVirtualNodes request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, ListVirtualNodes 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 ListVirtualNodes 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_node
- list_virtual_nodes
Describes an existing virtual node.
SELECT
mesh_name,
metadata,
spec,
status,
virtual_node_name
FROM aws.appmesh.virtual_nodes
WHERE mesh_name = '{{ mesh_name }}' -- required
AND virtual_node_name = '{{ virtual_node_name }}' -- required
AND region = '{{ region }}' -- required
AND meshOwner = '{{ meshOwner }}'
;
Returns a list of existing virtual nodes.
SELECT
arn,
created_at,
last_updated_at,
mesh_name,
mesh_owner,
resource_owner,
version,
virtual_node_name
FROM aws.appmesh.virtual_nodes
WHERE mesh_name = '{{ mesh_name }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND meshOwner = '{{ meshOwner }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_virtual_node
- Manifest
Creates a virtual node within a service mesh. A virtual node acts as a logical pointer to a particular task group, such as an Amazon ECS service or a Kubernetes deployment. When you create a virtual node, you can specify the service discovery information for your task group, and whether the proxy running in a task group will communicate with other proxies using Transport Layer Security (TLS). You define a listener for any inbound traffic that your virtual node expects. Any virtual service that your virtual node expects to communicate to is specified as a backend. The response metadata for your new virtual node contains the arn that is associated with the virtual node. Set this value to the full ARN; for example, arn:aws:appmesh:us-west-2:123456789012:myMesh/default/virtualNode/myApp) as the APPMESH_RESOURCE_ARN environment variable for your task group's Envoy proxy container in your task definition or pod spec. This is then mapped to the node.id and node.cluster Envoy parameters. By default, App Mesh uses the name of the resource you specified in APPMESH_RESOURCE_ARN when Envoy is referring to itself in metrics and traces. You can override this behavior by setting the APPMESH_RESOURCE_CLUSTER environment variable with your own name. For more information about virtual nodes, see Virtual nodes. You must be using 1.15.0 or later of the Envoy image when setting these variables. For more information aboutApp Mesh Envoy variables, see Envoy image in the App Mesh User Guide.
INSERT INTO aws.appmesh.virtual_nodes (
clientToken,
spec,
tags,
virtualNodeName,
mesh_name,
region,
meshOwner
)
SELECT
'{{ clientToken }}',
'{{ spec }}' /* required */,
'{{ tags }}',
'{{ virtualNodeName }}' /* required */,
'{{ mesh_name }}',
'{{ region }}',
'{{ meshOwner }}'
RETURNING
virtual_node
;
# Description fields are for documentation purposes
- name: virtual_nodes
props:
- name: mesh_name
value: "{{ mesh_name }}"
description: Required parameter for the virtual_nodes resource.
- name: region
value: "{{ region }}"
description: Required parameter for the virtual_nodes resource.
- name: clientToken
value: "{{ clientToken }}"
- name: spec
description: |
An object that represents the specification of a virtual node.
value:
backendDefaults:
clientPolicy:
tls:
certificate:
file: "{{ file }}"
sds: "{{ sds }}"
enforce: {{ enforce }}
ports:
- {{ ports }}
validation:
subjectAlternativeNames: "{{ subjectAlternativeNames }}"
trust: "{{ trust }}"
backends:
- virtualService:
clientPolicy:
tls:
certificate: "{{ certificate }}"
enforce: {{ enforce }}
ports: "{{ ports }}"
validation: "{{ validation }}"
virtualServiceName: "{{ virtualServiceName }}"
listeners:
- connectionPool:
grpc:
maxRequests: {{ maxRequests }}
http:
maxConnections: {{ maxConnections }}
maxPendingRequests: {{ maxPendingRequests }}
http2:
maxRequests: {{ maxRequests }}
tcp:
maxConnections: {{ maxConnections }}
healthCheck:
healthyThreshold: {{ healthyThreshold }}
intervalMillis: {{ intervalMillis }}
path: "{{ path }}"
port: {{ port }}
protocol: "{{ protocol }}"
timeoutMillis: {{ timeoutMillis }}
unhealthyThreshold: {{ unhealthyThreshold }}
outlierDetection:
baseEjectionDuration:
unit: "{{ unit }}"
value: {{ value }}
interval:
unit: "{{ unit }}"
value: {{ value }}
maxEjectionPercent: {{ maxEjectionPercent }}
maxServerErrors: {{ maxServerErrors }}
portMapping:
port: {{ port }}
protocol: "{{ protocol }}"
timeout:
grpc:
idle:
unit: "{{ unit }}"
value: {{ value }}
perRequest:
unit: "{{ unit }}"
value: {{ value }}
http:
idle:
unit: "{{ unit }}"
value: {{ value }}
perRequest:
unit: "{{ unit }}"
value: {{ value }}
http2:
idle:
unit: "{{ unit }}"
value: {{ value }}
perRequest:
unit: "{{ unit }}"
value: {{ value }}
tcp:
idle:
unit: "{{ unit }}"
value: {{ value }}
tls:
certificate:
acm:
certificateArn: "{{ certificateArn }}"
file:
certificateChain: "{{ certificateChain }}"
privateKey: "{{ privateKey }}"
sds:
secretName: "{{ secretName }}"
mode: "{{ mode }}"
validation:
subjectAlternativeNames:
match: "{{ match }}"
trust:
file: "{{ file }}"
sds: "{{ sds }}"
logging:
accessLog:
file:
format_:
json: "{{ json }}"
text: "{{ text }}"
path: "{{ path }}"
serviceDiscovery:
awsCloudMap:
attributes:
- key: "{{ key }}"
value: "{{ value }}"
ipPreference: "{{ ipPreference }}"
namespaceName: "{{ namespaceName }}"
serviceName: "{{ serviceName }}"
dns:
hostname: "{{ hostname }}"
ipPreference: "{{ ipPreference }}"
responseType: "{{ responseType }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: virtualNodeName
value: "{{ virtualNodeName }}"
- 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_node
Updates an existing virtual node in a specified service mesh.
UPDATE aws.appmesh.virtual_nodes
SET
clientToken = '{{ clientToken }}',
spec = '{{ spec }}'
WHERE
mesh_name = '{{ mesh_name }}' --required
AND virtual_node_name = '{{ virtual_node_name }}' --required
AND region = '{{ region }}' --required
AND spec = '{{ spec }}' --required
AND meshOwner = '{{ meshOwner}}'
RETURNING
virtual_node;
DELETE examples
- delete_virtual_node
Deletes an existing virtual node. You must delete any virtual services that list a virtual node as a service provider before you can delete the virtual node itself.
DELETE FROM aws.appmesh.virtual_nodes
WHERE mesh_name = '{{ mesh_name }}' --required
AND virtual_node_name = '{{ virtual_node_name }}' --required
AND region = '{{ region }}' --required
AND meshOwner = '{{ meshOwner }}'
;