Class: AWSCDK::APIGatewayv2::QuotaSettings

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(limit: nil, offset: nil, period: nil) ⇒ QuotaSettings

Returns a new instance of QuotaSettings.

Parameters:

  • limit (Numeric, nil) (defaults to: nil)

    The maximum number of requests that users can make within the specified time period.

  • offset (Numeric, nil) (defaults to: nil)

    For the initial time period, the number of requests to subtract from the specified limit.

  • period (AWSCDK::APIGatewayv2::Period, nil) (defaults to: nil)

    The time period for which the maximum limit of requests applies.



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

#limitNumeric? (readonly)

Note:

Default: none

The maximum number of requests that users can make within the specified time period.

Returns:

  • (Numeric, nil)


23
24
25
# File 'api_gatewayv2/quota_settings.rb', line 23

def limit
  @limit
end

#offsetNumeric? (readonly)

Note:

Default: none

For the initial time period, the number of requests to subtract from the specified limit.

Returns:

  • (Numeric, nil)


28
29
30
# File 'api_gatewayv2/quota_settings.rb', line 28

def offset
  @offset
end

#periodAWSCDK::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_propertiesObject



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_jsiiObject



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