Method: Aws::Lightsail::Types::PortInfo#to_port

Defined in:
lib/aws-sdk-lightsail/types.rb

#to_portInteger

The last port in a range of open ports on an instance.

Allowed ports:

  • TCP and UDP - ‘0` to `65535`

  • ICMP - The ICMP code for IPv4 addresses. For example, specify ‘8` as the `fromPort` (ICMP type), and `-1` as the `toPort` (ICMP code), to enable ICMP Ping. For more information, see [Control Messages] on Wikipedia.

  • ICMPv6 - The ICMP code for IPv6 addresses. For example, specify ‘128` as the `fromPort` (ICMPv6 type), and `0` as `toPort` (ICMPv6 code). For more information, see [Internet Control Message Protocol for IPv6].

[1]: en.wikipedia.org/wiki/Internet_Control_Message_Protocol#Control_messages [2]: en.wikipedia.org/wiki/Internet_Control_Message_Protocol_for_IPv6

Returns:

  • (Integer)


12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
# File 'lib/aws-sdk-lightsail/types.rb', line 12422

class PortInfo < Struct.new(
  :from_port,
  :to_port,
  :protocol,
  :cidrs,
  :ipv6_cidrs,
  :cidr_list_aliases)
  SENSITIVE = []
  include Aws::Structure
end