Class: AWSCDK::APIGatewayv2Integrations::WebSocketAWSIntegrationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2Integrations::WebSocketAWSIntegrationProps
- Defined in:
- api_gatewayv2_integrations/web_socket_aws_integration_props.rb
Overview
Props for AWS type integration for a WebSocket Api.
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 credentials role required for the integration.
-
#integration_method ⇒ String
readonly
Specifies the integration's HTTP method 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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(integration_method:, integration_uri:, content_handling: nil, credentials_role: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, template_selection_expression: nil, timeout: nil) ⇒ WebSocketAWSIntegrationProps
constructor
A new instance of WebSocketAWSIntegrationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(integration_method:, integration_uri:, content_handling: nil, credentials_role: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, template_selection_expression: nil, timeout: nil) ⇒ WebSocketAWSIntegrationProps
Returns a new instance of WebSocketAWSIntegrationProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 16 def initialize(integration_method:, integration_uri:, content_handling: nil, credentials_role: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, template_selection_expression: nil, timeout: nil) @integration_method = integration_method Jsii::Type.check_type(@integration_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationMethod") @integration_uri = integration_uri Jsii::Type.check_type(@integration_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integrationUri") @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? @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.
49 50 51 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 49 def content_handling @content_handling end |
#credentials_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - No credential role provided.
Specifies the credentials role required for the integration.
54 55 56 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 54 def credentials_role @credentials_role end |
#integration_method ⇒ String (readonly)
Specifies the integration's HTTP method type.
40 41 42 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 40 def integration_method @integration_method end |
#integration_uri ⇒ String (readonly)
Integration URI.
44 45 46 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 44 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.
62 63 64 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 62 def passthrough_behavior @passthrough_behavior end |
#request_parameters ⇒ Hash{String => String}? (readonly)
Default: - No request parameter provided to the integration.
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.
70 71 72 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 70 def request_parameters @request_parameters end |
#request_templates ⇒ Hash{String => String}? (readonly)
Default: - No request template provided to the integration.
A map of Apache Velocity templates that are applied on the request payload.
{ "application/json": "{ \"statusCode\": 200 }" }
79 80 81 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 79 def request_templates @request_templates end |
#template_selection_expression ⇒ String? (readonly)
Default: - No template selection expression provided.
The template selection expression for the integration.
84 85 86 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 84 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.
91 92 93 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 91 def timeout @timeout end |
Class Method Details
.jsii_properties ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 93 def self.jsii_properties { :integration_method => "integrationMethod", :integration_uri => "integrationUri", :content_handling => "contentHandling", :credentials_role => "credentialsRole", :passthrough_behavior => "passthroughBehavior", :request_parameters => "requestParameters", :request_templates => "requestTemplates", :template_selection_expression => "templateSelectionExpression", :timeout => "timeout", } end |
Instance Method Details
#to_jsii ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'api_gatewayv2_integrations/web_socket_aws_integration_props.rb', line 107 def to_jsii result = {} result.merge!({ "integrationMethod" => @integration_method, "integrationUri" => @integration_uri, "contentHandling" => @content_handling, "credentialsRole" => @credentials_role, "passthroughBehavior" => @passthrough_behavior, "requestParameters" => @request_parameters, "requestTemplates" => @request_templates, "templateSelectionExpression" => @template_selection_expression, "timeout" => @timeout, }) result.compact end |