• Simple Message Notification

smn
  1. Help Center
  2. Simple Message Notification
  3. API Reference
  4. APIs
  5. Resource Tag Operations
  6. Deleting a Resource Tag

Deleting a Resource Tag

Description

  • API name

    DeleteResourceTag

  • Function

    The API is idempotent. When deleting a tag, the system does not check its character set. The tag key cannot be left blank or be an empty string. If the key of the tag to be deleted does not exist, 404 will be returned.

URI

  • URI format

    DELETE /v2/{project_id}/{resource_type}/{resource_id}/tags/{key}

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

    resource_type

    Yes

    String

    Resource type

    The value can be smn_topic.

    resource_id

    Yes

    String

    Resource ID

    Obtain a resource ID:

    • Add X-SMN-RESOURCEID-TYPE=name in the request header and set the resource ID to the topic name.
    • Call the GetResourceInstances API to obtain the resource ID.

Request

  • Request example
    DELETE /v2/{project_id}/{resource_type}/{resource_id}/tags/{key}

Response

None

Returned Value

  • Normal

    Returned Value

    Description

    204

    No Content

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Incorrect request parameters.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    No permission to access the requested resource.

    404 Not Found

    The requested resource does not exist.

    500 Internal Server Error

    Request failed because the server is abnormal.

Error Code

See section Error Code.