Class: AWSCDK::APIGatewayv2::WebSocketIntegrationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::WebSocketIntegrationProps
- Defined in:
- api_gatewayv2/web_socket_integration_props.rb
Overview
The integration properties.
Instance Attribute Summary collapse
-
#content_handling ⇒ AWSCDK::APIGatewayv2::ContentHandling?
readonly
Specifies how to handle response payload content type conversions.
-
#credentials_role ⇒ AWSCDK::IAM::IRole?
readonly
Specifies the IAM role required for the integration.
-
#integration_method ⇒ String?
readonly
Specifies the integration's HTTP method type.
-
#integration_type ⇒ AWSCDK::APIGatewayv2::WebSocketIntegrationType
readonly
Integration type.
-
#integration_uri ⇒ String
readonly
Integration URI.
-
#passthrough_behavior ⇒ AWSCDK::APIGatewayv2::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.
-
#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.
-
#template_selection_expression ⇒ String?
readonly
The template selection expression for the integration.
-
#timeout ⇒ AWSCDK::Duration?
readonly
The maximum amount of time an integration will run before it returns without a response.
-
#web_socket_api ⇒ AWSCDK::APIGatewayv2::IWebSocketAPIRef
readonly
The WebSocket API to which this integration should be bound.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(integration_type:, integration_uri:, web_socket_api:, content_handling: nil, credentials_role: nil, integration_method: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, template_selection_expression: nil, timeout: nil) ⇒ WebSocketIntegrationProps
constructor
A new instance of WebSocketIntegrationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(integration_type:, integration_uri:, web_socket_api:, content_handling: nil, credentials_role: nil, integration_method: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, template_selection_expression: nil, timeout: nil) ⇒ WebSocketIntegrationProps
Returns a new instance of WebSocketIntegrationProps.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 18 def initialize(integration_type:, integration_uri:, web_socket_api:, content_handling: nil, credentials_role: nil, integration_method: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, template_selection_expression: nil, timeout: nil) @integration_type = integration_type Jsii::Type.check_type(@integration_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLldlYlNvY2tldEludGVncmF0aW9uVHlwZSJ9")), "integrationType") @integration_uri = integration_uri Jsii::Type.check_type(@integration_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationUri") @web_socket_api = web_socket_api Jsii::Type.check_type(@web_socket_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLklXZWJTb2NrZXRBcGlSZWYifQ==")), "webSocketApi") @content_handling = content_handling Jsii::Type.check_type(@content_handling, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkNvbnRlbnRIYW5kbGluZyJ9")), "contentHandling") unless @content_handling.nil? @credentials_role = credentials_role Jsii::Type.check_type(@credentials_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "credentialsRole") unless @credentials_role.nil? @integration_method = integration_method Jsii::Type.check_type(@integration_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationMethod") unless @integration_method.nil? @passthrough_behavior = passthrough_behavior Jsii::Type.check_type(@passthrough_behavior, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLlBhc3N0aHJvdWdoQmVoYXZpb3IifQ==")), "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? @template_selection_expression = template_selection_expression Jsii::Type.check_type(@template_selection_expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateSelectionExpression") unless @template_selection_expression.nil? @timeout = timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil? end |
Instance Attribute Details
#content_handling ⇒ AWSCDK::APIGatewayv2::ContentHandling? (readonly)
Default: - The response payload will be passed through from the integration response to the route response or method response without modification.
Specifies how to handle response payload content type conversions.
59 60 61 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 59 def content_handling @content_handling end |
#credentials_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - No IAM role required.
Specifies the IAM role required for the integration.
64 65 66 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 64 def credentials_role @credentials_role end |
#integration_method ⇒ String? (readonly)
Default: - No HTTP method required.
Specifies the integration's HTTP method type.
69 70 71 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 69 def integration_method @integration_method end |
#integration_type ⇒ AWSCDK::APIGatewayv2::WebSocketIntegrationType (readonly)
Integration type.
46 47 48 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 46 def integration_type @integration_type end |
#integration_uri ⇒ String (readonly)
Integration URI.
50 51 52 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 50 def integration_uri @integration_uri end |
#passthrough_behavior ⇒ AWSCDK::APIGatewayv2::PassthroughBehavior? (readonly)
Default: - No passthrough behavior required.
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.
77 78 79 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 77 def passthrough_behavior @passthrough_behavior end |
#request_parameters ⇒ Hash{String => String}? (readonly)
Default: - No request parameters required.
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.
85 86 87 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 85 def request_parameters @request_parameters end |
#request_templates ⇒ Hash{String => String}? (readonly)
Default: - No request templates required.
A map of Apache Velocity templates that are applied on the request payload.
{ "application/json": "{ \"statusCode\": 200 }" }
94 95 96 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 94 def request_templates @request_templates end |
#template_selection_expression ⇒ String? (readonly)
Default: - No template selection expression required.
The template selection expression for the integration.
99 100 101 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 99 def template_selection_expression @template_selection_expression end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(29)
The maximum amount of time an integration will run before it returns without a response.
Must be between 50 milliseconds and 29 seconds.
106 107 108 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 106 def timeout @timeout end |
#web_socket_api ⇒ AWSCDK::APIGatewayv2::IWebSocketAPIRef (readonly)
The WebSocket API to which this integration should be bound.
54 55 56 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 54 def web_socket_api @web_socket_api end |
Class Method Details
.jsii_properties ⇒ Object
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 108 def self.jsii_properties { :integration_type => "integrationType", :integration_uri => "integrationUri", :web_socket_api => "webSocketApi", :content_handling => "contentHandling", :credentials_role => "credentialsRole", :integration_method => "integrationMethod", :passthrough_behavior => "passthroughBehavior", :request_parameters => "requestParameters", :request_templates => "requestTemplates", :template_selection_expression => "templateSelectionExpression", :timeout => "timeout", } end |
Instance Method Details
#to_jsii ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'api_gatewayv2/web_socket_integration_props.rb', line 124 def to_jsii result = {} result.merge!({ "integrationType" => @integration_type, "integrationUri" => @integration_uri, "webSocketApi" => @web_socket_api, "contentHandling" => @content_handling, "credentialsRole" => @credentials_role, "integrationMethod" => @integration_method, "passthroughBehavior" => @passthrough_behavior, "requestParameters" => @request_parameters, "requestTemplates" => @request_templates, "templateSelectionExpression" => @template_selection_expression, "timeout" => @timeout, }) result.compact end |