Query usage plan status

Last updated: 2020-02-21 16:37:21

PDF

Interface description

This API (DescribeUsagePlansStatus) is used to query one or more usage plan lists. You can query the name, description, QPS and other information of these usage plans.

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
UsagePlanIds.n No Array of Strings Unique ID queries according to one or more usage plans.
Offset No Int Offset, default is 0.
Limit No Int The number returned. The default is 20, and the maximum value is 100.
Orderby No String Sort by which field.
Order No String Sort mode.
SearchName No String Fuzzy search according to the name of the usage plan.
SearchId No String According to the usage plan unique ID precise search.

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. If a Success, error is returned on success, the cause of the business error is returned.
Message String Module error message description, related to the interface.
TotalCount Int The number of usage plans that meet the criteria.
UsagePlanStatusSet List of Array Use the schedule list.

Where usagePlanStatusSet is an array of usagePlanStatus, and usagePlanStatus is composed as follows:

Parameter name Type Description
UsagePlanId String Use plan unique ID.
UsagePlanName String User-defined usage plan name.
UsagePlanDescription String User-defined usage plan description.
RequestControlUnit String Request limit unit. Default is SECOND. Currently, SECOND, can only be followed by MINUTE, HOUR, and so on.
RequestControlNum Int Request limit number.
CreatedTime Timestamp Policy creation time. Expressed according to the ISO8601 standard, and using UTC time. The format is: YYYY-MM-DDThh:mm:ssZ.
ModifiedTime Timestamp Last Modification Time. Expressed according to the ISO8601 standard, and using UTC time. The format is: YYYY-MM-DDThh:mm:ssZ.
MaxRequestNum Int The total requested quota,-1 means there is no limit.

Example

https://apigateway.api.qcloud.com/v2/index.php?
&<Common request parameters>
&Action=DescribeUsagePlansStatus
&usagePlanIds.0=usagePlan-XX
&usagePlanIds.1=usagePlan-XXXX
&offset=0
&limit=2
&orderby=createdTime
&order=desc
&searchKey=aa
&filter.notServiceId=service-6qdpttk
&filter.environment=Test

The returned results are as below:

{
    "code":"0",
    "message":"",
    "codeDesc":"Success",      
    "totalCount":2,
    "usagePlanStatusSet":[
        {
            "usagePlanId":"usagePlan-XX",
            "usagePlanName":"test1",
            "usagePlanDescription":"test1",
            "maxRequestNumPreSec":500,
            "createdTime":"2017-08-07T00:00:00Z",
            "modifiedTime":"2017-08-07T00:00:00Z",
            "maxRequestNum": -1
        },
        {
            "usagePlanId":"usagePlan-XXXX",
            "usagePlanName":"test2",
            "usagePlanDescription":"test2",
            "maxRequestNumPreSec":500,
            "createdTime":"2017-08-07T00:10:00Z",
            "modifiedTime":"2017-08-07T00:10:00Z",
            "maxRequestNum": 100
        }
    ]
}