Class: AWSCDK::APIGatewayv2::WebSocketIntegrationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2/web_socket_integration_props.rb

Overview

The integration properties.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

  • integration_type (AWSCDK::APIGatewayv2::WebSocketIntegrationType)

    Integration type.

  • integration_uri (String)

    Integration URI.

  • web_socket_api (AWSCDK::APIGatewayv2::IWebSocketAPIRef)

    The WebSocket API to which this integration should be bound.

  • content_handling (AWSCDK::APIGatewayv2::ContentHandling, nil) (defaults to: nil)

    Specifies how to handle response payload content type conversions.

  • credentials_role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    Specifies the IAM role required for the integration.

  • integration_method (String, nil) (defaults to: nil)

    Specifies the integration's HTTP method type.

  • passthrough_behavior (AWSCDK::APIGatewayv2::PassthroughBehavior, nil) (defaults to: nil)

    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}, nil) (defaults to: nil)

    The request parameters that API Gateway sends with the backend request.

  • request_templates (Hash{String => String}, nil) (defaults to: nil)

    A map of Apache Velocity templates that are applied on the request payload.

  • template_selection_expression (String, nil) (defaults to: nil)

    The template selection expression for the integration.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    The maximum amount of time an integration will run before it returns without a response.



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_handlingAWSCDK::APIGatewayv2::ContentHandling? (readonly)

Note:

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_roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - No IAM role required.

Specifies the IAM role required for the integration.

Returns:



64
65
66
# File 'api_gatewayv2/web_socket_integration_props.rb', line 64

def credentials_role
  @credentials_role
end

#integration_methodString? (readonly)

Note:

Default: - No HTTP method required.

Specifies the integration's HTTP method type.

Returns:

  • (String, nil)


69
70
71
# File 'api_gatewayv2/web_socket_integration_props.rb', line 69

def integration_method
  @integration_method
end

#integration_typeAWSCDK::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_uriString (readonly)

Integration URI.

Returns:

  • (String)


50
51
52
# File 'api_gatewayv2/web_socket_integration_props.rb', line 50

def integration_uri
  @integration_uri
end

#passthrough_behaviorAWSCDK::APIGatewayv2::PassthroughBehavior? (readonly)

Note:

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_parametersHash{String => String}? (readonly)

Note:

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.

Returns:

  • (Hash{String => String}, nil)


85
86
87
# File 'api_gatewayv2/web_socket_integration_props.rb', line 85

def request_parameters
  @request_parameters
end

#request_templatesHash{String => String}? (readonly)

Note:

Default: - No request templates required.

A map of Apache Velocity templates that are applied on the request payload.

  { "application/json": "{ \"statusCode\": 200 }" }

Returns:

  • (Hash{String => String}, nil)


94
95
96
# File 'api_gatewayv2/web_socket_integration_props.rb', line 94

def request_templates
  @request_templates
end

#template_selection_expressionString? (readonly)

Note:

Default: - No template selection expression required.

The template selection expression for the integration.

Returns:

  • (String, nil)


99
100
101
# File 'api_gatewayv2/web_socket_integration_props.rb', line 99

def template_selection_expression
  @template_selection_expression
end

#timeoutAWSCDK::Duration? (readonly)

Note:

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.

Returns:



106
107
108
# File 'api_gatewayv2/web_socket_integration_props.rb', line 106

def timeout
  @timeout
end

#web_socket_apiAWSCDK::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_propertiesObject



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_jsiiObject



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