ECS / Client / untag_resource

untag_resource#

ECS.Client.untag_resource(**kwargs)#

Deletes specified tags from a resource.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
Parameters:
  • resourceArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource to delete tags from. Currently, the supported resources are Amazon ECS capacity providers, tasks, services, task definitions, clusters, and container instances.

  • tagKeys (list) –

    [REQUIRED]

    The keys of the tags to be removed.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

Examples

This example deletes the ‘team’ tag from the ‘dev’ cluster.

response = client.untag_resource(
    resourceArn='arn:aws:ecs:region:aws_account_id:cluster/dev',
    tagKeys=[
        'team',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}