Updated on 2024-04-08 GMT+08:00

Modifying Instance Specifications

Function

This API is used to modify instance specifications.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

engine

Yes

String

Message engine, which is rocketmq.

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

oper_type

Yes

String

Change type.

Options:

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

  • horizontal: Add brokers without changing the storage space of each broker.

  • vertical: Scale up the broker flavor without changing the broker quantity and storage.

new_storage_space

No

Integer

This parameter is valid and mandatory when oper_type is set to storage or horizontal. Instance storage space = Broker quantity × 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

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

new_broker_num

No

Integer

Broker quantity.

This parameter is mandatory when oper_type is set to horizontal.

publicip_id

No

String

ID of the EIP bound to the instance. Use commas (,) to separate multiple EIP IDs. This parameter is mandatory when oper_type is horizontal and public access is enabled.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

ID of the specification modification task.

Example Requests

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

{
  "oper_type" : "horizontal",
  "new_product_id" : "c6.4u8g.cluster"
}

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.