Memperbarui instans aturan kebijakan di kluster tertentu. Anda dapat mengubah aksi tata kelola (peringatan atau blokir) dan cakupan (dalam OAuth) namespace tempat instans kebijakan berlaku.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:ModifyPolicyInstance |
update |
*Cluster
|
None | None |
Sintaks permintaan
PUT /clusters/{cluster_id}/policies/{policy_name} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| cluster_id |
string |
Yes |
ID kluster target. |
c8155823d057948c69a**** |
| policy_name |
string |
Yes |
Nama aturan tata kelola kebijakan. |
ACKAllowedRepos |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Parameter permintaan. |
|
| action |
string |
No |
Aksi tata kelola aturan. Nilai valid:
|
deny |
| instance_name |
string |
No |
ID instans aturan kebijakan. |
allowed-repos-cbhhb |
| namespaces |
array |
No |
Namespace tempat kebijakan berlaku. Nilai kosong menunjukkan semua namespace. |
|
|
string |
No |
Cakupan (dalam OAuth) instans kebijakan. Nilai default: "", yang menunjukkan semua namespace di kluster. |
["test3","test4"] |
|
| parameters |
object |
No |
Parameter konfigurasi instans aturan saat ini. Untuk informasi lebih lanjut tentang aturan pengaturan parameter, lihat Aturan kebijakan keamanan kontainer. |
"restrictedNamespaces": [ "test" ] |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| instances |
array |
Daftar instans yang diperbarui. |
|
|
string |
Daftar instans yang diperbarui. |
[ "allowed-repos-kqxnc" ] |
Contoh
Respons sukses
JSONformat
{
"instances": [
"[ \"allowed-repos-kqxnc\" ]"
]
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.