class CfnVirtualNodePropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.AppMesh.Mixins.CfnVirtualNodePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsappmesh/mixins#CfnVirtualNodePropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.appmesh.mixins.CfnVirtualNodePropsMixin |
Python | aws_cdk.mixins_preview.aws_appmesh.mixins.CfnVirtualNodePropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_appmesh » mixins » CfnVirtualNodePropsMixin |
Implements
IMixin
Extends
Mixin
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_ARNwhen Envoy is referring to itself in metrics and traces. You can override this behavior by setting theAPPMESH_RESOURCE_CLUSTERenvironment 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 AWS App Mesh User Guide.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appmesh-virtualnode.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as appmesh_mixins } from '@aws-cdk/mixins-preview/aws-appmesh';
const cfnVirtualNodePropsMixin = new appmesh_mixins.CfnVirtualNodePropsMixin({
meshName: 'meshName',
meshOwner: 'meshOwner',
spec: {
backendDefaults: {
clientPolicy: {
tls: {
certificate: {
file: {
certificateChain: 'certificateChain',
privateKey: 'privateKey',
},
sds: {
secretName: 'secretName',
},
},
enforce: false,
ports: [123],
validation: {
subjectAlternativeNames: {
match: {
exact: ['exact'],
},
},
trust: {
acm: {
certificateAuthorityArns: ['certificateAuthorityArns'],
},
file: {
certificateChain: 'certificateChain',
},
sds: {
secretName: 'secretName',
},
},
},
},
},
},
backends: [{
virtualService: {
clientPolicy: {
tls: {
certificate: {
file: {
certificateChain: 'certificateChain',
privateKey: 'privateKey',
},
sds: {
secretName: 'secretName',
},
},
enforce: false,
ports: [123],
validation: {
subjectAlternativeNames: {
match: {
exact: ['exact'],
},
},
trust: {
acm: {
certificateAuthorityArns: ['certificateAuthorityArns'],
},
file: {
certificateChain: 'certificateChain',
},
sds: {
secretName: 'secretName',
},
},
},
},
},
virtualServiceName: 'virtualServiceName',
},
}],
listeners: [{
connectionPool: {
grpc: {
maxRequests: 123,
},
http: {
maxConnections: 123,
maxPendingRequests: 123,
},
http2: {
maxRequests: 123,
},
tcp: {
maxConnections: 123,
},
},
healthCheck: {
healthyThreshold: 123,
intervalMillis: 123,
path: 'path',
port: 123,
protocol: 'protocol',
timeoutMillis: 123,
unhealthyThreshold: 123,
},
outlierDetection: {
baseEjectionDuration: {
unit: 'unit',
value: 123,
},
interval: {
unit: 'unit',
value: 123,
},
maxEjectionPercent: 123,
maxServerErrors: 123,
},
portMapping: {
port: 123,
protocol: 'protocol',
},
timeout: {
grpc: {
idle: {
unit: 'unit',
value: 123,
},
perRequest: {
unit: 'unit',
value: 123,
},
},
http: {
idle: {
unit: 'unit',
value: 123,
},
perRequest: {
unit: 'unit',
value: 123,
},
},
http2: {
idle: {
unit: 'unit',
value: 123,
},
perRequest: {
unit: 'unit',
value: 123,
},
},
tcp: {
idle: {
unit: 'unit',
value: 123,
},
},
},
tls: {
certificate: {
acm: {
certificateArn: 'certificateArn',
},
file: {
certificateChain: 'certificateChain',
privateKey: 'privateKey',
},
sds: {
secretName: 'secretName',
},
},
mode: 'mode',
validation: {
subjectAlternativeNames: {
match: {
exact: ['exact'],
},
},
trust: {
file: {
certificateChain: 'certificateChain',
},
sds: {
secretName: 'secretName',
},
},
},
},
}],
logging: {
accessLog: {
file: {
format: {
json: [{
key: 'key',
value: 'value',
}],
text: 'text',
},
path: 'path',
},
},
},
serviceDiscovery: {
awsCloudMap: {
attributes: [{
key: 'key',
value: 'value',
}],
ipPreference: 'ipPreference',
namespaceName: 'namespaceName',
serviceName: 'serviceName',
},
dns: {
hostname: 'hostname',
ipPreference: 'ipPreference',
responseType: 'responseType',
},
},
},
tags: [{
key: 'key',
value: 'value',
}],
virtualNodeName: 'virtualNodeName',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnVirtualNodePropsMixin(props: CfnVirtualNodeMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Virtual Node Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::AppMesh::VirtualNode.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript