Create a usage plan

Last updated: 2020-06-09 15:05:36


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

    Interface description

    This API (CreateUsagePlan) is used to create a usage plan.
    When using the API gateway, users need to create a usage plan and bind it to the environment of the service.

    Input Parameter

    The following request parameter list only lists the API request parameters. For other parameters, please see Common Request Parameters .

    Parameter name Required Type Description
    UsagePlanName No String User-defined usage plan name
    UsagePlanDesc No String User-defined usage plan description
    MaxRequestNumPreSec No Int The number of requests per second is limited. Default is 1000.
    MaxRequestNum No Int Total number of requested quotas. If it is not passed as-1, it will not be enabled.

    Output Parameter

    Parameter name Type Description
    Code Int Common error code, 0 indicates success, other values indicate failure. For more information, please see the error code page Common error code
    CodeDesc String Error code on the business side. Return the specific cause of the business error when a Success, error is returned on success.
    Message String Module error message description, related to interface
    UsagePlanId String Usage plan unique ID, is generated by the system, globally unique
    UsagePlanName String User-defined usage plan name
    UsagePlanDesc String User-defined usage plan description
    CreatedTime Timestamp Policy creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ

    &<Common request parameters>

    The returned results are as below:

        "code": "0",
        "message": "",
        "codeDesc": "Success",
        "usagePlanId": "usagePlan-XX",
        "usagePlanName": "name",
        "usagePlanDesc": "desc",
        "createdTime": "2017-08-07T00:00:00Z"

    Was this page helpful?

    Was this page helpful?

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