Table of Contents

Class DateTimeAttribute

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

The DateTime custom attribute type.

public class DateTimeAttribute : DeputyBase, ICustomAttribute
Inheritance
DateTimeAttribute
Implements

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

DateTimeAttribute(ICustomAttributeProps?)

public DateTimeAttribute(ICustomAttributeProps? props = null)

Parameters

props ICustomAttributeProps

Methods

Bind()

Bind this custom attribute type to the values as expected by CloudFormation.

public virtual ICustomAttributeConfig Bind()

Returns

ICustomAttributeConfig