Class: AWSCDK::Interfaces::AWSEC2::EIPReference

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
interfaces/awsec2/eip_reference.rb

Overview

A reference to a EIP resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allocation_id:, public_ip:) ⇒ EIPReference

Returns a new instance of EIPReference.

Parameters:

  • allocation_id (String)

    The AllocationId of the EIP resource.

  • public_ip (String)

    The PublicIp of the EIP resource.



9
10
11
12
13
14
# File 'interfaces/awsec2/eip_reference.rb', line 9

def initialize(allocation_id:, public_ip:)
  @allocation_id = allocation_id
  Jsii::Type.check_type(@allocation_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allocationId")
  @public_ip = public_ip
  Jsii::Type.check_type(@public_ip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "publicIp")
end

Instance Attribute Details

#allocation_idString (readonly)

The AllocationId of the EIP resource.

Returns:

  • (String)


19
20
21
# File 'interfaces/awsec2/eip_reference.rb', line 19

def allocation_id
  @allocation_id
end

#public_ipString (readonly)

The PublicIp of the EIP resource.

Returns:

  • (String)


23
24
25
# File 'interfaces/awsec2/eip_reference.rb', line 23

def public_ip
  @public_ip
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'interfaces/awsec2/eip_reference.rb', line 25

def self.jsii_properties
  {
    :allocation_id => "allocationId",
    :public_ip => "publicIp",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
# File 'interfaces/awsec2/eip_reference.rb', line 32

def to_jsii
  result = {}
  result.merge!({
    "allocationId" => @allocation_id,
    "publicIp" => @public_ip,
  })
  result.compact
end