AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon GameLift Service CreateFleet API operation.

Syntax

New-GMLFleet
-BuildId <String>
-CertificateConfiguration_CertificateType <CertificateType>
-Description <String>
-EC2InboundPermission <IpPermission[]>
-EC2InstanceType <EC2InstanceType>
-FleetType <FleetType>
-RuntimeConfiguration_GameSessionActivationTimeoutSecond <Int32>
-InstanceRoleArn <String>
-LogPath <String[]>
-RuntimeConfiguration_MaxConcurrentGameSessionActivation <Int32>
-MetricGroup <String[]>
-Name <String>
-NewGameSessionProtectionPolicy <ProtectionPolicy>
-ResourceCreationLimitPolicy_NewGameSessionsPerCreator <Int32>
-PeerVpcAwsAccountId <String>
-PeerVpcId <String>
-ResourceCreationLimitPolicy_PolicyPeriodInMinute <Int32>
-ScriptId <String>
-ServerLaunchParameter <String>
-ServerLaunchPath <String>
-RuntimeConfiguration_ServerProcess <ServerProcess[]>
-Force <SwitchParameter>

Description

Creates a new fleet to run your game servers. whether they are custom game builds or Realtime Servers with game-specific script. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can host multiple game sessions. When creating a fleet, you choose the hardware specifications, set some configuration options, and specify the game server to deploy on the new fleet. To create a new fleet, you must provide the following: (1) a fleet name, (2) an EC2 instance type and fleet type (spot or on-demand), (3) the build ID for your game build or script ID if using Realtime Servers, and (4) a run-time configuration, which determines how game servers will run on each instance in the fleet. When creating a Realtime Servers fleet, we recommend using a minimal version of the Realtime script (see this working code example ). This will make it much easier to troubleshoot any fleet creation issues. Once the fleet is active, you can update your Realtime script as needed. If the CreateFleet call is successful, Amazon GameLift performs the following tasks. You can track the process of a fleet by checking the fleet status or by monitoring fleet creation events:
  • Creates a fleet record. Status: NEW.
  • Begins writing events to the fleet event log, which can be accessed in the Amazon GameLift console. Sets the fleet's target capacity to 1 (desired instances), which triggers Amazon GameLift to start one new EC2 instance.
  • Downloads the game build or Realtime script to the new instance and installs it. Statuses: DOWNLOADING, VALIDATING, BUILDING.
  • Starts launching server processes on the instance. If the fleet is configured to run multiple server processes per instance, Amazon GameLift staggers each launch by a few seconds. Status: ACTIVATING.
  • Sets the fleet's status to ACTIVE as soon as one server process is ready to host a game session.
Learn more Working with Fleets Debug Fleet Creation IssuesRelated operations

Parameters

-BuildId <String>
Unique identifier for a build to be deployed on the new fleet. The custom game server 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.
Required?False
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-CertificateConfiguration_CertificateType <CertificateType>
The service has not provided documentation for this parameter; please refer to the service's API reference documentation for the latest available information.
Required?False
Position?Named
Accept pipeline input?False
-Description <String>
Human-readable description of a fleet.
Required?False
Position?Named
Accept pipeline input?False
-EC2InboundPermission <IpPermission[]>
Range of IP addresses and port settings that permit inbound traffic to access game sessions that running on the fleet. For fleets using a custom game build, this parameter is required before game sessions running on the fleet can accept connections. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges for use by the Realtime servers. You can specify multiple permission settings or add more by updating the fleet.
Required?False
Position?Named
Accept pipeline input?False
AliasesEC2InboundPermissions
-EC2InstanceType <EC2InstanceType>
Name of an EC2 instance type that is supported in Amazon GameLift. A fleet instance type determines the computing resources of each instance in the fleet, including CPU, memory, storage, and networking capacity. Amazon GameLift supports the following EC2 instance types. See Amazon EC2 Instance Types for detailed descriptions.
Required?False
Position?Named
Accept pipeline input?False
-FleetType <FleetType>
Indicates whether to use on-demand instances or spot instances for this fleet. If empty, the default is ON_DEMAND. Both categories of instances use identical hardware and configurations based on the instance type selected for this fleet. Learn more about On-Demand versus Spot Instances.
Required?False
Position?Named
Accept pipeline input?False
-Force <SwitchParameter>
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?False
-InstanceRoleArn <String>
Unique identifier for an AWS IAM role that manages access to your AWS services. 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, daemons (background processes). Create a role or look up a role's ARN 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.
Required?False
Position?Named
Accept pipeline input?False
-LogPath <String[]>
This parameter is no longer used. Instead, to specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API ProcessReady() and specify one or more directory paths in logParameters. See more information in the Server API Reference.
Required?False
Position?Named
Accept pipeline input?False
AliasesLogPaths
-MetricGroup <String[]>
Name of an Amazon CloudWatch metric group to add this fleet to. A metric group aggregates the metrics for all fleets in the group. Specify an existing metric group name, or provide a new name to create a new metric group. A fleet can only be included in one metric group at a time.
Required?False
Position?Named
Accept pipeline input?False
AliasesMetricGroups
-Name <String>
Descriptive label that is associated with a fleet. Fleet names do not need to be unique.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NewGameSessionProtectionPolicy <ProtectionPolicy>
Game session protection policy to apply to all instances in this fleet. If this parameter is not set, instances in this fleet default to no protection. You can change a fleet's protection policy using UpdateFleetAttributes, but this change will only affect sessions created after the policy change. You can also set protection for individual instances using UpdateGameSession.
  • NoProtection -- The game session can be terminated during a scale-down event.
  • FullProtection -- If the game session is in an ACTIVE status, it cannot be terminated during a scale-down event.
