Class: AWSCDK::APIGateway::ThrottleSettings
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::ThrottleSettings
- Defined in:
- api_gateway/throttle_settings.rb
Overview
Container for defining throttling parameters to API stages or methods.
Instance Attribute Summary collapse
-
#burst_limit ⇒ Numeric?
readonly
The maximum API request rate limit over a time ranging from one to a few seconds.
-
#rate_limit ⇒ Numeric?
readonly
The API request steady-state rate limit (average requests per second over an extended period of time).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(burst_limit: nil, rate_limit: nil) ⇒ ThrottleSettings
constructor
A new instance of ThrottleSettings.
- #to_jsii ⇒ Object
Constructor Details
#initialize(burst_limit: nil, rate_limit: nil) ⇒ ThrottleSettings
Returns a new instance of ThrottleSettings.
9 10 11 12 13 14 |
# File 'api_gateway/throttle_settings.rb', line 9 def initialize(burst_limit: nil, rate_limit: nil) @burst_limit = burst_limit Jsii::Type.check_type(@burst_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "burstLimit") unless @burst_limit.nil? @rate_limit = rate_limit Jsii::Type.check_type(@rate_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "rateLimit") unless @rate_limit.nil? end |
Instance Attribute Details
#burst_limit ⇒ Numeric? (readonly)
Note:
Default: none
The maximum API request rate limit over a time ranging from one to a few seconds.
20 21 22 |
# File 'api_gateway/throttle_settings.rb', line 20 def burst_limit @burst_limit end |
#rate_limit ⇒ Numeric? (readonly)
Note:
Default: none
The API request steady-state rate limit (average requests per second over an extended period of time).
25 26 27 |
# File 'api_gateway/throttle_settings.rb', line 25 def rate_limit @rate_limit end |
Class Method Details
.jsii_properties ⇒ Object
27 28 29 30 31 32 |
# File 'api_gateway/throttle_settings.rb', line 27 def self.jsii_properties { :burst_limit => "burstLimit", :rate_limit => "rateLimit", } end |
Instance Method Details
#to_jsii ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'api_gateway/throttle_settings.rb', line 34 def to_jsii result = {} result.merge!({ "burstLimit" => @burst_limit, "rateLimit" => @rate_limit, }) result.compact end |