Table of Contents

Class StringAttribute

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

The String custom attribute type.

public class StringAttribute : DeputyBase, ICustomAttribute
Inheritance
StringAttribute
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

StringAttribute(IStringAttributeProps?)

public StringAttribute(IStringAttributeProps? props = null)

Parameters

props IStringAttributeProps

Methods

Bind()

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

public virtual ICustomAttributeConfig Bind()

Returns

ICustomAttributeConfig