Required?False
Position?Named
Accept pipeline input?False
-PeerVpcAwsAccountId <String>
Unique identifier for the AWS account with the VPC that you want to peer your Amazon GameLift fleet with. You can find your Account ID in the AWS Management Console under account settings.
Required?False
Position?Named
Accept pipeline input?False
-PeerVpcId <String>
Unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same region where your fleet is deployed. Look up a VPC ID using the VPC Dashboard in the AWS Management Console. Learn more about VPC peering in VPC Peering with Amazon GameLift Fleets.
Required?False
Position?Named
Accept pipeline input?False
-ResourceCreationLimitPolicy_NewGameSessionsPerCreator <Int32>
Maximum number of game sessions that an individual can create during the policy period.
Required?False
Position?Named
Accept pipeline input?False
-ResourceCreationLimitPolicy_PolicyPeriodInMinute <Int32>
Time span used in evaluating the resource creation limit policy.
Required?False
Position?Named
Accept pipeline input?False
AliasesResourceCreationLimitPolicy_PolicyPeriodInMinutes
-RuntimeConfiguration_GameSessionActivationTimeoutSecond <Int32>
Maximum amount of time (in seconds) that a game session can remain in status ACTIVATING. If the game session is not active before the timeout, activation is terminated and the game session status is changed to TERMINATED.
Required?False
Position?Named
Accept pipeline input?False
AliasesRuntimeConfiguration_GameSessionActivationTimeoutSeconds
-RuntimeConfiguration_MaxConcurrentGameSessionActivation <Int32>
Maximum number of game sessions with status ACTIVATING to allow on an instance simultaneously. This setting limits the amount of instance resources that can be used for new game activations at any one time.
Required?False
Position?Named
Accept pipeline input?False
AliasesRuntimeConfiguration_MaxConcurrentGameSessionActivations
-RuntimeConfiguration_ServerProcess <ServerProcess[]>
Collection of server process configurations that describe which server processes to run on each instance in a fleet.
Required?False
Position?Named
Accept pipeline input?False
AliasesRuntimeConfiguration_ServerProcesses
-ScriptId <String>
Unique identifier for a Realtime script to be deployed on the new fleet. The Realtime script must have been successfully uploaded to Amazon GameLift. This fleet setting cannot be changed once the fleet is created.
Required?False
Position?Named
Accept pipeline input?False
-ServerLaunchParameter <String>
This parameter is no longer used. Instead, specify server launch parameters in the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)
Required?False
Position?Named
Accept pipeline input?False
AliasesServerLaunchParameters
-ServerLaunchPath <String>
This parameter is no longer used. Instead, specify a server launch path using the RuntimeConfiguration parameter. (Requests that specify a server launch path and launch parameters instead of a run-time configuration will continue to work.)
Required?False
Position?Named
Accept pipeline input?False

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
Aliases AK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-ProfileLocation <String>

Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)

If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.

If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.

As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.

Required? False
Position? Named
Accept pipeline input? False
Aliases AWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required? False
Position? Named
Accept pipeline input? False
Aliases AWSProfileName, StoredCredentials
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required? False
Position? Named
Accept pipeline input? False
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
Aliases SecretAccessKey, SK
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
Aliases ST
-Region <String>
The system name of the AWS region in which the operation should be invoked. For example, us-east-1, eu-west-1 etc.
Required? False
Position? Named
Accept pipeline input? False
Aliases RegionToCall
-EndpointUrl <String>

The endpoint to make the call against.

Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.

Required? False
Position? Named
Accept pipeline input? False

Inputs

You can pipe a String object to this cmdlet for the BuildId parameter.

Outputs

This cmdlet returns a Amazon.GameLift.Model.FleetAttributes object. The service call response (type Amazon.GameLift.Model.CreateFleetResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z