tag_resource

DataSync.Client.tag_resource(**kwargs)

Applies a tag to an Amazon Web Services resource. Tags are key-value pairs that can help you manage, filter, and search for your resources.

These include DataSync resources, such as locations, tasks, and task executions.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    Specifies the Amazon Resource Name (ARN) of the resource to apply the tag to.

  • Tags (list) --

    [REQUIRED]

    Specifies the tags that you want to apply to the resource.

    • (dict) --

      A key-value pair representing a single tag that's been applied to an Amazon Web Services resource.

      • Key (string) -- [REQUIRED]

        The key for an Amazon Web Services resource tag.

      • Value (string) --

        The value for an Amazon Web Services resource tag.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • DataSync.Client.exceptions.InvalidRequestException
  • DataSync.Client.exceptions.InternalException