aws-cdk-lib.aws_appmesh.VirtualNodeProps

interface VirtualNodeProps

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.VirtualNodeProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#VirtualNodeProps
Javasoftware.amazon.awscdk.services.appmesh.VirtualNodeProps
Pythonaws_cdk.aws_appmesh.VirtualNodeProps
TypeScript (source)aws-cdk-lib » aws_appmesh » VirtualNodeProps

The properties used when creating a new VirtualNode.

Example

declare const mesh: appmesh.Mesh;
declare const service: cloudmap.Service;

const node = new appmesh.VirtualNode(this, 'node', {
  mesh,
  serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
  listeners: [appmesh.VirtualNodeListener.http({
    port: 8080,
    healthCheck: appmesh.HealthCheck.http({
      healthyThreshold: 3,
      interval: Duration.seconds(5),
      path: '/ping',
      timeout: Duration.seconds(2),
      unhealthyThreshold: 2,
    }),
    timeout: {
      idle: Duration.seconds(5),
    },
  })],
  backendDefaults: {
    tlsClientPolicy: {
      validation: {
        trust: appmesh.TlsValidationTrust.file('/keys/local_cert_chain.pem'),
      },
    },
  },
  accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
});

cdk.Tags.of(node).add('Environment', 'Dev');

Properties

NameTypeDescription
meshIMeshThe Mesh which the VirtualNode belongs to.
accessLog?AccessLogAccess Logging Configuration for the virtual node.
backendDefaults?BackendDefaultsDefault Configuration Virtual Node uses to communicate with Virtual Service.
backends?Backend[]Virtual Services that this is node expected to send outbound traffic to.
listeners?VirtualNodeListener[]Initial listener for the virtual node.
serviceDiscovery?ServiceDiscoveryDefines how upstream clients will discover this VirtualNode.
virtualNodeName?stringThe name of the VirtualNode.

mesh

Type: IMesh

The Mesh which the VirtualNode belongs to.


accessLog?

Type: AccessLog (optional, default: No access logging)

Access Logging Configuration for the virtual node.


backendDefaults?

Type: BackendDefaults (optional, default: No Config)

Default Configuration Virtual Node uses to communicate with Virtual Service.


backends?

Type: Backend[] (optional, default: No backends)

Virtual Services that this is node expected to send outbound traffic to.


listeners?

Type: VirtualNodeListener[] (optional, default: No listeners)

Initial listener for the virtual node.


serviceDiscovery?

Type: ServiceDiscovery (optional, default: No Service Discovery)

Defines how upstream clients will discover this VirtualNode.


virtualNodeName?

Type: string (optional, default: A name is automatically determined)

The name of the VirtualNode.