# StringAttribute

The String custom attribute type.

Extends: StringAttribute
Implements: ICustomAttribute

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

## Example

```ts
new cognito.UserPool(this, 'myuserpool', {
  // ...
  standardAttributes: {
    fullname: {
      required: true,
      mutable: false,
    },
    address: {
      required: false,
      mutable: true,
    },
  },
  customAttributes: {
    'myappid': new cognito.StringAttribute({ minLen: 5, maxLen: 15, mutable: false }),
    'callingcode': new cognito.NumberAttribute({ min: 1, max: 3, mutable: true }),
    'isEmployee': new cognito.BooleanAttribute({ mutable: true }),
    'joinedOn': new cognito.DateTimeAttribute(),
  },
});
```

## Initializer

```ts
new StringAttribute(props?: StringAttributeProps)
```

## Methods

- `bind(): CustomAttributeConfig` — Bind this custom attribute type to the values as expected by CloudFormation.
