AWS SDK Version 3 for .NET
API Reference

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.

Note:

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

Syntax

C#
public virtual UntagResourceResponse UntagResource(
         UntagResourceRequest request
)

Parameters

request
Type: Amazon.ServiceDiscovery.Model.UntagResourceRequest

Container for the necessary parameters to execute the UntagResource service method.

Return Value


The response from the UntagResource service method, as returned by ServiceDiscovery.

Exceptions

ExceptionCondition
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.

Examples

This example removes the "Department" and "Project" tags from a resource.

UntagResource example


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"
    }
});


            

Version Information

.NET Framework:
Supported in: 4.5 and newer, 3.5

See Also