user_pool_users
Creates, updates, deletes or gets an user_pool_user
resource or lists user_pool_users
in a region
Overview
Name | user_pool_users |
Type | Resource |
Description | Resource Type definition for AWS::Cognito::UserPoolUser |
Id | aws.cognito.user_pool_users |
Fields
Name | Datatype | Description |
---|---|---|
desired_delivery_mediums | array | |
force_alias_creation | boolean | |
user_attributes | array | |
message_action | string | |
username | string | |
user_pool_id | string | |
validation_data | array | |
client_metadata | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | UserPoolId, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all user_pool_users
in a region.
SELECT
region,
desired_delivery_mediums,
force_alias_creation,
user_attributes,
message_action,
username,
user_pool_id,
validation_data,
client_metadata
FROM aws.cognito.user_pool_users
WHERE region = 'us-east-1';
Gets all properties from an individual user_pool_user
.
SELECT
region,
desired_delivery_mediums,
force_alias_creation,
user_attributes,
message_action,
username,
user_pool_id,
validation_data,
client_metadata
FROM aws.cognito.user_pool_users
WHERE region = 'us-east-1' AND data__Identifier = '<UserPoolId>|<Username>';
INSERT
example
Use the following StackQL query and manifest file to create a new user_pool_user
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.cognito.user_pool_users (
UserPoolId,
region
)
SELECT
'{{ UserPoolId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.cognito.user_pool_users (
DesiredDeliveryMediums,
ForceAliasCreation,
UserAttributes,
MessageAction,
Username,
UserPoolId,
ValidationData,
ClientMetadata,
region
)
SELECT
'{{ DesiredDeliveryMediums }}',
'{{ ForceAliasCreation }}',
'{{ UserAttributes }}',
'{{ MessageAction }}',
'{{ Username }}',
'{{ UserPoolId }}',
'{{ ValidationData }}',
'{{ ClientMetadata }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: user_pool_user
props:
- name: DesiredDeliveryMediums
value:
- '{{ DesiredDeliveryMediums[0] }}'
- name: ForceAliasCreation
value: '{{ ForceAliasCreation }}'
- name: UserAttributes
value:
- Name: '{{ Name }}'
Value: '{{ Value }}'
- name: MessageAction
value: '{{ MessageAction }}'
- name: Username
value: '{{ Username }}'
- name: UserPoolId
value: '{{ UserPoolId }}'
- name: ValidationData
value:
- null
- name: ClientMetadata
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.cognito.user_pool_users
WHERE data__Identifier = '<UserPoolId|Username>'
AND region = 'us-east-1';
Permissions
To operate on the user_pool_users
resource, the following permissions are required:
Create
cognito-idp:AdminCreateUser,
cognito-idp:AdminGetUser,
iam:PassRole
Read
cognito-idp:AdminGetUser
Delete
cognito-idp:AdminDeleteUser
List
cognito-idp:ListUsers