AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
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.
For .NET Core this operation is only available in asynchronous form. Please refer to DeleteTagsAsync.
Namespace: Amazon.EC2
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z
public virtual DeleteTagsResponse DeleteTags( DeleteTagsRequest request )
Container for the necessary parameters to execute the DeleteTags service method.
This example deletes the tag Stack=test from the specified image.
var client = new AmazonEC2Client();
var response = client.DeleteTags(new DeleteTagsRequest
{
Resources = new List<string> {
"ami-78a54011"
},
Tags = new List<Tag> {
new Tag {
Key = "Stack",
Value = "test"
}
}
});
.NET Framework:
Supported in: 4.7.2 and newer