Removes tags from a customer master key (CMK), secret, or certificate.
In this example, the tags whose tag keys are tagkey1 and tagkey2 are removed from
the CMK whose ID is 08c33a6f-4e0a-4a1b-a3fa-7ddf****
.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UntagResource |
The operation that you want to perform. Set the value to UntagResource. |
KeyId | String | No | 08c33a6f-4e0a-4a1b-a3fa-7ddf**** |
The ID of the customer master key (CMK). The ID must be globally unique. Note You can configure only one of the KeyId, SecretName, and CertificateId parameters.
|
TagKeys | String | Yes | ["tagkey1","tagkey2"] |
One or more tag keys. Separate multiple tag keys with commas (,). You need to specify only the tag keys, not the tag values. Each tag key must be 1 to 128 bytes in length. |
SecretName | String | No | MyDbC**** |
The name of the secret. Note You can configure only one of the KeyId, SecretName, and CertificateId parameters.
|
CertificateId | String | No | 770dbe42-e146-43d1-a55a-1355db86**** |
The ID of the certificate. Note You can configure only one of the KeyId, SecretName, and CertificateId parameters.
|
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 4162a6af-bc99-40b3-a552-89dcc8aaf7c8 |
The ID of the request, which is used to locate and troubleshoot issues. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UntagResource
&KeyId=08c33a6f-4e0a-4a1b-a3fa-7ddf****
&TagKeys=["tagkey1","tagkey2"]
&SecretName=MyDbC****
&CertificateId=770dbe42-e146-43d1-a55a-1355db86****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UntagResourceResponse>
<RequestId>4162a6af-bc99-40b3-a552-89dcc8aaf7c8</RequestId>
</UntagResourceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "4162a6af-bc99-40b3-a552-89dcc8aaf7c8"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter | The specified parameter is not valid. | The error message returned because an invalid value is specified for the parameter. |
404 | InvalidAccessKeyId.NotFound | The Access Key ID provided does not exist in our records. | The error message returned because the specified AccessKey ID does not exist. |
For a list of error codes, visit the API Error Center.