Get Role Policy Actions

GET/zstack/v1/identities/role/policy-actions

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/identities/role/policy-actions?showAllPolicies=false

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
systemTags (Optional)ListquerySystem tags 4.10.0
userTags (Optional)ListqueryUser tags 4.10.0
showAllPolicies (Optional)booleanqueryWhether to query all role policies in the system. If set to true, all role policies in the system are queried. If set to false, only the roles and policies owned by the current account are queried. 4.10.0

API Response

Response Example

{
  "policies": [
    ".header.identity.APIChangeResourceOwnerMsg",
    ".header.identity.APICheckResourcePermissionMsg",
    ".header.identity.APICreateAccountMsg",
    ".header.identity.APIDeleteAccountMsg",
    ".header.identity.APIGetAccountQuotaUsageMsg",
    ".header.identity.APIGetResourceAccountMsg",
    ".header.identity.APILogInByAccountMsg",
    ".header.identity.APILogOutMsg",
    ".header.identity.APIQueryAccountMsg",
    ".header.identity.APIQueryAccountResourceRefMsg",
    ".header.identity.APIQueryQuotaMsg",
    ".header.identity.APIRenewSessionMsg",
    ".header.identity.APIRevokeResourceSharingMsg",
    ".header.identity.APIShareResourceMsg",
    ".header.identity.APIUpdateAccountMsg",
    ".header.identity.APIUpdateQuotaMsg",
    ".header.identity.APIValidateSessionMsg"
  ]
}
NameTypeDescriptionStarting Version
inventoriesListAll matching actions4.10.0
successbooleanWhether the request is successful4.10.0
errorErrorCodeError code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error4.10.0

error

NameTypeDescriptionStarting Version
codeStringError code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.1001.0.6
descriptionStringBrief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null.0.6
opaqueLinkedHashMapReserved field. Default is null.0.6
causeErrorCodeRoot error. The source error that caused the current error. This field is null if no root error exists.0.6

SDK Examples

Java SDK

GetRolePolicyActionsAction action = new GetRolePolicyActionsAction();
action.showAllPolicies = false;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetRolePolicyActionsAction.Result res = action.call();

Python SDK

GetRolePolicyActionsAction action = GetRolePolicyActionsAction()
action.showAllPolicies = false
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetRolePolicyActionsAction.Result res = action.call()