Class: AWSCDK::APIGateway::CfnUsagePlan::QuotaSettingsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::CfnUsagePlan::QuotaSettingsProperty
- Defined in:
- api_gateway/cfn_usage_plan.rb
Overview
QuotaSettings is a property of the AWS::ApiGateway::UsagePlan resource that specifies a target for the maximum number of requests users can make to your REST APIs.
In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. Consider using AWS Budgets to monitor costs and AWS WAF to manage API requests.
Instance Attribute Summary collapse
-
#limit ⇒ Numeric?
readonly
The target maximum number of requests that can be made in a given time period.
-
#offset ⇒ Numeric?
readonly
The number of requests subtracted from the given limit in the initial time period.
-
#period ⇒ String?
readonly
The time period in which the limit applies.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(limit: nil, offset: nil, period: nil) ⇒ QuotaSettingsProperty
constructor
A new instance of QuotaSettingsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(limit: nil, offset: nil, period: nil) ⇒ QuotaSettingsProperty
Returns a new instance of QuotaSettingsProperty.
660 661 662 663 664 665 666 667 |
# File 'api_gateway/cfn_usage_plan.rb', line 660 def initialize(limit: nil, offset: nil, period: nil) @limit = limit Jsii::Type.check_type(@limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "limit") unless @limit.nil? @offset = offset Jsii::Type.check_type(@offset, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "offset") unless @offset.nil? @period = period Jsii::Type.check_type(@period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "period") unless @period.nil? end |
Instance Attribute Details
#limit ⇒ Numeric? (readonly)
The target maximum number of requests that can be made in a given time period.
673 674 675 |
# File 'api_gateway/cfn_usage_plan.rb', line 673 def limit @limit end |
#offset ⇒ Numeric? (readonly)
The number of requests subtracted from the given limit in the initial time period.
678 679 680 |
# File 'api_gateway/cfn_usage_plan.rb', line 678 def offset @offset end |
#period ⇒ String? (readonly)
The time period in which the limit applies.
Valid values are "DAY", "WEEK" or "MONTH".
685 686 687 |
# File 'api_gateway/cfn_usage_plan.rb', line 685 def period @period end |
Class Method Details
.jsii_properties ⇒ Object
687 688 689 690 691 692 693 |
# File 'api_gateway/cfn_usage_plan.rb', line 687 def self.jsii_properties { :limit => "limit", :offset => "offset", :period => "period", } end |
Instance Method Details
#to_jsii ⇒ Object
695 696 697 698 699 700 701 702 703 |
# File 'api_gateway/cfn_usage_plan.rb', line 695 def to_jsii result = {} result.merge!({ "limit" => @limit, "offset" => @offset, "period" => @period, }) result.compact end |