Class: AWSCDK::APIGatewayv2Authorizers::WebSocketLambdaAuthorizerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2_authorizers/web_socket_lambda_authorizer_props.rb

Overview

Properties to initialize WebSocketTokenAuthorizer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorizer_name: nil, identity_source: nil) ⇒ WebSocketLambdaAuthorizerProps

Returns a new instance of WebSocketLambdaAuthorizerProps.

Parameters:

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

    The name of the authorizer.

  • identity_source (Array<String>, nil) (defaults to: nil)

    The identity source for which authorization is requested.



9
10
11
12
13
14
# File 'api_gatewayv2_authorizers/web_socket_lambda_authorizer_props.rb', line 9

def initialize(authorizer_name: nil, identity_source: nil)
  @authorizer_name = authorizer_name
  Jsii::Type.check_type(@authorizer_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizerName") unless @authorizer_name.nil?
  @identity_source = identity_source
  Jsii::Type.check_type(@identity_source, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "identitySource") unless @identity_source.nil?
end

Instance Attribute Details

#authorizer_nameString? (readonly)

Note:

Default: - same value as id passed in the constructor.

The name of the authorizer.

Returns:

  • (String, nil)


20
21
22
# File 'api_gatewayv2_authorizers/web_socket_lambda_authorizer_props.rb', line 20

def authorizer_name
  @authorizer_name
end

#identity_sourceArray<String>? (readonly)

Note:

Default: ['route.request.header.Authorization']

The identity source for which authorization is requested.

Request parameter match 'route.request.querystring|header.[a-zA-z0-9._-]+'. Staged variable match 'stageVariables.[a-zA-Z0-9._-]+'. Context parameter match 'context.[a-zA-Z0-9._-]+'.

Returns:

  • (Array<String>, nil)


29
30
31
# File 'api_gatewayv2_authorizers/web_socket_lambda_authorizer_props.rb', line 29

def identity_source
  @identity_source
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'api_gatewayv2_authorizers/web_socket_lambda_authorizer_props.rb', line 31

def self.jsii_properties
  {
    :authorizer_name => "authorizerName",
    :identity_source => "identitySource",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "authorizerName" => @authorizer_name,
    "identitySource" => @identity_source,
  })
  result.compact
end