Domain name for API request: tke.tencentcloudapi.com.
This API is used to create log collection configuration.
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: CreateCLSLogConfig. |
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. |
LogConfig | Yes | String | Log collection configuration in json form |
ClusterId | Yes | String | Cluster ID |
LogsetId | No | String | CLS Logset ID |
ClusterType | No | String | Current cluster types support tke, eks. |
Parameter Name | Type | Description |
---|---|---|
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 create the collection rules as calling.
https://tke.tencentcloudapi.com/?Action=CreateCLSLogConfig
&LogConfig={\"apiVersion\":\"cls.cloud.tencent.com/v1\",\"kind\":\"LogConfig\",\"metadata\":{\"name\":\"stdout\"},\"spec\":{\"clsDetail\":{\"logType\":\"minimalist_log\",\"logFormat\":\"default\",\"topicId\":null,\"userDefineRule\":null,\"extractRule\":{\"timeKey\":null,\"timeFormat\":null,\"delimiter\":null,\"logRegex\":null,\"beginningRegex\":null,\"keys\":[],\"filterKeys\":[],\"filterRegex\":[],\"unMatchUpload\":\"false\",\"unMatchedKey\":null,\"backtracking\":\"0\"},\"topicName\":null,\"indexs\":[],\"region\":null},\"inputDetail\":{\"type\":\"container_stdout\",\"containerStdout\":{\"allContainers\":false,\"namespace\":null,\"workloads\":[{\"namespace\":\"default\",\"kind\":\"deployment\",\"name\":\"stdout\",\"container\":\"\"}],\"includeLabels\":null,\"container\":null,\"metadataLabels\":[]},\"containerFile\":null,\"hostFile\":null},\"kafkaDetail\":null}}
&ClusterId=cls-kaftesta
&<Common request parameters>
{
"Response": {
"RequestId": "f12a6e20-f950-4af9-8f8b-b6329a4961c2"
}
}
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.ClusterState | Cluster status error. |
FailedOperation.ComponentClientCommon | Internal client error. |
FailedOperation.ComponentClientHttp | Internal HTTP client error. |
FailedOperation.ComponentClientUnpack | Internal HTTP decapsulation failed. |
FailedOperation.CreateClsClient | Failed to create CLS Client. |
FailedOperation.CreateClsConfig | Failed to create CLS collection configuration. |
FailedOperation.CreateClsIndex | Failed to create CLS index. |
FailedOperation.CreateClsLogSet | Failed to create the CLS log set. |
FailedOperation.CreateClsMachineGroup | Failed to create CLS machine group. |
FailedOperation.CreateClsTopic | Failed to create CLS topic. |
FailedOperation.GetClsConfig | Failed to obtain CLS collection configuration. |
FailedOperation.GetClsConfigMachineGroups | Failed to obtain the machine group bound to the CLS collection configuration. |
FailedOperation.GetClsIndex | Failed to obtain CLS index configuration. |
FailedOperation.GetClsLogSet | Failed to query the topic set. |
FailedOperation.GetClsMachineGroup | Failed to obtain the CLS machine group. |
FailedOperation.GetClsMachineGroupConfigs | Failed to obtain the collection configuration bound to the CLS machine group. |
FailedOperation.GetClsTopic | Failed to obtain CLS log topic. |
FailedOperation.K8sClientBuildError | Failed to create the Kubernetes client. |
FailedOperation.KubeClientConnection | Failed to connect to the customer Kubernetes cluster. |
FailedOperation.KubeCommon | Kubernetes API error. |
FailedOperation.KubernetesClientBuildError | Failed to create the Kubernetes client. |
FailedOperation.KubernetesCreateOperationError | An error occurs while creating the cluster client. |
FailedOperation.KubernetesGetOperationError | |
FailedOperation.KubernetesInternal | Unknown Kubernetes error. |
FailedOperation.ModifyClsConfig | Failed to modify CLS collection configuration. |
FailedOperation.ModifyClsIndex | Failed to modify CLS index. |
FailedOperation.ModifyClsTopic | Failed to modify CLS log topic. |
InternalError.ComponentClientHttp | Internal HTTP client error |
InternalError.ComponentClinetHttp | Error while requesting (HTTP) other Tencent Cloud services |
InternalError.UnexceptedInternal | Internal error. |
InternalError.UnexpectedInternal | Unknown internal error. |
InvalidParameter.Param | Invalid parameter. |
Was this page helpful?