IdentityPoolRoleAttachmentProps

class aws_cdk.aws_cognito_identitypool.IdentityPoolRoleAttachmentProps(*, identity_pool, authenticated_role=None, role_mappings=None, unauthenticated_role=None)

Bases: object

(experimental) Props for an Identity Pool Role Attachment.

Parameters:
  • identity_pool (IIdentityPool) – (experimental) Id of the Attachments Underlying Identity Pool.

  • authenticated_role (Optional[IRole]) – (experimental) Default Authenticated (User) Role. Default: - No default authenticated role will be added

  • role_mappings (Optional[Sequence[Union[IdentityPoolRoleMapping, Dict[str, Any]]]]) – (experimental) Rules for mapping roles to users. Default: - no Role Mappings

  • unauthenticated_role (Optional[IRole]) – (experimental) Default Unauthenticated (Guest) Role. Default: - No default unauthenticated role will be added

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_cognito_identitypool as cognito_identitypool
import aws_cdk.aws_iam as iam

# identity_pool: cognito_identitypool.IdentityPool
# identity_pool_provider_url: cognito_identitypool.IdentityPoolProviderUrl
# role: iam.Role

identity_pool_role_attachment_props = cognito_identitypool.IdentityPoolRoleAttachmentProps(
    identity_pool=identity_pool,

    # the properties below are optional
    authenticated_role=role,
    role_mappings=[cognito_identitypool.IdentityPoolRoleMapping(
        provider_url=identity_pool_provider_url,

        # the properties below are optional
        resolve_ambiguous_roles=False,
        rules=[cognito_identitypool.RoleMappingRule(
            claim="claim",
            claim_value="claimValue",
            mapped_role=role,

            # the properties below are optional
            match_type=cognito_identitypool.RoleMappingMatchType.EQUALS
        )],
        use_token=False
    )],
    unauthenticated_role=role
)

Attributes

authenticated_role

(experimental) Default Authenticated (User) Role.

Default:
  • No default authenticated role will be added

Stability:

experimental

identity_pool

(experimental) Id of the Attachments Underlying Identity Pool.

Stability:

experimental

role_mappings

(experimental) Rules for mapping roles to users.

Default:
  • no Role Mappings

Stability:

experimental

unauthenticated_role

(experimental) Default Unauthenticated (Guest) Role.

Default:
  • No default unauthenticated role will be added

Stability:

experimental