Modifying Specifications of Instances with New Flavors
Function
This API is used to modify instance specifications.
URI
POST /v2/{engine}/{project_id}/instances/{instance_id}/extend
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
instance_id | Yes | String | Instance ID. |
engine | Yes | String | Message engine, which is rabbitmq. |
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
oper_type | Yes | String | Change type. Value range: storage: Expand the storage without changing the broker quantity. horizontal: Add brokers without resizing the storage space of each broker. vertical: Scale up the broker flavor without changing the broker quantity and storage. |
new_storage_space | No | Integer | New storage space. This parameter is valid and mandatory when oper_type is set to storage or horizontal. Instance storage space = Number of brokers x Storage space of each broker. If oper_type is set to storage, the number of brokers remains unchanged, and the storage space of each broker must be expanded by at least 100 GB. If oper_type is set to horizontal, the storage space of each broker remains unchanged. |
new_product_id | No | String | Flavor, such as c6.8u16g.cluster. This parameter is valid and mandatory when oper_type is set to vertical. |
new_broker_num | No | Integer | This parameter is valid only when oper_type is set to horizontal. |
new_spec_code | No | String | Old flavor, such as dms.instance.rabbitmq.cluster.c3.8u16g. When oper_type is set to horizontal, the value is dms.instance.rabbitmq.cluster.c3.8u16g.5 (5 is the broker quantity.) |
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
job_id | String | ID of the specification modification task. |
Example Requests
Expanding the storage space (pay-per-use, old flavors). new_spec_code is the original specification.
POST https://{endpoint}/{engine}/v2/{project_id}/instances/{instance_id}/extend{"new_storage_space" : 600,"oper_type" : "storage","new_spec_code" : "dms.instance.rabbitmq.cluster.c3.2u4g.3"}Adding brokers (pay-per-use, old flavors). new_storage_space is the space of the original specification. new_spec_code is dms.instance.rabbitmq.cluster.c3.2u4g.5 (5 is the broker quantity.)
POST https://{endpoint}/{engine}/v2/{project_id}/instances/{instance_id}/extend{"new_storage_space" : 600,"oper_type" : "horizontal","new_spec_code" : "dms.instance.rabbitmq.cluster.c3.2u4g.5"}Increasing broker flavors (pay-per-use, old flavors). For new_spec_code, replace the original specification with the new one. For example, replace 2u4g with 4u8g.
POST https://{endpoint}/{engine}/v2/{project_id}/instances/{instance_id}/extend{"new_storage_space" : 600,"oper_type" : "vertical","new_spec_code" : "dms.instance.rabbitmq.cluster.c3.2u4g.5"}Expanding the storage space (pay-per-use)
POST https://{endpoint}/{engine}/v2/{project_id}/instances/{instance_id}/extend{"new_storage_space" : 600,"oper_type" : "storage"}Adding brokers (pay-per-use)
POST https://{endpoint}/{engine}/v2/{project_id}/instances/{instance_id}/extend{"oper_type" : "horizontal","new_storage_space" : 500,"new_broker_num" : 5}Increasing the broker flavor (pay-per-use)
POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/extend{"oper_type" : "vertical","new_product_id" : "c6.4u8g.cluster"}
Example Responses
Status code: 200
Instance specifications are modified successfully.
{"job_id" : "93b94287-728d-4bb1-a158-cb66cb0854e7"}
Status Codes
Status Code | Description |
---|---|
200 | Instance specifications are modified successfully. |
Error Codes
See Error Codes.
- URI