Memanggil AttachPolicy untuk menyambungkan kebijakan akses ke objek otorisasi (Pengguna RAM, kelompok pengguna RAM, atau Peran RAM) guna memberikan otorisasi. Setelah otorisasi selesai, objek yang diberi otorisasi memperoleh izin akses pada sumber daya dalam kelompok sumber daya atau akun Alibaba Cloud yang ditentukan.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceGroupId |
string |
Yes |
Cakupan (dalam OAuth) otorisasi. Nilai valid:
|
rg-9gLOoK**** |
| PolicyType |
string |
Yes |
Tipe kebijakan akses. Nilai valid:
|
System |
| PolicyName |
string |
Yes |
Nama Kebijakan kebijakan akses. Nama Kebijakan harus memiliki panjang 1 hingga 128 karakter dan dapat berisi huruf, angka, dan tanda hubung (-). |
AdministratorAccess |
| PrincipalType |
string |
Yes |
Tipe objek dari objek otorisasi. Nilai valid:
|
IMSUser |
| PrincipalName |
string |
Yes |
Nama objek otorisasi. Format bervariasi berdasarkan tipe:
Catatan
Alias akun merupakan bagian dari nama domain default. Panggil GetDefaultDomain untuk mendapatkan alias akun. |
alice@demo.onaliyun.com |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter tanggapan. |
||
| RequestId |
string |
ID permintaan. |
697852FB-50D7-44D9-9774-530C31EAC572 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "697852FB-50D7-44D9-9774-530C31EAC572"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.PolicyType | The specified policy type is invalid. | |
| 404 | EntityNotExist.Policy | The policy does not exist. | |
| 404 | EntityNotExists.ResourceGroup | The specified resource group does not exist. You must first create a resource group. | |
| 409 | Invalid.ResourceGroup.Status | You cannot perform an operation on a resource group that is being created or deleted. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.