Interface RequestContext
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
RequestContext.Jsii$Proxy
requestContext
.
More details can be found at mapping templates documentation.
Example:
StepFunctionsRestApi.Builder.create(this, "StepFunctionsRestApi") .stateMachine(machine) .headers(true) .path(false) .querystring(false) .authorizer(false) .requestContext(RequestContext.builder() .caller(true) .user(true) .build()) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forRequestContext
static final class
An implementation forRequestContext
-
Method Summary
Modifier and TypeMethodDescriptionstatic RequestContext.Builder
builder()
default Boolean
Represents the information of $context.identity.accountId.default Boolean
getApiId()
Represents the information of $context.apiId.default Boolean
Represents the information of $context.identity.apiKey.default Boolean
Represents the information of $context.authorizer.principalId.default Boolean
Represents the information of $context.identity.caller.default Boolean
Represents the information of $context.identity.cognitoAuthenticationProvider.default Boolean
Represents the information of $context.identity.cognitoAuthenticationType.default Boolean
Represents the information of $context.identity.cognitoIdentityId.default Boolean
Represents the information of $context.identity.cognitoIdentityPoolId.default Boolean
Represents the information of $context.httpMethod.default Boolean
Represents the information of $context.requestId.default Boolean
Represents the information of $context.resourceId.default Boolean
Represents the information of $context.resourcePath.default Boolean
Represents the information of $context.identity.sourceIp.default Boolean
getStage()
Represents the information of $context.stage.default Boolean
getUser()
Represents the information of $context.identity.user.default Boolean
Represents the information of $context.identity.userAgent.default Boolean
Represents the information of $context.identity.userArn.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAccountId
Represents the information of $context.identity.accountId.Whether the AWS account of the API owner should be included in the request context
Default: false
-
getApiId
Represents the information of $context.apiId.Whether the identifier API Gateway assigns to your API should be included in the request context.
Default: false
-
getApiKey
Represents the information of $context.identity.apiKey.Whether the API key associated with the request should be included in request context.
Default: false
-
getAuthorizerPrincipalId
Represents the information of $context.authorizer.principalId.Whether the principal user identifier associated with the token sent by the client and returned from an API Gateway Lambda authorizer should be included in the request context.
Default: false
-
getCaller
Represents the information of $context.identity.caller.Whether the principal identifier of the caller that signed the request should be included in the request context. Supported for resources that use IAM authorization.
Default: false
-
getCognitoAuthenticationProvider
Represents the information of $context.identity.cognitoAuthenticationProvider.Whether the list of the Amazon Cognito authentication providers used by the caller making the request should be included in the request context. Available only if the request was signed with Amazon Cognito credentials.
Default: false
-
getCognitoAuthenticationType
Represents the information of $context.identity.cognitoAuthenticationType.Whether the Amazon Cognito authentication type of the caller making the request should be included in the request context. Available only if the request was signed with Amazon Cognito credentials. Possible values include authenticated for authenticated identities and unauthenticated for unauthenticated identities.
Default: false
-
getCognitoIdentityId
Represents the information of $context.identity.cognitoIdentityId.Whether the Amazon Cognito identity ID of the caller making the request should be included in the request context. Available only if the request was signed with Amazon Cognito credentials.
Default: false
-
getCognitoIdentityPoolId
Represents the information of $context.identity.cognitoIdentityPoolId.Whether the Amazon Cognito identity pool ID of the caller making the request should be included in the request context. Available only if the request was signed with Amazon Cognito credentials.
Default: false
-
getHttpMethod
Represents the information of $context.httpMethod.Whether the HTTP method used should be included in the request context. Valid values include: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT.
Default: false
-
getRequestId
Represents the information of $context.requestId.Whether the ID for the request should be included in the request context.
Default: false
-
getResourceId
Represents the information of $context.resourceId.Whether the identifier that API Gateway assigns to your resource should be included in the request context.
Default: false
-
getResourcePath
Represents the information of $context.resourcePath.Whether the path to the resource should be included in the request context.
Default: false
-
getSourceIp
Represents the information of $context.identity.sourceIp.Whether the source IP address of the immediate TCP connection making the request to API Gateway endpoint should be included in the request context.
Default: false
-
getStage
Represents the information of $context.stage.Whether the deployment stage of the API request should be included in the request context.
Default: false
-
getUser
Represents the information of $context.identity.user.Whether the principal identifier of the user that will be authorized should be included in the request context. Supported for resources that use IAM authorization.
Default: false
-
getUserAgent
Represents the information of $context.identity.userAgent.Whether the User-Agent header of the API caller should be included in the request context.
Default: false
-
getUserArn
Represents the information of $context.identity.userArn.Whether the Amazon Resource Name (ARN) of the effective user identified after authentication should be included in the request context.
Default: false
-
builder
- Returns:
- a
RequestContext.Builder
ofRequestContext
-