

# Managing Amazon Q Business data source resources
<a name="managing-resources-data-sources"></a>

You can choose to manage your Amazon Q Business application environment and associated resources. To learn how to do so, see the following sections:
+ [Managing Amazon Q Business indices](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/supported-native-retriever-actions.html)
+ [Managing Amazon Kendra indices](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/supported-kendra-retriever-actions.html)
+ [Managing Amazon Q Business data sources](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/supported-datasource-actions.html)
+ [Deleting uploaded documents](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/delete-doc-upload.html)

# Managing Amazon Q Business indices
<a name="supported-native-retriever-actions"></a>

To manage Amazon Q Business indexes, you can take the following actions:

**Topics**
+ [Deleting an Amazon Q Business index](#delete-native-retriever)
+ [Getting properties of an Amazon Q Business index](#describe-native-retriever)
+ [Listing Amazon Q Business indices and retrievers](#list-native-retriever)
+ [Editing Amazon Q Business indices](#update-native-retriever)

## Deleting an Amazon Q Business index
<a name="delete-native-retriever"></a>

To delete a Amazon Q Business index, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteIndex.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteIndex.html) API operation.

If you use the console, deleting an index automatically deletes the retriever attached to it. If you use the API, you must also use the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteRetriever.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteRetriever.html) API operation to delete the Amazon Q Business retriever attached to your index.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To delete an Amazon Q Business index**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. Complete the steps to create your Amazon Q Business application.

1. In **Applications**, select the name of your application from the list of applications.

1. From the left navigation menu, choose **Data sources**.

1. From the **Data sources** page, from **Index**, select **Delete**.

1. In the dialog box that opens, type **Confirm** to confirm deletion, and then choose **Delete**.

   You are returned to the service console while your application environment is deleted. When the deletion process is complete, the console displays a message confirming successful deletion.

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

**To delete an Amazon Q Business index**

```
aws qbusiness delete-index \
--application-id application-id \
--retriever-id index-id
```

**To delete an Amazon Q Business retriever**

```
aws qbusiness delete-retriever \
--application-id application-id \
--retriever-id retriever-id
```

------

## Getting properties of an Amazon Q Business index
<a name="describe-native-retriever"></a>

To get the properties of an Amazon Q Business index and retriever, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_GetIndex.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_GetIndex.html) and [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_GetRetriever.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_GetRetriever.html) API operation.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To get properties of an Amazon Q Business index and retriever** 

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the name of your application from the list of applications.

1. From the left navigation menu, choose **Data sources**.

1. On the **Data sources** page, under **Index** the following settings are available:
   + **Index name** – The name of the index.
   + **Index status** – The status of your index.
   + **Index provisioning** – The number of index units provisioned for your index.
   + **Document count** – The number of documents that are attached to your index. 
   + **Storage used** – The amount of storage that your index is using. 
   + **Index ID** – The ID of the index attached to your retriever. 
   + **Retriever ID** – The ID of the retriever that you're using. 
   + **Retriever** – The retriever type that you're using. 
   + **Last modified** – The time that your index was last modified. 

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

**To get properties of an Amazon Q Business index and retriever**

```
aws qbusiness get-index \
--application-id application-id \
--index-id index-id
```

```
aws qbusiness get-retriever \
--application-id application-id \
--retriever-id retriever-id
```

------

## Listing Amazon Q Business indices and retrievers
<a name="list-native-retriever"></a>

To list your native Amazon Q Business indices and retrievers, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListIndices.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListIndices.html) API operation and the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListRetrievers.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListRetrievers.html) API operation.

If you use the console, the list of Amazon Q Business indices and retrievers can be found within the list of data sources that you have created.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To list your Amazon Q Business indices and retrievers**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the name of your application from the list of applications.

1. From the left navigation menu, choose **Data sources**.

1. On the **Data sources** page, a list of all indices that you have created is available.

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

**To list your Amazon Q Business indices and retrievers**

```
aws qbusiness list-indices \
--application-id application-id \
--max-results maximum-result-to-display
```

```
aws qbusiness list-retrievers \
--application-id application-id \
--max-results maximum-result-to-display
```

------

## Editing Amazon Q Business indices
<a name="update-native-retriever"></a>

