批量查询资源所属的分组
更新时间:2025-04-03
描述
- 本接口用于批量查询资源所属的分组。
请求
请求结构
Plain Text
1POST /v1/res/resource/batch/queryGroupRes
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
resourceBriefs | List<ResourceBrief> | 是 | body | 资源列表 |
返回
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
resGroups | List<ResourceGroupsDetailFull> | 是 | 分组列表 |
错误码
无特殊错误码
示例
请求示例
Plain Text
1POST /v1/res/resource/batch/queryGroupRes HTTP/1.1
2Host: resourcemanager.baidubce.com
3Authorization: bce-auth-v1/04795b2a1d12490bbee94511b7b78d7e/2016-11-11T10:34:26Z/1800/host/9e5619677b3a461f5b95d061b88823634e8bbc0e6b46e5b3cecbb75f21906a3d
4{
5 "resourceBriefs": [
6 {
7 "resourceId": "i-xxxx",
8 "ResourceType": "BCC",
9 "resourceRegion":"bj"
10 }
11 ]
12}
返回示例
Plain Text
1HTTP/1.1 200 OK
2 Content-Type: application/json;charset=UTF-8
3 X-Bce-Request-Id: 8d51a788-e79d-4ced-a9e0-0662ec85b7f7
4 Server: BWS
5
6 {
7 "resGroups": [
8 {
9 "name": "cce-ig-5msak3yd-llf1p0ou-wrwomavx-2",
10 "type": "BCC",
11 "region": "bj",
12 "id": "i-xxxx",
13 "uuid": "xxxxxxxx-yyyy-zzzz-mmmm-nnnnnnnnnnnn",
14 "url": "https://console.bce.baidu.com/bcc/#/bcc/instance/detail?instanceId=xxxxxxxx-yyyy-zzzz-mmmm-nnnnnnnnnnnn",
15 "accountId": "acc-xxxxxxxx",
16 "userId": "acc-xxxxxxxx",
17 "groups": [
18 {
19 "name": "默认分组",
20 "extra": "",
21 "parentUuid": "",
22 "groupId": "RESG-xxxxxxxx",
23 "accountId": "acc-xxxxxxxx",
24 "userId": "acc-xxxxxxxx",
25 "createTime": "2021-03-01T10:50:29Z",
26 "updateTime": "2021-03-01T10:50:29Z",
27 "bindTime": "2025-01-07T13:08:41Z"
28 }
29 ]
30 }
31 ]
32}
33