Modify the usage plan

Last updated: 2020-02-21 16:35:34

PDF

Interface description

This API (ModifyUsagePlan) is used to modify the name, description and QPS of the usage plan.

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
UsagePlanId Yes String Use Plan unique ID
UsagePlanName No String Modified user-defined usage plan name
UsagePlanDesc No String Modified user-defined usage plan description
MaxRequestNumPreSec No Int Request limit per second
MaxRequestNum No Int Total number of requested quotas.-1 means it is not 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 Use Plan unique ID
UsagePlanName String Modified user-defined usage plan name
UsagePlanDesc String Modified user-defined usage plan description
MaxRequestNumPreSec Int Modified request limit per second
ModifiedTime Timestamp Last Modification Time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ

Example

https://apigateway.api.qcloud.com/v2/index.php?
&<Common request parameters>
&Action=ModifyUsagePlan
&usagePlanId=usagePlan-XX
&usagePlanName=newusagePlanName
&usagePlanDesc=newUsagePlanDescription
&maxRequestNumPreSec=1000

The returned results are as below:

{
    "code": "0",
    "message": "",
    "codeDesc": "Success",
    "usagePlanId": "usagePlan-XX",
    "usagePlanName": "newusagePlanName",
    "usagePlanDesc": "newUsagePlanDescription",
    "maxRequestNumPreSec": 1000,
    "modifiedTime": "2017-08-07T00:00:00Z"
}