Creating a Configuration File
Function
This API is used to generate a configuration file that defines a data migration solution for a Logstash cluster. Based on this configuration file, the Logstash cluster can ingest data from multiple data sources and migrate the data to the specified destinations.
Calling Method
For details, see Calling APIs.
URI
POST /v1.0/{project_id}/clusters/{cluster_id}/lgsconf/submit
|
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 Value range: Project ID of the account. Default value: N/A |
|
cluster_id |
Yes |
String |
Definition: ID of the cluster where the configuration file is to be created. For details about how to obtain the cluster ID, see Obtaining the Cluster ID. Constraints: N/A Value range: Cluster ID. Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Definition: Configuration file name. Constraints: N/A Value range: It can contain 4 to 32 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
|
conf_content |
Yes |
String |
Definition: Configuration file content. Constraints: N/A Value range: Less than 50 KB 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 list of sensitive character strings to be hidden. For items that you enter in this box, the corresponding strings will be replaced with *** in the configurations. 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 Value range: Enter a maximum of 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 Value range: 1 to 5 times the number of the node's vCPUs Default value: Number of vCPUs. |
|
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 valid only when queue_type=memory. 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 valid only when queue_type=memory. Value range: 1-100000 Default value: 1024 |
Response Parameters
Status code: 200
Request succeeded.
None
Example Requests
Configure an entity object.
POST https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/lgsconf/submit
{
"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.