

# Data source operations


With data source operations, you can perform actions on data sources. For more information, see the following API operations.

**Topics**
+ [

# Data source permissions
](data-source-permissions.md)
+ [

# CreateDataSource
](create-data-source.md)
+ [

# DeleteDataSource
](delete-data-source.md)
+ [

# DescribeDataSource
](describe-data-source.md)
+ [

# ListDataSources
](list-data-sources.md)
+ [

# UpdateDataSource
](update-data-source.md)

# Data source permissions


With data source permissions API operations, you can view and update permissions for a data source. For more information, see the following API operations.

**Topics**
+ [

# DescribeDataSourcePermissions
](describe-data-source-operation.md)
+ [

# UpdateDataSourcePermissions
](update-data-source-permissions.md)

# DescribeDataSourcePermissions


Use the `DescribeDataSourcePermissions` API operation to describe the resource permissions for a data source. To use this operation, you need the ID of the data source whose permissions you want to view. The data source ID is part of the data source URL in Quick Sight. You can also use the `ListDataSources` API operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight describe-data-source-permissions 
    --aws-account-id AWSACCOUNTID 
    --data-source-id DATASOURCEID
```

------

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

# UpdateDataSourcePermissions


Use the `UpdateDataSourcePermissions` API operation to update the resource permissions for a data source. You can grant or revoke permissions in the same command. To use this operation, you need the ID of the data source whose permissions you want to update. The data source ID is part of the data source URL in Quick Sight. You can also use the `ListDataSources` API operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight update-data-source-permissions
    --aws-account-id AWSACCOUNTID 
    --data-source-id DATASOURCEID 
    --grant-permissions Principal=arn:aws:quicksight:us-east-1:AWSACCOUNTID:user/default/USERNAME,Actions=quicksight:DescribeDataSource,quicksight:DescribeDataSourcePermissions,quicksight:PassDataSource
    --revoke-permissions Principal=arn:aws:quicksight:us-east-1:AWSACCOUNTID:user/default/USERNAME,Actions=quicksight:DescribeDataSource,quicksight:DescribeDataSourcePermissions,quicksight:PassDataSource
```

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-data-source-permissions
    --cli-input-json file://updatedatasourcepermissions.json
```

------

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

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

# CreateDataSource


Use the `CreateDataSource` API operation to create a data source. Following is an example AWS CLI command for this operation.

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

```
aws quicksight create-data-source 
    --aws-account-id AWSACCOUNTID 
    --data-source-id DATASOURCEID 
    --name NAME 
    --type ATHENA
```

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-data-source
    --cli-input-json file://createdatasource.json
```

------

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

# DeleteDataSource


Use the `DeleteDataSource` API operation to permanently delete a data source from Amazon Quick Sight. To use this operation, you need the ID of the data source that you want to delete. The data source ID is part of the data source URL in Quick Sight. You can also use the `ListDataSources` API operation to get the ID.

**Note**  
Deleting a data source breaks all datasets that reference it.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight delete-data-source 
    --aws-account-id AWSACCOUNTID 
    --data-source-id DATASOURCEID
```

------

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

# DescribeDataSource


Use the `DescribeDataSource` API operation to describe a data source. To use this operation, you need the ID of the data source that you want to view. The data source ID is part of the data source URL in Quick Sight. You can also use the `ListDataSources` API operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight describe-data-source 
    --aws-account-id AWSACCOUNTID 
    --data-source-id DATASOURCEID
```

------

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

# ListDataSources


Use the `ListDataSources` API operation to list all data sources in the current AWS Region that belong to a particular AWS account. Following is an example AWS CLI command for this operation.

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

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

------

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

# UpdateDataSource


Use the `UpdateDataSource` API operation to update a data source. To use this operation, you need the ID of the data source that you want to update. The data source ID is part of the data source URL in Quick Sight. You can also use the `ListDataSources` API operation to get the ID.

Following is an example AWS CLI command for this operation.

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

```
aws quicksight update-data-source 
    --aws-account-id AWSACCOUNTID 
    --data-source-id DATASOURCEID
```

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-data-source 
    --cli-input-json file://updatedatasource.json
```

------

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