查詢多個雲產品的多個雲資源綁定的標籤列表。
介面說明
支援標籤的雲端服務,請參見支援標籤的雲端服務。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
tag:ListTagResources |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
地區 ID。取值:
|
cn-hangzhou |
| RegionId |
string |
是 |
地區 ID。取值:
|
cn-hangzhou |
| NextToken |
string |
否 |
下一個查詢開始的 Token。 |
caeba0bbb2be03f84eb48b699f0a**** |
| PageSize |
integer |
否 |
分頁時每頁顯示的資料行數。 最大值:1000。預設值:50。 |
50 |
| Tags |
string |
否 |
標籤鍵和標籤值,索引值對取值範圍:1~10。 如果指定多個標籤,則會查詢同時綁定了該多個標籤的資源。 約束如下:
|
{"k1":"v1","k2":"v2"} |
| Category |
string |
否 |
標籤類型。取值:
預設值:All。 |
Custom |
| ResourceARN |
array |
否 |
資源 ARN(Aliyun Resource Name)。 N 的取值範圍:1~50。 資源 ARN 的格式:
說明
ResourceARN 支援傳遞資源群組、Action Trail和資源管理的 |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
|
string |
否 |
資源 ARN(Aliyun Resource Name)。 |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回參數。 |
||
| NextToken |
string |
根據
|
caeba0bbb2be03f84eb48b699f0a**** |
| RequestId |
string |
請求 ID。 |
014738E0-3C7F-47D8-8FB9-469500C6F387 |
| TagResources |
array<object> |
資源綁定的標籤資訊。 |
|
|
array<object> |
資源綁定的標籤資訊。 |
||
| ResourceARN |
string |
資源 ARN。 |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
| Tags |
array<object> |
標籤資訊。 |
|
|
object |
標籤資訊。 |
||
| Key |
string |
標籤鍵。 |
k1 |
| Value |
string |
標籤值。 |
v1 |
| Category |
string |
標籤類型。取值:
|
Custom |
樣本
正常返回樣本
JSON格式
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"RequestId": "014738E0-3C7F-47D8-8FB9-469500C6F387",
"TagResources": [
{
"ResourceARN": "arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg****",
"Tags": [
{
"Key": "k1",
"Value": "v1",
"Category": "Custom"
}
]
}
]
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidResourceARN.Account | The Account specified in the ResourceARN parameter does not match the actual account, specifically: %s. | ResourceARN中的Account與實際使用者不吻合,分別是:%s |
| 400 | InvalidResourceARN.FormatError | The format of parameter ResourceARN: %s is not valid, for the correct format, you can refer to the Recommend. | ResourceARN的格式不符合規範,正確的格式請參考錯誤診斷。 |
| 400 | InvalidResourceARN.Region | The Region specified in the ResourceARN parameter does not match the RegionId parameter, specifically: %s. | ResourceARN中的Region與參數RegionId不匹配,它們分別是:%s |
| 400 | InvalidParameter.TagKey | The TagKey parameter is invalid. The following TagKeys are invalid: %s. | 參數中存在不合法的標籤鍵,不合法的標籤鍵如下:%s |
| 400 | InvalidParameter.Tags | The Tags parameter cannot be empty, and JSON parsing should adhere to the format of a Map. | |
| 400 | InvalidParameter.RegionId | %s. | 地區參數不合法。 |
| 403 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | 參數包含重複標籤鍵。 |
| 403 | InvalidParameter.Category | The specified Category is invalid. Valid values are Custom and System. | 標籤類型非法,合法值為Custom,System。 |
| 403 | MissingParameter.ResourceIds | You must specify ResourceIds. | 資源清單參數不可為空白。 |
| 403 | NoPermission.Operator | The user is not authorized to operate on the specified resource. | 該使用者沒有許可權操作。 |
| 403 | NoPermission.SystemTag | The user does not have permission to operate the system tag. | 該使用者沒有許可權操作此系統標籤。 |
| 403 | NoPermissionKey.Category | Some keys cannot be modified because the user does not have permission. | 某些key的標籤類型沒有操作許可權。 |
| 403 | NoPermissionKey.Operator | You are not authorized to operate the tag key. | 該使用者沒有操作此標籤鍵許可權。 |
| 403 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. | 資源清單參數數量超限。 |
| 403 | NumberExceed.Tags | The maximum number of Tags is exceeded. | 標籤參數數量超限。 |
| 403 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | 每個資源上的標籤數量有限制,目前有資源已經超限。 |
| 403 | Invalid.NextToken | The parameter NextToken is invalid. | NextToken參數非法。 |
| 403 | InvalidParameter.TagValue | The Tag.N.Value parameter is invalid. | 標籤值參數非法。 |
| 403 | InvalidParameter.ResourceType | The ResourceType parameter is invalid. | 資源型別參數非法。 |
| 404 | Missing.TagKey | Tag.N.Value has been specified and you must specify Tag.N.Key. | 一對索引值對,對應的TagValue缺失相同N的TagKey。 |
| 404 | MissingParameter.AliUid | You must specify AliUid. | 缺失使用者UID參數。 |
| 404 | MissingParameter.Bid | You must specify Bid. | bid參數不可為空白。 |
| 404 | MissingParameter.RegionId | You must specify RegionId. | 缺少RegionId參數。 |
| 404 | MissingParameter.RemoveNum | You must specify RemoveNum. | 刪除數量參數缺失。 |
| 404 | MissingParameter.ResourceIdARN | You must specify ResourceIdARN. | 缺少ResourceIdARN參數。 |
| 404 | MissingParameter.TagKey | You must specify TagKey. | 標籤鍵參數不可為空白。 |
| 404 | MissingParameter.Tags | You must specify Tags. | 缺少參數Tags。 |
| 404 | NoMatch.RemoveNum | The specified DataNum does not match the deleted number. | 刪除數量參數不匹配。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。