AccessLog Class
Configuration for Envoy Access logs for mesh endpoints.
Example
ts
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
ts
new AccessLog()
python
AccessLog()
java
new AccessLog()
csharp
new AccessLog()
go
NewAccessLog()
Methods
bind(scope: Construct): AccessLogConfigdef bind(self, scope: Construct) -> AccessLogConfigpublic AccessLogConfig bind(Construct scope)public AccessLogConfig Bind(Construct scope)func Bind(Scope Construct) AccessLogConfig#Called when the AccessLog type is initialized.
Can be used to enforce mutual exclusivity with future properties
fromFilePath(filePath: string, loggingFormat?: LoggingFormat): AccessLog // chainable@staticmethod def from_file_path(file_path: str, logging_format: typing.Optional[LoggingFormat] = None) -> AccessLogpublic static AccessLog fromFilePath(String filePath, LoggingFormat loggingFormat)public static AccessLog FromFilePath(string filePath, LoggingFormat? loggingFormat = null)func FromFilePath(FilePath *string, LoggingFormat LoggingFormat) AccessLogstatic#Path to a file to write access logs to.