Class: AWSCDK::APIGatewayv2::HttpRouteAuthorizerConfig
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::HttpRouteAuthorizerConfig
- Defined in:
- api_gatewayv2/http_route_authorizer_config.rb
Overview
Results of binding an authorizer to an http route.
Instance Attribute Summary collapse
-
#authorization_scopes ⇒ Array<String>?
readonly
The list of OIDC scopes to include in the authorization.
-
#authorization_type ⇒ String
readonly
The type of authorization.
-
#authorizer_id ⇒ String?
readonly
The authorizer id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(authorization_type:, authorization_scopes: nil, authorizer_id: nil) ⇒ HttpRouteAuthorizerConfig
constructor
A new instance of HttpRouteAuthorizerConfig.
- #to_jsii ⇒ Object
Constructor Details
#initialize(authorization_type:, authorization_scopes: nil, authorizer_id: nil) ⇒ HttpRouteAuthorizerConfig
Returns a new instance of HttpRouteAuthorizerConfig.
10 11 12 13 14 15 16 17 |
# File 'api_gatewayv2/http_route_authorizer_config.rb', line 10 def initialize(authorization_type:, authorization_scopes: nil, authorizer_id: nil) @authorization_type = Jsii::Type.check_type(@authorization_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizationType") @authorization_scopes = Jsii::Type.check_type(@authorization_scopes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "authorizationScopes") unless @authorization_scopes.nil? @authorizer_id = Jsii::Type.check_type(@authorizer_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizerId") unless @authorizer_id.nil? end |
Instance Attribute Details
#authorization_scopes ⇒ Array<String>? (readonly)
Note:
Default: - no authorization scopes
The list of OIDC scopes to include in the authorization.
34 35 36 |
# File 'api_gatewayv2/http_route_authorizer_config.rb', line 34 def @authorization_scopes end |
#authorization_type ⇒ String (readonly)
The type of authorization.
Possible values are:
- AWS_IAM - IAM Authorizer
- JWT - JSON Web Token Authorizer
- CUSTOM - Lambda Authorizer
- NONE - No Authorization
29 30 31 |
# File 'api_gatewayv2/http_route_authorizer_config.rb', line 29 def @authorization_type end |
#authorizer_id ⇒ String? (readonly)
Note:
Default: - No authorizer id (useful for AWS_IAM route authorizer)
The authorizer id.
39 40 41 |
# File 'api_gatewayv2/http_route_authorizer_config.rb', line 39 def @authorizer_id end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 |
# File 'api_gatewayv2/http_route_authorizer_config.rb', line 41 def self.jsii_properties { :authorization_type => "authorizationType", :authorization_scopes => "authorizationScopes", :authorizer_id => "authorizerId", } end |
Instance Method Details
#to_jsii ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'api_gatewayv2/http_route_authorizer_config.rb', line 49 def to_jsii result = {} result.merge!({ "authorizationType" => @authorization_type, "authorizationScopes" => @authorization_scopes, "authorizerId" => @authorizer_id, }) result.compact end |