interface AttributeMapping
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Cognito.AttributeMapping |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#AttributeMapping |
Java | software.amazon.awscdk.services.cognito.AttributeMapping |
Python | aws_cdk.aws_cognito.AttributeMapping |
TypeScript (source) | aws-cdk-lib » aws_cognito » AttributeMapping |
The mapping of user pool attributes to the attributes provided by the identity providers.
Example
const userpool = new cognito.UserPool(this, 'Pool');
new cognito.UserPoolIdentityProviderAmazon(this, 'Amazon', {
clientId: 'amzn-client-id',
clientSecret: 'amzn-client-secret',
userPool: userpool,
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
uniqueId: cognito.ProviderAttribute.AMAZON_USER_ID,
},
},
});
Properties
| Name | Type | Description |
|---|---|---|
| address? | Provider | The user's postal address is a required attribute. |
| birthdate? | Provider | The user's birthday. |
| custom? | { [string]: Provider } | Specify custom attribute mapping here and mapping for any standard attributes not supported yet. |
| email? | Provider | The user's e-mail address. |
| email | Provider | The user's e-mail address is verification. |
| family | Provider | The surname or last name of user. |
| fullname? | Provider | The user's full name in displayable form. |
| gender? | Provider | The user's gender. |
| given | Provider | The user's first name or give name. |
| last | Provider | Time, the user's information was last updated. |
| locale? | Provider | The user's locale. |
| middle | Provider | The user's middle name. |
| nickname? | Provider | The user's nickname or casual name. |
| phone | Provider | The user's telephone number. |
| preferred | Provider | The user's preferred username. |
| profile | Provider | The URL to the user's profile page. |
| profile | Provider | The URL to the user's profile picture. |
| timezone? | Provider | The user's time zone. |
| website? | Provider | The URL to the user's web page or blog. |
address?
Type:
Provider
(optional, default: not mapped)
The user's postal address is a required attribute.
birthdate?
Type:
Provider
(optional, default: not mapped)
The user's birthday.
custom?
Type:
{ [string]: Provider }
(optional, default: no custom attribute mapping)
Specify custom attribute mapping here and mapping for any standard attributes not supported yet.
email?
Type:
Provider
(optional, default: not mapped)
The user's e-mail address.
emailVerified?
Type:
Provider
(optional, default: not mapped)
The user's e-mail address is verification.
familyName?
Type:
Provider
(optional, default: not mapped)
The surname or last name of user.
fullname?
Type:
Provider
(optional, default: not mapped)
The user's full name in displayable form.
gender?
Type:
Provider
(optional, default: not mapped)
The user's gender.
givenName?
Type:
Provider
(optional, default: not mapped)
The user's first name or give name.
lastUpdateTime?
Type:
Provider
(optional, default: not mapped)
Time, the user's information was last updated.
locale?
Type:
Provider
(optional, default: not mapped)
The user's locale.
middleName?
Type:
Provider
(optional, default: not mapped)
The user's middle name.
nickname?
Type:
Provider
(optional, default: not mapped)
The user's nickname or casual name.
phoneNumber?
Type:
Provider
(optional, default: not mapped)
The user's telephone number.
preferredUsername?
Type:
Provider
(optional, default: not mapped)
The user's preferred username.
profilePage?
Type:
Provider
(optional, default: not mapped)
The URL to the user's profile page.
profilePicture?
Type:
Provider
(optional, default: not mapped)
The URL to the user's profile picture.
timezone?
Type:
Provider
(optional, default: not mapped)
The user's time zone.
website?
Type:
Provider
(optional, default: not mapped)
The URL to the user's web page or blog.

.NET
Go
Java
Python
TypeScript (