Skip to main content

tags

Creates, updates, deletes, gets or lists a tags resource.

Overview

Nametags
TypeResource
Idaws.qbusiness.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
tagsarrayA list of tags associated with the Amazon Q Business application or data source.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_for_resourceselectresource_arn, regionGets a list of tags associated with a specified resource. Amazon Q Business applications and data sources can have tags associated with them.
tag_resourceupdateresource_arn, region, tagsAdds the specified tag to the specified Amazon Q Business application or data source resource. If the tag already exists, the existing value is replaced with the new value.
untag_resourceupdateresource_arn, tagKeys, regionRemoves a tag from an Amazon Q Business application or a data source.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
resource_arnstringThe Amazon Resource Name (ARN) of the Amazon Q Business application, or data source to remove the tag from.
tagKeysarrayA list of tag keys to remove from the Amazon Q Business application or data source. If a tag key does not exist on the resource, it is ignored.

SELECT examples

Gets a list of tags associated with a specified resource. Amazon Q Business applications and data sources can have tags associated with them.

SELECT
tags
FROM aws.qbusiness.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Adds the specified tag to the specified Amazon Q Business application or data source resource. If the tag already exists, the existing value is replaced with the new value.

UPDATE aws.qbusiness.tags
SET
tags = '{{ tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required
AND tags = '{{ tags }}' --required;