Smaws_Client_GameLift.CreateFleetThis API works with the following fleet types: EC2, Anywhere, Container
Creates a fleet of compute resources to host your game servers. Use this operation to set up a fleet for the following compute types:
Managed EC2 fleet
An EC2 fleet is a set of Amazon Elastic Compute Cloud (Amazon EC2) instances. Your game server build is deployed to each fleet instance. Amazon GameLift Servers manages the fleet's instances and controls the lifecycle of game server processes, which host game sessions for players. EC2 fleets can have instances in multiple locations. Each instance in the fleet is designated a Compute.
To create an EC2 fleet, provide these required parameters:
BuildId or ScriptIdComputeType set to EC2 (the default value)EC2InboundPermissionsEC2InstanceTypeFleetTypeNameRuntimeConfiguration with at least one ServerProcesses configurationIf successful, this operation creates a new fleet resource and places it in NEW status while Amazon GameLift Servers initiates the fleet creation workflow. To debug your fleet, fetch logs, view performance metrics or other actions on the fleet, create a development fleet with port 22/3389 open. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you're finished.
When the fleet status is ACTIVE, you can adjust capacity settings and turn autoscaling on/off for each location.
A managed fleet's runtime environment depends on the Amazon Machine Image (AMI) version it uses. When a new fleet is created, Amazon GameLift Servers assigns the latest available AMI version to the fleet, and all compute instances in that fleet are deployed with that version. To update the AMI version, you must create a new fleet. As a best practice, we recommend replacing your managed fleets every 30 days to maintain a secure and up-to-date runtime environment for your hosted game servers. For guidance, see Security best practices for Amazon GameLift Servers.
Anywhere fleet
An Anywhere fleet represents compute resources that are not owned or managed by Amazon GameLift Servers. You might create an Anywhere fleet with your local machine for testing, or use one to host game servers with on-premises hardware or other game hosting solutions.
To create an Anywhere fleet, provide these required parameters:
ComputeType set to ANYWHERELocations specifying a custom locationNameIf successful, this operation creates a new fleet resource and places it in ACTIVE status. You can register computes with a fleet in ACTIVE status.
Learn more
val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `ConflictException of Types.conflict_exception
| `InternalServiceException of Types.internal_service_exception
| `InvalidRequestException of Types.invalid_request_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `NotFoundException of Types.not_found_exception
| `NotReadyException of Types.not_ready_exception
| `TaggingFailedException of Types.tagging_failed_exception
| `UnauthorizedException of Types.unauthorized_exception
| `UnsupportedRegionException of Types.unsupported_region_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.create_fleet_input ->
(Types.create_fleet_output,
[> Smaws_Lib.Protocols.AwsJson.error
| `ConflictException of Types.conflict_exception
| `InternalServiceException of Types.internal_service_exception
| `InvalidRequestException of Types.invalid_request_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `NotFoundException of Types.not_found_exception
| `NotReadyException of Types.not_ready_exception
| `TaggingFailedException of Types.tagging_failed_exception
| `UnauthorizedException of Types.unauthorized_exception
| `UnsupportedRegionException of Types.unsupported_region_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.create_fleet_input ->
(Types.create_fleet_output Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `ConflictException of Types.conflict_exception
| `InternalServiceException of Types.internal_service_exception
| `InvalidRequestException of Types.invalid_request_exception
| `LimitExceededException of Types.limit_exceeded_exception
| `NotFoundException of Types.not_found_exception
| `NotReadyException of Types.not_ready_exception
| `TaggingFailedException of Types.tagging_failed_exception
| `UnauthorizedException of Types.unauthorized_exception
| `UnsupportedRegionException of Types.unsupported_region_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result