Query usage plan details

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

    Interface description

    This API (DescribeUsagePlan) is used to query the details of a usage plan, including name, QPS, environment for creation time binding, etc.

    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 Unique ID for usage plan to be queried

    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 User-defined usage plan name
    UsagePlanDesc String Use Plan description
    MaxRequestNumPreSec Int Request limit per second
    CreatedTime Timestamp Policy creation time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ
    ModifiedTime Timestamp Last Modification Time. Expressed according to the ISO8601 standard, and using UTC time. Format: YYYY-MM-DDThh:mm:ssZ
    BindSecretIdTotalCount Int Number of keys bound
    BindSecretIds List of String Use the ID list of keys that have been bound to the plan
    BindEnvironmentTotalCount Int Number of environments for bound services
    BindEnvironments List of Array The environmental status of the services that have been bound to the usage plan

    BindEnvironments indicates whether the service is bound to various environments. BindEnvironments is an array of bindEnvironment. BindEnvironment is composed as follows:

    Parameter name Type Description
    SeviceId String Unique ID of the bound service
    EnvironmentName String Name of the environment that has been bound

    Example

    https://apigateway.api.qcloud.com/v2/index.php?
    &<Common request parameters>
    &Action=DescribeUsagePlan
    &usagePlanId=usagePlan-XX

    The returned results are as below:

    {
        "code": "0",
        "message": "",
        "codeDesc": "Success",
        "usagePlanId": "usagePlan-XX",
        "usagePlanName": "test1",
        "usagePlanDesc": "test1",
        "maxRequestNumPreSec": 500,
        "createdTime": "2017-08-07T00:00:00Z",
        "modifiedTime": "2017-08-07T00:00:00Z",
        "bindSecretIdTotalCount": 2,
        "bindSecretIds": [
            "AKIDXXXXXwdeqDFaw",
            "AKIDXXXXXkoihMAlS"
        ],
        "bindEnvironmentTotalCount": 2,
        "bindEnvironments": [{
                "seviceId": "sevice-XX",
                "environmentName": "Test"
            },
            {
                "seviceId": "sevice-XXXX",
                "environmentName": "release"
            }
        ]
    }

    Was this page helpful?

    Was this page helpful?

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