Skip to main content

user_pool_user_to_group_attachments

Creates, updates, deletes or gets an user_pool_user_to_group_attachment resource or lists user_pool_user_to_group_attachments in a region

Overview

Nameuser_pool_user_to_group_attachments
TypeResource
DescriptionResource Type definition for AWS::Cognito::UserPoolUserToGroupAttachment
Idaws.cognito.user_pool_user_to_group_attachments

Fields

NameDatatypeDescription
user_pool_idstring
usernamestring
group_namestring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTUserPoolId, Username, GroupName, region
delete_resourceDELETEdata__Identifier, region
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all properties from an individual user_pool_user_to_group_attachment.

SELECT
region,
user_pool_id,
username,
group_name
FROM aws.cognito.user_pool_user_to_group_attachments
WHERE region = 'us-east-1' AND data__Identifier = '<UserPoolId>|<GroupName>|<Username>';

INSERT example

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

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

DELETE example

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

Permissions

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

Create

cognito-idp:AdminAddUserToGroup,
cognito-idp:AdminListGroupsForUser

Delete

cognito-idp:AdminRemoveUserFromGroup,
cognito-idp:AdminListGroupsForUser

Read

cognito-idp:AdminListGroupsForUser