Updated on 2026-04-30 GMT+08:00

Modifying Instance Specifications

Function

This API is used to change instance specifications.

URI

POST /v2/{engine}/{project_id}/instances/{instance_id}/extend

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

engine

Yes

String

Definition

Message engine type. rocketmq is available.

Constraints

N/A

Range

N/A

Default Value

N/A

project_id

Yes

String

Definition

Project ID. For details about how to obtain it, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID. You can call the API for querying all instances to obtain the instance ID. The instance ID is in the response body.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

oper_type

Yes

String

Definition

Change type.

Constraints

N/A

Range

  • storage: Expand the storage without changing the broker quantity.

  • horizontal: Scale up the RocketMQ 5.x instance specification.Increase the RocketMQ 4.8.0 broker quantity.

  • vertical: Scale up the broker flavor without changing the broker quantity and storage. Only available for RocketMQ 4.8.0.

Default Value

N/A

new_storage_space

No

Integer

Definition

New storage specification

Constraints

This parameter is valid and mandatory when oper_type is set to storage.

  • If oper_type is set to storage, 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.

Range

N/A

Default Value

N/A

new_product_id

No

String

Definition

New product ID

Constraints

  • For RocketMQ 5.x: this parameter is valid and mandatory if oper_type is set to horizontal. Specification changes are only for cluster instances.

  • For RocketMQ 4.8.0: this parameter is valid and mandatory if oper_type is set to vertical. Specification changes are only for cluster instances.

Range

N/A

Default Value

N/A

new_broker_num

No

Integer

Definition

Broker quantity

Constraints

This parameter is mandatory when oper_type is set to horizontal.

Range

N/A

Default Value

N/A

publicip_id

No

String

Definition

ID of the EIP bound to the instance. Use commas (,) to separate multiple EIP IDs.

Constraints

This parameter is mandatory when oper_type is horizontal and public access is enabled.

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

Definition

ID of the specification modification task.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Requests

POST https://{endpoint}/v2/rocketmq/{project_id}/instances/{instance_id}/extend

{
  "oper_type" : "horizontal",
  "new_product_id" : "rocketmq.b2.large.8"
}

Example Responses

Status code: 200

Instance specifications modified.

{
  "job_id" : "93b94287-728d-4bb1-a158-cb66cb0854e7"
}

Status Codes

Status Code

Description

200

Instance specifications modified.

Error Codes

See Error Codes.