Class Peer
(experimental) Peer object factories.
Inheritance
Namespace: Amazon.CDK.AWS.GameLift.Alpha
Assembly: Amazon.CDK.AWS.GameLift.Alpha.dll
Syntax (csharp)
public class Peer : DeputyBase
Syntax (vb)
Public Class Peer
Inherits DeputyBase
Remarks
The static methods on this object can be used to create peer objects which represent a connection partner in inbound permission rules.
Use this object if you need to represent connection partners using plain IP addresses.
Stability: Experimental
ExampleMetadata: infused
Examples
Build build;
var fleet = new BuildFleet(this, "Game server fleet", new BuildFleetProps {
FleetName = "test-fleet",
Content = build,
InstanceType = InstanceType.Of(InstanceClass.C4, InstanceSize.LARGE),
RuntimeConfiguration = new RuntimeConfiguration {
ServerProcesses = new [] { new ServerProcess {
LaunchPath = "/local/game/GameLiftExampleServer.x86_64"
} }
},
IngressRules = new [] { new IngressRule {
Source = Peer.AnyIpv4(),
Port = Port.TcpRange(100, 200)
} }
});
// Allowing a specific CIDR for port 1111 on UDP Protocol
fleet.AddIngressRule(Peer.Ipv4("1.2.3.4/32"), Port.Udp(1111));
Synopsis
Constructors
Peer() | |
Peer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Peer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
AnyIpv4() | (experimental) Any IPv4 address. |
Ipv4(String) | (experimental) Create an IPv4 peer from a CIDR. |
Constructors
Peer()
public Peer()
Remarks
Stability: Experimental
Peer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Peer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Peer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Peer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
AnyIpv4()
(experimental) Any IPv4 address.
public static IPeer AnyIpv4()
Returns
Remarks
Stability: Experimental
Ipv4(String)
(experimental) Create an IPv4 peer from a CIDR.
public static IPeer Ipv4(string cidrIp)
Parameters
- cidrIp System.String
Returns
Remarks
Stability: Experimental