

# 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*.