To edit your Amazon Q Business index, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UpdateIndices.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UpdateIndices.html) API operation.

**Note**  
When you update a native index, you can only update the number of storage units you provisioned for it. You can't change any other settings.

The following tab provides code examples for the AWS Management Console and AWS CLI.

------
#### [ Console ]

**To update your Amazon Q Business retriever**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the name of your application from the list of applications.

1. From the left navigation menu, choose **Data sources**.

1. In the **Data sources** page, from **Index**, select **Edit**.

1. In **Edit index**, choose to update index units provisioned from **Number of units**. 

1. Select **Update** to save your changes.

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

**To update your Amazon Q Business index**

```
aws qbusiness update-index \
--application-id application-id \
--index-id index-id \
--display-name display-name \
--role-arn roleArn \
--capacity-configuration IndexCapacityConfiguration="{indexId=<index-id>}"
```

------

# Managing Amazon Kendra indices
<a name="supported-kendra-retriever-actions"></a>

To manage Amazon Kendra indices being used as retrievers, you can take the following actions:

**Topics**
+ [Detaching an Amazon Kendra index](#detach-kendra-retriever)
+ [Updating an Amazon Kendra index](#edit-kendra-index)
+ [Deleting an Amazon Kendra index](#delete-kendra-index)
+ [Deleting an Amazon Kendra retriever](#delete-kendra-retriever)
+ [Getting properties of an Amazon Kendra retriever](#describe-kendra-retriever)
+ [Listing Amazon Kendra indices](#list-kendra-retriever)
+ [Updating an Amazon Kendra retriever](#update-kendra-retriever)

## Detaching an Amazon Kendra index
<a name="detach-kendra-retriever"></a>

To detach an Amazon Kendra index, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteRetriever.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteRetriever.html) API operation.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To detach an Amazon Kendra index**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the name of your application from the list of applications.

1. From the left navigation menu, choose **Data sources**.

1. In the **Data sources** page, from **Index**, select **Edit**.

1. In **Edit index**, choose to update index units provisioned from **Number of units**. 

1. Select **Update** to save your changes.

1. In **Applications**, choose **Actions**.

1. Choose **Detach**.

1. In the dialog box that opens, type **confirm** to confirm deletion, and then choose **Detach**.

   You are returned to the service console while your index is detached and your retriever is deleted. When the process is complete, the console displays a message confirming successful detachment.

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

**To detach an Amazon Kendra index**

```
aws qbusiness delete-retriever \
--application-id application-id \
--retriever-id retriever-id
```

------

## Updating an Amazon Kendra index
<a name="edit-kendra-index"></a>

To update an Amazon Kendra index, you can use the Amazon Q Business console or the Amazon Kendra [https://docs.aws.amazon.com/kendra/latest/APIReference/API_UpdateIndex.html](https://docs.aws.amazon.com/kendra/latest/APIReference/API_UpdateIndex.html) API operation.

**Note**  
You can't update an Amazon Kendra Developer edition index. You can only update an Amazon Kendra Enterprise Edition index or Amazon Kendra GenAI Enterprise Edition index.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To update an Amazon Kendra index**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the name of your application from the list of applications.

1. From the left navigation menu, choose **Data sources**.

1. In the **Data sources** page, from **Index**, select **Edit**.

1. In **Edit index**, choose between the following values to update"
   + **Storage capacity** – Update your storage capacity to a value between 1-50 units. Each unit contains 20,000 documents. Index capacity must be more than the data stored in your index. If you need to, delete data and re-sync your data sources before adjusting capacity. 
   + **Query capacity** – Update your query capacity between 1-100 units. Each unit is 0.1 queries per second (QPS), or about 8000 queries per day.

1. Select **Update** to save your changes.

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

**To update an Amazon Kendra index**

```
                                
aws kendra update-index \
--id index-id \
--capacity-units '{"QueryCapacityUnits": 2, "StorageCapacityUnits": 1}'
```

------

## Deleting an Amazon Kendra index
<a name="delete-kendra-index"></a>

To detach an Amazon Kendra index, you can use the Amazon Kendra console or the Amazon Kendra [https://docs.aws.amazon.com/kendra/latest/APIReference/API_DeleteIndex.html](https://docs.aws.amazon.com/kendra/latest/APIReference/API_DeleteIndex.html) API operation.

Deleting an index removes the index and all associated data sources and document data. Deleting an index doesn't remove the original documents from your storage.

Deleting an index is an asynchronous operation. When you start deleting an index, the index status changes to `DELETING`. It remains in the `DELETING` state until all of the information related to the index is removed. Once the index is deleted, it no longer appears in the results of a call to the Amazon Kendra [ListIndices](https://docs.aws.amazon.com/kendra/latest/APIReference/API_ListIndices.html) API. If you call the Amazon Kendra [DescribeIndex](https://docs.aws.amazon.com/kendra/latest/APIReference/API_DescribeIndex.html) API with the deleted index's identifier, you receive and `ResourceNotFound` exception.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To delete an Amazon Kendra index**

1. Sign in to the AWS Management Console and open the Amazon Kendra console at [https://console.aws.amazon.com/kendra/](https://console.aws.amazon.com/kendra/).

1. In the navigation pane, choose **Indexes**, and then choose the index to delete.

1. Choose **Delete** to delete the selected index.

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

**To delete an Amazon Kendra index**

```
aws kendra delete-index \
--id index-id
```

------

## Deleting an Amazon Kendra retriever
<a name="delete-kendra-retriever"></a>

To delete an Amazon Kendra retriever, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteRetriever.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteRetriever.html) API operation.

If you use the console, the only ways to delete your Amazon Kendra retriever from your Amazon Q Business application environment is to [detach your Amazon Kendra index](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/supported-kendra-retriever-actions.html#detach-kendra-retriever) from the Amazon Q Business application or delete your Amazon Q Business application environment.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI for the second scenario.

------
#### [ Console ]

**To delete an Amazon Kendra retriever**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, choose **Actions**.

1. Choose **Delete**.

1. In the dialog box that opens, type **Delete** to confirm deletion, and then choose **Delete**.

   You are returned to the service console while your application environment is deleted. When the deletion process is complete, the console displays a message confirming successful deletion.

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

**To delete an Amazon Kendra retriever**

```
aws qbusiness delete-retriever \
--application-id application-id \
--retriever-id retriever-id
```

------

## Getting properties of an Amazon Kendra retriever
<a name="describe-kendra-retriever"></a>

To get the properties of an Amazon Kendra retriever, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_AddRetriever.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_AddRetriever.html) API operation.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To get the properties of an Amazon Kendra retriever ** 

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the name of your application environment from the list of applications.

1. From the left navigation menu, choose **Data sources**.

1. On the **Data sources** page, under **Index** the following settings are available:
   + **Retriever** – The type of retriever that you're using. 
   + **Document count** – The number of documents that are attached to your index. 
   + **Last modified time** – The time that your index was last modified. 
   + **Index ID** – The ID of the index attached to your retriever. 
   + **Storage used** – The amount of storage that your index is using. 
   + **Index status** – The status of your index.
**Note**  
You can't edit or update retriever or index settings.

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

**To get properties of an Amazon Kendra retriever **

```
aws qbusiness get-retriever \
--application-id application-id \
--retriever-id retriever-id
```

------

## Listing Amazon Kendra indices
<a name="list-kendra-retriever"></a>

To list your Amazon Kendra indices being used as retrievers, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListRetrievers.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListRetrievers.html) API operation.

If you use the console, the list of Amazon Kendra indices being used as retrievers can be found within the list of data sources that you have created.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To list your Amazon Q Business indices and retrievers**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the name of your application from the list of applications.

1. From the left navigation menu, choose **Data sources**.

1. On the **Data sources** page, a list of all indices that you have created is available.

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

**To list Amazon Kendra retrivers**

```
aws qbusiness list-retrievers \
--application-id application-id \
--max-results maximum-result-to-display
```

------

## Updating an Amazon Kendra retriever
<a name="update-kendra-retriever"></a>

To update your Amazon Kendra retriever, you can use the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UpdateRetriever.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UpdateRetriever.html) API operation.

You can't update your Amazon Kendra retriever using the console.

The following tab provides code examples for the AWS CLI.

------
#### [ Console ]

**This action is not supported on the console.**

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

**To update an Amazon Kendra retriever**

```
aws qbusiness update-retriever \
--application-id application-id \
--retriever-id retriever-id \
--display-name display-name \
--role-arn roleArn \
--configuration kendraIndexConfiguration="{indexId=<kendra-index-d>}"
```

------

# Managing Amazon Q Business data sources
<a name="supported-datasource-actions"></a>

To manage data source connectors, you can perform the following actions:

**Topics**
+ [Deleting an Amazon Q Business data source connector](#delete-datasource)
+ [Getting properties of an Amazon Q Business data source connector](#describe-datasource)
+ [Listing Amazon Q Business data source connectors](#list-datasources)
+ [Updating Amazon Q Business data source connectors](#update-datasources)
+ [Starting data source connector sync jobs](#start-datasource-sync-jobs)
+ [Stopping data source connector sync jobs](#end-datasource-sync-jobs)
+ [Listing data source connector sync jobs](#list-datasource-sync-jobs)

## Deleting an Amazon Q Business data source connector
<a name="delete-datasource"></a>

To delete an Amazon Q Business data source connector, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteDataSource.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DeleteDataSource.html) API operation .

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To delete an Amazon Q Business data source connector**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment that you want to delete data sources from. 

1. From the left navigation menu, select **Data sources**.

1. From the **Data sources** list, select the data source you want to delete.

1. From **Actions**, choose **Delete**.

1. In the dialog box that opens, type **Delete** to confirm deletion, and then choose **Delete**.

   You are returned to the service console while your data source connector is deleted. When the deletion process is complete, the console displays a message confirming successful deletion.

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

**To delete an Amazon Q Business data source connector**

```
aws qbusiness delete-data-source \
--application-id application-id \
--index-id index-id \
--data-source-id data-source-id
```

------

## Getting properties of an Amazon Q Business data source connector
<a name="describe-datasource"></a>

To get the properties of an Amazon Q Business data source connector, you can use the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_GetDataSource.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_GetDataSource.html) API operation.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To get properties of an Amazon Q Business data source connector **

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment you want that contains your data sources. 

1. From the left navigation menu, select **Data sources**.

1. From the **Data sources** list, select the data source that you want to view details for.

1. Under **Data source details**, the following details are available:
   + **Name** – The name of your data source. 
   + **Status** – The status of your data source. 
   + **Last sync status** – The status of your last sync. 
   + **Description** – The description that you gave to your data source. 
   + **Type** – The type of data source that you're using. 
   + **Last sync time** – The time that your data source was last synced.
   + **Data source ID** – The ID of your data source.
   + **IAM role ARN** – The Amazon Resource Name (ARN) of the IAM role that's associated with your data source.
   + **Current sync state** – The current sync state of your data source.

**To get Amazon Q Business data source connector settings** 

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment you want that contains your data sources. 

1. From the left navigation menu, select **Data sources**.

1. From the **Data sources** list, select the data source you want to delete.

1. For **Data source details**, choose **Settings**.

1. For **Settings**, the following settings are available:
   + **IAM role** – The ARN of the IAM that's associated with your data source. 
   + **Sync scope** – The configuration details for your data source. 
   + **Sync mode** – The sync type that you chose for your data source. 
   + **Sync schedule** – The sync schedule that you chose for your data source. 
   + **Field mappings** – The data source document fields that you chose to map to Amazon Q Business index fields. 

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

**To get Amazon Q Business data source connector properties**

```
aws qbusiness get-data-source \
--application-id application-id \
--index-id index-id \
--data-source-id data-source-id
```

------

## Listing Amazon Q Business data source connectors
<a name="list-datasources"></a>

To list Amazon Q Business data source connectors, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListDataSources.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListDataSources.html) API operation.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To list Amazon Q Business data source connectors**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment you want that contains your data sources. 

1. From the left navigation menu, select **Data sources**.

1. On the **Data sources**, under **Data sources**, a list of data sources connected to your application environment is displayed.

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

**To list Amazon Q Business data source connectors**

```
aws qbusiness list-data-sources \
--application-id application-id \
--index-id index-id \
--max-results maximum-number-of-results-to-return
```

------

## Updating Amazon Q Business data source connectors
<a name="update-datasources"></a>

To update your Amazon Q Business data source connectors, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UpdateDataSource.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UpdateDataSource.html) API operation.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To update a Amazon Q Business data source connector**

**Option 1**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment you want to delete data sources from. 

1. From the left navigation menu, select **Data sources**.

1. On the application page, from **Data sources**, select the data source that you want to edit.

1. From **Actions**, choose **Edit**.

   You are redirected to your data source configuration page to edit your existing settings.

**Option 2**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment you want to delete data sources from. 

1. On the application page, from **Data sources**, select the data source that you want to edit.

1. On the data source page, from **Actions**, choose **Edit**.

   You are redirected to your data source configuration page to edit your existing settings.

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

**To update your Amazon Q Business connector**

```
aws qbusiness update-data-source \
--application-id application-id \
--data-source-id data-source-id \
--index-id index-id \
--configuration data-source-configuration-details \
--description description \
--display-name display-name \
--document-enrichment-configuration document-enrichment-configuration \
--role-arn roleArn \
--sync-schedule sync-schedule-information \
--vpc-configuration vpc-configuration
```

------

## Starting data source connector sync jobs
<a name="start-datasource-sync-jobs"></a>

To start Amazon Q Business data source connector sync jobs, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_StartDataSourceSyncJobs.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_StartDataSourceSyncJobs.html) API operation.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To start your Amazon Q Business data source connector sync jobs**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment you want to sync data sources in. 

1. On the application page, from **Data sources**, select the data source that you want to sync.

1. Choose **Sync now**.

   The console displays a message confirming that your sync job has started successfully.
**Note**  
You can also view your sync job report in the Amazon CloudWatch console.

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

**To start your Amazon Q Business data source connector sync jobs**

```
aws qbusiness start-data-source-sync-job \
--application-id application-id \
--index-id index-id \
--data-source-id data-source-id
```

------

## Stopping data source connector sync jobs
<a name="end-datasource-sync-jobs"></a>

To stop your Amazon Q Business connector sync jobs, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_StopDataSourceSyncJobs.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_StopDataSourceSyncJobs.html) API operation.

**Note**  
You can only stop a sync job already in progress.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To stop your Amazon Q Business data source connector sync jobs**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment you want to sync data sources in. 

1. On the application page, from **Data sources**, select the data source that you want to stop the sync for.

1. Choose **Stop sync**.

1. In the dialog box that opens , type **Stop** to confirm your action and then select **Stop sync**.

   The console displays a message confirming that your data source sync job is being stopped.

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

**To stop your Amazon Q Business data source connector sync jobs**

```
aws qbusiness stop-data-source-sync-job \
--application-id application-id \
--data-source-id data-source-id \
--index-id index-id
```

------

## Listing data source connector sync jobs
<a name="list-datasource-sync-jobs"></a>

To list Amazon Q Business data source connector sync jobs that are in progress, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListDataSourceSyncJobs.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListDataSourceSyncJobs.html) API operation.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To list your Amazon Q Business data source connector sync jobs**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the application environment you want that contains your data sources. 

1. On the application page, from **Data sources**, select the data source that you want to view details for.

1. Under **Data source details**, choose the **Sync run history** tab.

   You will see a list of ongoing, completed, and failed sync jobs for your data sources.

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

**To list your Amazon Q Business data source connector sync jobs**

```
aws qbusiness list-data-source-sync-job \
--application-id application-id \
--data-source-id data-source-id \
--index-id index-id \
--max-results max-results-to-return
```

------

# Deleting documents uploaded in an Amazon Q Business application
<a name="delete-doc-upload"></a>

To delete documents that have been directly uploaded to an application environment, you can use the console or the [https://docs.aws.amazon.com/amazonq/latest/api-reference/API_BatchDeleteDociment.html](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_BatchDeleteDociment.html) API operation. You can delete specific documents or all documents.

The following tabs provide a procedure for the AWS Management Console and code examples for the AWS CLI.

------
#### [ Console ]

**To delete specific directly uploaded documents** 

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. In **Applications**, select the name of the application environment that your uploaded files belong to.

1. From your applications page, from **Data sources**, choose **Uploaded files**.

1. In **Uploaded files**, choose **Document name**, and then select the documents that you want to delete.
**Note**  
You can choose up to 10 files at a time.

1. Choose **Delete files**.

   You are returned to the service console while your application environment is deleted. When the deletion process is complete, the console displays a message confirming successful deletion.

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

**To delete documents**

```
aws qbusiness batch-delete-document \
--application-id application-id \
--index-id index-id \
--documents documents-to-delete \
--data-source-sync-id data-source-sync-id
```

------

# Tagging resources in Amazon Q Business
<a name="tagging-ds"></a>

Manage your Amazon Q Business data sources, retrievers, and indexes by assigning tags. You can use tags to categorize your Amazon Q Business resources in various ways. For example, you could categorize by purpose, owner, or application, or any combination. Each tag consists of a *key* and a *value*, both of which you define.

Tags help you to do the following:
+ **Identify and organize your AWS resources** – Many AWS services support tagging, so you can assign the same tag to resources in different services to indicate that the resources are related. For example, you can tag an Amazon Kendra retriever and the Amazon Q Business web experience that uses the retriever with the same tag.
+ **Allocate costs** – You activate tags on the AWS Billing and Cost Management dashboard. AWS uses tags to categorize your costs and deliver a monthly cost allocation report to you. For more information, see [Cost Allocation and Tagging](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) in the *AWS Billing User Guide*.
+ **Control access to your resources** – You can use tags in AWS Identity and Access Management (IAM) policies that control access to Amazon Q Business resources. To activate tag-based access control, you can attach these policies to an IAM role or IAM user. For more information, see [Authorization based on tags](https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/security_iam_service-with-iam.html#security_iam_service-with-iam-tags).

You can create and manage tags using the AWS Management Console, the AWS Command Line Interface (AWS CLI), or the Amazon Q Business API.

**Topics**
+ [Using tags](#tagging-resources-ds)
+ [Tag restrictions](#tag-restrictions-ds)

## Using tags
<a name="tagging-resources-ds"></a>

If you're using the console, you can tag resources when you create them or add them later. You can also use the console to update or remove tags in the following ways:

------
#### [ Adding tags ]

**To add Amazon Q Business tags**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. From **Applications**, select the application whose resources you want to tag.

1. From the application summary page, scroll down and select **Tags**.

1. In **Tags**, from the resource you want to add tags to, select **Manage tags**.

1. In **Tags – *optional***, select **Add new tag** to add tags to your Amazon Q Business resource. Then, enter the following information for each tag:
   + **Key** – Add a key for your tag.
   + **Value - *optional*** – An optional value for your tag.

1. Select **Save**.

------
#### [ Removing tags ]

**To remove tags**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. From **Applications**, select the application you want to delete tags from.

1. From the application summary page, scroll down and select **Tags**.

1. In **Tags**, from the resource you want to add tags to, select **Manage tags**.

1. In **Tags – *optional***, select **Remove**.

1. Select **Save**.

------
#### [ Listing tags ]

**To view a list of tags**

1. Sign in to the AWS Management Console and open the Amazon Q Business console.

1. From **Applications**, select the application you want to delete tags from.

1. From the application summary page, scroll down and select **Tags**.

1. In **Tags**, each tagged resource will display a list of tags associated with it.

------

If you're using the AWS CLI or the Amazon Q Business API, use the following operations to manage tags for your resources:
+ [CreateApplication](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateApplication.html) – Apply tags when you create an Amazon Q Business application.
+ [CreateWebExperience](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_CreateWebExperience.html) – Apply tags when you create an Amazon Q Business web experience.
+ [ListTagsForResource](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_ListTagsForResource.html) – View the tags associated with a resource.
+ [TagResource](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_TagResource.html) – Add and modify tags for a resource.
+ [UntagResource](https://docs.aws.amazon.com/amazonq/latest/api-reference/API_UntagResource.html) – Remove tags from a resource.

## Tag restrictions
<a name="tag-restrictions-ds"></a>

The following restrictions apply to tags on Amazon Q Business resources:
+ Maximum number of tags – 50
+ Maximum key length – 128 characters
+ Maximum value length – 256 characters
+ Valid characters for key and value – a–z, A–Z, space, and the following characters: \$1 . : / = \$1 - and @
+ Keys and values are case sensitive
+ Don't use `aws:` as a prefix for keys; it's reserved for AWS use