Show / Hide Table of Contents

Class AccessLog

Configuration for Envoy Access logs for mesh endpoints.

Inheritance
object
AccessLog
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class AccessLog : DeputyBase
Syntax (vb)
Public MustInherit Class AccessLog Inherits DeputyBase
Remarks

ExampleMetadata: infused

Examples
Mesh mesh;
            var vpc = new Vpc(this, "vpc");
            var namespace = new PrivateDnsNamespace(this, "test-namespace", new PrivateDnsNamespaceProps {
                Vpc = vpc,
                Name = "domain.local"
            });
            var service = namespace.CreateService("Svc");
            var node = mesh.AddVirtualNode("virtual-node", new VirtualNodeBaseProps {
                ServiceDiscovery = ServiceDiscovery.CloudMap(service),
                Listeners = new [] { VirtualNodeListener.Http(new HttpVirtualNodeListenerOptions {
                    Port = 8081,
                    HealthCheck = HealthCheck.Http(new HttpHealthCheckOptions {
                        HealthyThreshold = 3,
                        Interval = Duration.Seconds(5),  // minimum
                        Path = "/health-check-path",
                        Timeout = Duration.Seconds(2),  // minimum
                        UnhealthyThreshold = 2
                    })
                }) },
                AccessLog = AccessLog.FromFilePath("/dev/stdout")
            });

Synopsis

Constructors

AccessLog()

Configuration for Envoy Access logs for mesh endpoints.

Methods

Bind(Construct)

Called when the AccessLog type is initialized.

FromFilePath(string, LoggingFormat?)

Path to a file to write access logs to.

Constructors

AccessLog()

Configuration for Envoy Access logs for mesh endpoints.

protected AccessLog()
Remarks

ExampleMetadata: infused

Examples
Mesh mesh;
            var vpc = new Vpc(this, "vpc");
            var namespace = new PrivateDnsNamespace(this, "test-namespace", new PrivateDnsNamespaceProps {
                Vpc = vpc,
                Name = "domain.local"
            });
            var service = namespace.CreateService("Svc");
            var node = mesh.AddVirtualNode("virtual-node", new VirtualNodeBaseProps {
                ServiceDiscovery = ServiceDiscovery.CloudMap(service),
                Listeners = new [] { VirtualNodeListener.Http(new HttpVirtualNodeListenerOptions {
                    Port = 8081,
                    HealthCheck = HealthCheck.Http(new HttpHealthCheckOptions {
                        HealthyThreshold = 3,
                        Interval = Duration.Seconds(5),  // minimum
                        Path = "/health-check-path",
                        Timeout = Duration.Seconds(2),  // minimum
                        UnhealthyThreshold = 2
                    })
                }) },
                AccessLog = AccessLog.FromFilePath("/dev/stdout")
            });

Methods

Bind(Construct)

Called when the AccessLog type is initialized.

public abstract IAccessLogConfig Bind(Construct scope)
Parameters
scope Construct
Returns

IAccessLogConfig

Remarks

Can be used to enforce mutual exclusivity with future properties

FromFilePath(string, LoggingFormat?)

Path to a file to write access logs to.

public static AccessLog FromFilePath(string filePath, LoggingFormat? loggingFormat = null)
Parameters
filePath string
loggingFormat LoggingFormat
Returns

AccessLog

Remarks

Default: - no file based access logging

Back to top Generated by DocFX