@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.176Z") @Stability(value=Stable) public interface JsonWithStandardFieldProps extends software.amazon.jsii.JsiiSerializable
Example:
// production stage
LogGroup prdLogGroup = new LogGroup(this, "PrdLogs");
RestApi api = RestApi.Builder.create(this, "books")
.deployOptions(StageOptions.builder()
.accessLogDestination(new LogGroupLogDestination(prdLogGroup))
.accessLogFormat(AccessLogFormat.jsonWithStandardFields())
.build())
.build();
Deployment deployment = Deployment.Builder.create(this, "Deployment").api(api).build();
// development stage
LogGroup devLogGroup = new LogGroup(this, "DevLogs");
Stage.Builder.create(this, "dev")
.deployment(deployment)
.accessLogDestination(new LogGroupLogDestination(devLogGroup))
.accessLogFormat(AccessLogFormat.jsonWithStandardFields(JsonWithStandardFieldProps.builder()
.caller(false)
.httpMethod(true)
.ip(true)
.protocol(true)
.requestTime(true)
.resourcePath(true)
.responseLength(true)
.status(true)
.user(true)
.build()))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
JsonWithStandardFieldProps.Builder
A builder for
JsonWithStandardFieldProps |
static class |
JsonWithStandardFieldProps.Jsii$Proxy
An implementation for
JsonWithStandardFieldProps |
| Modifier and Type | Method and Description |
|---|---|
static JsonWithStandardFieldProps.Builder |
builder() |
Boolean |
getCaller()
If this flag is enabled, the principal identifier of the caller will be output to the log.
|
Boolean |
getHttpMethod()
If this flag is enabled, the http method will be output to the log.
|
Boolean |
getIp()
If this flag is enabled, the source IP of request will be output to the log.
|
Boolean |
getProtocol()
If this flag is enabled, the request protocol will be output to the log.
|
Boolean |
getRequestTime()
If this flag is enabled, the CLF-formatted request time((dd/MMM/yyyy:HH:mm:ss +-hhmm) will be output to the log.
|
Boolean |
getResourcePath()
If this flag is enabled, the path to your resource will be output to the log.
|
Boolean |
getResponseLength()
If this flag is enabled, the response payload length will be output to the log.
|
Boolean |
getStatus()
If this flag is enabled, the method response status will be output to the log.
|
Boolean |
getUser()
If this flag is enabled, the principal identifier of the user will be output to the log.
|
@Stability(value=Stable) @NotNull Boolean getCaller()
@Stability(value=Stable) @NotNull Boolean getHttpMethod()
@Stability(value=Stable) @NotNull Boolean getIp()
@Stability(value=Stable) @NotNull Boolean getProtocol()
@Stability(value=Stable) @NotNull Boolean getRequestTime()
@Stability(value=Stable) @NotNull Boolean getResourcePath()
@Stability(value=Stable) @NotNull Boolean getResponseLength()
@Stability(value=Stable) @NotNull Boolean getStatus()
@Stability(value=Stable) @NotNull Boolean getUser()
@Stability(value=Stable) static JsonWithStandardFieldProps.Builder builder()
JsonWithStandardFieldProps.Builder of JsonWithStandardFieldPropsCopyright © 2022. All rights reserved.