Class: AWSCDK::APIGateway::ThrottlingPerMethod

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gateway/throttling_per_method.rb

Overview

Represents per-method throttling for a resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method:, throttle:) ⇒ ThrottlingPerMethod

Returns a new instance of ThrottlingPerMethod.

Parameters:



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

#methodAWSCDK::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

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



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_jsiiObject



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