aws-cdk-lib.aws_appmesh.AccessLog

class AccessLog

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

Configuration for Envoy Access logs for mesh endpoints.

Example

const vpc = new ec2.Vpc(this, 'vpc');
const namespace = new cloudmap.PrivateDnsNamespace(this, 'test-namespace', {
    vpc,
    name: 'domain.local',
});
const service = namespace.createService('Svc');

declare const mesh: appmesh.Mesh;
const node = mesh.addVirtualNode('virtual-node', {
  serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
  listeners: [appmesh.VirtualNodeListener.http({
    port: 8081,
    healthCheck: appmesh.HealthCheck.http({
      healthyThreshold: 3,
      interval: Duration.seconds(5), // minimum
      path: '/health-check-path',
      timeout: Duration.seconds(2), // minimum
      unhealthyThreshold: 2,
    }),
  })],
  accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout'),
});

Initializer

new AccessLog()

Methods

NameDescription
bind(scope)Called when the AccessLog type is initialized.
static fromFilePath(filePath, loggingFormat?)Path to a file to write access logs to.

bind(scope)

public bind(scope: Construct): AccessLogConfig

Parameters

  • scope Construct

Returns

  • AccessLogConfig

Called when the AccessLog type is initialized.

Can be used to enforce mutual exclusivity with future properties


static fromFilePath(filePath, loggingFormat?)

public static fromFilePath(filePath: string, loggingFormat?: LoggingFormat): AccessLog

Parameters

  • filePath string
  • loggingFormat LoggingFormat

Returns

  • AccessLog

Path to a file to write access logs to.