Class: AWSCDK::APIGateway::CfnUsagePlanProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::CfnUsagePlanProps
- Defined in:
- api_gateway/cfn_usage_plan_props.rb
Overview
Properties for defining a CfnUsagePlan.
Instance Attribute Summary collapse
-
#api_stages ⇒ AWSCDK::IResolvable, ...
readonly
The associated API stages of a usage plan.
-
#description ⇒ String?
readonly
The description of a usage plan.
-
#quota ⇒ AWSCDK::IResolvable, ...
readonly
The target maximum number of permitted requests per a given unit time interval.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The collection of tags.
-
#throttle ⇒ AWSCDK::IResolvable, ...
readonly
A map containing method level throttling information for API stage in a usage plan.
-
#usage_plan_name ⇒ String?
readonly
The name of a usage plan.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_stages: nil, description: nil, quota: nil, tags: nil, throttle: nil, usage_plan_name: nil) ⇒ CfnUsagePlanProps
constructor
A new instance of CfnUsagePlanProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api_stages: nil, description: nil, quota: nil, tags: nil, throttle: nil, usage_plan_name: nil) ⇒ CfnUsagePlanProps
Returns a new instance of CfnUsagePlanProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 15 def initialize(api_stages: nil, description: nil, quota: nil, tags: nil, throttle: nil, usage_plan_name: nil) @api_stages = api_stages Jsii::Type.check_type(@api_stages, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5DZm5Vc2FnZVBsYW4uQXBpU3RhZ2VQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "apiStages") unless @api_stages.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @quota = quota.is_a?(Hash) ? ::AWSCDK::APIGateway::CfnUsagePlan::QuotaSettingsProperty.new(**quota.transform_keys(&:to_sym)) : quota Jsii::Type.check_type(@quota, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkNmblVzYWdlUGxhbi5RdW90YVNldHRpbmdzUHJvcGVydHkifV19fQ==")), "quota") unless @quota.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @throttle = throttle.is_a?(Hash) ? ::AWSCDK::APIGateway::CfnUsagePlan::ThrottleSettingsProperty.new(**throttle.transform_keys(&:to_sym)) : throttle Jsii::Type.check_type(@throttle, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5LkNmblVzYWdlUGxhbi5UaHJvdHRsZVNldHRpbmdzUHJvcGVydHkifV19fQ==")), "throttle") unless @throttle.nil? @usage_plan_name = usage_plan_name Jsii::Type.check_type(@usage_plan_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "usagePlanName") unless @usage_plan_name.nil? end |
Instance Attribute Details
#api_stages ⇒ AWSCDK::IResolvable, ... (readonly)
The associated API stages of a usage plan.
34 35 36 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 34 def api_stages @api_stages end |
#description ⇒ String? (readonly)
The description of a usage plan.
39 40 41 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 39 def description @description end |
#quota ⇒ AWSCDK::IResolvable, ... (readonly)
The target maximum number of permitted requests per a given unit time interval.
44 45 46 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 44 def quota @quota end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The collection of tags.
Each tag element is associated with a given resource.
51 52 53 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 51 def @tags end |
#throttle ⇒ AWSCDK::IResolvable, ... (readonly)
A map containing method level throttling information for API stage in a usage plan.
56 57 58 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 56 def throttle @throttle end |
#usage_plan_name ⇒ String? (readonly)
The name of a usage plan.
61 62 63 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 61 def usage_plan_name @usage_plan_name end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 72 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 63 def self.jsii_properties { :api_stages => "apiStages", :description => "description", :quota => "quota", :tags => "tags", :throttle => "throttle", :usage_plan_name => "usagePlanName", } end |
Instance Method Details
#to_jsii ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'api_gateway/cfn_usage_plan_props.rb', line 74 def to_jsii result = {} result.merge!({ "apiStages" => @api_stages, "description" => @description, "quota" => @quota, "tags" => @tags, "throttle" => @throttle, "usagePlanName" => @usage_plan_name, }) result.compact end |