Class: AWSCDK::GameLift::CfnContainerFleet::IPPermissionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
game_lift/cfn_container_fleet.rb

Overview

A range of IP addresses and port settings that allow inbound traffic to connect to processes on an instance in a fleet.

Processes are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges.

For Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically opens two port ranges, one for TCP messaging and one for UDP.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_port:, ip_range:, protocol:, to_port:) ⇒ IPPermissionProperty

Returns a new instance of IPPermissionProperty.

Parameters:

  • from_port (Numeric)

    A starting value for a range of allowed port numbers.

  • ip_range (String)

    A range of allowed IP addresses.

  • protocol (String)

    The network communication protocol used by the fleet.

  • to_port (Numeric)

    An ending value for a range of allowed port numbers.



1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
# File 'game_lift/cfn_container_fleet.rb', line 1028

def initialize(from_port:, ip_range:, protocol:, to_port:)
  @from_port = from_port
  Jsii::Type.check_type(@from_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "fromPort")
  @ip_range = ip_range
  Jsii::Type.check_type(@ip_range, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipRange")
  @protocol = protocol
  Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol")
  @to_port = to_port
  Jsii::Type.check_type(@to_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "toPort")
end

Instance Attribute Details

#from_portNumeric (readonly)

A starting value for a range of allowed port numbers.

For fleets using Linux builds, only ports 22 and 1026-60000 are valid.

For fleets using Windows builds, only ports 1026-60000 are valid.



1047
1048
1049
# File 'game_lift/cfn_container_fleet.rb', line 1047

def from_port
  @from_port
end

#ip_rangeString (readonly)

A range of allowed IP addresses.

This value must be expressed in CIDR notation. Example: " 000.000.000.000/[subnet mask] " or optionally the shortened version " 0.0.0.0/[subnet mask] ".



1054
1055
1056
# File 'game_lift/cfn_container_fleet.rb', line 1054

def ip_range
  @ip_range
end

#protocolString (readonly)

The network communication protocol used by the fleet.



1059
1060
1061
# File 'game_lift/cfn_container_fleet.rb', line 1059

def protocol
  @protocol
end

#to_portNumeric (readonly)

An ending value for a range of allowed port numbers.

Port numbers are end-inclusive. This value must be equal to or greater than FromPort .

For fleets using Linux builds, only ports 22 and 1026-60000 are valid.

For fleets using Windows builds, only ports 1026-60000 are valid.



1070
1071
1072
# File 'game_lift/cfn_container_fleet.rb', line 1070

def to_port
  @to_port
end

Class Method Details

.jsii_propertiesObject



1072
1073
1074
1075
1076
1077
1078
1079
# File 'game_lift/cfn_container_fleet.rb', line 1072

def self.jsii_properties
  {
    :from_port => "fromPort",
    :ip_range => "ipRange",
    :protocol => "protocol",
    :to_port => "toPort",
  }
end

Instance Method Details

#to_jsiiObject



1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
# File 'game_lift/cfn_container_fleet.rb', line 1081

def to_jsii
  result = {}
  result.merge!({
    "fromPort" => @from_port,
    "ipRange" => @ip_range,
    "protocol" => @protocol,
    "toPort" => @to_port,
  })
  result.compact
end