Class: AWSCDK::APIGatewayv2::WebSocketRouteIntegrationConfig

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

Overview

Config returned back as a result of the bind.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, uri:, content_handling: nil, credentials_role: nil, method: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, template_selection_expression: nil, timeout: nil) ⇒ WebSocketRouteIntegrationConfig

Returns a new instance of WebSocketRouteIntegrationConfig.

Parameters:

  • type (AWSCDK::APIGatewayv2::WebSocketIntegrationType)

    Integration type.

  • uri (String)

    Integration URI.

  • 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)

    Credentials role.

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

    Integration method.

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

    Integration passthrough behaviors.

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

    Request parameters.

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

    Request template.

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

    Template selection expression.

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

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



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 17

def initialize(type:, uri:, content_handling: nil, credentials_role: nil, method: nil, passthrough_behavior: nil, request_parameters: nil, request_templates: nil, template_selection_expression: nil, timeout: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLldlYlNvY2tldEludGVncmF0aW9uVHlwZSJ9")), "type")
  @uri = uri
  Jsii::Type.check_type(@uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "uri")
  @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?
  @method = method
  Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "method") unless @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.



52
53
54
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 52

def content_handling
  @content_handling
end

#credentials_roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - No role provided.

Credentials role.

Returns:



57
58
59
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 57

def credentials_role
  @credentials_role
end

#methodString? (readonly)

Note:

Default: - No integration method.

Integration method.

Returns:

  • (String, nil)


62
63
64
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 62

def method
  @method
end

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

Note:

Default: - No pass through bahavior.

Integration passthrough behaviors.



67
68
69
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 67

def passthrough_behavior
  @passthrough_behavior
end

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

Note:

Default: - No request parameters provided.

Request parameters.

Returns:

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


72
73
74
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 72

def request_parameters
  @request_parameters
end

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

Note:

Default: - No request template provided.

Request template.

Returns:

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


77
78
79
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 77

def request_templates
  @request_templates
end

#template_selection_expressionString? (readonly)

Note:

Default: - No template selection expression.

Template selection expression.

Returns:

  • (String, nil)


82
83
84
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 82

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:



89
90
91
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 89

def timeout
  @timeout
end

#typeAWSCDK::APIGatewayv2::WebSocketIntegrationType (readonly)

Integration type.



43
44
45
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 43

def type
  @type
end

#uriString (readonly)

Integration URI.

Returns:

  • (String)


47
48
49
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 47

def uri
  @uri
end

Class Method Details

.jsii_propertiesObject



91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 91

def self.jsii_properties
  {
    :type => "type",
    :uri => "uri",
    :content_handling => "contentHandling",
    :credentials_role => "credentialsRole",
    :method => "method",
    :passthrough_behavior => "passthroughBehavior",
    :request_parameters => "requestParameters",
    :request_templates => "requestTemplates",
    :template_selection_expression => "templateSelectionExpression",
    :timeout => "timeout",
  }
end

Instance Method Details

#to_jsiiObject



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'api_gatewayv2/web_socket_route_integration_config.rb', line 106

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "uri" => @uri,
    "contentHandling" => @content_handling,
    "credentialsRole" => @credentials_role,
    "method" => @method,
    "passthroughBehavior" => @passthrough_behavior,
    "requestParameters" => @request_parameters,
    "requestTemplates" => @request_templates,
    "templateSelectionExpression" => @template_selection_expression,
    "timeout" => @timeout,
  })
  result.compact
end