AccessLog

class aws_cdk.aws_appmesh.AccessLog

Bases: object

Configuration for Envoy Access logs for mesh endpoints.

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")
)

Methods

abstract bind(scope)

Called when the AccessLog type is initialized.

Can be used to enforce mutual exclusivity with future properties

Parameters

scope (Construct) –

Return type

AccessLogConfig

Static Methods

classmethod from_file_path(file_path)

Path to a file to write access logs to.

Parameters

file_path (str) –

Default
  • no file based access logging

Return type

AccessLog