user_pool_groups
Creates, updates, deletes or gets an user_pool_group resource or lists user_pool_groups in a region
Overview
| Name | user_pool_groups |
| Type | Resource |
| Description | Resource Type definition for AWS::Cognito::UserPoolGroup |
| Id | awscc.cognito.user_pool_groups |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
description | string | |
group_name | string | |
precedence | integer | |
role_arn | string | |
user_pool_id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
group_name | string | |
user_pool_id | string | |
region | string | AWS region. |
For more information, see AWS::Cognito::UserPoolGroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | user_pool_groups | INSERT | UserPoolId, region |
delete_resource | user_pool_groups | DELETE | Identifier, region |
update_resource | user_pool_groups | UPDATE | Identifier, PatchDocument, region |
list_resources | user_pool_groups_list_only | SELECT | region |
get_resource | user_pool_groups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual user_pool_group.
SELECT
region,
description,
group_name,
precedence,
role_arn,
user_pool_id
FROM awscc.cognito.user_pool_groups
WHERE
region = 'us-east-1' AND
Identifier = '{{ user_pool_id }}|{{ group_name }}';
Lists all user_pool_groups in a region.
SELECT
region,
user_pool_id,
group_name
FROM awscc.cognito.user_pool_groups_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new user_pool_group resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.cognito.user_pool_groups (
UserPoolId,
region
)
SELECT
'{{ user_pool_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cognito.user_pool_groups (
Description,
GroupName,
Precedence,
RoleArn,
UserPoolId,
region
)
SELECT
'{{ description }}',
'{{ group_name }}',
'{{ precedence }}',
'{{ role_arn }}',
'{{ user_pool_id }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: user_pool_group
props:
- name: description
value: '{{ description }}'
- name: group_name
value: '{{ group_name }}'
- name: precedence
value: '{{ precedence }}'
- name: role_arn
value: '{{ role_arn }}'
- name: user_pool_id
value: '{{ user_pool_id }}'
UPDATE example
Use the following StackQL query and manifest file to update a user_pool_group resource, using stack-deploy.
/*+ update */
UPDATE awscc.cognito.user_pool_groups
SET PatchDocument = string('{{ {
"Description": description,
"Precedence": precedence,
"RoleArn": role_arn
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ user_pool_id }}|{{ group_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.cognito.user_pool_groups
WHERE
Identifier = '{{ user_pool_id }}|{{ group_name }}' AND
region = 'us-east-1';
Permissions
To operate on the user_pool_groups resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
cognito-idp:CreateGroup,
iam:PassRole,
iam:PutRolePolicy,
cognito-idp:GetGroup
cognito-idp:GetGroup
cognito-idp:UpdateGroup,
iam:PassRole,
iam:PutRolePolicy
cognito-idp:DeleteGroup,
cognito-idp:GetGroup,
iam:PutRolePolicy
cognito-idp:ListGroups