Class: AWSCDK::APIGateway::CognitoUserPoolsAuthorizerProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::CognitoUserPoolsAuthorizerProps
- Defined in:
- api_gateway/cognito_user_pools_authorizer_props.rb
Overview
Properties for CognitoUserPoolsAuthorizer.
Instance Attribute Summary collapse
-
#authorizer_name ⇒ String?
readonly
An optional human friendly name for the authorizer.
-
#cognito_user_pools ⇒ Array<AWSCDK::Cognito::IUserPool>
readonly
The user pools to associate with this authorizer.
-
#identity_source ⇒ String?
readonly
The request header mapping expression for the bearer token.
-
#results_cache_ttl ⇒ AWSCDK::Duration?
readonly
How long APIGateway should cache the results.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cognito_user_pools:, authorizer_name: nil, identity_source: nil, results_cache_ttl: nil) ⇒ CognitoUserPoolsAuthorizerProps
constructor
A new instance of CognitoUserPoolsAuthorizerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cognito_user_pools:, authorizer_name: nil, identity_source: nil, results_cache_ttl: nil) ⇒ CognitoUserPoolsAuthorizerProps
Returns a new instance of CognitoUserPoolsAuthorizerProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'api_gateway/cognito_user_pools_authorizer_props.rb', line 11 def initialize(cognito_user_pools:, authorizer_name: nil, identity_source: nil, results_cache_ttl: nil) @cognito_user_pools = cognito_user_pools Jsii::Type.check_type(@cognito_user_pools, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLklVc2VyUG9vbCJ9LCJraW5kIjoiYXJyYXkifX0=")), "cognitoUserPools") @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("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identitySource") unless @identity_source.nil? @results_cache_ttl = results_cache_ttl Jsii::Type.check_type(@results_cache_ttl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "resultsCacheTtl") unless @results_cache_ttl.nil? end |
Instance Attribute Details
#authorizer_name ⇒ String? (readonly)
Default: - the unique construct ID
An optional human friendly name for the authorizer.
Note that, this is not the primary identifier of the authorizer.
32 33 34 |
# File 'api_gateway/cognito_user_pools_authorizer_props.rb', line 32 def @authorizer_name end |
#cognito_user_pools ⇒ Array<AWSCDK::Cognito::IUserPool> (readonly)
The user pools to associate with this authorizer.
25 26 27 |
# File 'api_gateway/cognito_user_pools_authorizer_props.rb', line 25 def cognito_user_pools @cognito_user_pools end |
#identity_source ⇒ String? (readonly)
Default: IdentitySource.header('Authorization')
The request header mapping expression for the bearer token.
This is typically passed as part of the header, in which case
this should be method.request.header.Authorizer where Authorizer is the header containing the bearer token.
41 42 43 |
# File 'api_gateway/cognito_user_pools_authorizer_props.rb', line 41 def identity_source @identity_source end |
#results_cache_ttl ⇒ AWSCDK::Duration? (readonly)
Default: Duration.minutes(5)
How long APIGateway should cache the results.
Max 1 hour. Disable caching by setting this to 0.
49 50 51 |
# File 'api_gateway/cognito_user_pools_authorizer_props.rb', line 49 def results_cache_ttl @results_cache_ttl end |
Class Method Details
.jsii_properties ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'api_gateway/cognito_user_pools_authorizer_props.rb', line 51 def self.jsii_properties { :cognito_user_pools => "cognitoUserPools", :authorizer_name => "authorizerName", :identity_source => "identitySource", :results_cache_ttl => "resultsCacheTtl", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 |
# File 'api_gateway/cognito_user_pools_authorizer_props.rb', line 60 def to_jsii result = {} result.merge!({ "cognitoUserPools" => @cognito_user_pools, "authorizerName" => @authorizer_name, "identitySource" => @identity_source, "resultsCacheTtl" => @results_cache_ttl, }) result.compact end |