class AccessLog
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.AccessLog |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#AccessLog |
Java | software.amazon.awscdk.services.appmesh.AccessLog |
Python | aws_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
Name | Description |
---|---|
bind(scope) | Called when the AccessLog type is initialized. |
static from | Path to a file to write access logs to. |
bind(scope)
public bind(scope: Construct): AccessLogConfig
Parameters
- scope
Construct
Returns
Called when the AccessLog type is initialized.
Can be used to enforce mutual exclusivity with future properties
FilePath(filePath, loggingFormat?)
static frompublic static fromFilePath(filePath: string, loggingFormat?: LoggingFormat): AccessLog
Parameters
- filePath
string
- loggingFormat
Logging
Format
Returns
Path to a file to write access logs to.