Help Center/ Data Ingestion Service/ API Reference/ API Description/ Stream Management/ Updating Auto Scaling Information of a Stream
Updated on 2025-11-25 GMT+08:00

Updating Auto Scaling Information of a Stream

Function

This API is used to update the auto scaling information of a stream.

Calling Method

For details, see Calling APIs.

URI

PUT /v2/{project_id}/streams/{stream_name}/update

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

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

Constraints

N/A

Range

The value can contain 1 to 64 characters. Only letters and digits are allowed.

Default Value

N/A

stream_name

Yes

String

Definition

Name of the stream whose auto scaling information is to be updated

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. For details, see Token-based Authentication.

Constraints

N/A

Range

The value can contain 1 to 32,768 characters.

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

auto_scale_enabled

No

Boolean

Definition

Whether to enable auto scaling

Constraints

N/A

Range

  • true: Auto scaling is enabled.

  • false: Auto scaling is disabled.

Default Value

false

auto_scale_min_partition_count

No

Long

Definition

Minimum number of partitions that can be automatically removed when auto scaling is enabled

Constraints

The minimum number of partitions that can be automatically removed cannot be greater than the maximum number of partitions that can be automatically added and cannot be less than 1.

Range

N/A

Default Value

N/A

auto_scale_max_partition_count

No

Integer

Definition

Maximum number of partitions that can be automatically added when auto scaling is enabled.

Constraints

The value cannot be less than 1.

Range

N/A

Default Value

N/A

update_type

No

String

Definition

Update type. The value is fixed at AUTO_SCALE.

Constraints

N/A

Range

AUTO_SCALE

Default Value

AUTO_SCALE

Response Parameters

Status code: 200

Success

None

Example Requests

Update the auto scaling information of a stream.

PUT https://{Endpoint}/v2/{project_id}/streams/{stream_name}/update

{
  "auto_scale_enabled" : true,
  "auto_scale_max_partition_count" : 1,
  "auto_scale_min_partition_count" : 1,
  "update_type" : "AUTO_SCALE"
}

Example Responses

None

Status Codes

Status Code

Description

200

Success

Error Codes

See Error Codes.