Class IdentityPoolRoleMapping.Builder
java.lang.Object
software.amazon.awscdk.services.cognito.identitypool.IdentityPoolRoleMapping.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<IdentityPoolRoleMapping>
- Enclosing interface:
- IdentityPoolRoleMapping
@Stability(Experimental)
public static final class IdentityPoolRoleMapping.Builder
extends Object
implements software.amazon.jsii.Builder<IdentityPoolRoleMapping>
A builder for
IdentityPoolRoleMapping-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.providerUrl(IdentityPoolProviderUrl providerUrl) Sets the value ofIdentityPoolRoleMapping.getProviderUrl()resolveAmbiguousRoles(Boolean resolveAmbiguousRoles) Sets the value ofIdentityPoolRoleMapping.getResolveAmbiguousRoles()rules(List<? extends RoleMappingRule> rules) Sets the value ofIdentityPoolRoleMapping.getRules()Sets the value ofIdentityPoolRoleMapping.getUseToken()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
providerUrl
@Stability(Experimental) public IdentityPoolRoleMapping.Builder providerUrl(IdentityPoolProviderUrl providerUrl) Sets the value ofIdentityPoolRoleMapping.getProviderUrl()- Parameters:
providerUrl- The url of the provider of for which the role is mapped. This parameter is required.- Returns:
this
-
resolveAmbiguousRoles
@Stability(Experimental) public IdentityPoolRoleMapping.Builder resolveAmbiguousRoles(Boolean resolveAmbiguousRoles) Sets the value ofIdentityPoolRoleMapping.getResolveAmbiguousRoles()- Parameters:
resolveAmbiguousRoles- Allow for role assumption when results of role mapping are ambiguous.- Returns:
this
-
rules
@Stability(Experimental) public IdentityPoolRoleMapping.Builder rules(List<? extends RoleMappingRule> rules) Sets the value ofIdentityPoolRoleMapping.getRules()- Parameters:
rules- The claim and value that must be matched in order to assume the role. Required if useToken is false- Returns:
this
-
useToken
Sets the value ofIdentityPoolRoleMapping.getUseToken()- Parameters:
useToken- If true then mapped roles must be passed through the cognito:roles or cognito:preferred_role claims from identity provider.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<IdentityPoolRoleMapping>- Returns:
- a new instance of
IdentityPoolRoleMapping - Throws:
NullPointerException- if any required attribute was not provided
-