Menanyakan kebijakan akses suatu kredensial tertentu.
Deskripsi operasi
-
Untuk informasi mengenai kebijakan akses yang diperlukan agar pengguna RAM atau peran RAM dapat memanggil OpenAPI ini, lihat Resource Access Management.
-
Nama kebijakan kredensial hanya dapat diatur ke default. Oleh karena itu, Anda harus menetapkan parameter PolicyName ke default saat menanyakan kebijakan kredensial. Jika tidak, kesalahan
Not Foundakan dikembalikan.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| SecretName |
string |
Yes |
Nama atau Alibaba Cloud Resource Name (ARN) kredensial. Catatan
Jika Anda mengakses kredensial milik Akun Alibaba Cloud lain, Anda harus menentukan ARN kredensial tersebut. ARN kredensial harus dalam format |
secret_test |
| PolicyName |
string |
No |
Nama kebijakan kredensial. Hanya bidang statis default yang didukung. |
default |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. ID ini merupakan pengidentifikasi unik yang dihasilkan oleh Alibaba Cloud untuk permintaan tersebut. Anda dapat menggunakan ID ini untuk pemecahan masalah dan pelacakan isu. |
381D5D33-BB8F-395F-8EE4-AE3BB4B523C8 |
| Policy |
string |
Kebijakan kredensial. |
{"Version":"1","Statement": [{"Sid":"kms default secret policy","Effect":"Allow","Principal":{"RAM": ["acs:ram::119285303511****:*"]},"Action":["kms:*"],"Resource": ["*"] }] } |
Contoh
Respons sukses
JSONformat
{
"RequestId": "381D5D33-BB8F-395F-8EE4-AE3BB4B523C8",
"Policy": "{\"Version\":\"1\",\"Statement\": [{\"Sid\":\"kms default secret policy\",\"Effect\":\"Allow\",\"Principal\":{\"RAM\": [\"acs:ram::119285303511****:*\"]},\"Action\":[\"kms:*\"],\"Resource\": [\"*\"] }] }"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is not valid. | An invalid value is specified for the parameter. |
| 400 | MissingParameter | The parameter needed but no provided. | The required parameters are not specified. |
| 400 | Forbidden.NoPermission | This operation is forbidden by permission system. | You are not authorized to perform this operation. |
| 400 | Forbidden.KeyPolicyUnSupported | The specified key does not support key policy. | The specified key does not support key policies. |
| 403 | Forbidden.DKMSInstanceStateInvalid | The DKMS instance state is invalid. | Your dedicated KMS instance is invalid. |
| 404 | Forbidden.ResourceNotFound | Resource not found. | The resource is not found. |
| 404 | Forbidden.KeyNotFound | The specified Key is not found. | The error message returned because the specified CMK does not exist. |
| 503 | SerivceUnvailableTemporary | Service Unvailable Temporary | The service is temporarily unavailable. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.