Interface CfnIdentityPoolRoleAttachment.RoleMappingProperty

All Superinterfaces:
All Known Implementing Classes:
Enclosing class:

@Stability(Stable) public static interface CfnIdentityPoolRoleAttachment.RoleMappingProperty extends
RoleMapping is a property of the AWS::Cognito::IdentityPoolRoleAttachment resource that defines the role-mapping attributes of an Amazon Cognito identity pool.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 RoleMappingProperty roleMappingProperty = RoleMappingProperty.builder()
         // the properties below are optional
  • Method Details

    • getType

      @Stability(Stable) @NotNull String getType()
      The role-mapping type.

      Token uses cognito:roles and cognito:preferred_role claims from the Amazon Cognito identity provider token to map groups to roles. Rules attempts to match claims from the token to map to a role.

      Valid values are Token or Rules .

    • getAmbiguousRoleResolution

      @Stability(Stable) @Nullable default String getAmbiguousRoleResolution()
      Specifies the action to be taken if either no rules match the claim value for the Rules type, or there is no cognito:preferred_role claim and there are multiple cognito:roles matches for the Token type.

      If you specify Token or Rules as the Type, AmbiguousRoleResolution is required.

      Valid values are AuthenticatedRole or Deny .

    • getIdentityProvider

      @Stability(Stable) @Nullable default String getIdentityProvider()
      Identifier for the identity provider for which the role is mapped.

      For example: or ( . This is the identity provider that is used by the user for authentication.

      If the identity provider property isn't provided, the key of the entry in the RoleMappings map is used as the identity provider.

    • getRulesConfiguration

      @Stability(Stable) @Nullable default Object getRulesConfiguration()
      The rules to be used for mapping users to roles.

      If you specify "Rules" as the role-mapping type, RulesConfiguration is required.

    • builder

      @Stability(Stable) static CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder builder()
      a CfnIdentityPoolRoleAttachment.RoleMappingProperty.Builder of CfnIdentityPoolRoleAttachment.RoleMappingProperty