Updating a Configuration File
Function
This API is used to update the configuration file of a Logstash cluster.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
URI
POST /v1.0/{project_id}/clusters/{cluster_id}/lgsconf/update
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. Constraints N/A Range Project ID of an account. The value contains 32 characters, consisting of lowercase letters and digits. Default Value N/A |
| cluster_id | Yes | String | Definition ID of the cluster where the configuration file is to be updated. For details about how to obtain the cluster ID, see Obtaining the Cluster ID. Constraints N/A Range The value is a UUID containing 36 characters. Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Definition Configuration file name. Constraints N/A Range The value can contain 4 to 32 characters and must start with a letter. Only digits, letters, hyphens (-), and underscores (_) are allowed. Default Value N/A |
| conf_content | Yes | String | Definition Configuration file content. Constraints Less than 50 KB Range N/A Default Value N/A |
| setting | Yes | setting object | Definition: Configure an entity object. Constraints: N/A Value range: N/A Default value: N/A |
| sensitive_words | No | Array of strings | Definition: Sensitive character replacement. Enter the sensitive character strings you want to hide. For items that you enter in this box, the corresponding strings will be replaced with *** in the configuration file. Constraints: You can enter a maximum of 20 strings, each with a maximum length of 512 bytes. Value range: N/A Default value: N/A |
| desc | No | String | Definition Configuration file description. Constraints N/A Range The value can contain at most 128 characters. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workers | No | Integer | Definition Number of worker threads that will execute the Filters and Outputs stages of the pipeline in parallel. Constraints N/A Range 1 to 5 times the number of the node's vCPUs Default Value CPU cores of a node |
| batch_size | No | Integer | Definition: Maximum number of events that a worker thread collects from inputs before attempting to execute its filters and outputs. A larger value is more effective but increases memory overhead. Constraints: N/A Value range: 1-100000 Default value: 125 |
| batch_delay_ms | No | Integer | Definition: Minimum waiting time of an event to be scheduled by the pipeline. The unit is millisecond. Constraints: N/A Value range: 1-600000 Default value: 50 |
| queue_type | Yes | String | Definition: An internal queue for event buffering. Constraints: N/A Value range: Default value: N/A |
| queue_check_point_writes | No | Integer | Definition: Maximum number of written events before forcing a checkpoint when persistent queues are enabled. Constraints: This parameter is available only when queue_type=persisted. Value range: 1-40960 Default value: 1024 |
| queue_max_bytes_mb | No | Integer | Definition: Total capacity (in MB) of a persistent queue if persistent queues are used. Make sure the disk capacity is greater than the value of this parameter. Constraints: This parameter is available only when queue_type=persisted. Value range: 1-100000 Default value: 1024 |
Response Parameters
Status code: 200
Request succeeded.
None
Example Requests
Update the configuration file.
POST https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/lgsconf/update
{
"name" : "conf",
"desc" : "This is a description of a configuration file.",
"conf_content" : "xxxxxxxx",
"setting" : {
"workers" : 2,
"batch_size" : 125,
"batch_delay_ms" : 50,
"queue_type" : "persisted",
"queue_check_point_writes" : 1024,
"queue_max_bytes_mb" : 1024
}
} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
| 400 | Invalid request. The client should modify the request instead of re-initiating it. |
| 409 | The request cannot be processed due to a conflict. This status code indicates that the resource that the client attempts to create already exits, or the requested update failed due to a conflict. |
| 412 | The server did not meet one of the preconditions contained in the request. |
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