All Products
Search
Document Center

API Gateway:DescribeTrafficControls

Last Updated:Apr 01, 2024

Queries custom throttling policies and their details. Conditional queries are supported.

Operation description

  • This API is intended for API providers.
  • This API can be used to query all existing throttling policies (including special throttling policies) and their details.
  • You can specify query conditions. For example, you can query the throttling policies bound to a specified API or in a specified environment.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
apigateway:DescribeTrafficControlsRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TrafficControlIdstringNo

The ID of the throttling policy.

tf123456
GroupIdstringNo

The specified group ID. This parameter must be specified together with ApiId and StageName.

0009db9c828549768a200320714b8930
ApiIdstringNo

The specified API ID. This parameter must be specified together with GroupId and StageName.

3b81fd160f5645e097cc8855d75a1cf6
StageNamestringNo

The environment name. This parameter must be specified together with GroupId and ApiId. Valid values:********

  • RELEASE
  • TEST
RELEASE
TrafficControlNamestringNo

The name of the throttling policy.

ThrottlingTest
PageNumberintegerNo

The number of the page to return. Pages start from page 1. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Maximum value: 100. Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object
PageNumberinteger

The page number of the returned page.

1
RequestIdstring

The ID of the request.

93D91A99-F093-4596-87BA-3C4FBFD3FD8A
PageSizeinteger

The number of entries returned per page.

10
TotalCountinteger

The total number of returned entries.

1
TrafficControlsobject []

The returned throttling policy information. It is an array consisting of TrafficControl data.

UserDefaultinteger

The default throttling value for each user.

15000
ApiDefaultinteger

The default throttling value for each API.

20000
ModifiedTimestring

The last modification time (UTC) of the throttling policy.

2016-01-27T10:34:38Z
Descriptionstring

The description of the throttling policy.

test
TrafficControlUnitstring

The unit to be used in the throttling policy. Valid values:

  • MINUTE
  • HOUR
  • DAY
Minute
TrafficControlNamestring

The name of the throttling policy.

wulingtestq1
AppDefaultinteger

The default throttling value for each app.

8000
TrafficControlIdstring

The ID of the throttling policy.

cfed6c970d45481dbe136d6b5ac68c41
CreatedTimestring

The creation time (UTC) of the throttling policy.

2016-01-27T10:19:39Z
SpecialPoliciesobject []

The returned information about a special throttling policy. It is an array consisting of SpecialPolicy data.

SpecialTypestring

The type of the special throttling policy. Valid values:

  • APP
  • USER
USER
Specialsobject []

The returned information about a special throttling policy. It is an array consisting of Special data.

TrafficValueinteger

The throttling value.

100
SpecialKeystring

The AppId or user account corresponding to SpecialType.

test_wg@aliyun.com

Examples

Sample success responses

JSONformat

{
  "PageNumber": 1,
  "RequestId": "93D91A99-F093-4596-87BA-3C4FBFD3FD8A",
  "PageSize": 10,
  "TotalCount": 1,
  "TrafficControls": {
    "TrafficControl": [
      {
        "UserDefault": 15000,
        "ApiDefault": 20000,
        "ModifiedTime": "2016-01-27T10:34:38Z",
        "Description": "test",
        "TrafficControlUnit": "Minute",
        "TrafficControlName": "wulingtestq1",
        "AppDefault": 8000,
        "TrafficControlId": "cfed6c970d45481dbe136d6b5ac68c41",
        "CreatedTime": "2016-01-27T10:19:39Z",
        "SpecialPolicies": {
          "SpecialPolicy": [
            {
              "SpecialType": "USER",
              "Specials": {
                "Special": [
                  {
                    "TrafficValue": 100,
                    "SpecialKey": "test_wg@aliyun.com"
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history