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 | aws.cognito.user_pool_groups |
Fields
Name | Datatype | Description |
---|---|---|
description | string | |
group_name | string | |
precedence | integer | |
role_arn | string | |
user_pool_id | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | UserPoolId, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cognito.user_pool_groups (
UserPoolId,
region
)
SELECT
'{{ UserPoolId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cognito.user_pool_groups (
Description,
GroupName,
Precedence,
RoleArn,
UserPoolId,
region
)
SELECT
'{{ Description }}',
'{{ GroupName }}',
'{{ Precedence }}',
'{{ RoleArn }}',
'{{ UserPoolId }}',
'{{ 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: GroupName
value: '{{ GroupName }}'
- name: Precedence
value: '{{ Precedence }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: UserPoolId
value: '{{ UserPoolId }}'
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