Create and manage groups with the AWS CLI - Amazon QuickSight

Create and manage groups with the AWS CLI

Before you begin, make sure that you have the AWS CLI installed. For more information, see Installing the AWS CLI in the AWS CLI User Guide.

Use the following procedure to create an Amazon QuickSight user group.

  1. Open a terminal window. If you are using Microsoft Windows, open a command prompt.

  2. Enter the following command at the prompt to create a group. Substitute the correct values for your parameters.

    aws quicksight create-group --aws-account-id=111122223333 --namespace=default --group-name="Sales-Management" --description="Sales Management - Forecasting"

    You might find it easier to create the command in a text editor before entering it at the prompt. For more information on create-group and other available commands, see the Amazon QuickSight API reference.

  3. Verify that the group exists by using a command similar to one of the following. The following command lists all groups.

    aws quicksight list-groups --aws-account-id 111122223333 --namespace default

    The following command describes a specific group.

    aws quicksight describe-group --aws-account-id 11112222333 --namespace default --group-name Sales

    The following command searches for groups in a specified QuickSight namespace.

    aws quicksight search-groups --region us-west-2 --aws-account-id 11112222333 --namespace default --filters "[{\"Operator\": \"StartsWith\", \"Name\": \"GROUP_NAME\", \"Value\": \"Mar\"}]"
  4. Add a member to the new group by using a command similar to the following.

    aws quicksight create-group-membership --aws-account-id 111122223333 --namespace default --group-name Sales --member-name Pat

    The following command determines if a user is a member of a specified group.

    aws quicksight describe-group-membership --region us-west-2 --aws-account-id 11112222333 --namespace default --group-name Marketing-East --member-name user

Enter the following command at the prompt to delete a group. Substitute the correct values for your parameters.

aws quicksight delete-group --aws-account-id 111122223333 --namespace default --group-name Marketing-East

You might find it easier to create the command in a text editor before entering it at the prompt. For more information on delete-group and other available commands, see the Amazon QuickSight API reference.