Help & DocumentationAPIsAPI GatewayService APIsInquire about the details of the service usage plan

Inquire about the details of the service usage plan

Last updated: 2020-02-21 16:22:55

Interface description

This API (DescribeServiceUsagePlan) is used to query the details of the service usage plan.
If the service needs authentication throttling to take effect, you need to bind the usage plan to this service. This API is used to query all usage plans bound to a 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
ServiceId Yes String Unique ID for the service to be queried
Offset No Int Offset. Default value: 0
Limit No Int Number of returned results. Default value: 20. Maximum value: 100
SearchEnvironment No String According to the usage plan, the environment name model is accurate.

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
TotalCount Int Total number of usage plans bound on the service
UsagePlanList List of Arrays List of usage plans bound on the service

UsagePlanList is a list of usage plans bound to the service. It is an array of usagePlanAttribute. The usagePlanAttribute is composed as follows:

Parameter name Type Description
UsagePlanId String Use the unique ID of the plan
UsagePlanName String Name of the usage plan
UsagePlanDesc String Description of the usage plan
Environment String Use the service environment bound by the plan
CreatedTime Timestamp Use schedule creation time
ModifiedTime Timestamp Use the last modification time of the plan
InUseRequestNum Int Quota already used
MaxRequestNum Int Total quota requested.-1 means there is no limit.

&<Common request parameters>

The returned results are as below:

    "code": "0",
    "message": "",
    "codeDesc": "Success",
    "totalCount": 2,
    "usagePlanList": [{
            "usagePlanId": "usagePlan-XX",
            "usagePlanName": "usagePlanName1",
            "usagePlanDesc": "usagePlanDesc1",
            "environment": "Pre",
            "maxRequestNumPreSec": 100,
            "createdTime": "2017-08-07T00:00:00Z",
            "modifiedTime": "2017-08-07T00:00:00Z",
            "inUseRequestNum": 0,
            "maxRequestNum": -1
            "usagePlanId": "usagePlan-XXX",
            "usagePlanName": "usagePlanName2",
            "usagePlanDesc": "usagePlanDesc2",
            "environment": "Test",
            "maxRequestNumPreSec": 100,
            "createdTime": "2017-08-07T00:00:00Z",
            "modifiedTime": "2017-08-07T00:00:00Z",
            "inUseRequestNum": 10,
            "maxRequestNum": 100