绑定标签
更新时间:2023-09-22
接口描述
本接口用于为GaiaDB集群绑定标签。
请求结构
Plain Text
1POST /v{version}/tags HTTP/1.1
2HOST: gaiadb.bj.baidubce.com
3Authorization: authorization string
4{ "resources": [
5 {
6 "resourceId": "gaiadbxxxyyy",
7 "tags": [
8 {
9 "tagKey": "hello",
10 "tagValue": "world"
11 }
12 ]
13 }
14 ]
15}
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API 版本号 |
resources | List<Resource> | 是 | RequestBody参数 | 资源列表 |
Resource
参数名称 | 类型 | 是否必选 | 描述 |
---|---|---|---|
resourceId | String | 是 | 资源ID(集群实例ID) |
tags | List<Tag> | 是 | 标签列表 |
Tag
参数名称 | 类型 | 是否必选 | 描述 |
---|---|---|---|
tagKey | String | 是 | 标签Key |
tagValue | String | 是 | 标签Value |
返回头域
除公共头域,无其它特殊头域。
返回参数
无特殊返回参数。
请求示例
Plain Text
1POST /v1/tags HTTP/1.1
2HOST: gaiadb.bj.baidubce.com
3Content-Type: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
5{
6 "resources": [
7 {
8 "resourceId": "gaiadbxxxyyy",
9 "tags": [
10 {
11 "tagKey": "hello",
12 "tagValue": "world"
13 }
14 ]
15 }
16 ]
17}
返回示例
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 7869616F-7A68-6977-656E-406261696475
3Content-Type: application/json