Class: AWSCDK::APIGatewayv2::WebSocketRouteOptions

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

Overview

Options used to add route to the API.

Direct Known Subclasses

WebSocketRouteProps

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(integration:, authorizer: nil, return_response: nil) ⇒ WebSocketRouteOptions

Returns a new instance of WebSocketRouteOptions.

Parameters:



10
11
12
13
14
15
16
17
# File 'api_gatewayv2/web_socket_route_options.rb', line 10

def initialize(integration:, authorizer: nil, return_response: nil)
  @integration = integration
  Jsii::Type.check_type(@integration, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLldlYlNvY2tldFJvdXRlSW50ZWdyYXRpb24ifQ==")), "integration")
  @authorizer = authorizer
  Jsii::Type.check_type(@authorizer, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLklXZWJTb2NrZXRSb3V0ZUF1dGhvcml6ZXIifQ==")), "authorizer") unless @authorizer.nil?
  @return_response = return_response
  Jsii::Type.check_type(@return_response, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "returnResponse") unless @return_response.nil?
end

Instance Attribute Details

#authorizerAWSCDK::APIGatewayv2::IWebSocketRouteAuthorizer? (readonly)

Note:

Default: - No Authorizer

The authorize to this route.

You can only set authorizer to a $connect route.



29
30
31
# File 'api_gatewayv2/web_socket_route_options.rb', line 29

def authorizer
  @authorizer
end

#integrationAWSCDK::APIGatewayv2::WebSocketRouteIntegration (readonly)

The integration to be configured on this route.



22
23
24
# File 'api_gatewayv2/web_socket_route_options.rb', line 22

def integration
  @integration
end

#return_responseBoolean? (readonly)

Note:

Default: false

Should the route send a response to the client.

Returns:

  • (Boolean, nil)


34
35
36
# File 'api_gatewayv2/web_socket_route_options.rb', line 34

def return_response
  @return_response
end

Class Method Details

.jsii_propertiesObject



36
37
38
39
40
41
42
# File 'api_gatewayv2/web_socket_route_options.rb', line 36

def self.jsii_properties
  {
    :integration => "integration",
    :authorizer => "authorizer",
    :return_response => "returnResponse",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
52
# File 'api_gatewayv2/web_socket_route_options.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "integration" => @integration,
    "authorizer" => @authorizer,
    "returnResponse" => @return_response,
  })
  result.compact
end