Class: AWSCDK::Lightsail::CfnStaticIPProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lightsail/cfn_static_ip_props.rb

Overview

Properties for defining a CfnStaticIp.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(static_ip_name:, attached_to: nil) ⇒ CfnStaticIPProps

Returns a new instance of CfnStaticIPProps.

Parameters:

  • static_ip_name (String)

    The name of the static IP.

  • attached_to (String, nil) (defaults to: nil)

    The instance that the static IP is attached to.



11
12
13
14
15
16
# File 'lightsail/cfn_static_ip_props.rb', line 11

def initialize(static_ip_name:, attached_to: nil)
  @static_ip_name = static_ip_name
  Jsii::Type.check_type(@static_ip_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "staticIpName")
  @attached_to = attached_to
  Jsii::Type.check_type(@attached_to, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "attachedTo") unless @attached_to.nil?
end

Instance Attribute Details

#attached_toString? (readonly)

The instance that the static IP is attached to.



27
28
29
# File 'lightsail/cfn_static_ip_props.rb', line 27

def attached_to
  @attached_to
end

#static_ip_nameString (readonly)

The name of the static IP.



22
23
24
# File 'lightsail/cfn_static_ip_props.rb', line 22

def static_ip_name
  @static_ip_name
end

Class Method Details

.jsii_propertiesObject



29
30
31
32
33
34
# File 'lightsail/cfn_static_ip_props.rb', line 29

def self.jsii_properties
  {
    :static_ip_name => "staticIpName",
    :attached_to => "attachedTo",
  }
end

Instance Method Details

#to_jsiiObject



36
37
38
39
40
41
42
43
# File 'lightsail/cfn_static_ip_props.rb', line 36

def to_jsii
  result = {}
  result.merge!({
    "staticIpName" => @static_ip_name,
    "attachedTo" => @attached_to,
  })
  result.compact
end