delete_tags
¶
delete_tags(
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
resources: Optional[ResourceIdList] = None,
tags: Optional[TagList] = None,
) -> None
Deletes the specified set of tags from the specified set of resources.
To list the current tags, use DescribeTags. For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide.
Parameters:
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
resources(Optional[ResourceIdList], default:None) –The IDs of the resources, separated by spaces.
Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.
-
tags(Optional[TagList], default:None) –The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.
If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the
aws:prefix).Constraints: Up to 1000 tags.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To delete a tag from a resource This example deletes the tag Stack=test from the specified image.
Source code in docs_src/capo_ec2/_services/ec2.py
18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18806 18807 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 | |