Create Policy

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


    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 (CreatePolicy) is used to create a policy.

    Request domain name:


    For the policy created via this API (CreatePolicy), createMode is 2 by default.

    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
    policyName string Yes Policy name
    description string No Policy description
    policyDocument string Yes Policy document

    Output Parameters

    Parameter Name Type Description
    policyId int Policy ID




        "code": 0,
        "message": "",
        "codeDesc": "Success",
        "data": {
            "policyId": 524497
    }xxxxxxxxxx {    "code": 0,    "message": "",    "codeDesc": "Success",    "data": {        "policyId": 524497    }}

    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