Meng-query kebijakan akses dari secret tertentu dalam instans KMS.
Deskripsi operasi
-
Untuk informasi tentang 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 mengatur parameter PolicyName menjadi default saat Anda meng-query 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) dari kredensial. Catatan
Jika Anda mengakses kredensial yang dimiliki oleh akun Alibaba Cloud lain, Anda harus menentukan ARN kredensial tersebut. ARN kredensial harus dalam format |
secret_test |
| PolicyName |
string |
No |
Nama kebijakan kredensial. Hanya field 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 memecahkan dan menemukan masalah. |
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.