

# Group membership operations


With group membership API operations, you can view and update permissions for members in a group. For more information, see the following API operations.

**Topics**
+ [

# CreateGroupMembership
](create-group-membership.md)
+ [

# DeleteGroupMembership
](delete-group-membership.md)
+ [

# DescribeGroupMembership
](describe-group-membership.md)
+ [

# ListGroupMemberships
](list-group-memberships.md)

# CreateGroupMembership


Use the `CreateGroupMembership` API operation to add an Amazon Quick Sight user to a Quick Sight group. You can find users in a certain group by calling the `ListGroups` API operation, and then the `ListGroupMemberships` API operation on the group of your choice.

Following is an example AWS CLI command for this operation. In the following examples, the member *`USERNAME`* is added to the group *`GROUPNAME`*.

------
#### [ AWS CLI ]

```
aws quicksight create-group-membership 
    --namespace default 
    --aws-account-id AWSACCOUNTID 
    --group-name GROUPNAME 
    --member-name USERNAME
```

You can also make this command using a CLI skeleton file with the following command. For more information about CLI skeleton files, see [Use CLI skeleton files](cli-skeletons.md).

```
aws quicksight create-group-membership 
    --cli-input-json file://creategroupmembership.json
```

------

For more information about the `CreateGroupMembership` API operation, see [CreateGroupMembership](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateGroupMembership.html) in the *Amazon Quick Sight API Reference*.

# DeleteGroupMembership


Use the `DeleteGroupMembership` API operation to remove a user from a group so that the user is no longer a member of the group. You can find users in a certain group by calling the `ListGroups` API operation, and then the `ListGroupMemberships` operation on the group that you choose.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight delete-group-membership 
    --member-name USERNAME 
    --group-name GROUPNAME 
    --aws-account-id AWSACCOUNTID 
    --namespace NAMESPACE
```

------

For more information about the `DeleteGroupMembership` API operation, see [DeleteGroupMembership](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DeleteGroupMembership.html) in the *Amazon Quick Sight API Reference*.

# DescribeGroupMembership


Use the `DescribeGroupMembership` API 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.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

CLI Input:

```
aws quicksight describe-group-membership 
    --region us-west-2 
    --aws-account-id AWSACCOUNTID 
    --namespace NAMESPACE 
    --group-name Marketing-East 
    --member-name MEMBERNAME
```

------

For more information about the `ListGroups` API operation, see [DescribeGroupMembership](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeGroupMembership.html) in the *Amazon Quick Sight API Reference*.

# ListGroupMemberships


Use the `ListGroupMemberships` API operation to list member users in a group. To view a list of user groups in Amazon Quick Sight, call the `ListGroups` API operation.

Following is an example AWS CLI command for this operation.

------
#### [ AWS CLI ]

```
aws quicksight list-group-memberships 
    --group-name GROUPNAME 
    --max-results 100 
    --aws-account-id AWSACCOUNTID 
    --namespace NAMESPACE
```

------

For more information about the `ListGroupMemberships` API operation, see [ListGroupMemberships](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ListGroupMemberships.html) in the *Amazon Quick Sight API Reference*.