aws-cdk-lib.aws_appmesh.LoggingFormat

class LoggingFormat

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

Configuration for Envoy Access Logging Format for mesh endpoints.

Example

declare const mesh: appmesh.Mesh;
declare const service: cloudmap.Service;
const node = new appmesh.VirtualNode(this, 'node', {
  mesh,
  serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
  listeners: [appmesh.VirtualNodeListener.http({
    port: 8080,
    healthCheck: appmesh.HealthCheck.http({
      healthyThreshold: 3,
      interval: cdk.Duration.seconds(5),
      path: '/ping',
      timeout: cdk.Duration.seconds(2),
      unhealthyThreshold: 2,
    }),
    timeout: {
      idle: cdk.Duration.seconds(5),
    },
  })],
  backendDefaults: {
    tlsClientPolicy: {
      validation: {
        trust: appmesh.TlsValidationTrust.file('/keys/local_cert_chain.pem'),
      },
    },
  },
  accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout',
    appmesh.LoggingFormat.fromJson(
      {testKey1: 'testValue1', testKey2: 'testValue2'})),
});

Initializer

new LoggingFormat()

Methods

NameDescription
bind()Called when the Access Log Format is initialized.
static fromJson(jsonLoggingFormat)Generate logging format from json key pairs.
static fromText(text)Generate logging format from text pattern.

bind()

public bind(): LoggingFormatConfig

Returns

  • LoggingFormatConfig

Called when the Access Log Format is initialized.

Can be used to enforce mutual exclusivity with future properties


static fromJson(jsonLoggingFormat)

public static fromJson(jsonLoggingFormat: { [string]: string }): LoggingFormat

Parameters

  • jsonLoggingFormat { [string]: string }

Returns

  • LoggingFormat

Generate logging format from json key pairs.


static fromText(text)

public static fromText(text: string): LoggingFormat

Parameters

  • text string

Returns

  • LoggingFormat

Generate logging format from text pattern.