Table of Contents

Class NumberAttributeProps

Namespace
Amazon.CDK.AWS.Cognito
Assembly
Amazon.CDK.AWS.Cognito.dll

Props for NumberAttr.

public class NumberAttributeProps : INumberAttributeProps, INumberAttributeConstraints, ICustomAttributeProps
Inheritance
NumberAttributeProps
Implements
Inherited Members

Examples

new UserPool(this, "myuserpool", new UserPoolProps {
                // ...
                StandardAttributes = new StandardAttributes {
                    Fullname = new StandardAttribute {
                        Required = true,
                        Mutable = false
                    },
                    Address = new StandardAttribute {
                        Required = false,
                        Mutable = true
                    }
                },
                CustomAttributes = new Dictionary<string, ICustomAttribute> {
                    { "myappid", new StringAttribute(new StringAttributeProps { MinLen = 5, MaxLen = 15, Mutable = false }) },
                    { "callingcode", new NumberAttribute(new NumberAttributeProps { Min = 1, Max = 3, Mutable = true }) },
                    { "isEmployee", new BooleanAttribute(new CustomAttributeProps { Mutable = true }) },
                    { "joinedOn", new DateTimeAttribute() }
                }
            });

Remarks

ExampleMetadata: infused

Constructors

NumberAttributeProps()

public NumberAttributeProps()

Properties

Max

Maximum value of this attribute.

public double? Max { get; set; }

Property Value

double?

Remarks

Default: - no maximum value

Min

Minimum value of this attribute.

public double? Min { get; set; }

Property Value

double?

Remarks

Default: - no minimum value

Mutable

Specifies whether the value of the attribute can be changed.

public bool? Mutable { get; set; }

Property Value

bool?

Remarks

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.

Default: false