Retrieves the effective user scope of a specified control policy.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:GetPolicyUserScope |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID of the bastion host to which the control policy belongs. Note
You can invoke the DescribeInstances operation to obtain this parameter. |
bastion-xxxx-xx |
| RegionId |
string |
No |
The region ID of the bastion host instance to which the control policy belongs. Note
For the mapping between region IDs and region names, see Regions and zones. |
cn-hangzhou |
| PolicyId |
string |
Yes |
The ID of the control policy to query. Note
You can call the ListPolicies operation to obtain this parameter. |
1 |
| ProjectId |
integer |
No |
The project ID. |
3 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The unique request ID generated by Alibaba Cloud for this request. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| UserScope |
object |
The effective user scope of the control policy. |
|
| ScopeType |
string |
The effective user scope of the control policy. Note
|
All |
| UserGroupIds |
array |
The user groups to which the control policy applies. |
|
|
string |
The user group ID. |
["1", "2", "3"] |
|
| UserIds |
array |
The effective user scope of the control policy. |
|
|
string |
The user ID. |
["1", "2", "3"] |
Examples
Success response
JSON format
{
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"UserScope": {
"ScopeType": "All",
"UserGroupIds": [
"[\"1\", \"2\", \"3\"]"
],
"UserIds": [
"[\"1\", \"2\", \"3\"]"
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The argument is invalid. | The argument is invalid. |
| 500 | InternalError | An unknown error occurred. | An unknown error occurred. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.