# Amazon Cognito

> Connect Amazon Cognito to automate user pools, users and groups.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/amazon-cognito

## Actions

### Add User To Group

Add a user to a group in a user pool, by username and group name.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.
- Group name (`group_name`, text, required): Group name for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Confirm Sign Up

Confirm a self-registered user's sign-up in a user pool, by username, without them entering a confirmation code.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.
- Client metadata (`client_metadata`, object): Client metadata for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Create Group

Create a group in a user pool with a name, and optionally a description, IAM role and precedence. Returns the new group.

**Inputs**

- Group name (`group_name`, text, required): Group name for this request.
- User pool (`user_pool_id`, text, required): User pool id for this request.
- Description (`description`, text): Description for this request.
- Role arn (`role_arn`, text): Role arn for this request.
- Precedence (`precedence`, number): Precedence for this request. At least 0.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Create User

Create a user in a user pool with a username and optional attributes, sending an invitation with a temporary password unless you suppress it. Returns the new user.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.
- User attributes (`user_attributes`, list): User attributes for this request.
- Validation data (`validation_data`, list): Validation data for this request.
- Temporary password (`temporary_password`, text): Temporary password for this request.
- Force alias creation (`force_alias_creation`, true/false): Force alias creation for this request.
- Message action (`message_action`, text): Message action for this request. One of: `SUPPRESS` (Create without sending an invitation), `RESEND` (Resend the existing invitation).
- Desired delivery mediums (`desired_delivery_mediums`, list): Desired delivery mediums for this request. One or more of: `SMS`, `EMAIL`.
- Client metadata (`client_metadata`, object): Client metadata for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Delete Group

Delete a group from a user pool by its name. Its users are kept.

**Inputs**

- Group name (`group_name`, text, required): Group name for this request.
- User pool (`user_pool_id`, text, required): User pool id for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Delete User

Delete a user from a user pool by username, so they can no longer sign in.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Delete User Attributes

Remove the named attributes from a user in a user pool, by username.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.
- User attribute names (`user_attribute_names`, list, required): User attribute names for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Describe User Pool

Get one user pool by its ID, with its settings such as password policy, MFA, required attributes and sign-in options.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Disable User

Turn off a user in a user pool, by username, so they can no longer sign in. Their account is kept.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Enable User

Turn a disabled user back on in a user pool, by username, so they can sign in again.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get Group

Get one group in a user pool by its name, with its description, IAM role and precedence.

**Inputs**

- Group name (`group_name`, text, required): Group name for this request.
- User pool (`user_pool_id`, text, required): User pool id for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get User

Get one user in a user pool by username, with their attributes, account status, MFA settings and whether they are enabled.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List Groups

List the groups in a user pool, with each group's name, description, IAM role and precedence.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Limit (`limit`, number): Limit for this request. From 0 to 60.
- Next token (`next_token`, text): Next token for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List User Pools

List the Cognito user pools in your account and region, with each pool's ID, name, status and dates.

**Inputs**

- Next token (`next_token`, text): Next token for this request.
- Max results (`max_results`, number): Max results for this request. From 1 to 60.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List Users

List the users in a user pool, optionally filtered by an attribute such as email, with each user's username, attributes, status and whether they are enabled.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Attributes to get (`attributes_to_get`, list): Attributes to get for this request.
- Limit (`limit`, number): Limit for this request. From 0 to 60.
- Pagination token (`pagination_token`, text): Pagination token for this request.
- Filter (`filter`, text): Filter for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Remove User From Group

Remove a user from a group in a user pool, by username and group name. The user is kept.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.
- Group name (`group_name`, text, required): Group name for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Reset User Password

Reset a user's password in a user pool, by username, so they must set a new one with a code sent to them at their next sign-in.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.
- Client metadata (`client_metadata`, object): Client metadata for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Set User Password

Set a user's password in a user pool, by username, either as a permanent password or a temporary one they must change at sign-in.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.
- Password (`password`, text, required): Password for this request.
- Permanent (`permanent`, true/false): Permanent for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Update Group

Change a group's description, IAM role or precedence, by its name in a user pool. Returns the updated group.

**Inputs**

- Group name (`group_name`, text, required): Group name for this request.
- User pool (`user_pool_id`, text, required): User pool id for this request.
- Description (`description`, text): Description for this request.
- Role arn (`role_arn`, text): Role arn for this request.
- Precedence (`precedence`, number): Precedence for this request. At least 0.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Update User Attributes

Change a user's attributes, such as email or phone number, in a user pool, by username.

**Inputs**

- User pool (`user_pool_id`, text, required): User pool id for this request.
- Username (`username`, text, required): Username for this request.
- User attributes (`user_attributes`, list, required): User attributes for this request.
- Client metadata (`client_metadata`, object): Client metadata for this request.

**Outputs**

- `data` (object): The service response, including all records and metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation value for the next page.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```
