Policy Details

Last updated: 2019-05-14 10:03:41

API Description

This API (GetPolicy) is used to query policy details

Request domain name:



This API (GetPolicy) can only be used to query the details of a policy with createMode not equal to 1.

Input Parameters

The following request parameter list only provides API request parameters. Other parameters can be found in Common Request Parameters.

Parameter Name Type Required Description
policyId int Yes Policy ID

Output Parameters

Parameter Name Type Description
policyName string Policy name
description string Policy description
type int 1: Custom policy; 2: Preset policy
addTime string Time when a policy is created
updateTime string Latest update time of a policy
policyDocument array Policy document





    "code": 0,
    "message": "",
    "codeDesc": "Success",
    "data": {
        "policyDocument": {
            "version": "2.0",
            "statement": [
                    "effect": "allow",
                    "action": "*",
                    "resource": "*"
        "updateTime": "2017-09-04 11:50:19",
        "addTime": "2016-06-02 19:40:09",
        "policyName": "AdministratorAccess",
        "description": "This policy allows you to manage all users under your account and their permissions, financial information and Cloud assets.",
        "type": 2

Error Codes

For more information, please see Error Codes.