Interface JsonWithStandardFieldProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
JsonWithStandardFieldProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:02.609Z")
@Stability(Stable)
public interface JsonWithStandardFieldProps
extends software.amazon.jsii.JsiiSerializable
Properties for controlling items output in JSON standard format.
Example:
// production stage LogGroup prodLogGroup = new LogGroup(this, "PrdLogs"); RestApi api = RestApi.Builder.create(this, "books") .deployOptions(StageOptions.builder() .accessLogDestination(new LogGroupLogDestination(prodLogGroup)) .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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forJsonWithStandardFieldProps
static final class
An implementation forJsonWithStandardFieldProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
If this flag is enabled, the principal identifier of the caller will be output to the log.If this flag is enabled, the http method will be output to the log.getIp()
If this flag is enabled, the source IP of request will be output to the log.If this flag is enabled, the request protocol will be output to the log.If this flag is enabled, the CLF-formatted request time((dd/MMM/yyyy:HH:mm:ss +-hhmm) will be output to the log.If this flag is enabled, the path to your resource will be output to the log.If this flag is enabled, the response payload length will be output to the log.If this flag is enabled, the method response status will be output to the log.getUser()
If this flag is enabled, the principal identifier of the user will be output to the log.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCaller
If this flag is enabled, the principal identifier of the caller will be output to the log. -
getHttpMethod
If this flag is enabled, the http method will be output to the log. -
getIp
If this flag is enabled, the source IP of request will be output to the log. -
getProtocol
If this flag is enabled, the request protocol will be output to the log. -
getRequestTime
If this flag is enabled, the CLF-formatted request time((dd/MMM/yyyy:HH:mm:ss +-hhmm) will be output to the log. -
getResourcePath
If this flag is enabled, the path to your resource will be output to the log. -
getResponseLength
If this flag is enabled, the response payload length will be output to the log. -
getStatus
If this flag is enabled, the method response status will be output to the log. -
getUser
If this flag is enabled, the principal identifier of the user will be output to the log. -
builder
- Returns:
- a
JsonWithStandardFieldProps.Builder
ofJsonWithStandardFieldProps
-