Modifying Structuring Configurations (Recommended)
Function
This API is used to modify structuring configurations using a structuring template.
URI
PUT /v3/{project_id}/lts/struct/template
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID. Minimum: 32 Maximum: 32 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. For details about how to obtain a user token, see Obtaining a User Token. Minimum: 1000 Maximum: 2000 |
|
Content-Type |
Yes |
String |
Set this parameter to application/json;charset=UTF-8. Minimum: 30 Maximum: 30 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
log_group_id |
Yes |
String |
Log group ID. For details about how to obtain a log group ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID. Minimum: 36 Maximum: 36 |
|
log_stream_id |
Yes |
String |
Log stream ID. For details about how to obtain a log stream ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID. Minimum: 36 Maximum: 36 |
|
template_name |
Yes |
String |
Template name, which cannot be empty and will be verified. Minimum: 1 Maximum: 64 |
|
template_type |
Yes |
String |
Template type. The value can be built_in (system templates) or custom (custom templates). For details about system template types, see section "Log Search and Analysis" > "Setting Cloud Structuring Parsing" > "Setting a Structuring Template" in the LTS User Guide. |
|
template_id |
Yes |
String |
ID of the custom structuring template used for creating or modifying structuring settings. When a system template is used, this parameter can be left empty. The value is obtained from the API for querying a custom structuring template. |
Response Parameters
Status code: 201
The request is successful.
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
errorCode |
String |
Response error code. |
|
errorMessage |
String |
Response error message. |
|
isQueryComplete |
Boolean |
Whether the query is complete. |
|
queryComplete |
Boolean |
Whether the query is complete. |
|
remainIterationCount |
Integer |
Number of remaining iterations. |
Example Requests
-
Modifying an ELB system template
PUT https://{endpoint}/v3/{project_id}/lts/struct/template { "log_group_id" : "17f23e52-a23d-46e0-8bc5-xxxxxxxxxxxx", "log_stream_id" : "b4d56d47-b4c4-453e-9047-xxxxxxxxxxxx", "template_type" : "built_in", "template_name" : "ELB", "template_id" : "" } -
Modifying a VPC system template
PUT https://{endpoint}/v3/{project_id}/lts/struct/template { "log_group_id" : "17f23e52-a23d-46e0-8bc5-xxxxxxxxxxxx", "log_stream_id" : "b4d56d47-b4c4-453e-9047-xxxxxxxxxxxx", "template_type" : "built_in", "template_name" : "VPC", "template_id" : "" }
Example Responses
Status code: 201
The request is successful.
None
Status code: 400
BadRequest: Invalid request. Modify the request based on the description in errorMessage before a retry.
{
"errorCode" : "SVCSTG.ALS.200201",
"errorMessage" : "log_group_id must not be empty",
"isQueryComplete" : true,
"queryComplete" : true,
"remainIterationCount" : 0
}
Status Codes
|
Status Code |
Description |
|---|---|
|
201 |
The request is successful. |
|
400 |
BadRequest: Invalid request. Modify the request based on the description in errorMessage before a retry. |
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