@aws-cdk_aws-cognito-identitypool-alpha.RoleMappingMatchType

enum RoleMappingMatchType ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Cognito.IdentityPool.Alpha.RoleMappingMatchType
Gogithub.com/aws/aws-cdk-go/awscdkcognitoidentitypoolalpha/v2#RoleMappingMatchType
Javasoftware.amazon.awscdk.services.cognito.identitypool.alpha.RoleMappingMatchType
Pythonaws_cdk.aws_cognito_identitypool_alpha.RoleMappingMatchType
TypeScript (source)@aws-cdk/aws-cognito-identitypool-alpha ยป RoleMappingMatchType

Types of matches allowed for Role Mapping.

Example

import { IdentityPoolProviderUrl, RoleMappingMatchType } from '@aws-cdk/aws-cognito-identitypool-alpha';

declare const adminRole: iam.Role;
declare const nonAdminRole: iam.Role;
new IdentityPool(this, 'myidentitypool', {
  identityPoolName: 'myidentitypool',
  // Assign specific roles to users based on whether or not the custom admin claim is passed from the identity provider
  roleMappings: [{
    providerUrl: IdentityPoolProviderUrl.AMAZON,
    rules: [
      {
        claim: 'custom:admin',
        claimValue: 'admin',
        mappedRole: adminRole,
      },
      {
        claim: 'custom:admin',
        claimValue: 'admin',
        matchType: RoleMappingMatchType.NOTEQUAL,
        mappedRole: nonAdminRole,
      }
    ],
  }],
});

Members

NameDescription
EQUALS ๐Ÿ”นThe Claim from the token must equal the given value in order for a match.
CONTAINS ๐Ÿ”นThe Claim from the token must contain the given value in order for a match.
STARTS_WITH ๐Ÿ”นThe Claim from the token must start with the given value in order for a match.
NOTEQUAL ๐Ÿ”นThe Claim from the token must not equal the given value in order for a match.

EQUALS ๐Ÿ”น

The Claim from the token must equal the given value in order for a match.


CONTAINS ๐Ÿ”น

The Claim from the token must contain the given value in order for a match.


STARTS_WITH ๐Ÿ”น

The Claim from the token must start with the given value in order for a match.


NOTEQUAL ๐Ÿ”น

The Claim from the token must not equal the given value in order for a match.