Class: AWSCDK::APIGatewayv2::APIKeyOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::APIKeyOptions
- Defined in:
- api_gatewayv2/api_key_options.rb
Overview
The options for creating an API Key.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#api_key_name ⇒ String?
readonly
A name for the API key.
-
#description ⇒ String?
readonly
A description of the purpose of the API key.
-
#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) ⇒ APIKeyOptions
constructor
A new instance of APIKeyOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api_key_name: nil, description: nil, value: nil) ⇒ APIKeyOptions
Returns a new instance of APIKeyOptions.
10 11 12 13 14 15 16 17 |
# File 'api_gatewayv2/api_key_options.rb', line 10 def initialize(api_key_name: nil, description: nil, value: 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? end |
Instance Attribute Details
#api_key_name ⇒ String? (readonly)
Note:
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.
25 26 27 |
# File 'api_gatewayv2/api_key_options.rb', line 25 def api_key_name @api_key_name end |
#description ⇒ String? (readonly)
Note:
Default: none
A description of the purpose of the API key.
30 31 32 |
# File 'api_gatewayv2/api_key_options.rb', line 30 def description @description end |
#value ⇒ String? (readonly)
Note:
Default: none
The value of the API key.
Must be at least 20 characters long.
37 38 39 |
# File 'api_gatewayv2/api_key_options.rb', line 37 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
39 40 41 42 43 44 45 |
# File 'api_gatewayv2/api_key_options.rb', line 39 def self.jsii_properties { :api_key_name => "apiKeyName", :description => "description", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'api_gatewayv2/api_key_options.rb', line 47 def to_jsii result = {} result.merge!({ "apiKeyName" => @api_key_name, "description" => @description, "value" => @value, }) result.compact end |