Class BuildFleet
(experimental) A fleet contains Amazon Elastic Compute Cloud (Amazon EC2) instances that GameLift hosts.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.GameLift.Alpha
Assembly: Amazon.CDK.AWS.GameLift.Alpha.dll
Syntax (csharp)
public class BuildFleet : FleetBase, IBuildFleet, IFleet, IResource, IConstruct, IDependable, IEnvironmentAware, IGrantable, IGameSessionQueueDestination
Syntax (vb)
Public Class BuildFleet Inherits FleetBase Implements IBuildFleet, IFleet, IResource, IConstruct, IDependable, IEnvironmentAware, IGrantable, IGameSessionQueueDestination
Remarks
A fleet uses the configuration and scaling logic that you define to run your game server build. You can use a fleet directly without a queue. You can also associate multiple fleets with a GameLift queue.
For example, you can use Spot Instance fleets configured with your preferred locations, along with a backup On-Demand Instance fleet with the same locations. Using multiple Spot Instance fleets of different instance types reduces the chance of needing On-Demand Instance placement.
Stability: Experimental
Resource: AWS::GameLift::Fleet
ExampleMetadata: infused
Examples
Build build;
// Server processes can be delcared in a declarative way through the constructor
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",
Parameters = "-logFile /local/game/logs/myserver1935.log -port 1935",
ConcurrentExecutions = 100
} }
}
});
Synopsis
Constructors
| BuildFleet(Construct, string, IBuildFleetProps) | (experimental) A fleet contains Amazon Elastic Compute Cloud (Amazon EC2) instances that GameLift hosts. |
Properties
| Content | (experimental) The build content of the fleet. |
| FleetArn | (experimental) The ARN of the fleet. |
| FleetId | (experimental) The Identifier of the fleet. |
| GrantPrincipal | (experimental) The principal this GameLift fleet is using. |
| PROPERTY_INJECTION_ID | (experimental) Uniquely identifies this class. |
| Role | (experimental) The IAM role GameLift assumes by fleet instances to access AWS ressources. |
Methods
| AddIngressRule(IPeer, Port) | (experimental) Adds an ingress rule to allow inbound traffic to access game sessions on this fleet. |
| FromBuildFleetArn(Construct, string, string) | (experimental) Import an existing fleet from its ARN. |
| FromBuildFleetId(Construct, string, string) | (experimental) Import an existing fleet from its identifier. |
Constructors
BuildFleet(Construct, string, IBuildFleetProps)
(experimental) A fleet contains Amazon Elastic Compute Cloud (Amazon EC2) instances that GameLift hosts.
public BuildFleet(Construct scope, string id, IBuildFleetProps props)
Parameters
- scope Construct
- id string
- props IBuildFleetProps
Remarks
Stability: Experimental
Properties
Content
(experimental) The build content of the fleet.
public virtual IBuild Content { get; }
Property Value
Remarks
Stability: Experimental
FleetArn
(experimental) The ARN of the fleet.
public override string FleetArn { get; }
Property Value
Overrides
Remarks
Stability: Experimental
FleetId
(experimental) The Identifier of the fleet.
public override string FleetId { get; }
Property Value
Overrides
Remarks
Stability: Experimental
GrantPrincipal
(experimental) The principal this GameLift fleet is using.
public override IPrincipal GrantPrincipal { get; }
Property Value
Overrides
Remarks
Stability: Experimental
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Stability: Experimental
Role
(experimental) The IAM role GameLift assumes by fleet instances to access AWS ressources.
public virtual IRole Role { get; }
Property Value
Remarks
Stability: Experimental
Methods
AddIngressRule(IPeer, Port)
(experimental) Adds an ingress rule to allow inbound traffic to access game sessions on this fleet.
public virtual void AddIngressRule(IPeer source, Port port)
Parameters
Remarks
Stability: Experimental
FromBuildFleetArn(Construct, string, string)
(experimental) Import an existing fleet from its ARN.
public static IBuildFleet FromBuildFleetArn(Construct scope, string id, string buildFleetArn)
Parameters
Returns
Remarks
Stability: Experimental
FromBuildFleetId(Construct, string, string)
(experimental) Import an existing fleet from its identifier.
public static IBuildFleet FromBuildFleetId(Construct scope, string id, string buildFleetId)
Parameters
Returns
Remarks
Stability: Experimental