Skip to main content

group_memberships

Creates, updates, deletes, gets or lists a group_memberships resource.

Overview

Namegroup_memberships
TypeResource
Idaws.quicksight.group_memberships

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
group_memberobjectA member of an Quick Sight group. Currently, group members must be users. Groups can't be members of another group. .
request_idstringThe Amazon Web Services request ID for this operation.
statusintegerThe HTTP status of the request.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_group_membershipselectmember_name, group_name, aws_account_id, namespace, regionUse the DescribeGroupMembership operation to determine if a user is a member of the specified group. If the user exists and is a member of the specified group, an associated GroupMember object is returned.
list_group_membershipsselectgroup_name, aws_account_id, namespace, regionnext-token, max-resultsLists member users in a group.
create_group_membershipinsertmember_name, group_name, aws_account_id, namespace, regionAdds an Amazon Quick Sight user to an Amazon Quick Sight group.
delete_group_membershipdeletemember_name, group_name, aws_account_id, namespace, regionRemoves a user from a group so that the user is no longer a member of the group.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
aws_account_idstringThe ID for the Amazon Web Services account that the group is in. Currently, you use the ID for the Amazon Web Services account that contains your Amazon Quick Sight account.
group_namestringThe name of the group that you want to delete the user from.
member_namestringThe name of the user that you want to delete from the group membership.
namespacestringThe namespace of the group that you want to remove a user from.
regionstringAWS region (default: us-east-1)
max-resultsintegerThe maximum number of results to return from this request.
next-tokenstringA pagination token that can be used in a subsequent request.

SELECT examples

Use the DescribeGroupMembership operation to determine if a user is a member of the specified group. If the user exists and is a member of the specified group, an associated GroupMember object is returned.

SELECT
group_member,
request_id,
status
FROM aws.quicksight.group_memberships
WHERE member_name = '{{ member_name }}' -- required
AND group_name = '{{ group_name }}' -- required
AND aws_account_id = '{{ aws_account_id }}' -- required
AND namespace = '{{ namespace }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Adds an Amazon Quick Sight user to an Amazon Quick Sight group.

INSERT INTO aws.quicksight.group_memberships (
member_name,
group_name,
aws_account_id,
namespace,
region
)
SELECT
'{{ member_name }}',
'{{ group_name }}',
'{{ aws_account_id }}',
'{{ namespace }}',
'{{ region }}'
RETURNING
group_member,
request_id,
status
;

DELETE examples

Removes a user from a group so that the user is no longer a member of the group.

DELETE FROM aws.quicksight.group_memberships
WHERE member_name = '{{ member_name }}' --required
AND group_name = '{{ group_name }}' --required
AND aws_account_id = '{{ aws_account_id }}' --required
AND namespace = '{{ namespace }}' --required
AND region = '{{ region }}' --required
;