ResponseType¶
-
class
aws_cdk.aws_apigateway.
ResponseType
(*args: Any, **kwargs)¶ Bases:
object
Supported types of gateway responses.
- See
https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html
- ExampleMetadata
infused
Example:
api = apigateway.RestApi(self, "books-api") api.add_gateway_response("test-response", type=apigateway.ResponseType.ACCESS_DENIED, status_code="500", response_headers={ "Access-Control-Allow-Origin": "test.com", "test-key": "test-value" }, templates={ "application/json": "{ "message": $context.error.messageString, "statusCode": "488", "type": "$context.error.responseType" }" } )
Attributes
-
ACCESS_DENIED
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
API_CONFIGURATION_ERROR
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
AUTHORIZER_CONFIGURATION_ERROR
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
AUTHORIZER_FAILURE
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
BAD_REQUEST_BODY
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
BAD_REQUEST_PARAMETERS
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
DEFAULT_4_XX
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
DEFAULT_5_XX
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
EXPIRED_TOKEN
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
INTEGRATION_FAILURE
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
INTEGRATION_TIMEOUT
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
INVALID_API_KEY
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
INVALID_SIGNATURE
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
MISSING_AUTHENTICATION_TOKEN
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
QUOTA_EXCEEDED
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
REQUEST_TOO_LARGE
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
RESOURCE_NOT_FOUND
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
THROTTLED
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
UNAUTHORIZED
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
UNSUPPORTED_MEDIA_TYPE
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
WAF_FILTERED
= <aws_cdk.aws_apigateway.ResponseType object>¶
-
response_type
¶ Valid value of response type.
- Return type
str
Static Methods
-
classmethod
of
(type)¶ A custom response type to support future cases.
- Parameters
type (
str
) –- Return type