Querying Tags of an Associated Resource
Function
This API is used to query tags of a specified resource.
TMS uses this API to query all tags of a specified resource.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
 - If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
 
URI
GET /v3/{project_id}/vault/{vault_id}/tags
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        project_id  | 
      
        Yes  | 
      
        String  | 
      
        Project ID  | 
     
| 
        vault_id  | 
      
        Yes  | 
      
        String  | 
      
        Resource ID  | 
     
Request Parameters
None
Response Parameters
Status code: 200
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        tags  | 
      
        Array of Tag objects  | 
      
        Tag list Keys in the tag list must be unique.  | 
     
| 
        sys_tags  | 
      
        Array of SysTag objects  | 
      
        Only users with the op_service permission can obtain this field. Currently, only resource_tag is included. key: _sys_enterprise_project_id value: enterprise project ID. Value 0 indicates the default enterprise project. This field is not returned in the non-op_service scenario.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        key  | 
      
        String  | 
      
        Tag key. Default value: N/A A tag key consists of up to 36 characters. It cannot be an empty string. Spaces before and after a key will be discarded. The key cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores ().  | 
     
| 
        value  | 
      
        String  | 
      
        Tag value. Default value: N/A It is mandatory when a tag is added and optional when a tag is deleted. It consists of up to 43 characters. It can be an empty string. Spaces before and after a value will be discarded. The value cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). The value can contain only letters, digits, hyphens (-), underscores (), and periods (.).  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        key  | 
      
        String  | 
      
        Key Key of the system tag, which is obtained from the whitelist and cannot be defined randomly. Currently, only the _sys_enterprise_project_id field is supported, and the corresponding value indicates the enterprise project ID.  | 
     
| 
        value  | 
      
        String  | 
      
        Value Currently, only the enterprise project ID is used. The default enterprise project ID is 0.  | 
     
Status code: 400
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        For details, see Error Codes.  | 
     
| 
        error_msg  | 
      
        String  | 
      
        Error message  | 
     
Example Requests
GET https://{endpoint}/v3/{project_id}/vault/{vault_id}/tags
 Example Responses
Status code: 200
OK
{
  "tags" : [ {
    "key" : "string",
    "value" : ""
  } ]
}
  Status code: 400
Bad Request
{
  "error_code" : "BackupService.9900",
  "error_msg" : "Invalid vault_id provided."
}
 Status Codes
| 
        Status Code  | 
      
        Description  | 
     
|---|---|
| 
        200  | 
      
        OK  | 
     
| 
        400  | 
      
        Bad Request  | 
     
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot