# ClientAttributes

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

- Source: [`aws-cognito/lib/user-pool-attr.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-cognito/lib/user-pool-attr.ts#L488)

## Example

```ts
const pool = new cognito.UserPool(this, 'Pool');

const clientWriteAttributes = (new cognito.ClientAttributes())
  .withStandardAttributes({fullname: true, email: true})
  .withCustomAttributes('favoritePizza', 'favoriteBeverage');

const clientReadAttributes = clientWriteAttributes
  .withStandardAttributes({emailVerified: true})
  .withCustomAttributes('pointsEarned');

pool.addClient('app-client', {
  // ...
  readAttributes: clientReadAttributes,
  writeAttributes: clientWriteAttributes,
});
```

## Initializer

```ts
new ClientAttributes()
```

## Methods

- `attributes(): string[]` — The list of attributes represented by this ClientAttributes.

- `withCustomAttributes(...attributes: string[]): ClientAttributes // chainable` — Creates a custom ClientAttributes with the specified attributes.

  **Parameters**

  - `attributes` — a list of custom attributes to add to the set.

- `withStandardAttributes(attributes: StandardAttributesMask): ClientAttributes // chainable` — Creates a custom ClientAttributes with the specified attributes.

  **Parameters**

  - `attributes` — a list of standard attributes to add to the set.
