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(Stable)
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.mappingKey(String mappingKey) Sets the value ofIdentityPoolRoleMapping.getMappingKey()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(Stable) public IdentityPoolRoleMapping.Builder providerUrl(IdentityPoolProviderUrl providerUrl) Sets the value ofIdentityPoolRoleMapping.getProviderUrl()- Parameters:
providerUrl- The url of the Provider for which the role is mapped. This parameter is required.- Returns:
this
-
mappingKey
Sets the value ofIdentityPoolRoleMapping.getMappingKey()- Parameters:
mappingKey- The key used for the role mapping in the role mapping hash. Required if the providerUrl is a token.- Returns:
this
-
resolveAmbiguousRoles
@Stability(Stable) 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(Stable) 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
-