Amazon.GameLift.AmazonGameLiftClient.CreateFleet C# (CSharp) Method

CreateFleet() public method

Creates a new fleet to run your game servers. A fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances, each of which can run multiple server processes to host game sessions. You configure a fleet to create instances with certain hardware specifications (see Amazon EC2 Instance Types for more information), and deploy a specified game build to each instance. A newly created fleet passes through several statuses; once it reaches the ACTIVE status, it can begin hosting game sessions.

To create a new fleet, provide a fleet name, an EC2 instance type, and a build ID of the game build to deploy. You can also configure the new fleet with the following settings: (1) a runtime configuration describing what server processes to run on each instance in the fleet (required to create fleet), (2) access permissions for inbound traffic, (3) fleet-wide game session protection, and (4) the location of default log files for GameLift to upload and store.

If the CreateFleet call is successful, Amazon GameLift performs the following tasks:

  • Creates a fleet record and sets the status to NEW (followed by other statuses as the fleet is activated).

  • Sets the fleet's capacity to 1 "desired", which causes GameLift to start one new EC2 instance.

  • Starts launching server processes on the instance. If the fleet is configured to run multiple server processes per instance, GameLift staggers each launch by a few seconds.

  • Begins writing events to the fleet event log, which can be accessed in the GameLift console.

  • Sets the fleet's status to ACTIVE once one server process in the fleet is ready to host a game session.

After a fleet is created, use the following actions to change fleet properties and configuration:

  • UpdateFleetAttributes -- Update fleet metadata, including name and description.

  • UpdateFleetCapacity -- Increase or decrease the number of instances you want the fleet to maintain.

  • UpdateFleetPortSettings -- Change the IP address and port ranges that allow access to incoming traffic.

  • UpdateRuntimeConfiguration -- Change how server processes are launched in the fleet, including launch path, launch parameters, and the number of concurrent processes.

/// The requested operation would cause a conflict with the current state of a service /// resource associated with the request. Resolve the conflict before retrying this request. /// /// The service encountered an unrecoverable internal failure while processing the request. /// Clients can retry such requests immediately or after a waiting period. /// /// One or more parameter values in the request are invalid. Correct the invalid parameter /// values before retrying. /// /// The requested operation would cause the resource to exceed the allowed service limit. /// Resolve the issue before retrying. /// /// A service resource associated with the request could not be found. Clients should /// not retry such requests. /// /// The client failed authentication. Clients should not retry such requests. ///
public CreateFleet ( CreateFleetRequest request ) : Amazon.GameLift.Model.CreateFleetResponse
request Amazon.GameLift.Model.CreateFleetRequest Container for the necessary parameters to execute the CreateFleet service method.
return Amazon.GameLift.Model.CreateFleetResponse
        public CreateFleetResponse CreateFleet(CreateFleetRequest request)
        {
            var marshaller = new CreateFleetRequestMarshaller();
            var unmarshaller = CreateFleetResponseUnmarshaller.Instance;

            return Invoke<CreateFleetRequest,CreateFleetResponse>(request, marshaller, unmarshaller);
        }
AmazonGameLiftClient