Modifying Instance Configurations¶
Function¶
This API is used to modify instance configurations.
URI¶
PUT /v2/{project_id}/instances/{instance_id}/configs
Parameter | Mandatory | Type | Description |
---|---|---|---|
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¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
kafka_configs | No | Array of ModifyInstanceConfig objects | Configurations to be modified. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
name | No | String | Names of configurations to be modified. |
value | No | String | New value of the modified configuration. |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
job_id | String | Configuration modification task ID. |
dynamic_config | Integer | Number of dynamic configuration parameters to be modified. |
static_config | Integer | Number of static configuration parameters to be modified. |
Example Requests¶
Modifying the threshold for idle connection timeout and the log deletion interval.
PUT https://{endpoint}/v2/{project_id}/instances/{instance_id}/configs
{
"kafka_configs" : [ {
"name" : "connections.max.idle.ms",
"value" : "500000"
}, {
"name" : "log.retention.hours",
"value" : "66"
} ]
}
Example Responses¶
Status code: 200
Configuration modified.
{
"job_id" : "8abfa7b38ba79a20018ba9afc550576a",
"dynamic_config" : 0,
"static_config" : 2
}
Status Codes¶
Status Code | Description |
---|---|
200 | Configuration modified. |
Error Codes¶
See Error Codes.