Class: AWSCDK::APIGateway::StepFunctionsExecutionIntegrationOptions
- Inherits:
-
IntegrationOptions
- Object
- IntegrationOptions
- AWSCDK::APIGateway::StepFunctionsExecutionIntegrationOptions
- Defined in:
- api_gateway/step_functions_execution_integration_options.rb
Overview
Options when configuring Step Functions synchronous integration with Rest API.
Instance Attribute Summary collapse
-
#authorizer ⇒ Boolean?
readonly
If the whole authorizer object, including custom context values should be in the execution input.
-
#cache_key_parameters ⇒ Array<String>?
readonly
A list of request parameters whose values are to be cached.
-
#cache_namespace ⇒ String?
readonly
An API-specific tag group of related cached parameters.
-
#connection_type ⇒ AWSCDK::APIGateway::ConnectionType?
readonly
The type of network connection to the integration endpoint.
-
#content_handling ⇒ AWSCDK::APIGateway::ContentHandling?
readonly
Specifies how to handle request payload content type conversions.
-
#credentials_passthrough ⇒ Boolean?
readonly
Requires that the caller's identity be passed through from the request.
-
#credentials_role ⇒ AWSCDK::IAM::IRole?
readonly
An IAM role that API Gateway assumes.
-
#headers ⇒ Boolean?
readonly
Check if header is to be included inside the execution input.
-
#integration_responses ⇒ Array<AWSCDK::APIGateway::IntegrationResponse>?
readonly
The response that API Gateway provides after a method's backend completes processing a request.
-
#passthrough_behavior ⇒ AWSCDK::APIGateway::PassthroughBehavior?
readonly
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.
-
#path ⇒ Boolean?
readonly
Check if path is to be included inside the execution input.
-
#querystring ⇒ Boolean?
readonly
Check if querystring is to be included inside the execution input.
-
#request_context ⇒ AWSCDK::APIGateway::RequestContext?
readonly
Which details of the incoming request must be passed onto the underlying state machine, such as, account id, user identity, request id, etc.
-
#request_parameters ⇒ Hash{String => String}?
readonly
The request parameters that API Gateway sends with the backend request.
-
#request_templates ⇒ Hash{String => String}?
readonly
A map of Apache Velocity templates that are applied on the request payload.
-
#response_transfer_mode ⇒ AWSCDK::APIGateway::ResponseTransferMode?
readonly
The response transfer mode for the integration.
-
#timeout ⇒ AWSCDK::Duration?
readonly
The maximum amount of time an integration will run before it returns without a response.
-
#use_default_method_responses ⇒ Boolean?
readonly
Whether to add default response models with 200, 400, and 500 status codes to the method.
-
#vpc_link ⇒ AWSCDK::APIGateway::IVPCLink?
readonly
The VpcLink used for the integration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cache_key_parameters: nil, cache_namespace: nil, connection_type: nil, content_handling: nil, credentials_passthrough: nil, credentials_role: nil, integration_responses: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout: nil, vpc_link: nil, authorizer: nil, headers: nil, path: nil, querystring: nil, request_context: nil, use_default_method_responses: nil) ⇒ StepFunctionsExecutionIntegrationOptions
constructor
A new instance of StepFunctionsExecutionIntegrationOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cache_key_parameters: nil, cache_namespace: nil, connection_type: nil, content_handling: nil, credentials_passthrough: nil, credentials_role: nil, integration_responses: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout: nil, vpc_link: nil, authorizer: nil, headers: nil, path: nil, querystring: nil, request_context: nil, use_default_method_responses: nil) ⇒ StepFunctionsExecutionIntegrationOptions
Returns a new instance of StepFunctionsExecutionIntegrationOptions.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 26 def initialize(cache_key_parameters: nil, cache_namespace: nil, connection_type: nil, content_handling: nil, credentials_passthrough: nil, credentials_role: nil, integration_responses: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, response_transfer_mode: nil, timeout: nil, vpc_link: nil, authorizer: nil, headers: nil, path: nil, querystring: nil, request_context: nil, use_default_method_responses: nil) @cache_key_parameters = cache_key_parameters Jsii::Type.check_type(@cache_key_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "cacheKeyParameters") unless @cache_key_parameters.nil? @cache_namespace = cache_namespace Jsii::Type.check_type(@cache_namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cacheNamespace") unless @cache_namespace.nil? @connection_type = connection_type Jsii::Type.check_type(@connection_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5Db25uZWN0aW9uVHlwZSJ9")), "connectionType") unless @connection_type.nil? @content_handling = content_handling Jsii::Type.check_type(@content_handling, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5Db250ZW50SGFuZGxpbmcifQ==")), "contentHandling") unless @content_handling.nil? @credentials_passthrough = credentials_passthrough Jsii::Type.check_type(@credentials_passthrough, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "credentialsPassthrough") unless @credentials_passthrough.nil? @credentials_role = credentials_role Jsii::Type.check_type(@credentials_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "credentialsRole") unless @credentials_role.nil? @integration_responses = integration_responses.is_a?(Array) ? integration_responses.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::APIGateway::IntegrationResponse.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : integration_responses Jsii::Type.check_type(@integration_responses, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkludGVncmF0aW9uUmVzcG9uc2UifSwia2luZCI6ImFycmF5In19")), "integrationResponses") unless @integration_responses.nil? @passthrough_behavior = passthrough_behavior Jsii::Type.check_type(@passthrough_behavior, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5QYXNzdGhyb3VnaEJlaGF2aW9yIn0=")), "passthroughBehavior") unless @passthrough_behavior.nil? @request_parameters = request_parameters Jsii::Type.check_type(@request_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "requestParameters") unless @request_parameters.nil? @request_templates = request_templates Jsii::Type.check_type(@request_templates, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "requestTemplates") unless @request_templates.nil? @response_transfer_mode = response_transfer_mode Jsii::Type.check_type(@response_transfer_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5SZXNwb25zZVRyYW5zZmVyTW9kZSJ9")), "responseTransferMode") unless @response_transfer_mode.nil? @timeout = timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil? @vpc_link = vpc_link Jsii::Type.check_type(@vpc_link, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JVnBjTGluayJ9")), "vpcLink") unless @vpc_link.nil? @authorizer = Jsii::Type.check_type(@authorizer, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "authorizer") unless @authorizer.nil? @headers = headers Jsii::Type.check_type(@headers, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "headers") unless @headers.nil? @path = path Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "path") unless @path.nil? @querystring = querystring Jsii::Type.check_type(@querystring, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "querystring") unless @querystring.nil? @request_context = request_context.is_a?(Hash) ? ::AWSCDK::APIGateway::RequestContext.new(**request_context.transform_keys(&:to_sym)) : request_context Jsii::Type.check_type(@request_context, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5SZXF1ZXN0Q29udGV4dCJ9")), "requestContext") unless @request_context.nil? @use_default_method_responses = use_default_method_responses Jsii::Type.check_type(@use_default_method_responses, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "useDefaultMethodResponses") unless @use_default_method_responses.nil? end |
Instance Attribute Details
#authorizer ⇒ Boolean? (readonly)
Default: false
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" } }
183 184 185 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 183 def @authorizer end |
#cache_key_parameters ⇒ Array<String>? (readonly)
A list of request parameters whose values are to be cached.
It determines request parameters that will make it into the cache key.
73 74 75 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 73 def cache_key_parameters @cache_key_parameters end |
#cache_namespace ⇒ String? (readonly)
An API-specific tag group of related cached parameters.
77 78 79 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 77 def cache_namespace @cache_namespace end |
#connection_type ⇒ AWSCDK::APIGateway::ConnectionType? (readonly)
Default: - ConnectionType.VPC_LINK if vpcLink property is configured; ConnectionType.Internet otherwise.
The type of network connection to the integration endpoint.
82 83 84 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 82 def connection_type @connection_type end |
#content_handling ⇒ AWSCDK::APIGateway::ContentHandling? (readonly)
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.
Specifies how to handle request payload content type conversions.
87 88 89 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 87 def content_handling @content_handling end |
#credentials_passthrough ⇒ Boolean? (readonly)
Default: Caller identity is not passed through
Requires that the caller's identity be passed through from the request.
92 93 94 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 92 def credentials_passthrough @credentials_passthrough end |
#credentials_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: A role is not assumed
An IAM role that API Gateway assumes.
Mutually exclusive with credentials_pass_through.
99 100 101 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 99 def credentials_role @credentials_role end |
#headers ⇒ Boolean? (readonly)
Default: false
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" } }
198 199 200 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 198 def headers @headers end |
#integration_responses ⇒ Array<AWSCDK::APIGateway::IntegrationResponse>? (readonly)
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.
108 109 110 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 108 def integration_responses @integration_responses end |
#passthrough_behavior ⇒ AWSCDK::APIGateway::PassthroughBehavior? (readonly)
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.
115 116 117 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 115 def passthrough_behavior @passthrough_behavior end |
#path ⇒ Boolean? (readonly)
Default: true
Check if path is to be included inside the execution input.
The execution input will include a new key path:
{ "body": {}, "path": { "resourceName": "resourceValue" } }
212 213 214 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 212 def path @path end |
#querystring ⇒ Boolean? (readonly)
Default: true
Check if querystring is to be included inside the execution input.
The execution input will include a new key query_string:
{ "body": {}, "querystring": { "key": "value" } }
226 227 228 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 226 def querystring @querystring end |
#request_context ⇒ AWSCDK::APIGateway::RequestContext? (readonly)
Default: - all parameters within request context will be set as false
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 request_context:
{ "body": {}, "requestContext": { "key": "value" } }
240 241 242 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 240 def request_context @request_context end |
#request_parameters ⇒ Hash{String => String}? (readonly)
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.
130 131 132 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 130 def request_parameters @request_parameters end |
#request_templates ⇒ Hash{String => String}? (readonly)
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 }" }
144 145 146 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 144 def request_templates @request_templates end |
#response_transfer_mode ⇒ AWSCDK::APIGateway::ResponseTransferMode? (readonly)
Default: ResponseTransferMode.BUFFERED
The response transfer mode for the integration.
To enable response streaming, set this value to ResponseTransferMode.STREAM.
151 152 153 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 151 def response_transfer_mode @response_transfer_mode end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(29)
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 account. This increase might require a reduction in your account-level throttle quota limit.
See https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html Amazon API Gateway quotas for more details.
163 164 165 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 163 def timeout @timeout end |
#use_default_method_responses ⇒ Boolean? (readonly)
Default: true
Whether to add default response models with 200, 400, and 500 status codes to the method.
245 246 247 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 245 def use_default_method_responses @use_default_method_responses end |
#vpc_link ⇒ AWSCDK::APIGateway::IVPCLink? (readonly)
The VpcLink used for the integration.
Required if connectionType is VPC_LINK
169 170 171 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 169 def vpc_link @vpc_link end |
Class Method Details
.jsii_properties ⇒ Object
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 247 def self.jsii_properties { :cache_key_parameters => "cacheKeyParameters", :cache_namespace => "cacheNamespace", :connection_type => "connectionType", :content_handling => "contentHandling", :credentials_passthrough => "credentialsPassthrough", :credentials_role => "credentialsRole", :integration_responses => "integrationResponses", :passthrough_behavior => "passthroughBehavior", :request_parameters => "requestParameters", :request_templates => "requestTemplates", :response_transfer_mode => "responseTransferMode", :timeout => "timeout", :vpc_link => "vpcLink", :authorizer => "authorizer", :headers => "headers", :path => "path", :querystring => "querystring", :request_context => "requestContext", :use_default_method_responses => "useDefaultMethodResponses", } end |
Instance Method Details
#to_jsii ⇒ Object
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'api_gateway/step_functions_execution_integration_options.rb', line 271 def to_jsii result = {} result.merge!(super) result.merge!({ "cacheKeyParameters" => @cache_key_parameters, "cacheNamespace" => @cache_namespace, "connectionType" => @connection_type, "contentHandling" => @content_handling, "credentialsPassthrough" => @credentials_passthrough, "credentialsRole" => @credentials_role, "integrationResponses" => @integration_responses, "passthroughBehavior" => @passthrough_behavior, "requestParameters" => @request_parameters, "requestTemplates" => @request_templates, "responseTransferMode" => @response_transfer_mode, "timeout" => @timeout, "vpcLink" => @vpc_link, "authorizer" => @authorizer, "headers" => @headers, "path" => @path, "querystring" => @querystring, "requestContext" => @request_context, "useDefaultMethodResponses" => @use_default_method_responses, }) result.compact end |