Class: AWSCDK::APIGatewayv2::WebSocketRouteAuthorizerConfig

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

Overview

Results of binding an authorizer to an WebSocket route.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorization_type:, authorizer_id: nil) ⇒ WebSocketRouteAuthorizerConfig

Returns a new instance of WebSocketRouteAuthorizerConfig.

Parameters:

  • authorization_type (String)

    The type of authorization.

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

    The authorizer id.



9
10
11
12
13
14
# File 'api_gatewayv2/web_socket_route_authorizer_config.rb', line 9

def initialize(authorization_type:, authorizer_id: nil)
  @authorization_type = authorization_type
  Jsii::Type.check_type(@authorization_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizationType")
  @authorizer_id = authorizer_id
  Jsii::Type.check_type(@authorizer_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizerId") unless @authorizer_id.nil?
end

Instance Attribute Details

#authorization_typeString (readonly)

The type of authorization.

Possible values are:

  • CUSTOM - Lambda Authorizer
  • NONE - No Authorization

Returns:

  • (String)


24
25
26
# File 'api_gatewayv2/web_socket_route_authorizer_config.rb', line 24

def authorization_type
  @authorization_type
end

#authorizer_idString? (readonly)

Note:

Default: - No authorizer id (useful for AWS_IAM route authorizer)

The authorizer id.

Returns:

  • (String, nil)


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

def authorizer_id
  @authorizer_id
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'api_gatewayv2/web_socket_route_authorizer_config.rb', line 31

def self.jsii_properties
  {
    :authorization_type => "authorizationType",
    :authorizer_id => "authorizerId",
  }
end

Instance Method Details

#to_jsiiObject



38
39
40
41
42
43
44
45
# File 'api_gatewayv2/web_socket_route_authorizer_config.rb', line 38

def to_jsii
  result = {}
  result.merge!({
    "authorizationType" => @authorization_type,
    "authorizerId" => @authorizer_id,
  })
  result.compact
end