Class: AWSCDK::EC2::KeyPairAttributes
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::KeyPairAttributes
- Defined in:
- ec2/key_pair_attributes.rb
Overview
Attributes of a Key Pair.
Instance Attribute Summary collapse
-
#key_pair_name ⇒ String
readonly
The unique name of the key pair.
-
#type ⇒ AWSCDK::EC2::KeyPairType?
readonly
The type of the key pair.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key_pair_name:, type: nil) ⇒ KeyPairAttributes
constructor
A new instance of KeyPairAttributes.
- #to_jsii ⇒ Object
Constructor Details
#initialize(key_pair_name:, type: nil) ⇒ KeyPairAttributes
Returns a new instance of KeyPairAttributes.
9 10 11 12 13 14 |
# File 'ec2/key_pair_attributes.rb', line 9 def initialize(key_pair_name:, type: nil) @key_pair_name = key_pair_name Jsii::Type.check_type(@key_pair_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyPairName") @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLktleVBhaXJUeXBlIn0=")), "type") unless @type.nil? end |
Instance Attribute Details
#key_pair_name ⇒ String (readonly)
The unique name of the key pair.
19 20 21 |
# File 'ec2/key_pair_attributes.rb', line 19 def key_pair_name @key_pair_name end |
#type ⇒ AWSCDK::EC2::KeyPairType? (readonly)
Note:
Default: no type specified
The type of the key pair.
24 25 26 |
# File 'ec2/key_pair_attributes.rb', line 24 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
26 27 28 29 30 31 |
# File 'ec2/key_pair_attributes.rb', line 26 def self.jsii_properties { :key_pair_name => "keyPairName", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'ec2/key_pair_attributes.rb', line 33 def to_jsii result = {} result.merge!({ "keyPairName" => @key_pair_name, "type" => @type, }) result.compact end |