将一个或多个负载实例绑定到指定的集群中。
接口说明
请求说明
HiveId 是必填参数,表示要绑定负载的目标集群 ID。
InstanceIds 是必填参数,表示要绑定到集群中的负载 ID 列表。
如果尝试绑定已经存在于目标集群中的负载 ID,则会返回错误信息。
绑定操作成功后,返回的成功和失败的负载实例列表可以帮助用户了解哪些负载已成功绑定,哪些未成功绑定及其原因。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| HiveId |
string |
是 |
集群 ID |
hive-xxxx-xxx-xxx |
| InstanceIds |
array |
是 |
负载 ID 列表 |
['acp-c4b9pbj4fzkagfexv', 'acp-c4b9pbj4fzkagfexw'] |
|
string |
否 |
负载 ID |
['ew-g24n2ql2sdozw6hl2'] |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID |
xxxx-xxx-xxx |
| SuccessInstanceCount |
integer |
成功数量 |
5 |
| FailedInstanceCount |
integer |
失败的数量 |
0 |
| SuccessInstances |
array<object> |
成功的实例列表 |
|
|
object |
成功的负载信息 |
||
| InstanceId |
string |
实例 ID |
ew-1226d588c69449209ee963161c067b04 |
| Message |
string |
消息 |
SUCCESS |
| FailedInstances |
array<object> |
失败的实例列表 |
|
|
object |
失败的负载信息 |
||
| InstanceId |
string |
负载 ID |
ew-1226d588c69449209ee963161c067b04 |
| Message |
string |
错误信息 |
Error 1062 (23000): Duplicate entry 'hive-4fbf3928d40e43948b98acdb4fb5aaed-ew-1226d588c69449209ee9631' for key 'PRIMARY' |
示例
正常返回示例
JSON格式
{
"RequestId": "xxxx-xxx-xxx",
"SuccessInstanceCount": 5,
"FailedInstanceCount": 0,
"SuccessInstances": [
{
"InstanceId": "ew-1226d588c69449209ee963161c067b04",
"Message": "SUCCESS"
}
],
"FailedInstances": [
{
"InstanceId": "ew-1226d588c69449209ee963161c067b04",
"Message": "Error 1062 (23000): Duplicate entry 'hive-4fbf3928d40e43948b98acdb4fb5aaed-ew-1226d588c69449209ee9631' for key 'PRIMARY'"
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。