interface NumberAttributeProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Cognito.NumberAttributeProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscognito#NumberAttributeProps |
Java | software.amazon.awscdk.services.cognito.NumberAttributeProps |
Python | aws_cdk.aws_cognito.NumberAttributeProps |
TypeScript (source) | aws-cdk-lib » aws_cognito » NumberAttributeProps |
Props for NumberAttr.
Example
new cognito.UserPool(this, 'myuserpool', {
// ...
standardAttributes: {
fullname: {
required: true,
mutable: false,
},
address: {
required: false,
mutable: true,
},
},
customAttributes: {
'myappid': new cognito.StringAttribute({ minLen: 5, maxLen: 15, mutable: false }),
'callingcode': new cognito.NumberAttribute({ min: 1, max: 3, mutable: true }),
'isEmployee': new cognito.BooleanAttribute({ mutable: true }),
'joinedOn': new cognito.DateTimeAttribute(),
},
});
Properties
Name | Type | Description |
---|---|---|
max? | number | Maximum value of this attribute. |
min? | number | Minimum value of this attribute. |
mutable? | boolean | Specifies whether the value of the attribute can be changed. |
max?
Type:
number
(optional, default: no maximum value)
Maximum value of this attribute.
min?
Type:
number
(optional, default: no minimum value)
Minimum value of this attribute.
mutable?
Type:
boolean
(optional, default: false)
Specifies whether the value of the attribute can be changed.
For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute.