LoggingFormat

class aws_cdk.aws_appmesh.LoggingFormat

Bases: object

Configuration for Envoy Access Logging Format for mesh endpoints.

ExampleMetadata:

infused

Example:

# mesh: appmesh.Mesh
# service: cloudmap.Service

node = appmesh.VirtualNode(self, "node",
    mesh=mesh,
    service_discovery=appmesh.ServiceDiscovery.cloud_map(service),
    listeners=[appmesh.VirtualNodeListener.http(
        port=8080,
        health_check=appmesh.HealthCheck.http(
            healthy_threshold=3,
            interval=cdk.Duration.seconds(5),
            path="/ping",
            timeout=cdk.Duration.seconds(2),
            unhealthy_threshold=2
        ),
        timeout=appmesh.HttpTimeout(
            idle=cdk.Duration.seconds(5)
        )
    )],
    backend_defaults=appmesh.BackendDefaults(
        tls_client_policy=appmesh.TlsClientPolicy(
            validation=appmesh.TlsValidation(
                trust=appmesh.TlsValidationTrust.file("/keys/local_cert_chain.pem")
            )
        )
    ),
    access_log=appmesh.AccessLog.from_file_path("/dev/stdout",
        appmesh.LoggingFormat.from_json({"test_key1": "testValue1", "test_key2": "testValue2"}))
)

Methods

abstract bind()

Called when the Access Log Format is initialized.

Can be used to enforce mutual exclusivity with future properties

Return type:

LoggingFormatConfig

Static Methods

classmethod from_json(json_logging_format)

Generate logging format from json key pairs.

Parameters:

json_logging_format (Mapping[str, str]) –

Return type:

LoggingFormat

classmethod from_text(text)

Generate logging format from text pattern.

Parameters:

text (str) –

Return type:

LoggingFormat