Skip to main content

role_memberships

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

Overview

Namerole_memberships
TypeResource
Idaws.quicksight.role_memberships

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
membersstringThe list of groups associated with a role

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_role_membershipsselectrole, aws_account_id, namespace, regionnext-token, max-resultsLists all groups that are associated with a role.
create_role_membershipinsertmember_name, aws_account_id, namespace, role, regionUse CreateRoleMembership to add an existing Quick Sight group to an existing role.
delete_role_membershipdeletemember_name, role, aws_account_id, namespace, regionRemoves a group from a role.

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 you want to create a group in. The Amazon Web Services account ID that you provide must be the same Amazon Web Services account that contains your Amazon Quick Sight account.
member_namestringThe name of the group.
namespacestringThe namespace that contains the role.
regionstringAWS region (default: us-east-1)
rolestringThe role that you want to remove permissions from.
max-resultsintegerThe maximum number of results to return.
next-tokenstringA pagination token that can be used in a subsequent request.

SELECT examples

Lists all groups that are associated with a role.

SELECT
members
FROM aws.quicksight.role_memberships
WHERE role = '{{ role }}' -- required
AND aws_account_id = '{{ aws_account_id }}' -- required
AND namespace = '{{ namespace }}' -- required
AND region = '{{ region }}' -- required
AND `next-token` = '{{ next-token }}'
AND `max-results` = '{{ max-results }}'
;

INSERT examples

Use CreateRoleMembership to add an existing Quick Sight group to an existing role.

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

DELETE examples

Removes a group from a role.

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