AutoScaling / Client / delete_tags

delete_tags#

AutoScaling.Client.delete_tags(**kwargs)#

Deletes the specified tags.

See also: AWS API Documentation

Request Syntax

response = client.delete_tags(
    Tags=[
        {
            'ResourceId': 'string',
            'ResourceType': 'string',
            'Key': 'string',
            'Value': 'string',
            'PropagateAtLaunch': True|False
        },
    ]
)
Parameters:

Tags (list) –

[REQUIRED]

One or more tags.

  • (dict) –

    Describes a tag for an Auto Scaling group.

    • ResourceId (string) –

      The name of the Auto Scaling group.

    • ResourceType (string) –

      The type of resource. The only supported value is auto-scaling-group.

    • Key (string) – [REQUIRED]

      The tag key.

    • Value (string) –

      The tag value.

    • PropagateAtLaunch (boolean) –

      Determines whether the tag is added to new instances as they are launched in the group.

Returns:

None

Exceptions

  • AutoScaling.Client.exceptions.ResourceContentionFault

  • AutoScaling.Client.exceptions.ResourceInUseFault

Examples

This example deletes the specified tag from the specified Auto Scaling group.

response = client.delete_tags(
    Tags=[
        {
            'Key': 'Dept',
            'ResourceId': 'my-auto-scaling-group',
            'ResourceType': 'auto-scaling-group',
            'Value': 'Research',
        },
    ],
)

print(response)

Expected Output:

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