Updated on 2024-11-18 GMT+08:00

Batch Deleting Tags from a Resource

Function

This API is used to batch delete tags from a specified resource. System tags cannot be deleted. If any tag to be deleted is not found, the deletion is considered successful.

URI

  • POST /v3/sfs/tms/{project_id}/file-systems/{resource_id}/tags/delete
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    The project ID. For details, see Obtaining a Project ID.

    resource_id

    Yes

    String

    The resource ID, which is the name of a general purpose file system.

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

Content-type

Yes

String

The MIME type of the request body.

Example: application/json

X-Auth-Token

No

String

The user token.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

tags

Yes

List<resource_tag>

The tag list. For details, see Table 3.

Response Parameters

None

Example Request

Batch deleting tags from a general purpose file system whose name is bucketName with the project ID c80a2157ba1d46c0825265947342077c:

POST https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/bucketName/tags/delete

Request body example:

{
    "tags":[
        {
            "key":"key1"
        },
        {
            "key":"key2",
            "value":"value2"
        }
    ]
}

Example Response

None

Status Codes

  • Normal

Status Code

Description

204

Resource tags deleted.

  • Abnormal

Status Code

Description

400

Invalid tag parameter.

401

Certification failed.

403

Authentication failed.

404

Resource not found.

500

System error.