Skip to main content

user_pool_users

Creates, updates, deletes or gets an user_pool_user resource or lists user_pool_users in a region

Overview

Nameuser_pool_users
TypeResource
DescriptionResource Type definition for AWS::Cognito::UserPoolUser
Idaws.cognito.user_pool_users

Fields

NameDatatypeDescription
desired_delivery_mediumsarray
force_alias_creationboolean
user_attributesarray
message_actionstring
usernamestring
user_pool_idstring
validation_dataarray
client_metadataobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTUserPoolId, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all user_pool_users in a region.

SELECT
region,
desired_delivery_mediums,
force_alias_creation,
user_attributes,
message_action,
username,
user_pool_id,
validation_data,
client_metadata
FROM aws.cognito.user_pool_users
WHERE region = 'us-east-1';

Gets all properties from an individual user_pool_user.

SELECT
region,
desired_delivery_mediums,
force_alias_creation,
user_attributes,
message_action,
username,
user_pool_id,
validation_data,
client_metadata
FROM aws.cognito.user_pool_users
WHERE region = 'us-east-1' AND data__Identifier = '<UserPoolId>|<Username>';

INSERT example

Use the following StackQL query and manifest file to create a new user_pool_user resource, using stack-deploy.

/*+ create */
INSERT INTO aws.cognito.user_pool_users (
UserPoolId,
region
)
SELECT
'{{ UserPoolId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.cognito.user_pool_users
WHERE data__Identifier = '<UserPoolId|Username>'
AND region = 'us-east-1';

Permissions

To operate on the user_pool_users resource, the following permissions are required:

Create

cognito-idp:AdminCreateUser,
cognito-idp:AdminGetUser,
iam:PassRole

Read

cognito-idp:AdminGetUser

Delete

cognito-idp:AdminDeleteUser

List

cognito-idp:ListUsers