Mengambil cakupan aset kebijakan kontrol tertentu.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:GetPolicyAssetScope |
get |
*Semua sumber daya.
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans bastion host. Catatan
Anda dapat memanggil operasi DescribeInstances untuk mendapatkan parameter ini. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
ID wilayah bastion host. Catatan
Untuk pemetaan antara ID wilayah dan nama wilayah, lihat Regions and zones. |
cn-hangzhou |
| PolicyId |
string |
Yes |
ID kebijakan kontrol. Catatan
Anda dapat memanggil operasi ListPolicies untuk mendapatkan parameter ini. |
7 |
| ProjectId |
integer |
No |
ID proyek. |
3 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| AssetScope |
object |
Cakupan aset kebijakan kontrol. |
|
| Databases |
array<object> |
Daftar aset database tempat kebijakan kontrol berlaku. |
|
|
object |
|||
| AccountScopeType |
string |
Cakupan akun database tempat kebijakan kontrol berlaku. Nilai valid:
|
AccountId |
| DatabaseAccountIds |
array |
Daftar ID akun database tempat kebijakan kontrol berlaku. |
|
|
string |
ID akun database. |
3 |
|
| DatabaseId |
string |
ID instans database. |
17 |
| HostGroups |
array<object> |
Cakupan kelompok aset tempat kebijakan kontrol berlaku. |
|
|
object |
|||
| AccountNames |
array |
Cakupan akun aset tempat kebijakan kontrol berlaku. |
|
|
string |
Nama akun aset. |
root |
|
| AccountScopeType |
string |
Cakupan akun aset tempat kebijakan kontrol berlaku. Nilai valid:
|
All |
| HostGroupId |
string |
ID kelompok aset. |
4 |
| Hosts |
array<object> |
Cakupan host tempat kebijakan kontrol berlaku. |
|
|
object |
|||
| AccountScopeType |
string |
Cakupan akun host tempat kebijakan kontrol berlaku. Nilai valid:
|
All |
| HostAccountIds |
array |
Cakupan akun host tempat kebijakan kontrol berlaku. |
|
|
string |
ID akun host. |
3 |
|
| HostId |
string |
ID host. |
1 |
| ScopeType |
string |
Cakupan aset kebijakan kontrol. Catatan
|
All |
| RequestId |
string |
ID permintaan yang dihasilkan oleh Alibaba Cloud untuk permintaan ini. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
Contoh
Respons sukses
JSONformat
{
"AssetScope": {
"Databases": [
{
"AccountScopeType": "AccountId",
"DatabaseAccountIds": [
"3\n"
],
"DatabaseId": "17"
}
],
"HostGroups": [
{
"AccountNames": [
"root"
],
"AccountScopeType": "All",
"HostGroupId": "4"
}
],
"Hosts": [
{
"AccountScopeType": "All",
"HostAccountIds": [
"3"
],
"HostId": "1"
}
],
"ScopeType": "All"
},
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE"
}
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.