aws.cognito_idp.admin_list_groups_for_user
Example SQL Queries
SELECT * FROMaws.cognito_idp.admin_list_groups_for_userWHERE"username" = 'VALUE'AND "user_pool_id" = 'VALUE';Description
Lists the groups that a user belongs to.
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
Table Definition
| Column Name | Column Data Type |
|---|---|
| user_pool_id Required Input Column The user pool ID for the user pool. | VARCHAR |
| username Required Input Column The username of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If username isn't an alias attribute in your user pool, this value must be the sub of a local user or the username of a user from a third-party IdP. | VARCHAR |
| _aws_profile Input Column The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role. | STRUCT( |
Show child fields
| |
| _aws_region Input Column The AWS region to use. | VARCHAR |
| creation_date The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date object. | TIMESTAMP_S |
| description A string containing the description of the group. | VARCHAR |
| group_name The name of the group. | VARCHAR |
| last_modified_date The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date object. | TIMESTAMP_S |
| precedence A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher ornull Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the cognito:roles and cognito:preferred_role claims. Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim isn't set in users' tokens. The default Precedence value is null. | BIGINT |
| role_arn The role Amazon Resource Name (ARN) for the group. | VARCHAR |