Policy Details

Last updated: 2020-06-05 19:37:21


    This is a legacy API which has been hidden and will no longer be updated. We recommend using the new CAM API 3.0 which is standardized and faster.

    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.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback