• Scalable File Service

sfs
  1. Help Center
  2. Scalable File Service
  3. API Reference
  4. SFS APIs
  5. Share Tag
  6. Batch Deleting Share Tags

Batch Deleting Share Tags

Function

This interface is used to batch delete tags from a specified share.

This interface is idempotent. If the tags to be deleted do not exist on the share, the deletion is regarded as successful by default.

URI

  • POST /v2/{project_id}/sfs/{share_id}/tags/action
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    string

    Specifies the project ID of the operator.

    share_id

    Yes

    string

    Specifies the share ID.

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    action

    Yes

    string

    Specifies the operation identifier. Possible values are create and delete. Use delete to batch delete tags from a specified share.

    tags

    Yes

    list<resource_tag>

    Specifies the tag list.

  • Description of field resource_tag

    Parameter

    Mandatory

    Type

    Description

    key

    Yes

    string

    Specifies the key of the tag. The value can contain a maximum of 36 characters. This parameter cannot be left empty.

    value

    No

    string

    Specifies the value of the tag. The value contains a maximum of 43 characters and can be an empty string. If the value is not an empty string, the tag is located and deleted based on the key and value. If the value is an empty string, the tag is located and deleted based on the key.

  • Example request
    {
        "action": "delete",
        "tags": [
            {
                "key": "key1",
                "value": "value1"
            },
            {
                "key": "key2"
            },
            {
                "key": "key3",
                "value": ""
            }
        ]
    }

Response

  • Parameter description

    None

  • Example response

    None

Status Codes

  • Normal

    204

  • Abnormal

    Status Code

    Description

    400 Bad Request

    Invalid value.

    401 Unauthorized

    Authentication failed.

    403 Forbidden

    You are forbidden to access the requested page.

    404 Not Found

    The requested resource was not found.

    500 Internal Server Error

    The request is not completed because of a service error.