Class: AWSCDK::APIGateway::UsagePlanPerAPIStage
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::UsagePlanPerAPIStage
- Defined in:
- api_gateway/usage_plan_per_api_stage.rb
Overview
Represents the API stages that a usage plan applies to.
Instance Attribute Summary collapse
- #api ⇒ AWSCDK::APIGateway::IRestAPI? readonly
-
#stage ⇒ AWSCDK::APIGateway::Stage?
readonly
[disable-awslint:ref-via-interface].
- #throttle ⇒ Array<AWSCDK::APIGateway::ThrottlingPerMethod>? readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api: nil, stage: nil, throttle: nil) ⇒ UsagePlanPerAPIStage
constructor
A new instance of UsagePlanPerAPIStage.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api: nil, stage: nil, throttle: nil) ⇒ UsagePlanPerAPIStage
Returns a new instance of UsagePlanPerAPIStage.
10 11 12 13 14 15 16 17 |
# File 'api_gateway/usage_plan_per_api_stage.rb', line 10 def initialize(api: nil, stage: nil, throttle: nil) @api = api Jsii::Type.check_type(@api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JUmVzdEFwaSJ9")), "api") unless @api.nil? @stage = stage Jsii::Type.check_type(@stage, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5TdGFnZSJ9")), "stage") unless @stage.nil? @throttle = throttle.is_a?(Array) ? throttle.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::APIGateway::ThrottlingPerMethod.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : throttle Jsii::Type.check_type(@throttle, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LlRocm90dGxpbmdQZXJNZXRob2QifSwia2luZCI6ImFycmF5In19")), "throttle") unless @throttle.nil? end |
Instance Attribute Details
#api ⇒ AWSCDK::APIGateway::IRestAPI? (readonly)
Note:
Default: none
21 22 23 |
# File 'api_gateway/usage_plan_per_api_stage.rb', line 21 def api @api end |
#stage ⇒ AWSCDK::APIGateway::Stage? (readonly)
Note:
Default: none
[disable-awslint:ref-via-interface].
26 27 28 |
# File 'api_gateway/usage_plan_per_api_stage.rb', line 26 def stage @stage end |
#throttle ⇒ Array<AWSCDK::APIGateway::ThrottlingPerMethod>? (readonly)
Note:
Default: none
29 30 31 |
# File 'api_gateway/usage_plan_per_api_stage.rb', line 29 def throttle @throttle end |
Class Method Details
.jsii_properties ⇒ Object
31 32 33 34 35 36 37 |
# File 'api_gateway/usage_plan_per_api_stage.rb', line 31 def self.jsii_properties { :api => "api", :stage => "stage", :throttle => "throttle", } end |
Instance Method Details
#to_jsii ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'api_gateway/usage_plan_per_api_stage.rb', line 39 def to_jsii result = {} result.merge!({ "api" => @api, "stage" => @stage, "throttle" => @throttle, }) result.compact end |