Help Center/ Log Tank Service/ API Reference/ APIs/ Multi-Account Log Aggregation/ Modifying the Log Aggregation Switch Status
Updated on 2024-01-16 GMT+08:00

Modifying the Log Aggregation Switch Status

Function

This API can be called only by administrators or delegated administrators to modify the status of the log aggregation switch.

Calling Method

For details, see Calling APIs.

URI

PUT /v1/{project_id}/lts/log-converge-config/switch

Table 1 Path Parameters

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.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

log_converge_switch

Yes

String

Switch parameters

Request Parameters

Table 3 Request header 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.

Content-Type

Yes

String

Set this parameter to application/json;charset=utf8.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

result

String

Result of modifying the log aggregation switch

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error description.

Minimum: 2

Maximum: 512

Example Requests

Log aggregation is enabled.

PUT https://{endpoint}/v1/{project_id}/lts/log-converge-config/switch

/v1/{project_id}/lts/log-converge-config/switch?log_converge_switch=true

Example Responses

Status code: 200

Response body for modifying the log aggregation switch

{
  "result" : "success"
}

Status Codes

Status Code

Description

200

Response body for modifying the log aggregation switch

400

Error response

Error Codes

See Error Codes.