Class LogGroupLogDestination
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigateway.LogGroupLogDestination
- All Implemented Interfaces:
IAccessLogDestination
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:45.002Z")
@Stability(Stable)
public class LogGroupLogDestination
extends software.amazon.jsii.JsiiObject
implements IAccessLogDestination
Use CloudWatch Logs as a custom access log destination for API Gateway.
Example:
LogGroup logGroup = new LogGroup(this, "ApiGatewayAccessLogs"); RestApi.Builder.create(this, "books") .deployOptions(StageOptions.builder() .accessLogDestination(new LogGroupLogDestination(logGroup)) .accessLogFormat(AccessLogFormat.custom(String.format("%s %s %s", AccessLogField.contextRequestId(), AccessLogField.contextErrorMessage(), AccessLogField.contextErrorMessageString()))) .build()) .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.apigateway.IAccessLogDestination
IAccessLogDestination.Jsii$Default, IAccessLogDestination.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionLogGroupLogDestination
(ILogGroup logGroup) protected
LogGroupLogDestination
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
LogGroupLogDestination
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionBinds this destination to the CloudWatch Logs.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
LogGroupLogDestination
protected LogGroupLogDestination(software.amazon.jsii.JsiiObjectRef objRef) -
LogGroupLogDestination
protected LogGroupLogDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
LogGroupLogDestination
- Parameters:
logGroup
- This parameter is required.
-
-
Method Details
-
bind
Binds this destination to the CloudWatch Logs.- Specified by:
bind
in interfaceIAccessLogDestination
- Parameters:
_stage
- This parameter is required.
-