Class: AWSCDK::EC2::KeyPairAttributes

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/key_pair_attributes.rb

Overview

Attributes of a Key Pair.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key_pair_name:, type: nil) ⇒ KeyPairAttributes

Returns a new instance of KeyPairAttributes.

Parameters:

  • key_pair_name (String)

    The unique name of the key pair.

  • type (AWSCDK::EC2::KeyPairType, nil) (defaults to: nil)

    The type of the key pair.



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_nameString (readonly)

The unique name of the key pair.

Returns:

  • (String)


19
20
21
# File 'ec2/key_pair_attributes.rb', line 19

def key_pair_name
  @key_pair_name
end

#typeAWSCDK::EC2::KeyPairType? (readonly)

Note:

Default: no type specified

The type of the key pair.

Returns:



24
25
26
# File 'ec2/key_pair_attributes.rb', line 24

def type
  @type
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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