Anda dapat memilih tipe kebijakan keamanan di kluster ACK, mengonfigurasi tindakan penegakan dan cakupan terkait, serta membuat dan menerapkan instans kebijakan. Anda dapat memanggil operasi DescribePolicyInstances untuk mengambil detail instans aturan kebijakan tertentu di kluster, seperti deskripsi kebijakan dan tingkat tata kelola.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:DescribePolicyInstances |
get |
*Cluster
|
None | None |
Sintaks permintaan
GET /clusters/{cluster_id}/policies HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| cluster_id |
string |
Yes |
ID kluster. |
c8155823d057948c69a**** |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| policy_name |
string |
No |
Nama aturan tata kelola kebijakan. |
ACKPSPCapabilities |
| instance_name |
string |
No |
Nama instans kebijakan. |
allowed-repos-cz4s2 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
array |
Daftar instans kebijakan. |
||
|
object |
策略实例。 |
||
| ali_uid |
string |
策略实例实施者 UID。 |
16298168**** |
| cluster_id |
string |
目标集群 ID。 |
c8155823d057948c69a**** |
| instance_name |
string |
规则实例名称。 |
no-env-var-secrets-**** |
| policy_name |
string |
策略治理规则名称。 |
ACKPSPCapabilities |
| policy_category |
string |
策略类型名称。 |
k8s-general |
| policy_description |
string |
规则模板描述。 |
Restricts secrets used in pod envs |
| policy_parameters |
string |
当前规则实例的配置参数。 |
"restrictedNamespaces": [ "test" ] |
| policy_severity |
string |
规则实例治理等级。 |
low |
| policy_scope |
string |
策略实例实施范围: 默认"*"代表集群所有命名空间。 否则返回作用 Namespaces 名称,多个 Namespaces 以逗号(,)分隔。 |
* |
| policy_action |
string |
规则治理动作,取值:
|
deny |
Created
deprecated
|
string |
创建时间(已废弃,请勿使用)。 |
2024-10-29T18:09:12+08:00 |
Updated
deprecated
|
string |
更新时间(已废弃,请勿使用)。 |
2024-10-29T18:09:12+08:00 |
resource_id
deprecated
|
string |
资源 ID(已废弃,请勿使用)。 |
123456*** |
total_violations
deprecated
|
integer |
集群中处理违规计数(已废弃,请勿使用)。 |
0 |
is_deleted
deprecated
|
integer |
删除状态(已废弃,请勿使用)。 |
0 |
Contoh
Respons sukses
JSONformat
[
{
"ali_uid": "16298168****",
"cluster_id": "c8155823d057948c69a****",
"instance_name": "no-env-var-secrets-****",
"policy_name": "ACKPSPCapabilities",
"policy_category": "k8s-general",
"policy_description": "Restricts secrets used in pod envs",
"policy_parameters": "\"restrictedNamespaces\": [ \"test\" ]",
"policy_severity": "low",
"policy_scope": "*",
"policy_action": "deny",
"Created": "2024-10-29T18:09:12+08:00",
"Updated": "2024-10-29T18:09:12+08:00",
"resource_id": "123456***",
"total_violations": 0,
"is_deleted": 0
}
]
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.