VirtualNodeBaseProps

class aws_cdk.aws_appmesh.VirtualNodeBaseProps(*, access_log=None, backend_defaults=None, backends=None, listeners=None, service_discovery=None, virtual_node_name=None)

Bases: object

Basic configuration properties for a VirtualNode.

Parameters
  • access_log (Optional[AccessLog]) – Access Logging Configuration for the virtual node. Default: - No access logging

  • backend_defaults (Optional[BackendDefaults]) – Default Configuration Virtual Node uses to communicate with Virtual Service. Default: - No Config

  • backends (Optional[Sequence[Backend]]) – Virtual Services that this is node expected to send outbound traffic to. Default: - No backends

  • listeners (Optional[Sequence[VirtualNodeListener]]) – Initial listener for the virtual node. Default: - No listeners

  • service_discovery (Optional[ServiceDiscovery]) – Defines how upstream clients will discover this VirtualNode. Default: - No Service Discovery

  • virtual_node_name (Optional[str]) – The name of the VirtualNode. Default: - A name is automatically determined

Example:

# mesh is of type Mesh
vpc = ec2.Vpc(self, "vpc")
namespace = cloudmap.PrivateDnsNamespace(self, "test-namespace",
    vpc=vpc,
    name="domain.local"
)
service = namespace.create_service("Svc")
node = mesh.add_virtual_node("virtual-node",
    service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
    listeners=[appmesh.VirtualNodeListener.http(
        port=8081,
        health_check=appmesh.HealthCheck.http(
            healthy_threshold=3,
            interval=cdk.Duration.seconds(5),  # minimum
            path="/health-check-path",
            timeout=cdk.Duration.seconds(2),  # minimum
            unhealthy_threshold=2
        )
    )],
    access_log=appmesh.AccessLog.from_file_path("/dev/stdout")
)

Attributes

access_log

Access Logging Configuration for the virtual node.

Default
  • No access logging

Return type

Optional[AccessLog]

backend_defaults

Default Configuration Virtual Node uses to communicate with Virtual Service.

Default
  • No Config

Return type

Optional[BackendDefaults]

backends

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

Default
  • No backends

Return type

Optional[List[Backend]]

listeners

Initial listener for the virtual node.

Default
  • No listeners

Return type

Optional[List[VirtualNodeListener]]

service_discovery

Defines how upstream clients will discover this VirtualNode.

Default
  • No Service Discovery

Return type

Optional[ServiceDiscovery]

virtual_node_name

The name of the VirtualNode.

Default
  • A name is automatically determined

Return type

Optional[str]