Class CfnFleet
A CloudFormation AWS::GameLift::Fleet
.
Inherited Members
Namespace: Amazon.CDK.AWS.GameLift
Assembly: Amazon.CDK.AWS.GameLift.dll
Syntax (csharp)
public class CfnFleet : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnFleet
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
The AWS::GameLift::Fleet
resource creates an Amazon GameLift (GameLift) fleet to host custom game server or Realtime Servers. A fleet is a set of EC2 instances, configured with instructions to run game servers on each instance.
CloudformationResource: AWS::GameLift::Fleet
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-gamelift-fleet.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.GameLift;
var cfnFleet = new CfnFleet(this, "MyCfnFleet", new CfnFleetProps {
Name = "name",
// the properties below are optional
AnywhereConfiguration = new AnywhereConfigurationProperty {
Cost = "cost"
},
BuildId = "buildId",
CertificateConfiguration = new CertificateConfigurationProperty {
CertificateType = "certificateType"
},
ComputeType = "computeType",
Description = "description",
DesiredEc2Instances = 123,
Ec2InboundPermissions = new [] { new IpPermissionProperty {
FromPort = 123,
IpRange = "ipRange",
Protocol = "protocol",
ToPort = 123
} },
Ec2InstanceType = "ec2InstanceType",
FleetType = "fleetType",
InstanceRoleArn = "instanceRoleArn",
Locations = new [] { new LocationConfigurationProperty {
Location = "location",
// the properties below are optional
LocationCapacity = new LocationCapacityProperty {
DesiredEc2Instances = 123,
MaxSize = 123,
MinSize = 123
}
} },
MaxSize = 123,
MetricGroups = new [] { "metricGroups" },
MinSize = 123,
NewGameSessionProtectionPolicy = "newGameSessionProtectionPolicy",
PeerVpcAwsAccountId = "peerVpcAwsAccountId",
PeerVpcId = "peerVpcId",
ResourceCreationLimitPolicy = new ResourceCreationLimitPolicyProperty {
NewGameSessionsPerCreator = 123,
PolicyPeriodInMinutes = 123
},
RuntimeConfiguration = new RuntimeConfigurationProperty {
GameSessionActivationTimeoutSeconds = 123,
MaxConcurrentGameSessionActivations = 123,
ServerProcesses = new [] { new ServerProcessProperty {
ConcurrentExecutions = 123,
LaunchPath = "launchPath",
// the properties below are optional
Parameters = "parameters"
} }
},
ScriptId = "scriptId"
});
Synopsis
Constructors
CfnFleet(Construct, String, ICfnFleetProps) | Create a new |
CfnFleet(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnFleet(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AnywhereConfiguration |
|
AttrFleetId | A unique identifier for the fleet. |
BuildId | A unique identifier for a build to be deployed on the new fleet. |
CertificateConfiguration | Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ComputeType | The type of compute resource used to host your game servers. |
Description | A description for the fleet. |
DesiredEc2Instances | The number of EC2 instances that you want this fleet to host. |
Ec2InboundPermissions | The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. |
Ec2InstanceType | The Amazon GameLift-supported Amazon EC2 instance type to use for all fleet instances. |
FleetType | Indicates whether to use On-Demand or Spot instances for this fleet. |
InstanceRoleArn | A unique identifier for an IAM role that manages access to your AWS services. |
Locations | A set of remote locations to deploy additional instances to and manage as part of the fleet. |
MaxSize | The maximum number of instances that are allowed in the specified fleet location. |
MetricGroups | The name of an AWS CloudWatch metric group to add this fleet to. |
MinSize | The minimum number of instances that are allowed in the specified fleet location. |
Name | A descriptive label that is associated with a fleet. |
NewGameSessionProtectionPolicy | The status of termination protection for active game sessions on the fleet. |
PeerVpcAwsAccountId | Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the AWS account that owns the VPC. |
PeerVpcId | A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. |
ResourceCreationLimitPolicy | A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time. |
RuntimeConfiguration | Instructions for how to launch and maintain server processes on instances in the fleet. |
ScriptId | The unique identifier for a Realtime configuration script to be deployed on fleet instances. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnFleet(Construct, String, ICfnFleetProps)
Create a new AWS::GameLift::Fleet
.
public CfnFleet(Construct scope, string id, ICfnFleetProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnFleetProps
- resource properties.
CfnFleet(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnFleet(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnFleet(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnFleet(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AnywhereConfiguration
AWS::GameLift::Fleet.AnywhereConfiguration
.
public virtual object AnywhereConfiguration { get; set; }
Property Value
System.Object
Remarks
AttrFleetId
A unique identifier for the fleet.
public virtual string AttrFleetId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: FleetId
BuildId
A unique identifier for a build to be deployed on the new fleet.
public virtual string BuildId { get; set; }
Property Value
System.String
Remarks
If you are deploying the fleet with a custom game build, you must specify this property. The build must have been successfully uploaded to Amazon GameLift and be in a READY
status. This fleet setting cannot be changed once the fleet is created.
CertificateConfiguration
Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet.
public virtual object CertificateConfiguration { get; set; }
Property Value
System.Object
Remarks
Amazon GameLift uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift. By default, the CertificateConfiguration
is DISABLED
. You can't change this property after you create the fleet.
AWS Certificate Manager (ACM) certificates expire after 13 months. Certificate expiration can cause fleets to fail, preventing players from connecting to instances in the fleet. We recommend you replace fleets before 13 months, consider using fleet aliases for a smooth transition.
ACM isn't available in all AWS regions. A fleet creation request with certificate generation enabled in an unsupported Region, fails with a 4xx error. For more information about the supported Regions, see Supported Regions in the AWS Certificate Manager User Guide .
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ComputeType
The type of compute resource used to host your game servers.
public virtual string ComputeType { get; set; }
Property Value
System.String
Remarks
You can use your own compute resources with Amazon GameLift Anywhere or use Amazon EC2 instances with managed Amazon GameLift.
Description
A description for the fleet.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
DesiredEc2Instances
The number of EC2 instances that you want this fleet to host.
public virtual Nullable<double> DesiredEc2Instances { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
When creating a new fleet, GameLift automatically sets this value to "1" and initiates a single instance. Once the fleet is active, update this value to trigger GameLift to add or remove instances from the fleet.
Ec2InboundPermissions
The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet.
public virtual object Ec2InboundPermissions { get; set; }
Property Value
System.Object
Remarks
If the fleet is hosting a custom game build, this property must be set before players can connect to game sessions. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges.
Ec2InstanceType
The Amazon GameLift-supported Amazon EC2 instance type to use for all fleet instances.
public virtual string Ec2InstanceType { get; set; }
Property Value
System.String
Remarks
Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity. See Amazon Elastic Compute Cloud Instance Types for detailed descriptions of Amazon EC2 instance types.
FleetType
Indicates whether to use On-Demand or Spot instances for this fleet.
public virtual string FleetType { get; set; }
Property Value
System.String
Remarks
By default, this property is set to ON_DEMAND
. Learn more about when to use On-Demand versus Spot Instances . This property cannot be changed after the fleet is created.
InstanceRoleArn
A unique identifier for an IAM role that manages access to your AWS services.
public virtual string InstanceRoleArn { get; set; }
Property Value
System.String
Remarks
With an instance role ARN set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). Create a role or look up a role's ARN by using the IAM dashboard in the AWS Management Console . Learn more about using on-box credentials for your game servers at Access external resources from a game server . This property cannot be changed after the fleet is created.
Locations
A set of remote locations to deploy additional instances to and manage as part of the fleet.
public virtual object Locations { get; set; }
Property Value
System.Object
Remarks
This parameter can only be used when creating fleets in AWS Regions that support multiple locations. You can add any Amazon GameLift-supported AWS Region as a remote location, in the form of an AWS Region code such as us-west-2
. To create a fleet with instances in the home Region only, don't use this parameter.
To use this parameter, Amazon GameLift requires you to use your home location in the request.
MaxSize
The maximum number of instances that are allowed in the specified fleet location.
public virtual Nullable<double> MaxSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
If this parameter is not set, the default is 1.
MetricGroups
The name of an AWS CloudWatch metric group to add this fleet to.
public virtual string[] MetricGroups { get; set; }
Property Value
System.String[]
Remarks
A metric group is used to aggregate the metrics for multiple fleets. You can specify an existing metric group name or set a new name to create a new metric group. A fleet can be included in only one metric group at a time.
MinSize
The minimum number of instances that are allowed in the specified fleet location.
public virtual Nullable<double> MinSize { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
If this parameter is not set, the default is 0.
Name
A descriptive label that is associated with a fleet.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
Fleet names do not need to be unique.
NewGameSessionProtectionPolicy
The status of termination protection for active game sessions on the fleet.
public virtual string NewGameSessionProtectionPolicy { get; set; }
Property Value
System.String
Remarks
By default, this property is set to NoProtection
.
PeerVpcAwsAccountId
Used when peering your Amazon GameLift fleet with a VPC, the unique identifier for the AWS account that owns the VPC.
public virtual string PeerVpcAwsAccountId { get; set; }
Property Value
System.String
Remarks
You can find your account ID in the AWS Management Console under account settings.
PeerVpcId
A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet.
public virtual string PeerVpcId { get; set; }
Property Value
System.String
Remarks
The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the AWS Management Console . Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets .
ResourceCreationLimitPolicy
A policy that limits the number of game sessions that an individual player can create on instances in this fleet within a specified span of time.
public virtual object ResourceCreationLimitPolicy { get; set; }
Property Value
System.Object
Remarks
RuntimeConfiguration
Instructions for how to launch and maintain server processes on instances in the fleet.
public virtual object RuntimeConfiguration { get; set; }
Property Value
System.Object
Remarks
The runtime configuration defines one or more server process configurations, each identifying a build executable or Realtime script file and the number of processes of that type to run concurrently.
The RuntimeConfiguration
parameter is required unless the fleet is being configured using the older parameters ServerLaunchPath
and ServerLaunchParameters
, which are still supported for backward compatibility.
ScriptId
The unique identifier for a Realtime configuration script to be deployed on fleet instances.
public virtual string ScriptId { get; set; }
Property Value
System.String
Remarks
You can use either the script ID or ARN. Scripts must be uploaded to Amazon GameLift prior to creating the fleet. This fleet property cannot be changed later.
You can't use the !Ref
command to reference a script created with a CloudFormation template for the fleet property ScriptId
. Instead, use Fn::GetAtt Script.Arn
or Fn::GetAtt Script.Id
to retrieve either of these properties as input for ScriptId
. Alternatively, enter a ScriptId
string manually.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>