Class: AWSCDK::Lightsail::CfnContainer::PortInfoProperty

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

Overview

PortInfo is a property of the Container property. It describes the ports to open and the protocols to use for a container on a Amazon Lightsail container service.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(port: nil, protocol: nil) ⇒ PortInfoProperty

Returns a new instance of PortInfoProperty.

Parameters:

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

    The open firewall ports of the container.

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

    The protocol name for the open ports.



944
945
946
947
948
949
# File 'lightsail/cfn_container.rb', line 944

def initialize(port: nil, protocol: nil)
  @port = port
  Jsii::Type.check_type(@port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "port") unless @port.nil?
  @protocol = protocol
  Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") unless @protocol.nil?
end

Instance Attribute Details

#portString? (readonly)

The open firewall ports of the container.



955
956
957
# File 'lightsail/cfn_container.rb', line 955

def port
  @port
end

#protocolString? (readonly)

The protocol name for the open ports.

Allowed values : HTTP | HTTPS | TCP | UDP



962
963
964
# File 'lightsail/cfn_container.rb', line 962

def protocol
  @protocol
end

Class Method Details

.jsii_propertiesObject



964
965
966
967
968
969
# File 'lightsail/cfn_container.rb', line 964

def self.jsii_properties
  {
    :port => "port",
    :protocol => "protocol",
  }
end

Instance Method Details

#to_jsiiObject



971
972
973
974
975
976
977
978
# File 'lightsail/cfn_container.rb', line 971

def to_jsii
  result = {}
  result.merge!({
    "port" => @port,
    "protocol" => @protocol,
  })
  result.compact
end