Class: AWSCDK::APIGatewayv2::QuotaSettings
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::QuotaSettings
- Defined in:
- api_gatewayv2/quota_settings.rb
Overview
Specifies the maximum number of requests that clients can make to API Gateway APIs.
Instance Attribute Summary collapse
-
#limit ⇒ Numeric?
readonly
The maximum number of requests that users can make within the specified time period.
-
#offset ⇒ Numeric?
readonly
For the initial time period, the number of requests to subtract from the specified limit.
-
#period ⇒ AWSCDK::APIGatewayv2::Period?
readonly
The time period for which the maximum limit of requests applies.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(limit: nil, offset: nil, period: nil) ⇒ QuotaSettings
constructor
A new instance of QuotaSettings.
- #to_jsii ⇒ Object
Constructor Details
#initialize(limit: nil, offset: nil, period: nil) ⇒ QuotaSettings
Returns a new instance of QuotaSettings.
10 11 12 13 14 15 16 17 |
# File 'api_gatewayv2/quota_settings.rb', line 10 def initialize(limit: nil, offset: nil, period: nil) @limit = limit Jsii::Type.check_type(@limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "limit") unless @limit.nil? @offset = offset Jsii::Type.check_type(@offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "offset") unless @offset.nil? @period = period Jsii::Type.check_type(@period, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLlBlcmlvZCJ9")), "period") unless @period.nil? end |
Instance Attribute Details
#limit ⇒ Numeric? (readonly)
Note:
Default: none
The maximum number of requests that users can make within the specified time period.
23 24 25 |
# File 'api_gatewayv2/quota_settings.rb', line 23 def limit @limit end |
#offset ⇒ Numeric? (readonly)
Note:
Default: none
For the initial time period, the number of requests to subtract from the specified limit.
28 29 30 |
# File 'api_gatewayv2/quota_settings.rb', line 28 def offset @offset end |
#period ⇒ AWSCDK::APIGatewayv2::Period? (readonly)
Note:
Default: none
The time period for which the maximum limit of requests applies.
33 34 35 |
# File 'api_gatewayv2/quota_settings.rb', line 33 def period @period end |
Class Method Details
.jsii_properties ⇒ Object
35 36 37 38 39 40 41 |
# File 'api_gatewayv2/quota_settings.rb', line 35 def self.jsii_properties { :limit => "limit", :offset => "offset", :period => "period", } end |
Instance Method Details
#to_jsii ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'api_gatewayv2/quota_settings.rb', line 43 def to_jsii result = {} result.merge!({ "limit" => @limit, "offset" => @offset, "period" => @period, }) result.compact end |