Domain name for API request: tke.tencentcloudapi.com.
This API is used to query Cluster Log (Auditing, Event, Common Log) Switch List.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeLogSwitches. |
Version | Yes | String | Common Params. The value used for this API: 2018-05-25. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
ClusterIds.N | Yes | Array of String | List of cluster IDs |
ClusterType | No | String | Cluster Type, TKE or EKS |
Parameter Name | Type | Description |
---|---|---|
SwitchSet | Array of Switch | Cluster log switch collection Note: This field may return "null", indicating that no valid value can be obtained. |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to obtain container log component switch information.
POST / HTTP/1.1
Host: tke.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeLogSwitches
<Common request parameters>
{
"ClusterType": "tke",
"ClusterIds": [
"cls-dpla09lf",
"cls-oh0o9d8f",
"cls-9r7hfd5h"
]
}
{
"Response": {
"RequestId": "bd5b2352-8900-4ab7-b79b-2f51f2e92c26",
"SwitchSet": [
{
"Audit": {
"Enable": false,
"LogsetId": "",
"TopicId": "",
"TopicRegion": "",
"UpgradeAble": false,
"Version": ""
},
"ClusterId": "cls-oh0o9d8f",
"Event": {
"Enable": false,
"LogsetId": "",
"TopicId": "",
"TopicRegion": "",
"UpgradeAble": false,
"Version": ""
},
"Log": {
"Enable": false,
"LogsetId": "",
"TopicId": "",
"TopicRegion": "",
"UpgradeAble": false,
"Version": ""
},
"MasterLog": {
"Enable": false,
"LogsetId": "",
"TopicId": "",
"TopicRegion": "",
"UpgradeAble": false,
"Version": ""
}
},
{
"Audit": {
"Enable": true,
"LogsetId": "d12706e7-ae3b-42cf-9dab-d41e71482193",
"TopicId": "77b6130b-81cf-46dc-9faf-8d4b5afca77f",
"TopicRegion": "ap-chengdu",
"UpgradeAble": false,
"Version": ""
},
"ClusterId": "cls-dpla09lf",
"Event": {
"Enable": true,
"LogsetId": "d12706e7-ae3b-42cf-9dab-d41e71482193",
"TopicId": "ec5a1f8e-5234-419b-bf10-e5789e325bdf",
"TopicRegion": "ap-chengdu",
"UpgradeAble": false,
"Version": ""
},
"Log": {
"Enable": true,
"LogsetId": "",
"TopicId": "",
"TopicRegion": "",
"UpgradeAble": false,
"Version": "1.1.14"
},
"MasterLog": {
"Enable": false,
"LogsetId": "",
"TopicId": "",
"TopicRegion": "",
"UpgradeAble": false,
"Version": ""
}
},
{
"Audit": {
"Enable": true,
"LogsetId": "299ec2db-8139-4f4c-8f83-6022e427df65",
"TopicId": "72d439f2-befa-47cb-924b-39c2d7a64d0b",
"TopicRegion": "ap-chengdu",
"UpgradeAble": false,
"Version": ""
},
"ClusterId": "cls-9r7hfd5h",
"Event": {
"Enable": true,
"LogsetId": "299ec2db-8139-4f4c-8f83-6022e427df65",
"TopicId": "20408e26-932a-4400-a0c8-c5874669265b",
"TopicRegion": "ap-chengdu",
"UpgradeAble": false,
"Version": ""
},
"Log": {
"Enable": true,
"LogsetId": "",
"TopicId": "",
"TopicRegion": "",
"UpgradeAble": false,
"Version": "1.1.14"
},
"MasterLog": {
"Enable": false,
"LogsetId": "",
"TopicId": "",
"TopicRegion": "",
"UpgradeAble": false,
"Version": ""
}
}
]
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation | Operation failed. |
FailedOperation.ComponentClientUnpack | Internal HTTP decapsulation failed. |
FailedOperation.KubernetesListOperationError | Failed to obtain the kubernetes resource list. |
FailedOperation.RBACForbidden | The sub-account does not have the required RBAC permissions. |
InternalError | Internal error. |
InternalError.KubernetesClientBuildError | Failed to create the kubernetes client. |
InternalError.KubernetesGetOperationError | Failed to obtain the kubernetes resources |
InternalError.Param | Parameter error. |
InternalError.UnexceptedInternal | Internal error. |
InternalError.UnexpectedInternal | Unknown internal error. |
Was this page helpful?