8 AWS QuickSight Command Examples (with examples)

8 AWS QuickSight Command Examples (with examples)

AWS QuickSight is a powerful tool for visualizing and analyzing data. With the AWS CLI for QuickSight, you can access QuickSight entities and perform various operations. In this article, we will explore 8 different use cases for 6 different QuickSight commands. Each use case will include the code, a motivation for using the example, an explanation of every argument, and an example output. Let’s dive in!

1. List datasets

To list datasets in AWS QuickSight using the CLI, you can use the list-data-sets command. This command retrieves a list of datasets associated with your AWS account.

aws quicksight list-data-sets --aws-account-id aws_account_id
  • Motivation: This example is useful when you want to see all the datasets available in your AWS QuickSight account.
  • Explanation:
    • --aws-account-id: The AWS account ID associated with the QuickSight account.
  • Example Output:
    {
        "DataSetSummaryList": [
            {
                "Arn": "arn:aws:quicksight:us-east-1:123456789012:dataset/example",
                "DataSetId": "example",
                "ImportMode": "SPICE",
                "LastUpdatedTime": "2021-10-20T10:00:00.000000Z",
                "Name": "Example Dataset",
                "PhysicalTableCount": 1,
                "RowLevelPermissionDataSet": {
                    "Arn": "arn:aws:quicksight:us-east-1:123456789012:dataset/row-level-permissions-example"
                }
            },
            ...
        ]
    }
    

2. List users

To list users in AWS QuickSight using the CLI, you can use the list-users command. This command retrieves a list of users associated with your AWS QuickSight account.

aws quicksight list-users --aws-account-id aws_account_id --namespace default
  • Motivation: This example is useful when you want to see all the users present in your AWS QuickSight account.
  • Explanation:
    • --aws-account-id: The AWS account ID associated with the QuickSight account.
    • --namespace: The namespace of the AWS QuickSight account. Default is typically used.
  • Example Output:
    {
        "UserList": [
            {
                "Active": true,
                "Arn": "arn:aws:quicksight:us-east-1:123456789012:user/default/user1",
                "Email": "user1@example.com",
                "IdentityType": "QUICKSIGHT",
                "PrincipalId": "user1",
                "Role": "AUTHOR",
                "UserName": "user1"
            },
            ...
        ]
    }
    

3. List groups

To list groups in AWS QuickSight using the CLI, you can use the list-groups command. This command retrieves a list of groups associated with your AWS QuickSight account.

aws quicksight list-groups --aws-account-id aws_account_id --namespace default
  • Motivation: This example is useful when you want to see all the groups present in your AWS QuickSight account.
  • Explanation:
    • --aws-account-id: The AWS account ID associated with the QuickSight account.
    • --namespace: The namespace of the AWS QuickSight account. Default is typically used.
  • Example Output:
    {
        "GroupList": [
            {
                "Arn": "arn:aws:quicksight:us-east-1:123456789012:namespace/default/group1",
                "Description": "Group 1",
                "GroupName": "group1",
                "PrincipalId": "group1"
            },
            ...
        ]
    }
    

4. List dashboards

To list dashboards in AWS QuickSight using the CLI, you can use the list-dashboards command. This command retrieves a list of dashboards associated with your AWS QuickSight account.

aws quicksight list-dashboards --aws-account-id aws_account_id
  • Motivation: This example is useful when you want to see all the dashboards available in your AWS QuickSight account.
  • Explanation:
    • --aws-account-id: The AWS account ID associated with the QuickSight account.
  • Example Output:
    {
        "DashboardSummaryList": [
            {
                "Arn": "arn:aws:quicksight:us-east-1:123456789012:dashboard/example",
                "CreatedTime": "2021-10-20T10:00:00.000000Z",
                "DashboardId": "example",
                "LastPublishedTime": "2021-10-20T11:00:00.000000Z",
                "Name": "Example Dashboard",
                "PublishedVersionNumber": 1
            },
            ...
        ]
    }
    

5. Display detailed information about a dataset

To display detailed information about a dataset in AWS QuickSight using the CLI, you can use the describe-data-set command. This command retrieves detailed information about a specific dataset.

aws quicksight describe-data-set --aws-account-id aws_account_id --data-set-id data_set_id
  • Motivation: This example is useful when you want to get detailed information about a dataset, such as its name, ARN, import mode, and more.
  • Explanation:
    • --aws-account-id: The AWS account ID associated with the QuickSight account.
    • --data-set-id: The ID of the dataset you want to describe.
  • Example Output:
    {
        "DataSet": {
            "Arn": "arn:aws:quicksight:us-east-1:123456789012:dataset/example",
            "ColumnLevelPermissionRules": [],
            "CreatedTime": "2021-10-20T10:00:00.000000Z",
            "DataSetId": "example",
            "ImportMode": "SPICE",
            "LastUpdatedTime": "2021-10-20T12:00:00.000000Z",
            "LogicalTableMap": {
                ...
            },
            "Name": "Example Dataset",
            "OutputColumns": [
                ...
            ],
            "PhysicalTableMap": {
                ...
            },
            "RowLevelPermissionDataSet": {
                "Arn": "arn:aws:quicksight:us-east-1:123456789012:dataset/row-level-permissions-example"
            }
        }
    }
    

6. Display who has access to the dataset and their permissions

To display who has access to a dataset and what kind of actions they can perform on the dataset in AWS QuickSight using the CLI, you can use the describe-data-set-permissions command. This command retrieves detailed information about dataset permissions.

aws quicksight describe-data-set-permissions --aws-account-id aws_account_id --data-set-id data_set_id
  • Motivation: This example is useful when you want to review access permissions for a dataset, such as who has access and their specific permissions.
  • Explanation:
    • --aws-account-id: The AWS account ID associated with the QuickSight account.
    • --data-set-id: The ID of the dataset for which you want to describe the permissions.
  • Example Output:
    {
        "DataSetArn": "arn:aws:quicksight:us-east-1:123456789012:dataset/example",
        "DataSetId": "example",
        "Permissions": [
            {
                "Actions": [
                    "quicksight:CreateDataSet",
                    "quicksight:UpdateDataSetPermissions",
                    "quicksight:DescribeDataSet",
                    ...
                ],
                "Principal": "arn:aws:iam::123456789012:user/user1",
                "PrincipalName": "user1",
                "PrincipalType": "IAM"
            },
            ...
        ]
    }
    

Conclusion

In this article, we explored 8 different use cases for performing various operations with the AWS QuickSight CLI. Each use case included the code, a motivation for using the example, an explanation of every argument, and an example output. By leveraging the AWS CLI for QuickSight, you can efficiently manage datasets, users, groups, dashboards, and permissions in your AWS QuickSight account.

Related Posts

How to use the command `hub issue` (with examples)

How to use the command `hub issue` (with examples)

The hub issue command is a command line tool that allows you to manage Github issues directly from your terminal.

Read More
How to use the command pbmtoxbm (with examples)

How to use the command pbmtoxbm (with examples)

Pbmtoxbm is a command-line tool that converts portable bitmap (PBM) images to X11 bitmap format (XBM).

Read More
Managing Karabiner Configuration with Goku (with examples)

Managing Karabiner Configuration with Goku (with examples)

Karabiner is a powerful keyboard customization tool for macOS that allows you to remap keys and create complex keyboard shortcuts.

Read More