ProviderAttribute

class aws_cdk.aws_cognito.ProviderAttribute(*args: Any, **kwargs)

Bases: object

An attribute available from a third party identity provider.

ExampleMetadata:

infused

Example:

userpool = cognito.UserPool(self, "Pool")

cognito.UserPoolIdentityProviderAmazon(self, "Amazon",
    client_id="amzn-client-id",
    client_secret="amzn-client-secret",
    user_pool=userpool,
    attribute_mapping=cognito.AttributeMapping(
        email=cognito.ProviderAttribute.AMAZON_EMAIL,
        website=cognito.ProviderAttribute.other("url"),  # use other() when an attribute is not pre-defined in the CDK
        custom={
            # custom user pool attributes go here
            "unique_id": cognito.ProviderAttribute.AMAZON_USER_ID
        }
    )
)

Attributes

AMAZON_EMAIL = <aws_cdk.aws_cognito.ProviderAttribute object>
AMAZON_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
AMAZON_POSTAL_CODE = <aws_cdk.aws_cognito.ProviderAttribute object>
AMAZON_USER_ID = <aws_cdk.aws_cognito.ProviderAttribute object>
APPLE_EMAIL = <aws_cdk.aws_cognito.ProviderAttribute object>
APPLE_FIRST_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
APPLE_LAST_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
APPLE_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_BIRTHDAY = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_EMAIL = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_FIRST_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_GENDER = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_ID = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_LAST_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_LOCALE = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_MIDDLE_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
FACEBOOK_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_BIRTHDAYS = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_EMAIL = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_FAMILY_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_GENDER = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_GIVEN_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_NAME = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_NAMES = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_PHONE_NUMBERS = <aws_cdk.aws_cognito.ProviderAttribute object>
GOOGLE_PICTURE = <aws_cdk.aws_cognito.ProviderAttribute object>
attribute_name

The attribute value string as recognized by the provider.

Static Methods

classmethod other(attribute_name)

Use this to specify an attribute from the identity provider that is not pre-defined in the CDK.

Parameters:

attribute_name (str) – the attribute value string as recognized by the provider.

Return type:

ProviderAttribute