All Products
Search
Document Center

Resource Management:DeleteTag

Last Updated:Mar 03, 2024

Deletes a preset tag.

Operation description

This topic provides an example on how to call the API operation to delete the preset tag whose tag key is Environment and tag value is test.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

Note Only cn-hangzhou is supported.
cn-hangzhou
KeystringYes

The tag key.

If no tag value is associated with a tag key, you can specify the Key parameter without specifying the Value parameter to delete the tag key. Otherwise, you must specify both the Key and Value parameters to delete a preset tag.

Environment
ValuestringNo

The tag value.

test

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

6E27F22C-EDA3-132E-A53F-77DE3BC2343D

Examples

Sample success responses

JSONformat

{
  "RequestId": "6E27F22C-EDA3-132E-A53F-77DE3BC2343D"
}

Error codes

HTTP status codeError codeError messageDescription
400MetaTagKeyHasValueThe specified TagKey already bind tag value-
403WrongEndpointOnly the central endpoint supports the create and delete operation of meta tag.Only center endpoint supports meta tag create & delete operation.
403NoPermission.OperatorThe user is not authorized to operate on the specified resource.The user is not authorized to operate on the specified resource.
403MetaTagKeyNotFoundThe meta tag key is not found.-
404MissingParameter.KeyThe Key must not be empty.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-01-25The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
    Added Error Codes: 400