Class RoleMappingRule.Builder
java.lang.Object
software.amazon.awscdk.services.cognito.identitypool.RoleMappingRule.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RoleMappingRule>
- Enclosing interface:
- RoleMappingRule
@Stability(Experimental)
public static final class RoleMappingRule.Builder
extends Object
implements software.amazon.jsii.Builder<RoleMappingRule>
A builder for
RoleMappingRule-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofRoleMappingRule.getClaim()claimValue(String claimValue) Sets the value ofRoleMappingRule.getClaimValue()mappedRole(IRole mappedRole) Sets the value ofRoleMappingRule.getMappedRole()matchType(RoleMappingMatchType matchType) Sets the value ofRoleMappingRule.getMatchType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
claim
Sets the value ofRoleMappingRule.getClaim()- Parameters:
claim- The key sent in the token by the federated identity provider. This parameter is required.- Returns:
this
-
claimValue
Sets the value ofRoleMappingRule.getClaimValue()- Parameters:
claimValue- The value of the claim that must be matched. This parameter is required.- Returns:
this
-
mappedRole
Sets the value ofRoleMappingRule.getMappedRole()- Parameters:
mappedRole- The Role to be assumed when Claim Value is matched. This parameter is required.- Returns:
this
-
matchType
Sets the value ofRoleMappingRule.getMatchType()- Parameters:
matchType- How to match with the Claim value.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<RoleMappingRule>- Returns:
- a new instance of
RoleMappingRule - Throws:
NullPointerException- if any required attribute was not provided
-