Updating Stream Information
Function
This API is used to update the information about specified streams.
URI
PUT /v3/{project_id}/streams/{stream_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
stream_name |
Yes |
String |
Name of the stream whose partition quantity needs to be changed. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
stream_name |
Yes |
String |
Name of the stream to be updated. Maximum: 64 |
data_duration |
No |
Integer |
Data retention period Value range: 24–72 Unit: hour Default value: 24 If this parameter is left unspecified, the default value will be used. Maximum: 168 Default: 24 |
data_type |
No |
String |
Source data type
Default value: BLOB Enumeration values:
|
data_schema |
No |
String |
Source data structure that defines JSON and CSV formats. It is described in the syntax of the Avro schema. |
auto_scale_enabled |
No |
Boolean |
Whether to enable auto scaling
Default: false Enumeration values:
|
auto_scale_min_partition_count |
No |
Long |
Minimum number of partitions for automatic scale-down when auto scaling is enabled. Minimum: 1 |
auto_scale_max_partition_count |
No |
Long |
Maximum number of partitions for automatic scale-up when auto scaling is enabled. |
Response Parameters
None
Example Requests
Updating Lifecycles of Streams
PUT https://{Endpoint}/v3/{project_id}/streams/{stream_name} { "stream_name" : "stz_test", "data_duration" : 48 }
Updating Stream Types
PUT https://{Endpoint}/v3/{project_id}/streams/{stream_name} { "stream_name" : "stz_test", "data_type" : "JSON" }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
204 |
Normal response. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot