UntagResource - AWS Cloud Map

UntagResource

Removes one or more tags from the specified resource.

Request Syntax

{ "ResourceARN": "string", "TagKeys": [ "string" ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ResourceARN

The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Required: Yes

TagKeys

The tag keys to remove from the specified resource.

Type: Array of strings

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidInput

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.

HTTP Status Code: 400

ResourceNotFoundException

The operation can't be completed because the resource was not found.

HTTP Status Code: 400

Example

UntagResource Example

Sample Request

POST / HTTP/1.1 Host: servicediscovery.us-east-1.amazonaws.com Accept-Encoding: identity X-Amz-Target: Route53AutoNaming_v20170314.UntagResource Content-Type: application/x-amz-json-1.1 User-Agent: aws-cli/1.18.63 Python/3.6.9 Linux/4.4.0-18362-Microsoft botocore/1.16.13 X-Amz-Date: 20200521T193349Z X-Amz-Security-Token: [security-token] Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20200521/us-east-1/servicediscovery/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=[calculated-signature] Content-Length: [number of characters in the JSON string] { "ResourceARN": "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm", "TagKeys": ["Project", "Department"] }

Sample Response

HTTP/1.1 200 Content-Type: application/x-amz-json-1.1 Date: Thu, 21 May 2020 19:33:49 GMT x-amzn-RequestId: [request-id] Content-Length: 2 Connection: keep-alive {}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: