Class ResponseType
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigateway.ResponseType
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)",
date="2024-07-05T20:26:26.342Z")
@Stability(Stable)
public class ResponseType
extends software.amazon.jsii.JsiiObject
Supported types of gateway responses.
Example:
RestApi api = new RestApi(this, "books-api"); api.addGatewayResponse("test-response", GatewayResponseOptions.builder() .type(ResponseType.ACCESS_DENIED) .statusCode("500") .responseHeaders(Map.of( // Note that values must be enclosed within a pair of single quotes "Access-Control-Allow-Origin", "'test.com'", "test-key", "'test-value'")) .templates(Map.of( "application/json", "{ \"message\": $context.error.messageString, \"statusCode\": \"488\", \"type\": \"$context.error.responseType\" }")) .build());
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResponseType
The gateway response for authorization failure.static final ResponseType
The gateway response for an invalid API configuration.static final ResponseType
The gateway response for failing to connect to a custom or Amazon Cognito authorizer.static final ResponseType
The gateway response when a custom or Amazon Cognito authorizer failed to authenticate the caller.static final ResponseType
The gateway response when the request body cannot be validated according to an enabled request validator.static final ResponseType
The gateway response when the request parameter cannot be validated according to an enabled request validator.static final ResponseType
The default gateway response for an unspecified response type with the status code of 4XX.static final ResponseType
The default gateway response for an unspecified response type with a status code of 5XX.static final ResponseType
The gateway response for an AWS authentication token expired error.static final ResponseType
The gateway response for an integration failed error.static final ResponseType
The gateway response for an integration timed out error.static final ResponseType
The gateway response for an invalid API key submitted for a method requiring an API key.static final ResponseType
The gateway response for an invalid AWS signature error.static final ResponseType
The gateway response for a missing authentication token error, including the cases when the client attempts to invoke an unsupported API method or resource.static final ResponseType
The gateway response for the usage plan quota exceeded error.static final ResponseType
The gateway response for the request too large error.static final ResponseType
The gateway response when API Gateway cannot find the specified resource after an API request passes authentication and authorization.static final ResponseType
The gateway response when usage plan, method, stage, or account level throttling limits exceeded.static final ResponseType
The gateway response when the custom or Amazon Cognito authorizer failed to authenticate the caller.static final ResponseType
The gateway response when a payload is of an unsupported media type, if strict passthrough behavior is enabled.static final ResponseType
The gateway response when a request is blocked by AWS WAF. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ResponseType
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ResponseType
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionValid value of response type.static ResponseType
A custom response type to support future cases.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
-
Field Details
-
ACCESS_DENIED
The gateway response for authorization failure. -
API_CONFIGURATION_ERROR
The gateway response for an invalid API configuration. -
AUTHORIZER_CONFIGURATION_ERROR
The gateway response for failing to connect to a custom or Amazon Cognito authorizer. -
AUTHORIZER_FAILURE
The gateway response when a custom or Amazon Cognito authorizer failed to authenticate the caller. -
BAD_REQUEST_BODY
The gateway response when the request body cannot be validated according to an enabled request validator. -
BAD_REQUEST_PARAMETERS
The gateway response when the request parameter cannot be validated according to an enabled request validator. -
DEFAULT_4_XX
The default gateway response for an unspecified response type with the status code of 4XX. -
DEFAULT_5_XX
The default gateway response for an unspecified response type with a status code of 5XX. -
EXPIRED_TOKEN
The gateway response for an AWS authentication token expired error. -
INTEGRATION_FAILURE
The gateway response for an integration failed error. -
INTEGRATION_TIMEOUT
The gateway response for an integration timed out error. -
INVALID_API_KEY
The gateway response for an invalid API key submitted for a method requiring an API key. -
INVALID_SIGNATURE
The gateway response for an invalid AWS signature error. -
MISSING_AUTHENTICATION_TOKEN
The gateway response for a missing authentication token error, including the cases when the client attempts to invoke an unsupported API method or resource. -
QUOTA_EXCEEDED
The gateway response for the usage plan quota exceeded error. -
REQUEST_TOO_LARGE
The gateway response for the request too large error. -
RESOURCE_NOT_FOUND
The gateway response when API Gateway cannot find the specified resource after an API request passes authentication and authorization. -
THROTTLED
The gateway response when usage plan, method, stage, or account level throttling limits exceeded. -
UNAUTHORIZED
The gateway response when the custom or Amazon Cognito authorizer failed to authenticate the caller. -
UNSUPPORTED_MEDIA_TYPE
The gateway response when a payload is of an unsupported media type, if strict passthrough behavior is enabled. -
WAF_FILTERED
The gateway response when a request is blocked by AWS WAF.
-
-
Constructor Details
-
ResponseType
protected ResponseType(software.amazon.jsii.JsiiObjectRef objRef) -
ResponseType
protected ResponseType(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
of
A custom response type to support future cases.- Parameters:
type
- This parameter is required.
-
getResponseType
Valid value of response type.
-