@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-31T18:36:57.944Z")
public class AccessLogField
extends software.amazon.jsii.JsiiObject
Example:
AccessLogFormat.custom(JSON.stringify(Map.of( "requestId", AccessLogField.contextRequestId(), "sourceIp", AccessLogField.contextIdentitySourceIp(), "method", AccessLogField.contextHttpMethod(), "userContext", Map.of( "sub", AccessLogField.contextAuthorizerClaims("sub"), "email", AccessLogField.contextAuthorizerClaims("email")))));
Modifier | Constructor and Description |
---|---|
|
AccessLogField() |
protected |
AccessLogField(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
AccessLogField(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
contextAccountId()
The API owner's AWS account ID.
|
static java.lang.String |
contextApiId()
The identifier API Gateway assigns to your API.
|
static java.lang.String |
contextAuthorizer(java.lang.String property)
The stringified value of the specified key-value pair of the `context` map returned from an API Gateway Lambda authorizer function.
|
static java.lang.String |
contextAuthorizerClaims(java.lang.String property)
A property of the claims returned from the Amazon Cognito user pool after the method caller is successfully authenticated.
|
static java.lang.String |
contextAuthorizerIntegrationLatency()
The authorizer latency in ms.
|
static java.lang.String |
contextAuthorizerPrincipalId()
The principal user identification associated with the token sent by the client and returned from an API Gateway Lambda authorizer (formerly known as a custom authorizer).
|
static java.lang.String |
contextAwsEndpointRequestId()
The AWS endpoint's request ID.
|
static java.lang.String |
contextDomainName()
The full domain name used to invoke the API.
|
static java.lang.String |
contextDomainPrefix()
The first label of the `$context.domainName`.
|
static java.lang.String |
contextErrorMessage()
A string containing an API Gateway error message.
|
static java.lang.String |
contextErrorMessageString()
The quoted value of $context.error.message, namely "$context.error.message".
|
static java.lang.String |
contextErrorResponseType()
A type of GatewayResponse.
|
static java.lang.String |
contextErrorValidationErrorString()
A string containing a detailed validation error message.
|
static java.lang.String |
contextExtendedRequestId()
The extended ID that API Gateway assigns to the API request, which contains more useful information for debugging/troubleshooting.
|
static java.lang.String |
contextHttpMethod()
The HTTP method used.
|
static java.lang.String |
contextIdentityAccountId()
The AWS account ID associated with the request.
|
static java.lang.String |
contextIdentityApiKey()
For API methods that require an API key, this variable is the API key associated with the method request.
|
static java.lang.String |
contextIdentityApiKeyId()
The API key ID associated with an API request that requires an API key.
|
static java.lang.String |
contextIdentityCaller()
The principal identifier of the caller making the request.
|
static java.lang.String |
contextIdentityCognitoAuthenticationProvider()
The Amazon Cognito authentication provider used by the caller making the request.
|
static java.lang.String |
contextIdentityCognitoAuthenticationType()
The Amazon Cognito authentication type of the caller making the request.
|
static java.lang.String |
contextIdentityCognitoIdentityId()
The Amazon Cognito identity ID of the caller making the request.
|
static java.lang.String |
contextIdentityCognitoIdentityPoolId()
The Amazon Cognito identity pool ID of the caller making the request.
|
static java.lang.String |
contextIdentityPrincipalOrgId()
The AWS organization ID.
|
static java.lang.String |
contextIdentitySourceIp()
The source IP address of the TCP connection making the request to API Gateway.
|
static java.lang.String |
contextIdentityUser()
The principal identifier of the user making the request.
|
static java.lang.String |
contextIdentityUserAgent()
The User-Agent header of the API caller.
|
static java.lang.String |
contextIdentityUserArn()
The Amazon Resource Name (ARN) of the effective user identified after authentication.
|
static java.lang.String |
contextIntegrationLatency()
The integration latency in ms.
|
static java.lang.String |
contextIntegrationStatus()
For Lambda proxy integration, this parameter represents the status code returned from AWS Lambda, not from the backend Lambda function.
|
static java.lang.String |
contextPath()
The request path.
|
static java.lang.String |
contextProtocol()
The request protocol, for example, HTTP/1.1.
|
static java.lang.String |
contextRequestId()
The ID that API Gateway assigns to the API request.
|
static java.lang.String |
contextRequestOverrideHeader(java.lang.String headerName)
The request header override.
|
static java.lang.String |
contextRequestOverridePath(java.lang.String pathName)
The request path override.
|
static java.lang.String |
contextRequestOverrideQuerystring(java.lang.String querystringName)
The request query string override.
|
static java.lang.String |
contextRequestTime()
The CLF-formatted request time (dd/MMM/yyyy:HH:mm:ss +-hhmm).
|
static java.lang.String |
contextRequestTimeEpoch()
The Epoch-formatted request time.
|
static java.lang.String |
contextResourceId()
The identifier that API Gateway assigns to your resource.
|
static java.lang.String |
contextResourcePath()
The path to your resource.
|
static java.lang.String |
contextResponseLatency()
The response latency in ms.
|
static java.lang.String |
contextResponseLength()
The response payload length.
|
static java.lang.String |
contextResponseOverrideHeader(java.lang.String headerName)
The response header override.
|
static java.lang.String |
contextResponseOverrideStatus()
The response status code override.
|
static java.lang.String |
contextStage()
The deployment stage of the API request (for example, `Beta` or `Prod`).
|
static java.lang.String |
contextStatus()
The method response status.
|
static java.lang.String |
contextWafResponseCode()
The response received from AWS WAF: `WAF_ALLOW` or `WAF_BLOCK`.
|
static java.lang.String |
contextWebaclArn()
The complete ARN of the web ACL that is used to decide whether to allow or block the request.
|
static java.lang.String |
contextXrayTraceId()
The trace ID for the X-Ray trace.
|
protected AccessLogField(software.amazon.jsii.JsiiObjectRef objRef)
protected AccessLogField(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public AccessLogField()
public static java.lang.String contextAccountId()
public static java.lang.String contextApiId()
public static java.lang.String contextAuthorizer(java.lang.String property)
property
- key of the context map. This parameter is required.public static java.lang.String contextAuthorizerClaims(java.lang.String property)
property
- A property key of the claims. This parameter is required.public static java.lang.String contextAuthorizerIntegrationLatency()
public static java.lang.String contextAuthorizerPrincipalId()
public static java.lang.String contextAwsEndpointRequestId()
public static java.lang.String contextDomainName()
This should be the same as the incoming Host
header.
public static java.lang.String contextDomainPrefix()
public static java.lang.String contextErrorMessage()
public static java.lang.String contextErrorMessageString()
public static java.lang.String contextErrorResponseType()
This variable can only be used for simple variable substitution in a GatewayResponse body-mapping template, which is not processed by the Velocity Template Language engine, and in access logging.
public static java.lang.String contextErrorValidationErrorString()
public static java.lang.String contextExtendedRequestId()
public static java.lang.String contextHttpMethod()
Valid values include: DELETE
, GET
, HEAD
, OPTIONS
, PATCH
, POST
, and PUT
.
public static java.lang.String contextIdentityAccountId()
public static java.lang.String contextIdentityApiKey()
For methods that don't require an API key, this variable is
public static java.lang.String contextIdentityApiKeyId()
public static java.lang.String contextIdentityCaller()
public static java.lang.String contextIdentityCognitoAuthenticationProvider()
Available only if the request was signed with Amazon Cognito credentials.
public static java.lang.String contextIdentityCognitoAuthenticationType()
Available only if the request was signed with Amazon Cognito credentials.
public static java.lang.String contextIdentityCognitoIdentityId()
Available only if the request was signed with Amazon Cognito credentials.
public static java.lang.String contextIdentityCognitoIdentityPoolId()
Available only if the request was signed with Amazon Cognito credentials.
public static java.lang.String contextIdentityPrincipalOrgId()
public static java.lang.String contextIdentitySourceIp()
Warning: You should not trust this value if there is any chance that the X-Forwarded-For
header could be forged.
public static java.lang.String contextIdentityUser()
Used in Lambda authorizers.
public static java.lang.String contextIdentityUserAgent()
public static java.lang.String contextIdentityUserArn()
public static java.lang.String contextIntegrationLatency()
public static java.lang.String contextIntegrationStatus()
public static java.lang.String contextPath()
For example, for a non-proxy request URL of https://{rest-api-id.execute-api.{region}.amazonaws.com/{stage}/root/child, this value is /{stage}/root/child.
public static java.lang.String contextProtocol()
public static java.lang.String contextRequestId()
public static java.lang.String contextRequestOverrideHeader(java.lang.String headerName)
If this parameter is defined, it contains the headers to be used instead of the HTTP Headers that are defined in the Integration Request pane.
headerName
- This parameter is required.public static java.lang.String contextRequestOverridePath(java.lang.String pathName)
If this parameter is defined, it contains the request path to be used instead of the URL Path Parameters that are defined in the Integration Request pane.
pathName
- This parameter is required.public static java.lang.String contextRequestOverrideQuerystring(java.lang.String querystringName)
If this parameter is defined, it contains the request query strings to be used instead of the URL Query String Parameters that are defined in the Integration Request pane.
querystringName
- This parameter is required.public static java.lang.String contextRequestTime()
public static java.lang.String contextRequestTimeEpoch()
public static java.lang.String contextResourceId()
public static java.lang.String contextResourcePath()
For example, for the non-proxy request URI of https://{rest-api-id.execute-api.{region}.amazonaws.com/{stage}/root/child
,
The $context.resourcePath value is /root/child
.
public static java.lang.String contextResponseLatency()
public static java.lang.String contextResponseLength()
public static java.lang.String contextResponseOverrideHeader(java.lang.String headerName)
If this parameter is defined, it contains the header to be returned instead of the Response header that is defined as the Default mapping in the Integration Response pane.
headerName
- This parameter is required.public static java.lang.String contextResponseOverrideStatus()
If this parameter is defined, it contains the status code to be returned instead of the Method response status that is defined as the Default mapping in the Integration Response pane.
public static java.lang.String contextStage()
public static java.lang.String contextStatus()
public static java.lang.String contextWafResponseCode()
Will not be set if the stage is not associated with a web ACL.
public static java.lang.String contextWebaclArn()
Will not be set if the stage is not associated with a web ACL.
public static java.lang.String contextXrayTraceId()