

# Folder operations
<a name="folder-operations"></a>

In Quick Sight Enterprise Edition, you can create personal and shared folders to add hierarchical structure to Quick Sight asset management. Using folders, people can more easily organize, navigate through, and discover dashboards, analyses, and datasets. Within a folder, you can still use your usual tools to search for assets or to add assets to your favorites list.

For more information about folders, see [Organizing Assets into Folders for Quick Sight](https://docs.aws.amazon.com/quicksight/latest/user/folders.html) in the *Amazon Quick Sight User Guide*.

Using the AWS CLI, you can use the following operations to create, search, update, and delete folders in your Quick Sight account:

**Topics**
+ [

# Folder membership operations
](folder-membership.md)
+ [

# Folder permissions operations
](folder-permissions.md)
+ [

# CreateFolder
](create-folder.md)
+ [

# DeleteFolder
](delete-folder.md)
+ [

# DescribeFolder
](describe-folder.md)
+ [

# ListFolders
](list-folders.md)
+ [

# SearchFolders
](search-folders.md)
+ [

# UpdateFolder
](update-folder.md)

# Folder membership operations
<a name="folder-membership"></a>

With folder membership API operations, you can view and update assets, such as a dashboard, analysis, or dataset, to a folder. For more information, see the following API operations:
+ [CreateFolderMembership](create-folder-membership.md)
+ [DeleteFolderMembership](delete-folder-membership.md)
+ [ListFolderMembers](list-folder-members.md)

# CreateFolderMembership
<a name="create-folder-membership"></a>

Use the `CreateFolderMembership` to add an asset, such as a dashboard, analysis, or dataset, to a folder. To use this operation, you need the member ID of the asset that you want to add to a folder. The member ID is either the dashboard, analysis, or dataset ID of the analysis, dashboard, or dataset that you want to add to a folder. The member ID is part of the analysis, dashboard, or dataset URL in Quick Sight. You can also use the `ListAnalyses`, `ListDashboards`, or `ListDataSets` operations to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight create-folder-membership 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID 
    --member-id 444455556666 
    --member-type DASHBOARD
```

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-folder-membership 
    --cli-input-json file://createfoldermembership.json
```

------

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

# DeleteFolderMembership
<a name="delete-folder-membership"></a>

Use the `DeleteFolderMembership` to delete an asset, such as a dashboard, analysis, or dataset, from a folder. To use this operation, you need the member ID of the asset that you want to add to a folder. The member ID is either the dashboard, analysis, or dataset ID of the analysis, dashboard, or dataset that you want to add to a folder. The member ID is part of the analysis, dashboard, or dataset URL in Quick Sight. You can also use the `ListAnalyses`, `ListDashboards`, or `ListDataSets` operations to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight delete-folder-membership 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID 
    --member-id 444455556666
    --member-type DASHBOARD
```

------

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

# ListFolderMembers
<a name="list-folder-members"></a>

Use the `ListFolderMembers` operation to list all assets (`DASHBOARD`, `ANALYSIS`, and `DATASET`) that are in a folder. To use this operation, you need the ID of the folder whose permissions you want to view. The folder ID is part of the folder URL in Quick Sight. You can also use the `ListFolders` operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight list-folder-members 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID
    --page-size 10 
    --max-items 100
```

------

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

# Folder permissions operations
<a name="folder-permissions"></a>

With folder permission API operations, you can view and update permissions for folders. For more information, see the following API operations:
+ [UpdateFolderPermissions](update-folder-permissions.md)
+ [DescribeFolderPermissions](describe-folder-permissions.md)
+ [DescribeFolderResolvedPermissions](describe-folder-resolved-permissions.md)

# DescribeFolderPermissions
<a name="describe-folder-permissions"></a>

Use the `DescribeFolderPermissions` operation to describe the permissions of a folder. To use this operation, you need the ID of the folder whose permissions you want to view. The folder ID is part of the folder URL in Quick Sight. You can also use the `ListFolders` operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight describe-folder-permissions 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID
```

------

You can find the folder ID by using a `ListFolders` operation or through the URL in the Quick Sight user interface.

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

# DescribeFolderResolvedPermissions
<a name="describe-folder-resolved-permissions"></a>

Use the `DescribeFolderResolvedPermissions` operation to describe the resolved permissions of a folder. Permissions consist of both folder direct permissions and the inherited permissions from the ancestor folders. To use this operation, you need the ID of the folder whose permissions you want to view. The folder ID is part of the folder URL in Quick Sight. You can also use the `ListFolders` operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight describe-folder-resolved-permissions 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID
```

------

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

# UpdateFolderPermissions
<a name="update-folder-permissions"></a>

Use the `UpdateFolderPermissions` operation to update the permissions of a folder. You can grant or revoke permissions in the same command. To use this operation, you need the ID of the folder whose permissions you want to view. The folder ID is part of the folder URL in Quick Sight. You can also use the `ListFolders` operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight update-folder-permissions --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID 
    --grant-permissions Principal=arn:aws:quicksight:us-east-1:AWSACCOUNTID:user/default/USERNAME,Actions=quicksight:CreateFolder,quicksight:DescribeFolder,quicksight:UpdateFolder,quicksight:DeleteFolder,quicksight:CreateFolderMembership,quicksight:DeleteFolderMembership,quicksight:DescribeFolderPermissions,quicksight:UpdateFolderPermissions
    --revoke-permissions Principal=arn:aws:quicksight:us-east-1:AWSACCOUNTID:user/default/USERNAME,Actions=quicksight:CreateFolder,quicksight:DescribeFolder,quicksight:UpdateFolder,quicksight:DeleteFolder,quicksight:CreateFolderMembership,quicksight:DeleteFolderMembership,quicksight:DescribeFolderPermissions,quicksight:UpdateFolderPermissions
```

If your `region` has already been configured within the CLI, it doesn't need to be included as an argument.

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 update-folder-permissions 
    --cli-input-json file://updatefolderpermissions.json
```

------

If your region has already been configured with the CLI, it does not need to be included in an argument.

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

# CreateFolder
<a name="create-folder"></a>

The `CreateFolder` operation creates an empty shared folder. To use this operation, you need the ID of the folder whose permissions you want to view. The folder ID is part of the folder URL in Quick Sight. You can also use the `ListFolders` operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight create-folder 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID
```

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-folder 
    --cli-input-json file://createfolder.json
```

------

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

# DeleteFolder
<a name="delete-folder"></a>

Use the `DeleteFolder` operation to delete an empty folder. To use this operation, you need the ID of the folder whose permissions you want to view. The folder ID is part of the folder URL in Quick Sight. You can also use the `ListFolders` operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight delete-folder 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID
```

------

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

# DescribeFolder
<a name="describe-folder"></a>

Use the `DescribeFolder` operation to describe a folder. To use this operation, you need the ID of the folder whose permissions you want to view. The folder ID is part of the folder URL in Quick Sight. You can also use the `ListFolders` operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight describe-folder 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID
```

------

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

# ListFolders
<a name="list-folders"></a>

Use the `ListFolders` operation to list all folders in an Quick Sight account. 

Following is an example AWS CLI command for this operation.

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

```
aws quicksight list-folders 
    --aws-account-id AWSACCOUNTID 
    --page-size 10 
    --max-items 100
```

------

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

# SearchFolders
<a name="search-folders"></a>

Use the `SearchFolders` operation to search the subfolders of a folder. 

Following is an example AWS CLI command for this operation.

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

```
aws quicksight search-folders 
    --aws-account-id AWSACCOUNTID 
    --filters Operator=StringEquals,Name=QUICKSIGHT_USER,Value=arn:aws:quicksight:us-east-1:AWSACCOUNTID:user/default/USERNAME 
    --max-results 100
```

If your `region` has already been configured within the CLI, it doesn't need to be included as an argument.

------

If your region has already been configured with the CLI, it does not need to be included in an argument.

For more information on the SearchFolders operation, see [SearchFolders](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_SearchFolders.html) in the * Quick Sight API Reference*.

# UpdateFolder
<a name="update-folder"></a>

Use the `UpdateFolder` operation to update the name of a folder. To use this operation, you need the ID of the folder whose permissions you want to view. The folder ID is part of the folder URL in Quick Sight. You can also use the `ListFolders` operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight update-folder 
    --aws-account-id AWSACCOUNTID 
    --folder-id FOLDERID 
    --name NAME
```

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 update-folder 
    --cli-input-json file://updatefolder.json
```

------

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