You can call the UpdateClusterAuditLogConfig operation to enable or disable the audit log feature in a Container Service for Kubernetes (ACK) cluster and update the audit log configuration. This operation also allows you to record requests to the Kubernetes API and the responses, which can be used to trace cluster operation history and troubleshoot cluster issues.
Operation description
Before you call this operation, ensure that you understand the billing methods and pricing of Simple Log Service.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:UpdateClusterAuditLogConfig |
none |
*Cluster
|
None | None |
Request syntax
PUT /clusters/{clusterid}/audit_log HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| clusterid |
string |
No |
The cluster ID. |
c82e6987e2961451182edacd74faf**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| sls_project_name |
string |
No |
The Simple Log Service project to which the Logstore storing the cluster audit logs belongs.
|
k8s-log-c82e6987e2961451182edacd74faf**** |
| disable |
boolean |
No |
Enable or disable audit logging.
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| cluster_id |
string |
The cluster ID. |
c93095129fc41463aa455d89444fd**** |
| request_id |
string |
The ID of the request. |
48BD70F6-A7E6-543D-9F23-08DEB764**** |
| task_id |
string |
The ID of the task. |
T-5faa48fb31b6b8078d00**** |
Examples
Success response
JSON format
{
"cluster_id": "c93095129fc41463aa455d89444fd****",
"request_id": "48BD70F6-A7E6-543D-9F23-08DEB764****",
"task_id": "T-5faa48fb31b6b8078d00****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.