1
0
forked from docs/doc-exports
doc-exports/docs/csbs/api-ref/en-us_topic_0098635091.html
Wei, Hongmin 8ce662c4dc CSBS API initial version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com>
Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
2022-10-24 21:06:50 +00:00

14 KiB

Querying Backup Tags of a Project

Function

This API is used to query a tenant's tag set in a specific region and of a specific resource type.

TMS uses this API to list tags created by a tenant to facilitate tag creation and resource filtering on the console.

URI

  • Parameter description
    Table 2 Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID

Request

  • Parameter description

    None

  • Example request
    GET https://{endpoint}/v1/{project_id}/csbs_backup/tags

Response

  • Parameter description
    Table 3 Parameter description

    Parameter

    Type

    Description

    tags

    List<tag>

    Tag list

    Keys in the tag list must be unique.

  • Parameter description of field tag
    Table 4 Parameter description of field 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 (_).

    values

    List<String>

    List of tag values

    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",
                "values": [
                    "value1",
                    "value2"
                 ]
            },
            {
                "key": "key2",
                "values": [
                    "value1",
                    "value2"
                 ]
            }
        ]
    }

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.