Class: AWSCDK::APIGateway::UsagePlanProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::UsagePlanProps
- Defined in:
- api_gateway/usage_plan_props.rb
Instance Attribute Summary collapse
-
#api_stages ⇒ Array<AWSCDK::APIGateway::UsagePlanPerAPIStage>?
readonly
API Stages to be associated with the usage plan.
-
#description ⇒ String?
readonly
Represents usage plan purpose.
-
#name ⇒ String?
readonly
Name for this usage plan.
-
#quota ⇒ AWSCDK::APIGateway::QuotaSettings?
readonly
Number of requests clients can make in a given time period.
-
#throttle ⇒ AWSCDK::APIGateway::ThrottleSettings?
readonly
Overall throttle settings for the API.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_stages: nil, description: nil, name: nil, quota: nil, throttle: nil) ⇒ UsagePlanProps
constructor
A new instance of UsagePlanProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api_stages: nil, description: nil, name: nil, quota: nil, throttle: nil) ⇒ UsagePlanProps
Returns a new instance of UsagePlanProps.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'api_gateway/usage_plan_props.rb', line 11 def initialize(api_stages: nil, description: nil, name: nil, quota: nil, throttle: nil) @api_stages = api_stages.is_a?(Array) ? api_stages.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::APIGateway::UsagePlanPerAPIStage.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : api_stages Jsii::Type.check_type(@api_stages, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LlVzYWdlUGxhblBlckFwaVN0YWdlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "apiStages") unless @api_stages.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @quota = quota.is_a?(Hash) ? ::AWSCDK::APIGateway::QuotaSettings.new(**quota.transform_keys(&:to_sym)) : quota Jsii::Type.check_type(@quota, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5RdW90YVNldHRpbmdzIn0=")), "quota") unless @quota.nil? @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") unless @throttle.nil? end |
Instance Attribute Details
#api_stages ⇒ Array<AWSCDK::APIGateway::UsagePlanPerAPIStage>? (readonly)
Note:
Default: none
API Stages to be associated with the usage plan.
28 29 30 |
# File 'api_gateway/usage_plan_props.rb', line 28 def api_stages @api_stages end |
#description ⇒ String? (readonly)
Note:
Default: none
Represents usage plan purpose.
33 34 35 |
# File 'api_gateway/usage_plan_props.rb', line 33 def description @description end |
#name ⇒ String? (readonly)
Note:
Default: none
Name for this usage plan.
38 39 40 |
# File 'api_gateway/usage_plan_props.rb', line 38 def name @name end |
#quota ⇒ AWSCDK::APIGateway::QuotaSettings? (readonly)
Note:
Default: none
Number of requests clients can make in a given time period.
43 44 45 |
# File 'api_gateway/usage_plan_props.rb', line 43 def quota @quota end |
#throttle ⇒ AWSCDK::APIGateway::ThrottleSettings? (readonly)
Note:
Default: none
Overall throttle settings for the API.
48 49 50 |
# File 'api_gateway/usage_plan_props.rb', line 48 def throttle @throttle end |
Class Method Details
.jsii_properties ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'api_gateway/usage_plan_props.rb', line 50 def self.jsii_properties { :api_stages => "apiStages", :description => "description", :name => "name", :quota => "quota", :throttle => "throttle", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 |
# File 'api_gateway/usage_plan_props.rb', line 60 def to_jsii result = {} result.merge!({ "apiStages" => @api_stages, "description" => @description, "name" => @name, "quota" => @quota, "throttle" => @throttle, }) result.compact end |