Updated on 2023-08-29 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.

Default: kafka

project_id

Yes

String

Project ID. For details about how to obtain it, 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

Type of the change.

Value:

  • storage: Expand the storage space without adding brokers.

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

  • vertical: Modify the underlying flavor of brokers without adding brokers or storage space.

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_broker_num

No

Integer

This parameter is valid only when oper_type is set to horizontal.

A maximum of 30 brokers are supported.

new_product_id

No

String

New product ID for scale-up.

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

Obtain the product ID from Querying Product Specifications List.

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 set to horizontal.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

ID of the specification modification task.

Example Requests

  • Expanding the storage space (pay-per-use)

    POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/extend
    
    {
      "oper_type" : "storage",
      "new_storage_space" : 600
    }
  • Adding brokers (pay-per-use)

    POST https://{endpoint}/v2/{engine}/{project_id}/instances/{instance_id}/extend
    
    {
      "oper_type" : "horizontal",
      "new_storage_space" : 1600,
      "new_broker_num" : 4
    }
  • 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.