StepFunctionsExecutionIntegrationOptions
- class aws_cdk.aws_apigateway.StepFunctionsExecutionIntegrationOptions(*, cache_key_parameters=None, cache_namespace=None, connection_type=None, content_handling=None, credentials_passthrough=None, credentials_role=None, integration_responses=None, passthrough_behavior=None, request_parameters=None, request_templates=None, timeout=None, vpc_link=None, authorizer=None, headers=None, path=None, querystring=None, request_context=None, use_default_method_responses=None)
Bases:
IntegrationOptions
Options when configuring Step Functions synchronous integration with Rest API.
- Parameters:
cache_key_parameters (
Optional
[Sequence
[str
]]) – A list of request parameters whose values are to be cached. It determines request parameters that will make it into the cache key.cache_namespace (
Optional
[str
]) – An API-specific tag group of related cached parameters.connection_type (
Optional
[ConnectionType
]) – The type of network connection to the integration endpoint. Default: - ConnectionType.VPC_LINK ifvpcLink
property is configured; ConnectionType.Internet otherwise.content_handling (
Optional
[ContentHandling
]) – Specifies how to handle request payload content type conversions. Default: none if this property isn’t defined, the request payload is passed through from the method request to the integration request without modification, provided that thepassthroughBehaviors
property is configured to support payload pass-through.credentials_passthrough (
Optional
[bool
]) – Requires that the caller’s identity be passed through from the request. Default: Caller identity is not passed throughcredentials_role (
Optional
[IRole
]) – An IAM role that API Gateway assumes. Mutually exclusive withcredentialsPassThrough
. Default: A role is not assumedintegration_responses (
Optional
[Sequence
[Union
[IntegrationResponse
,Dict
[str
,Any
]]]]) – The response that API Gateway provides after a method’s backend completes processing a request. API Gateway intercepts the response from the backend so that you can control how API Gateway surfaces backend responses. For example, you can map the backend status codes to codes that you define.passthrough_behavior (
Optional
[PassthroughBehavior
]) – Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.request_parameters (
Optional
[Mapping
[str
,str
]]) – The request parameters that API Gateway sends with the backend request. Specify request parameters as key-value pairs (string-to-string mappings), with a destination as the key and a source as the value. Specify the destination by using the following pattern integration.request.location.name, where location is querystring, path, or header, and name is a valid, unique parameter name. The source must be an existing method request parameter or a static value. You must enclose static values in single quotation marks and pre-encode these values based on their destination in the request.request_templates (
Optional
[Mapping
[str
,str
]]) – A map of Apache Velocity templates that are applied on the request payload. The template that API Gateway uses is based on the value of the Content-Type header that’s sent by the client. The content type value is the key, and the template is the value (specified as a string), such as the following snippet:: { “application/json”: “{ "statusCode": 200 }” }timeout (
Optional
[Duration
]) – The maximum amount of time an integration will run before it returns without a response. By default, the value must be between 50 milliseconds and 29 seconds. The upper bound can be increased for regional and private Rest APIs only, via a quota increase request for your acccount. This increase might require a reduction in your account-level throttle quota limit. See {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html Amazon API Gateway quotas} for more details. Default: Duration.seconds(29)vpc_link (
Optional
[IVpcLink
]) – The VpcLink used for the integration. Required if connectionType is VPC_LINKauthorizer (
Optional
[bool
]) – If the whole authorizer object, including custom context values should be in the execution input. The execution input will include a new keyauthorizer
: { “body”: {}, “authorizer”: { “key”: “value” } } Default: falseheaders (
Optional
[bool
]) – Check if header is to be included inside the execution input. The execution input will include a new keyheaders
: { “body”: {}, “headers”: { “header1”: “value”, “header2”: “value” } } Default: falsepath (
Optional
[bool
]) – Check if path is to be included inside the execution input. The execution input will include a new keypath
: { “body”: {}, “path”: { “resourceName”: “resourceValue” } } Default: truequerystring (
Optional
[bool
]) – Check if querystring is to be included inside the execution input. The execution input will include a new keyqueryString
: { “body”: {}, “querystring”: { “key”: “value” } } Default: truerequest_context (
Union
[RequestContext
,Dict
[str
,Any
],None
]) – Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc. The execution input will include a new keyrequestContext
: { “body”: {}, “requestContext”: { “key”: “value” } } Default: - all parameters within request context will be set as falseuse_default_method_responses (
Optional
[bool
]) – Whether to add default response models with 200, 400, and 500 status codes to the method. Default: true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk from aws_cdk import aws_apigateway as apigateway from aws_cdk import aws_iam as iam # role: iam.Role # vpc_link: apigateway.VpcLink step_functions_execution_integration_options = apigateway.StepFunctionsExecutionIntegrationOptions( authorizer=False, cache_key_parameters=["cacheKeyParameters"], cache_namespace="cacheNamespace", connection_type=apigateway.ConnectionType.INTERNET, content_handling=apigateway.ContentHandling.CONVERT_TO_BINARY, credentials_passthrough=False, credentials_role=role, headers=False, integration_responses=[apigateway.IntegrationResponse( status_code="statusCode", # the properties below are optional content_handling=apigateway.ContentHandling.CONVERT_TO_BINARY, response_parameters={ "response_parameters_key": "responseParameters" }, response_templates={ "response_templates_key": "responseTemplates" }, selection_pattern="selectionPattern" )], passthrough_behavior=apigateway.PassthroughBehavior.WHEN_NO_MATCH, path=False, querystring=False, request_context=apigateway.RequestContext( account_id=False, api_id=False, api_key=False, authorizer_principal_id=False, caller=False, cognito_authentication_provider=False, cognito_authentication_type=False, cognito_identity_id=False, cognito_identity_pool_id=False, http_method=False, request_id=False, resource_id=False, resource_path=False, source_ip=False, stage=False, user=False, user_agent=False, user_arn=False ), request_parameters={ "request_parameters_key": "requestParameters" }, request_templates={ "request_templates_key": "requestTemplates" }, timeout=cdk.Duration.minutes(30), use_default_method_responses=False, vpc_link=vpc_link )
Attributes
- authorizer
If the whole authorizer object, including custom context values should be in the execution input.
The execution input will include a new key
authorizer
:{ “body”: {}, “authorizer”: { “key”: “value” } }
- Default:
false
- cache_key_parameters
A list of request parameters whose values are to be cached.
It determines request parameters that will make it into the cache key.
- cache_namespace
An API-specific tag group of related cached parameters.
- connection_type
The type of network connection to the integration endpoint.
- Default:
ConnectionType.VPC_LINK if
vpcLink
property is configured; ConnectionType.Internet otherwise.
- content_handling
Specifies how to handle request payload content type conversions.
- Default:
none if this property isn’t defined, the request payload is passed through from the method request to the integration request without modification, provided that the
passthroughBehaviors
property is configured to support payload pass-through.
- credentials_passthrough
Requires that the caller’s identity be passed through from the request.
- Default:
Caller identity is not passed through
- credentials_role
An IAM role that API Gateway assumes.
Mutually exclusive with
credentialsPassThrough
.- Default:
A role is not assumed
- headers
Check if header is to be included inside the execution input.
The execution input will include a new key
headers
:{ “body”: {}, “headers”: { “header1”: “value”, “header2”: “value” } }
- Default:
false
- integration_responses
The response that API Gateway provides after a method’s backend completes processing a request.
API Gateway intercepts the response from the backend so that you can control how API Gateway surfaces backend responses. For example, you can map the backend status codes to codes that you define.
- passthrough_behavior
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource.
There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER.
- path
Check if path is to be included inside the execution input.
The execution input will include a new key
path
:{ “body”: {}, “path”: { “resourceName”: “resourceValue” } }
- Default:
true
- querystring
Check if querystring is to be included inside the execution input.
The execution input will include a new key
queryString
:{ “body”: {}, “querystring”: { “key”: “value” } }
- Default:
true
- request_context
Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc.
The execution input will include a new key
requestContext
:{ “body”: {}, “requestContext”: { “key”: “value” } }
- Default:
all parameters within request context will be set as false
- request_parameters
The request parameters that API Gateway sends with the backend request.
Specify request parameters as key-value pairs (string-to-string mappings), with a destination as the key and a source as the value.
Specify the destination by using the following pattern integration.request.location.name, where location is querystring, path, or header, and name is a valid, unique parameter name.
The source must be an existing method request parameter or a static value. You must enclose static values in single quotation marks and pre-encode these values based on their destination in the request.
- request_templates
A map of Apache Velocity templates that are applied on the request payload.
The template that API Gateway uses is based on the value of the Content-Type header that’s sent by the client. The content type value is the key, and the template is the value (specified as a string), such as the following snippet:
{ "application/json": "{ \"statusCode\": 200 }" }
- timeout
The maximum amount of time an integration will run before it returns without a response.
By default, the value must be between 50 milliseconds and 29 seconds. The upper bound can be increased for regional and private Rest APIs only, via a quota increase request for your acccount. This increase might require a reduction in your account-level throttle quota limit.
See {@link https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html Amazon API Gateway quotas} for more details.
- Default:
Duration.seconds(29)
- use_default_method_responses
Whether to add default response models with 200, 400, and 500 status codes to the method.
- Default:
true
- vpc_link
The VpcLink used for the integration.
Required if connectionType is VPC_LINK