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.
Removes one or more tags from the specified resource.
For .NET Core this operation is only available in asynchronous form. Please refer to UntagResourceAsync.
Namespace: Amazon.ServiceDiscovery
Assembly: AWSSDK.ServiceDiscovery.dll
Version: 3.x.y.z
public virtual UntagResourceResponse UntagResource( UntagResourceRequest request )
Container for the necessary parameters to execute the UntagResource service method.
Exception | Condition |
---|---|
InvalidInputException | One or more specified values aren't valid. For example, a required value might be missing, a numeric value might be outside the allowed range, or a string value might exceed length constraints. |
ResourceNotFoundException | The operation can't be completed because the resource was not found. |
This example removes the "Department" and "Project" tags from a resource.
var client = new AmazonServiceDiscoveryClient(); var response = client.UntagResource(new UntagResourceRequest { ResourceARN = "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm", TagKeys = new List<string> { "Project", "Department" } });
.NET Framework:
Supported in: 4.5 and newer, 3.5