edit-icon download-icon

ALIYUN::ApiGateway::TrafficControl

Last Updated: Jun 13, 2018

ALIYUN::ApiGateway::TrafficControl can be used to create user-defined traffic throttling strategies.

Syntax

  1. {
  2. "Type" : "ALIYUN::ApiGateway::TrafficControl",
  3. "Properties" : {
  4. "TrafficControlName" : String,
  5. "Description" : String,
  6. "UserDefault" : String,
  7. "AppDefault" : String,
  8. "TrafficControlUnit" : String,
  9. "Special" : List,
  10. "ApiDefault" : Integer
  11. }
  12. }

Attributes

Attribute name Type Required Update allowed Description
TrafficControlName string Yes Yes The name of the traffic throttling strategy. It can contain 4 to 50 characters, including English letters, Chinese characters, digits, and underscore (). It cannot begin with an underscore (_)
TrafficControlUnit string Yes Yes The unit of the traffic throttling strategy. Optional values: MINUTE, HOUR, and DAY
ApiDefault integer Yes Yes The default traffic throttling value for each API
Description string No Yes Description of traffic throttling
UserDefault string No Yes The default traffic throttling value for each user
AppDefault string No Yes The default traffic throttling value for each app
Special list No Yes Set a specified user-defined traffic throttling strategy

Special syntax

  1. "Special" : {
  2. "SpecialType" : String,
  3. "SpecialKey" : String,
  4. "TrafficValue" : Integer,
  5. }

Special attributes

Attribute name Type Required Update allowed Description
SpecialType string Yes No Specified traffic throttling type. Values: APP and USER
SpecialKey string Yes No Enter the corresponding AppId or Alibaba Cloud account according to the SpecialType
TrafficValue integer Yes No The corresponding traffic throttling value

Return value

Fn::GetAtt

TrafficControlId: the ID of the user-defined traffic throttling.

Example

  1. {
  2. "ROSTemplateFormatVersion": "2015-09-01",
  3. "Parameters": {
  4. "AppId": {
  5. "Type": "String",
  6. "Description": "Specified APP ID"
  7. }
  8. },
  9. "Resources": {
  10. "TrafficControl": {
  11. "Type": "ALIYUN::ApiGateway::TrafficControl",
  12. "Properties": {
  13. "TrafficControlName": "test_traffic_control1",
  14. "TrafficControlUnit": "MINUTE",
  15. "ApiDefault": 400,
  16. "UserDefault": 200,
  17. "AppDefault": 100,
  18. "Description": "demo2",
  19. "Special": [
  20. {
  21. "SpecialType": "APP",
  22. "SpecialKey": {
  23. "Ref": "AppId"
  24. },
  25. "TrafficValue": 80
  26. }
  27. ]
  28. }
  29. }
  30. }
  31. }
Thank you! We've received your feedback.