实例扩容
URI
POST /v2/{engine}/{project_id}/instances/{instance_id}/extend
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
engine |
是 |
String |
消息引擎。 |
project_id |
是 |
String |
项目ID,获取方式请参见获取项目ID。 |
instance_id |
是 |
String |
实例ID。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
oper_type |
是 |
String |
变更类型。 取值范围:
|
new_storage_space |
否 |
Integer |
扩容后的存储空间。 当oper_type类型是storage或horizontal时,该参数有效且必填。 实例存储空间 = 代理数量 * 每个broker的存储空间。 当oper_type类型是storage时,代理数量不变,每个broker存储空间最少扩容100GB。 当oper_type类型是horizontal时,每个broker的存储空间不变。 |
new_broker_num |
否 |
Integer |
当oper_type参数为horizontal时,该参数有效。 |
new_product_id |
否 |
String |
垂直扩容时的新产品ID。 当oper_type类型是vertical时,该参数才有效且必填。 产品ID可以从查询产品规格列表获取。 |
publicip_id |
否 |
String |
实例绑定的弹性IP地址的ID。 以英文逗号隔开多个弹性IP地址的ID。 当oper_type类型是horizontal时,该参数必填。 |
tenant_ips |
否 |
Array of strings |
指定的内网IP地址,仅支持指定IPv4。 指定的IP数量只能小于等于新增节点数量。 当指定IP小于节点数量时,未指定的节点随机分配内网IP地址。 |
second_tenant_subnet_id |
否 |
String |
实例扩容时新节点使用备用子网的id 当实例扩容使用备用子网,则传入此值 需要联系客服添加白名单才能传入此值 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
job_id |
String |
规格变更任务ID。 |
请求示例
- 扩容存储空间(按需实例)。
POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/extend { "oper_type" : "storage", "new_storage_space" : 600 }
- 扩容代理数量(按需实例)。
POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/extend { "oper_type" : "horizontal", "new_storage_space" : 1600, "new_broker_num" : 4, "tenant_ips" : [ "127.0.0.1", "127.0.0.2", "127.0.0.3" ] }
- 扩容代理规格(按需实例)。
POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/extend { "oper_type" : "vertical", "new_product_id" : "c6.4u8g.cluster" }
响应示例
状态码: 200
实例扩容成功。
{ "job_id" : "93b94287-728d-4bb1-a158-cb66cb0854e7" }
状态码
状态码 |
描述 |
---|---|
200 |
实例扩容成功。 |
错误码
请参见错误码。