Class: AWSCDK::Cognito::CfnIdentityPoolRoleAttachment::MappingRuleProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::CfnIdentityPoolRoleAttachment::MappingRuleProperty
- Defined in:
- cognito/cfn_identity_pool_role_attachment.rb
Overview
Defines how to map a claim to a role ARN.
Instance Attribute Summary collapse
-
#claim ⇒ String
readonly
The claim name that must be present in the token.
-
#match_type ⇒ String
readonly
The match condition that specifies how closely the claim value in the IdP token must match
Value. -
#role_arn ⇒ String
readonly
The Amazon Resource Name (ARN) of the role.
-
#value ⇒ String
readonly
A brief string that the claim must match.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(claim:, match_type:, role_arn:, value:) ⇒ MappingRuleProperty
constructor
A new instance of MappingRuleProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(claim:, match_type:, role_arn:, value:) ⇒ MappingRuleProperty
Returns a new instance of MappingRuleProperty.
529 530 531 532 533 534 535 536 537 538 |
# File 'cognito/cfn_identity_pool_role_attachment.rb', line 529 def initialize(claim:, match_type:, role_arn:, value:) @claim = claim Jsii::Type.check_type(@claim, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "claim") @match_type = match_type Jsii::Type.check_type(@match_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "matchType") @role_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") end |
Instance Attribute Details
#claim ⇒ String (readonly)
The claim name that must be present in the token.
For example: "isAdmin" or "paid".
546 547 548 |
# File 'cognito/cfn_identity_pool_role_attachment.rb', line 546 def claim @claim end |
#match_type ⇒ String (readonly)
The match condition that specifies how closely the claim value in the IdP token must match Value .
Valid values are: Equals , Contains , StartsWith , and NotEqual .
553 554 555 |
# File 'cognito/cfn_identity_pool_role_attachment.rb', line 553 def match_type @match_type end |
#role_arn ⇒ String (readonly)
The Amazon Resource Name (ARN) of the role.
558 559 560 |
# File 'cognito/cfn_identity_pool_role_attachment.rb', line 558 def role_arn @role_arn end |
#value ⇒ String (readonly)
A brief string that the claim must match.
For example, "paid" or "yes".
565 566 567 |
# File 'cognito/cfn_identity_pool_role_attachment.rb', line 565 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
567 568 569 570 571 572 573 574 |
# File 'cognito/cfn_identity_pool_role_attachment.rb', line 567 def self.jsii_properties { :claim => "claim", :match_type => "matchType", :role_arn => "roleArn", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
576 577 578 579 580 581 582 583 584 585 |
# File 'cognito/cfn_identity_pool_role_attachment.rb', line 576 def to_jsii result = {} result.merge!({ "claim" => @claim, "matchType" => @match_type, "roleArn" => @role_arn, "value" => @value, }) result.compact end |