Create Policy

Last updated: 2019-05-14 10:02:58

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.