• Cloud Server Backup Service

csbs
  1. Help Center
  2. Cloud Server Backup Service
  3. API Reference
  4. API Description
  5. Tag Management
  6. Querying Tags of a Backup Policy

Querying Tags of a Backup Policy

Function

This API is used to query tags of a specific instance.

TMS uses this API to query all tags of a specific instance.

URI

  • URI format

    GET /v1/{project_id}/csbs_backup_policy/{resource_id}/tags

  • Request header

    Parameter

    Mandatory

    Type

    Description

    Content-type

    MIME type of the body in the request

    Yes

    application/json

    X-Auth-Token

    User token

    Yes

    -

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

    resource_id

    Yes

    String

    Resource ID

Request

  • Element description

None

  • Example request
    GET /v1/{project_id}/csbs_backup_policy/{resource_id}/tags

Response

  • Element description

    Parameter

    Type

    Description

    tags

    List<resource_tag>

    Tag list

    Keys in the tag list must be unique.

  • Parameter description of field resource_tag

    Parameter

    Type

    Description

    key

    String

    Tag key

    It consists of up to 36 characters.

    It cannot be an empty string.

    It can contain only letters, digits, hyphens (-), and underscores (_).

    value

    List<String>

    Tag value

    It consists of up to 43 characters.

    It can be an empty string.

    It can contain only letters, digits, hyphens (-), and underscores (_).

  • Example response
    {
           "tags": [
            {
                "key": "key1",
                "value": "value1"
            },
            {
                "key": "key2",
                "value": "value3"
            }
        ]
    }

Status Codes

  • Normal

    Status Code

    Description

    200

    OK

  • Abnormal

    Status Code

    Description

    400

    Invalid parameters.

    401

    Authentication failed.

    403

    You do not have permission to perform this operation.

    404

    The requested resource was not found.

    500

    A system exception occurs.

Error Codes

For details, see Error Codes.