Class: AWSCDK::APIGatewayv2::WebSocketRouteProps

Inherits:
WebSocketRouteOptions
  • Object
show all
Defined in:
api_gatewayv2/web_socket_route_props.rb

Overview

Properties to initialize a new Route.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(integration:, authorizer: nil, return_response: nil, route_key:, web_socket_api:, api_key_required: nil) ⇒ WebSocketRouteProps

Returns a new instance of WebSocketRouteProps.

Parameters:



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'api_gatewayv2/web_socket_route_props.rb', line 13

def initialize(integration:, authorizer: nil, return_response: nil, route_key:, web_socket_api:, api_key_required: 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?
  @route_key = route_key
  Jsii::Type.check_type(@route_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "routeKey")
  @web_socket_api = web_socket_api
  Jsii::Type.check_type(@web_socket_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLklXZWJTb2NrZXRBcGkifQ==")), "webSocketApi")
  @api_key_required = api_key_required
  Jsii::Type.check_type(@api_key_required, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "apiKeyRequired") unless @api_key_required.nil?
end

Instance Attribute Details

#api_key_requiredBoolean? (readonly)

Note:

Default: false

Whether the route requires an API Key to be provided.

Returns:

  • (Boolean, nil)


56
57
58
# File 'api_gatewayv2/web_socket_route_props.rb', line 56

def api_key_required
  @api_key_required
end

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

Note:

Default: - No Authorizer

The authorize to this route.

You can only set authorizer to a $connect route.



38
39
40
# File 'api_gatewayv2/web_socket_route_props.rb', line 38

def authorizer
  @authorizer
end

#integrationAWSCDK::APIGatewayv2::WebSocketRouteIntegration (readonly)

The integration to be configured on this route.



31
32
33
# File 'api_gatewayv2/web_socket_route_props.rb', line 31

def integration
  @integration
end

#return_responseBoolean? (readonly)

Note:

Default: false

Should the route send a response to the client.

Returns:

  • (Boolean, nil)


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

def return_response
  @return_response
end

#route_keyString (readonly)

The key to this route.

Returns:

  • (String)


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

def route_key
  @route_key
end

#web_socket_apiAWSCDK::APIGatewayv2::IWebSocketAPI (readonly)

The API the route is associated with.



51
52
53
# File 'api_gatewayv2/web_socket_route_props.rb', line 51

def web_socket_api
  @web_socket_api
end

Class Method Details

.jsii_propertiesObject



58
59
60
61
62
63
64
65
66
67
# File 'api_gatewayv2/web_socket_route_props.rb', line 58

def self.jsii_properties
  {
    :integration => "integration",
    :authorizer => "authorizer",
    :return_response => "returnResponse",
    :route_key => "routeKey",
    :web_socket_api => "webSocketApi",
    :api_key_required => "apiKeyRequired",
  }
end

Instance Method Details

#to_jsiiObject



69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'api_gatewayv2/web_socket_route_props.rb', line 69

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "integration" => @integration,
    "authorizer" => @authorizer,
    "returnResponse" => @return_response,
    "routeKey" => @route_key,
    "webSocketApi" => @web_socket_api,
    "apiKeyRequired" => @api_key_required,
  })
  result.compact
end