Show / Hide Table of Contents

Class LogGroupLogDestination

Use CloudWatch Logs as a custom access log destination for API Gateway.

Inheritance
System.Object
LogGroupLogDestination
Implements
IAccessLogDestination
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class LogGroupLogDestination : DeputyBase, IAccessLogDestination
Syntax (vb)
Public Class LogGroupLogDestination
    Inherits DeputyBase
    Implements IAccessLogDestination
Remarks

ExampleMetadata: infused

Examples
var logGroup = new LogGroup(this, "ApiGatewayAccessLogs");
new RestApi(this, "books", new RestApiProps {
    DeployOptions = new StageOptions {
        AccessLogDestination = new LogGroupLogDestination(logGroup),
        AccessLogFormat = AccessLogFormat.Custom($@"{apigateway.AccessLogField.contextRequestId()} {apigateway.AccessLogField.contextErrorMessage()} {apigateway.AccessLogField.contextErrorMessageString()}
              {apigateway.AccessLogField.contextAuthorizerError()} {apigateway.AccessLogField.contextAuthorizerIntegrationStatus()}")
    }
});

Synopsis

Constructors

LogGroupLogDestination(ILogGroup)
LogGroupLogDestination(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

LogGroupLogDestination(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

Methods

Bind(IStage)

Binds this destination to the CloudWatch Logs.

Constructors

LogGroupLogDestination(ILogGroup)

public LogGroupLogDestination(ILogGroup logGroup)
Parameters
logGroup ILogGroup

LogGroupLogDestination(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected LogGroupLogDestination(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

LogGroupLogDestination(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected LogGroupLogDestination(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

Methods

Bind(IStage)

Binds this destination to the CloudWatch Logs.

public virtual IAccessLogDestinationConfig Bind(IStage stage)
Parameters
stage IStage
Returns

IAccessLogDestinationConfig

Implements

IAccessLogDestination
Back to top Generated by DocFX