You can call the GetClusterAuditProject operation to check whether the cluster has API Server auditing enabled and the corresponding Simple Log Service project that stores API Server audit logs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:GetClusterAuditProject |
get |
*Cluster
|
None | None |
Request syntax
GET /clusters/{clusterid}/audit HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| clusterid |
string |
Yes |
Cluster ID |
cad1230511cbb4db4a488e58518****** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| sls_project_name |
string |
The SLS project in which the audit logs of the API server are stored. |
k8s-log-cad1230511cbb4db4a488e58518****** |
| audit_enabled |
boolean |
Indicates whether the cluster auditing feature is enabled for the cluster.
|
true |
Examples
Success response
JSON format
{
"sls_project_name": "k8s-log-cad1230511cbb4db4a488e58518******\n",
"audit_enabled": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.