Mencabut izin pada database dan akun database dari pengguna.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:DetachDatabaseAccountsFromUser |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID bastion host. Catatan
Anda dapat memanggil operasi DescribeInstances untuk mengkueri ID bastion host. |
bastionhost-cn-pe335ipfk01 |
| RegionId |
string |
No |
ID wilayah bastion host. Catatan
Untuk informasi lebih lanjut mengenai pemetaan antara ID wilayah dan nama wilayah, lihat Wilayah dan zona. |
cn-shanghai |
| UserId |
string |
Yes |
ID pengguna yang ingin Anda cabut izinnya pada database dan akun database. Catatan
Anda dapat memanggil operasi ListUsers untuk mengkueri ID pengguna. |
1 |
| Databases |
array<object> |
No |
Database. |
|
|
object |
No |
|||
| DatabaseId |
string |
No |
The ID of the database on which you want to revoke permissions. |
8 |
| DatabaseAccountIds |
array |
No |
An array that consists of database account IDs. |
|
|
string |
No |
The IDs of the database accounts on which you want to revoke permissions. |
["1","2","3"] |
Struktur data parameter permintaan.
Database.
| Parameter | Tipe | Deskripsi |
| DatabaseId | string | ID database. |
| DatabaseAccountIds | array[string] | Array yang terdiri dari ID akun database. Tentukan string JSON. Anda dapat menentukan hingga 10 ID akun database. |
Kode berikut menyediakan contoh nilai untuk Databases:
[
{"DatabaseId":"1"} // Mencabut izin pada database dan akun database.
{"DatabaseId":"2","DatabaseAccountIds":["1","2","3",...]}, // Mencabut izin hanya pada akun database.
{"DatabaseId":"5","DatabaseAccountIds":[]} // Tidak didukung.
...
]
```.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
79D7E114-CB52-5695-AB15-12776C308387 |
| Results |
array<object> |
The result of the call. |
|
|
array<object> |
|||
| Code |
string |
The error code that is returned. If OK is returned, the operation was successful. If another error code is returned, the operation failed. |
OK |
| DatabaseAccounts |
array<object> |
A list that shows the operation results of the database accounts. |
|
|
object |
|||
| Code |
string |
The error code that is returned. If OK is returned, the operation was successful. If another error code is returned, the operation failed. |
OK |
| DatabaseAccountId |
string |
The ID of the database account on which the permissions are revoked. |
9 |
| Message |
string |
The error message that is returned. |
None |
| DatabaseId |
string |
The ID of the database on which the permissions are revoked. |
4 |
| Message |
string |
The error message that is returned. |
None |
| UserId |
string |
The user ID. |
1 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "79D7E114-CB52-5695-AB15-12776C308387",
"Results": [
{
"Code": "OK",
"DatabaseAccounts": [
{
"Code": "OK",
"DatabaseAccountId": "9",
"Message": "None"
}
],
"DatabaseId": "4",
"Message": "None",
"UserId": "1"
}
]
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The argument is invalid. | |
| 500 | InternalError | An unknown error occurred. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.