Class: AWSCDK::APIGatewayv2::RateLimitedAPIKeyProps
- Inherits:
-
APIKeyProps
- Object
- APIKeyProps
- AWSCDK::APIGatewayv2::RateLimitedAPIKeyProps
- Defined in:
- api_gatewayv2/rate_limited_api_key_props.rb
Overview
RateLimitedApiKey properties.
Instance Attribute Summary collapse
-
#api_key_name ⇒ String?
readonly
A name for the API key.
-
#api_stages ⇒ Array<AWSCDK::APIGatewayv2::UsagePlanPerAPIStage>?
readonly
API Stages to be associated with the RateLimitedApiKey.
-
#customer_id ⇒ String?
readonly
An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
-
#description ⇒ String?
readonly
A description of the purpose of the API key.
-
#enabled ⇒ Boolean?
readonly
Indicates whether the API key can be used by clients.
-
#generate_distinct_id ⇒ Boolean?
readonly
Specifies whether the key identifier is distinct from the created API key value.
-
#quota ⇒ AWSCDK::APIGatewayv2::QuotaSettings?
readonly
Number of requests clients can make in a given time period.
-
#throttle ⇒ AWSCDK::APIGatewayv2::ThrottleSettings?
readonly
Overall throttle settings for the API.
-
#value ⇒ String?
readonly
The value of the API key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_key_name: nil, description: nil, value: nil, customer_id: nil, enabled: nil, generate_distinct_id: nil, api_stages: nil, quota: nil, throttle: nil) ⇒ RateLimitedAPIKeyProps
constructor
A new instance of RateLimitedAPIKeyProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api_key_name: nil, description: nil, value: nil, customer_id: nil, enabled: nil, generate_distinct_id: nil, api_stages: nil, quota: nil, throttle: nil) ⇒ RateLimitedAPIKeyProps
Returns a new instance of RateLimitedAPIKeyProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 16 def initialize(api_key_name: nil, description: nil, value: nil, customer_id: nil, enabled: nil, generate_distinct_id: nil, api_stages: nil, quota: nil, throttle: nil) @api_key_name = api_key_name Jsii::Type.check_type(@api_key_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiKeyName") unless @api_key_name.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless @value.nil? @customer_id = customer_id Jsii::Type.check_type(@customer_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "customerId") unless @customer_id.nil? @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil? @generate_distinct_id = generate_distinct_id Jsii::Type.check_type(@generate_distinct_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "generateDistinctId") unless @generate_distinct_id.nil? @api_stages = api_stages.is_a?(Array) ? api_stages.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::UsagePlanPerAPIStage.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : api_stages Jsii::Type.check_type(@api_stages, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcGlnYXRld2F5djIuVXNhZ2VQbGFuUGVyQXBpU3RhZ2UifSwia2luZCI6ImFycmF5In19")), "apiStages") unless @api_stages.nil? @quota = quota.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::QuotaSettings.new(**quota.transform_keys(&:to_sym)) : quota Jsii::Type.check_type(@quota, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLlF1b3RhU2V0dGluZ3MifQ==")), "quota") unless @quota.nil? @throttle = throttle.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::ThrottleSettings.new(**throttle.transform_keys(&:to_sym)) : throttle Jsii::Type.check_type(@throttle, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLlRocm90dGxlU2V0dGluZ3MifQ==")), "throttle") unless @throttle.nil? end |
Instance Attribute Details
#api_key_name ⇒ String? (readonly)
Default: automatically generated name
A name for the API key.
If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.
43 44 45 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 43 def api_key_name @api_key_name end |
#api_stages ⇒ Array<AWSCDK::APIGatewayv2::UsagePlanPerAPIStage>? (readonly)
Default: none
API Stages to be associated with the RateLimitedApiKey.
75 76 77 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 75 def api_stages @api_stages end |
#customer_id ⇒ String? (readonly)
Default: none
An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
60 61 62 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 60 def customer_id @customer_id end |
#description ⇒ String? (readonly)
Default: none
A description of the purpose of the API key.
48 49 50 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 48 def description @description end |
#enabled ⇒ Boolean? (readonly)
Default: true
Indicates whether the API key can be used by clients.
65 66 67 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 65 def enabled @enabled end |
#generate_distinct_id ⇒ Boolean? (readonly)
Default: false
Specifies whether the key identifier is distinct from the created API key value.
70 71 72 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 70 def generate_distinct_id @generate_distinct_id end |
#quota ⇒ AWSCDK::APIGatewayv2::QuotaSettings? (readonly)
Default: none
Number of requests clients can make in a given time period.
80 81 82 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 80 def quota @quota end |
#throttle ⇒ AWSCDK::APIGatewayv2::ThrottleSettings? (readonly)
Default: none
Overall throttle settings for the API.
85 86 87 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 85 def throttle @throttle end |
#value ⇒ String? (readonly)
Default: none
The value of the API key.
Must be at least 20 characters long.
55 56 57 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 55 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 87 def self.jsii_properties { :api_key_name => "apiKeyName", :description => "description", :value => "value", :customer_id => "customerId", :enabled => "enabled", :generate_distinct_id => "generateDistinctId", :api_stages => "apiStages", :quota => "quota", :throttle => "throttle", } end |
Instance Method Details
#to_jsii ⇒ Object
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'api_gatewayv2/rate_limited_api_key_props.rb', line 101 def to_jsii result = {} result.merge!(super) result.merge!({ "apiKeyName" => @api_key_name, "description" => @description, "value" => @value, "customerId" => @customer_id, "enabled" => @enabled, "generateDistinctId" => @generate_distinct_id, "apiStages" => @api_stages, "quota" => @quota, "throttle" => @throttle, }) result.compact end |