资源从资源分组移除
更新时间:2024-03-11
描述
- 本接口用于把资源从到资源分组移除
请求
请求结构
Plain Text
1PUT /v1/res/resource
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
bindings | List<OpenGroupResInfo> | 是 | body | 需要解绑的资源和分组关系列表。 |
返回
返回参数
void
示例
请求示例
Plain Text
1PUT /v1/res/resource?force=false HTTP/1.1
2Host: resourcemanager.baidubce.com
3content-type: application/json
4Authorization: bce-auth-v1/04795b2a1d12490bbee94511b7b78d7e/2016-11-11T10:34:26Z/1800/host/9e5619677b3a461f5b95d061b88823634e8bbc0e6b46e5b3cecbb75f21906a3d
5Content-Length: 20
6
7{
8 "bindings":[
9 {
10 "resourceId":"i-xMfbkAtv",
11 "resourceType":"BCC",
12 "resourceRegion":"su",
13 "groupId":"RESG-nAry9duMxag"
14 }, {
15 "resourceId":"v-c0rYs8uE",
16 "resourceType":"CDS",
17 "resourceRegion":"su",
18 "groupId":"RESG-nAry9duMxag"
19
20 }
21]}
返回示例
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
错误码
错误码 | 错误描述 | HTTP状态码 | 中文解释 |
---|---|---|---|
ArgumentInvalid | Resource [xxx] doesn't exist. | 400 | 入参资源不存在 |
ArgumentInvalid | Group [xxx] doesn't exist. | 400 | 入参分组不存在 |
ArgumentInvalid | Group resource relationship [xxx] doesn't exist. | 400 | 入参的分组与资源绑定关系不存在 |
ArgumentInvalid | Can't find any relationShip between resource and group. | 400 | 没有找到分组和资源的任何绑定关系 |