Skip to main content

user_pool_groups

Creates, updates, deletes or gets an user_pool_group resource or lists user_pool_groups in a region

Overview

Nameuser_pool_groups
TypeResource
DescriptionResource Type definition for AWS::Cognito::UserPoolGroup
Idaws.cognito.user_pool_groups

Fields

NameDatatypeDescription
descriptionstring
group_namestring
precedenceinteger
role_arnstring
user_pool_idstring
regionstringAWS region.

Methods

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

SELECT examples

Gets all user_pool_groups in a region.

SELECT
region,
description,
group_name,
precedence,
role_arn,
user_pool_id
FROM aws.cognito.user_pool_groups
WHERE region = 'us-east-1';

Gets all properties from an individual user_pool_group.

SELECT
region,
description,
group_name,
precedence,
role_arn,
user_pool_id
FROM aws.cognito.user_pool_groups
WHERE region = 'us-east-1' AND data__Identifier = '<UserPoolId>|<GroupName>';

INSERT example

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

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

DELETE example

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

Permissions

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

Create

cognito-idp:CreateGroup,
iam:PassRole,
iam:PutRolePolicy,
cognito-idp:GetGroup

Read

cognito-idp:GetGroup

Update

cognito-idp:UpdateGroup,
iam:PassRole,
iam:PutRolePolicy

Delete

cognito-idp:DeleteGroup,
cognito-idp:GetGroup,
iam:PutRolePolicy

List

cognito-idp:ListGroups