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
Name | user_pool_user_to_group_attachments |
Type | Resource |
Description | Resource Type definition for AWS::Cognito::UserPoolUserToGroupAttachment |
Id | aws.cognito.user_pool_user_to_group_attachments |
Fields
Name | Datatype | Description |
---|---|---|
user_pool_id | string | |
username | string | |
group_name | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | UserPoolId, Username, GroupName, region |
delete_resource | DELETE | data__Identifier, region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cognito.user_pool_user_to_group_attachments (
UserPoolId,
Username,
GroupName,
region
)
SELECT
'{{ UserPoolId }}',
'{{ Username }}',
'{{ GroupName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cognito.user_pool_user_to_group_attachments (
UserPoolId,
Username,
GroupName,
region
)
SELECT
'{{ UserPoolId }}',
'{{ Username }}',
'{{ GroupName }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: user_pool_user_to_group_attachment
props:
- name: UserPoolId
value: '{{ UserPoolId }}'
- name: Username
value: '{{ Username }}'
- name: GroupName
value: '{{ GroupName }}'
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