Class: AWSCDK::GameLift::CfnFleet::IPPermissionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GameLift::CfnFleet::IPPermissionProperty
- Defined in:
- game_lift/cfn_fleet.rb
Overview
A range of IP addresses and port settings that allow inbound traffic to connect to server processes on an instance in a fleet.
New game sessions are assigned an IP address/port number combination, which must fall into the fleet's allowed ranges. Fleets with custom game builds must have permissions explicitly set. For Realtime Servers fleets, GameLift automatically opens two port ranges, one for TCP messaging and one for UDP.
Instance Attribute Summary collapse
-
#from_port ⇒ Numeric
readonly
A starting value for a range of allowed port numbers.
-
#ip_range ⇒ String
readonly
A range of allowed IP addresses.
-
#protocol ⇒ String
readonly
The network communication protocol used by the fleet.
-
#to_port ⇒ Numeric
readonly
An ending value for a range of allowed port numbers.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(from_port:, ip_range:, protocol:, to_port:) ⇒ IPPermissionProperty
constructor
A new instance of IPPermissionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(from_port:, ip_range:, protocol:, to_port:) ⇒ IPPermissionProperty
Returns a new instance of IPPermissionProperty.
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 |
# File 'game_lift/cfn_fleet.rb', line 1021 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_port ⇒ Numeric (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.
1040 1041 1042 |
# File 'game_lift/cfn_fleet.rb', line 1040 def from_port @from_port end |
#ip_range ⇒ String (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] ".
1047 1048 1049 |
# File 'game_lift/cfn_fleet.rb', line 1047 def ip_range @ip_range end |
#protocol ⇒ String (readonly)
The network communication protocol used by the fleet.
1052 1053 1054 |
# File 'game_lift/cfn_fleet.rb', line 1052 def protocol @protocol end |
#to_port ⇒ Numeric (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.
1063 1064 1065 |
# File 'game_lift/cfn_fleet.rb', line 1063 def to_port @to_port end |
Class Method Details
.jsii_properties ⇒ Object
1065 1066 1067 1068 1069 1070 1071 1072 |
# File 'game_lift/cfn_fleet.rb', line 1065 def self.jsii_properties { :from_port => "fromPort", :ip_range => "ipRange", :protocol => "protocol", :to_port => "toPort", } end |
Instance Method Details
#to_jsii ⇒ Object
1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 |
# File 'game_lift/cfn_fleet.rb', line 1074 def to_jsii result = {} result.merge!({ "fromPort" => @from_port, "ipRange" => @ip_range, "protocol" => @protocol, "toPort" => @to_port, }) result.compact end |