Table of Contents

Class ClientAttributes

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

A set of attributes, useful to set Read and Write attributes.

public class ClientAttributes : DeputyBase
Inheritance
ClientAttributes

Examples

var pool = new UserPool(this, "Pool");

            var clientWriteAttributes = (new ClientAttributes()).WithStandardAttributes(new StandardAttributesMask { Fullname = true, Email = true }).WithCustomAttributes("favouritePizza", "favouriteBeverage");

            var clientReadAttributes = clientWriteAttributes.WithStandardAttributes(new StandardAttributesMask { EmailVerified = true }).WithCustomAttributes("pointsEarned");

            pool.AddClient("app-client", new UserPoolClientOptions {
                // ...
                ReadAttributes = clientReadAttributes,
                WriteAttributes = clientWriteAttributes
            });

Remarks

ExampleMetadata: infused

Constructors

ClientAttributes()

Creates a ClientAttributes with the specified attributes.

public ClientAttributes()

Remarks

Default: - a ClientAttributes object without any attributes

Methods

Attributes()

The list of attributes represented by this ClientAttributes.

public virtual string[] Attributes()

Returns

string[]

WithCustomAttributes(params string[])

Creates a custom ClientAttributes with the specified attributes.

public virtual ClientAttributes WithCustomAttributes(params string[] attributes)

Parameters

attributes string[]

a list of custom attributes to add to the set.

Returns

ClientAttributes

WithStandardAttributes(IStandardAttributesMask)

Creates a custom ClientAttributes with the specified attributes.

public virtual ClientAttributes WithStandardAttributes(IStandardAttributesMask attributes)

Parameters

attributes IStandardAttributesMask

a list of standard attributes to add to the set.

Returns

ClientAttributes