Class: AWSCDK::APIGatewayv2Authorizers::HttpUserPoolAuthorizerProps

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

Overview

Properties to initialize HttpUserPoolAuthorizer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorizer_name: nil, identity_source: nil, user_pool_clients: nil, user_pool_region: nil) ⇒ HttpUserPoolAuthorizerProps

Returns a new instance of HttpUserPoolAuthorizerProps.

Parameters:

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

    Friendly name of the authorizer.

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

    The identity source for which authorization is requested.

  • user_pool_clients (Array<AWSCDK::Cognito::IUserPoolClient>, nil) (defaults to: nil)

    The user pool clients that should be used to authorize requests with the user pool.

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

    The AWS region in which the user pool is present.



11
12
13
14
15
16
17
18
19
20
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 11

def initialize(authorizer_name: nil, identity_source: nil, user_pool_clients: nil, user_pool_region: 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?
  @user_pool_clients = user_pool_clients
  Jsii::Type.check_type(@user_pool_clients, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLklVc2VyUG9vbENsaWVudCJ9LCJraW5kIjoiYXJyYXkifX0=")), "userPoolClients") unless @user_pool_clients.nil?
  @user_pool_region = user_pool_region
  Jsii::Type.check_type(@user_pool_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userPoolRegion") unless @user_pool_region.nil?
end

Instance Attribute Details

#authorizer_nameString? (readonly)

Note:

Default: - same value as id passed in the constructor

Friendly name of the authorizer.

Returns:

  • (String, nil)


26
27
28
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 26

def authorizer_name
  @authorizer_name
end

#identity_sourceArray<String>? (readonly)

Note:

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

The identity source for which authorization is requested.

Returns:

  • (Array<String>, nil)


31
32
33
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 31

def identity_source
  @identity_source
end

#user_pool_clientsArray<AWSCDK::Cognito::IUserPoolClient>? (readonly)

Note:

Default: - a new client will be created for the given user pool

The user pool clients that should be used to authorize requests with the user pool.

Returns:



36
37
38
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 36

def user_pool_clients
  @user_pool_clients
end

#user_pool_regionString? (readonly)

Note:

Default: - same region as the Route the authorizer is attached to.

The AWS region in which the user pool is present.

Returns:

  • (String, nil)


41
42
43
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 41

def user_pool_region
  @user_pool_region
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
50
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 43

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

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
60
61
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 52

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