Amazon Connect Service

2023/06/26 - Amazon Connect Service - 1 new api methods

Changes  This release provides a way to search for existing tags within an instance. Before tagging a resource, ensure consistency by searching for pre-existing key:value pairs.

SearchResourceTags (new) Link ΒΆ

Searches tags used in an Amazon Connect instance using optional search criteria.

See also: AWS API Documentation

Request Syntax

client.search_resource_tags(
    InstanceId='string',
    ResourceTypes=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    SearchCriteria={
        'TagSearchCondition': {
            'tagKey': 'string',
            'tagValue': 'string',
            'tagKeyComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT',
            'tagValueComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        }
    }
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance. You can find the instanceId in the Amazon Resource Name (ARN) of the instance.

type ResourceTypes:

list

param ResourceTypes:

The list of resource types to be used to search tags from. If not provided or if any empty list is provided, this API will search from all supported resource types.

  • (string) --

type NextToken:

string

param NextToken:

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return per page.

type SearchCriteria:

dict

param SearchCriteria:

The search criteria to be used to return tags.

  • TagSearchCondition (dict) --

    The search criteria to be used to return tags.

    • tagKey (string) --

      The tag key used in the tag search condition.

    • tagValue (string) --

      The tag value used in the tag search condition.

    • tagKeyComparisonType (string) --

      The type of comparison to be made when evaluating the tag key in tag search condition.

    • tagValueComparisonType (string) --

      The type of comparison to be made when evaluating the tag value in tag search condition.

rtype:

dict

returns:

Response Syntax

{
    'Tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Tags (list) --

      A list of tags used in the Amazon Connect instance.

      • (dict) --

        A tag set contains tag key and tag value.

        • key (string) --

          The tag key in the tagSet.

        • value (string) --

          The tag value in the tagSet.

    • NextToken (string) --

      If there are additional results, this is the token for the next set of results.