Query Policy List

Last Updated on : 2023-10-09 08:06:36download

Query the detailed list of policies on pages.

API address

GET: /v2.0/cloud/iam/policy/list

Request parameter

Parameter nameTypeINRequiredDescription
last_row_keyLongqueryfalseThe ID of the specified starting policy. If it is left empty, the query is started from the first entry.
page_sizeIntegerquerytrueThe number of items returned on each page.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.
successBooleanIndicates whether the request is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
error_codeStringFor more information, see the error codes.
error_msgStringThe message that is returned if the request fails. It is empty if the request is successful.

Description of result

Parameter nameTypeDescription
policy_idLongThe ID of the specified policy.
nameStringThe name of the specified policy.
allow_actionListThe Allow action, which describes the specific actions allowed.
deny_actionListThe Deny action, which describes the specific actions denied.
descriptionStringThe description of the specified policy.
gmt_createLongThe creation time.
gmt_modifiedLongThe time when it is modified.

Request example

GET: /v2.0/cloud/iam/policy/list?page_size=10&last_row_key=0

Return example

{
    "tid": "16868012577231686801257723",
    "result": [
        {
            "gmtModified": 1686559156,
            "description": "Policy description",
            "gmtCreate": 1686558615,
            "policyId": 1,
            "denyAction": [
                "*"
            ],
            "name": "Policy Name"
        }
    ],
    "t": 1686801257723,
    "success": true
}

Error code

For more information, see error code.