Class: AWSCDK::APIGateway::ThrottlingPerMethod
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::ThrottlingPerMethod
- Defined in:
- api_gateway/throttling_per_method.rb
Overview
Represents per-method throttling for a resource.
Instance Attribute Summary collapse
-
#method ⇒ AWSCDK::APIGateway::Method
readonly
[disable-awslint:ref-via-interface] The method for which you specify the throttling settings.
-
#throttle ⇒ AWSCDK::APIGateway::ThrottleSettings
readonly
Specifies the overall request rate (average requests per second) and burst capacity.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(method:, throttle:) ⇒ ThrottlingPerMethod
constructor
A new instance of ThrottlingPerMethod.
- #to_jsii ⇒ Object
Constructor Details
#initialize(method:, throttle:) ⇒ ThrottlingPerMethod
Returns a new instance of ThrottlingPerMethod.
9 10 11 12 13 14 |
# File 'api_gateway/throttling_per_method.rb', line 9 def initialize(method:, throttle:) @method = method Jsii::Type.check_type(@method, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5NZXRob2QifQ==")), "method") @throttle = throttle.is_a?(Hash) ? ::AWSCDK::APIGateway::ThrottleSettings.new(**throttle.transform_keys(&:to_sym)) : throttle Jsii::Type.check_type(@throttle, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5UaHJvdHRsZVNldHRpbmdzIn0=")), "throttle") end |
Instance Attribute Details
#method ⇒ AWSCDK::APIGateway::Method (readonly)
Note:
Default: none
[disable-awslint:ref-via-interface] The method for which you specify the throttling settings.
20 21 22 |
# File 'api_gateway/throttling_per_method.rb', line 20 def method @method end |
#throttle ⇒ AWSCDK::APIGateway::ThrottleSettings (readonly)
Note:
Default: none
Specifies the overall request rate (average requests per second) and burst capacity.
25 26 27 |
# File 'api_gateway/throttling_per_method.rb', line 25 def throttle @throttle end |
Class Method Details
.jsii_properties ⇒ Object
27 28 29 30 31 32 |
# File 'api_gateway/throttling_per_method.rb', line 27 def self.jsii_properties { :method => "method", :throttle => "throttle", } end |
Instance Method Details
#to_jsii ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'api_gateway/throttling_per_method.rb', line 34 def to_jsii result = {} result.merge!({ "method" => @method, "throttle" => @throttle, }) result.compact end |