Struct aws_sdk_gamelift::client::fluent_builders::CreateFleet
source · [−]pub struct CreateFleet { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateFleet
.
Creates a fleet of Amazon Elastic Compute Cloud (Amazon Elastic Compute Cloud) instances to host your custom game server or Realtime Servers. Use this operation to configure the computing resources for your fleet and provide instructions for running game servers on each instance.
Most GameLift fleets can deploy instances to multiple locations, including the home Region (where the fleet is created) and an optional set of remote locations. Fleets that are created in the following Amazon Web Services Regions support multiple locations: us-east-1 (N. Virginia), us-west-2 (Oregon), eu-central-1 (Frankfurt), eu-west-1 (Ireland), ap-southeast-2 (Sydney), ap-northeast-1 (Tokyo), and ap-northeast-2 (Seoul). Fleets that are created in other GameLift Regions can deploy instances in the fleet's home Region only. All fleet instances use the same configuration regardless of location; however, you can adjust capacity settings and turn auto-scaling on/off for each location.
To create a fleet, choose the hardware for your instances, specify a game server build or Realtime script to deploy, and provide a runtime configuration to direct GameLift how to start and run game servers on each instance in the fleet. Set permissions for inbound traffic to your game servers, and enable optional features as needed. When creating a multi-location fleet, provide a list of additional remote locations.
If you need to debug your fleet, fetch logs, view performance metrics or other actions on the fleet, create the 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.
If successful, this operation creates a new Fleet resource and places it in NEW
status, which prompts GameLift to initiate the fleet creation workflow. You can track fleet creation by checking fleet status using DescribeFleetAttributes
and DescribeFleetLocationAttributes
/, or by monitoring fleet creation events using DescribeFleetEvents
. As soon as the fleet status changes to ACTIVE
, you can enable automatic scaling for the fleet with PutScalingPolicy
and set capacity for the home Region with UpdateFleetCapacity
. When the status of each remote location reaches ACTIVE
, you can set capacity by location using UpdateFleetCapacity
.
Learn more
Related actions
CreateFleet
| UpdateFleetCapacity
| PutScalingPolicy
| DescribeEC2InstanceLimits
| DescribeFleetAttributes
| DescribeFleetLocationAttributes
| UpdateFleetAttributes
| StopFleetActions
| DeleteFleet
| All APIs by task
Implementations
sourceimpl CreateFleet
impl CreateFleet
sourcepub async fn send(self) -> Result<CreateFleetOutput, SdkError<CreateFleetError>>
pub async fn send(self) -> Result<CreateFleetOutput, SdkError<CreateFleetError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
A descriptive label that is associated with a fleet. Fleet names do not need to be unique.
sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A human-readable description of the fleet.
sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A human-readable description of the fleet.
sourcepub fn build_id(self, input: impl Into<String>) -> Self
pub fn build_id(self, input: impl Into<String>) -> Self
The unique identifier for a custom game server build to be deployed on fleet instances. You can use either the build ID or ARN. The build must be uploaded to GameLift and in READY
status. This fleet property cannot be changed later.
sourcepub fn set_build_id(self, input: Option<String>) -> Self
pub fn set_build_id(self, input: Option<String>) -> Self
The unique identifier for a custom game server build to be deployed on fleet instances. You can use either the build ID or ARN. The build must be uploaded to GameLift and in READY
status. This fleet property cannot be changed later.
sourcepub fn script_id(self, input: impl Into<String>) -> Self
pub fn script_id(self, input: impl Into<String>) -> Self
The unique identifier for a Realtime configuration script to be deployed on fleet instances. You can use either the script ID or ARN. Scripts must be uploaded to GameLift prior to creating the fleet. This fleet property cannot be changed later.
sourcepub fn set_script_id(self, input: Option<String>) -> Self
pub fn set_script_id(self, input: Option<String>) -> Self
The unique identifier for a Realtime configuration script to be deployed on fleet instances. You can use either the script ID or ARN. Scripts must be uploaded to GameLift prior to creating the fleet. This fleet property cannot be changed later.
sourcepub fn server_launch_path(self, input: impl Into<String>) -> Self
pub fn server_launch_path(self, input: impl Into<String>) -> Self
This parameter is no longer used. Specify a server launch path using the RuntimeConfiguration
parameter. Requests that use this parameter instead continue to be valid.
sourcepub fn set_server_launch_path(self, input: Option<String>) -> Self
pub fn set_server_launch_path(self, input: Option<String>) -> Self
This parameter is no longer used. Specify a server launch path using the RuntimeConfiguration
parameter. Requests that use this parameter instead continue to be valid.
sourcepub fn server_launch_parameters(self, input: impl Into<String>) -> Self
pub fn server_launch_parameters(self, input: impl Into<String>) -> Self
This parameter is no longer used. Specify server launch parameters using the RuntimeConfiguration
parameter. Requests that use this parameter instead continue to be valid.
sourcepub fn set_server_launch_parameters(self, input: Option<String>) -> Self
pub fn set_server_launch_parameters(self, input: Option<String>) -> Self
This parameter is no longer used. Specify server launch parameters using the RuntimeConfiguration
parameter. Requests that use this parameter instead continue to be valid.
sourcepub fn log_paths(self, input: impl Into<String>) -> Self
pub fn log_paths(self, input: impl Into<String>) -> Self
Appends an item to LogPaths
.
To override the contents of this collection use set_log_paths
.
This parameter is no longer used. To specify where GameLift should store log files once a server process shuts down, use the GameLift server API ProcessReady()
and specify one or more directory paths in logParameters
. See more information in the Server API Reference.
sourcepub fn set_log_paths(self, input: Option<Vec<String>>) -> Self
pub fn set_log_paths(self, input: Option<Vec<String>>) -> Self
This parameter is no longer used. To specify where GameLift should store log files once a server process shuts down, use the GameLift server API ProcessReady()
and specify one or more directory paths in logParameters
. See more information in the Server API Reference.
sourcepub fn ec2_instance_type(self, input: Ec2InstanceType) -> Self
pub fn ec2_instance_type(self, input: Ec2InstanceType) -> Self
The GameLift-supported Amazon EC2 instance type to use for all fleet instances. 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.
sourcepub fn set_ec2_instance_type(self, input: Option<Ec2InstanceType>) -> Self
pub fn set_ec2_instance_type(self, input: Option<Ec2InstanceType>) -> Self
The GameLift-supported Amazon EC2 instance type to use for all fleet instances. 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.
sourcepub fn ec2_inbound_permissions(self, input: IpPermission) -> Self
pub fn ec2_inbound_permissions(self, input: IpPermission) -> Self
Appends an item to EC2InboundPermissions
.
To override the contents of this collection use set_ec2_inbound_permissions
.
The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. 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, GameLift automatically sets TCP and UDP ranges.
sourcepub fn set_ec2_inbound_permissions(
self,
input: Option<Vec<IpPermission>>
) -> Self
pub fn set_ec2_inbound_permissions(
self,
input: Option<Vec<IpPermission>>
) -> Self
The allowed IP address ranges and port settings that allow inbound traffic to access game sessions on this fleet. 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, GameLift automatically sets TCP and UDP ranges.
sourcepub fn new_game_session_protection_policy(self, input: ProtectionPolicy) -> Self
pub fn new_game_session_protection_policy(self, input: ProtectionPolicy) -> Self
The status of termination protection for active game sessions on the fleet. By default, this property is set to NoProtection
. You can also set game session protection for an individual game session by calling UpdateGameSession
.
-
NoProtection - Game sessions can be terminated during active gameplay as a result of a scale-down event.
-
FullProtection - Game sessions in
ACTIVE
status cannot be terminated during a scale-down event.
sourcepub fn set_new_game_session_protection_policy(
self,
input: Option<ProtectionPolicy>
) -> Self
pub fn set_new_game_session_protection_policy(
self,
input: Option<ProtectionPolicy>
) -> Self
The status of termination protection for active game sessions on the fleet. By default, this property is set to NoProtection
. You can also set game session protection for an individual game session by calling UpdateGameSession
.
-
NoProtection - Game sessions can be terminated during active gameplay as a result of a scale-down event.
-
FullProtection - Game sessions in
ACTIVE
status cannot be terminated during a scale-down event.
sourcepub fn runtime_configuration(self, input: RuntimeConfiguration) -> Self
pub fn runtime_configuration(self, input: RuntimeConfiguration) -> Self
Instructions for how to launch and maintain server processes on instances in the fleet. 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.
sourcepub fn set_runtime_configuration(
self,
input: Option<RuntimeConfiguration>
) -> Self
pub fn set_runtime_configuration(
self,
input: Option<RuntimeConfiguration>
) -> Self
Instructions for how to launch and maintain server processes on instances in the fleet. 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.
sourcepub fn resource_creation_limit_policy(
self,
input: ResourceCreationLimitPolicy
) -> Self
pub fn resource_creation_limit_policy(
self,
input: ResourceCreationLimitPolicy
) -> Self
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.
sourcepub fn set_resource_creation_limit_policy(
self,
input: Option<ResourceCreationLimitPolicy>
) -> Self
pub fn set_resource_creation_limit_policy(
self,
input: Option<ResourceCreationLimitPolicy>
) -> Self
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.
sourcepub fn metric_groups(self, input: impl Into<String>) -> Self
pub fn metric_groups(self, input: impl Into<String>) -> Self
Appends an item to MetricGroups
.
To override the contents of this collection use set_metric_groups
.
The name of an Amazon Web Services CloudWatch metric group to add this fleet to. 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.
sourcepub fn set_metric_groups(self, input: Option<Vec<String>>) -> Self
pub fn set_metric_groups(self, input: Option<Vec<String>>) -> Self
The name of an Amazon Web Services CloudWatch metric group to add this fleet to. 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.
sourcepub fn peer_vpc_aws_account_id(self, input: impl Into<String>) -> Self
pub fn peer_vpc_aws_account_id(self, input: impl Into<String>) -> Self
Used when peering your GameLift fleet with a VPC, the unique identifier for the Amazon Web Services account that owns the VPC. You can find your account ID in the Amazon Web Services Management Console under account settings.
sourcepub fn set_peer_vpc_aws_account_id(self, input: Option<String>) -> Self
pub fn set_peer_vpc_aws_account_id(self, input: Option<String>) -> Self
Used when peering your GameLift fleet with a VPC, the unique identifier for the Amazon Web Services account that owns the VPC. You can find your account ID in the Amazon Web Services Management Console under account settings.
sourcepub fn peer_vpc_id(self, input: impl Into<String>) -> Self
pub fn peer_vpc_id(self, input: impl Into<String>) -> Self
A unique identifier for a VPC with resources to be accessed by your GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with GameLift Fleets.
sourcepub fn set_peer_vpc_id(self, input: Option<String>) -> Self
pub fn set_peer_vpc_id(self, input: Option<String>) -> Self
A unique identifier for a VPC with resources to be accessed by your GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the VPC Dashboard in the Amazon Web Services Management Console. Learn more about VPC peering in VPC Peering with GameLift Fleets.
sourcepub fn fleet_type(self, input: FleetType) -> Self
pub fn fleet_type(self, input: FleetType) -> Self
Indicates whether to use On-Demand or Spot instances for this fleet. 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.
sourcepub fn set_fleet_type(self, input: Option<FleetType>) -> Self
pub fn set_fleet_type(self, input: Option<FleetType>) -> Self
Indicates whether to use On-Demand or Spot instances for this fleet. 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.
sourcepub fn instance_role_arn(self, input: impl Into<String>) -> Self
pub fn instance_role_arn(self, input: impl Into<String>) -> Self
A unique identifier for an IAM role that manages access to your Amazon Web Services 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, and daemons (background processes). Create a role or look up a role's ARN by using the IAM dashboard in the Amazon Web Services 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.
sourcepub fn set_instance_role_arn(self, input: Option<String>) -> Self
pub fn set_instance_role_arn(self, input: Option<String>) -> Self
A unique identifier for an IAM role that manages access to your Amazon Web Services 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, and daemons (background processes). Create a role or look up a role's ARN by using the IAM dashboard in the Amazon Web Services 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.
sourcepub fn certificate_configuration(self, input: CertificateConfiguration) -> Self
pub fn certificate_configuration(self, input: CertificateConfiguration) -> Self
Prompts GameLift to generate a TLS/SSL certificate for the fleet. TLS certificates are used for encrypting traffic between game clients and the game servers that are running on GameLift. By default, the CertificateConfiguration
is set to DISABLED
. This property cannot be changed after the fleet is created.
Note: This feature requires the Amazon Web Services Certificate Manager (ACM) service, which is not available in all Amazon Web Services regions. When working in a region that does not support this feature, a fleet creation request with certificate generation fails with a 4xx error.
sourcepub fn set_certificate_configuration(
self,
input: Option<CertificateConfiguration>
) -> Self
pub fn set_certificate_configuration(
self,
input: Option<CertificateConfiguration>
) -> Self
Prompts GameLift to generate a TLS/SSL certificate for the fleet. TLS certificates are used for encrypting traffic between game clients and the game servers that are running on GameLift. By default, the CertificateConfiguration
is set to DISABLED
. This property cannot be changed after the fleet is created.
Note: This feature requires the Amazon Web Services Certificate Manager (ACM) service, which is not available in all Amazon Web Services regions. When working in a region that does not support this feature, a fleet creation request with certificate generation fails with a 4xx error.
sourcepub fn locations(self, input: LocationConfiguration) -> Self
pub fn locations(self, input: LocationConfiguration) -> Self
Appends an item to Locations
.
To override the contents of this collection use set_locations
.
A set of remote locations to deploy additional instances to and manage as part of the fleet. This parameter can only be used when creating fleets in Amazon Web Services Regions that support multiple locations. You can add any GameLift-supported Amazon Web Services Region as a remote location, in the form of an Amazon Web Services Region code such as us-west-2
. To create a fleet with instances in the home Region only, omit this parameter.
sourcepub fn set_locations(self, input: Option<Vec<LocationConfiguration>>) -> Self
pub fn set_locations(self, input: Option<Vec<LocationConfiguration>>) -> Self
A set of remote locations to deploy additional instances to and manage as part of the fleet. This parameter can only be used when creating fleets in Amazon Web Services Regions that support multiple locations. You can add any GameLift-supported Amazon Web Services Region as a remote location, in the form of an Amazon Web Services Region code such as us-west-2
. To create a fleet with instances in the home Region only, omit this parameter.
Appends an item to Tags
.
To override the contents of this collection use set_tags
.
A list of labels to assign to the new fleet resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. Once the fleet is created, you can use TagResource
, UntagResource
, and ListTagsForResource
to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.
A list of labels to assign to the new fleet resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference. Once the fleet is created, you can use TagResource
, UntagResource
, and ListTagsForResource
to add, remove, and view tags. The maximum tag limit may be lower than stated. See the Amazon Web Services General Reference for actual tagging limits.
Trait Implementations
sourceimpl Clone for CreateFleet
impl Clone for CreateFleet
sourcefn clone(&self) -> CreateFleet
fn clone(&self) -> CreateFleet
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CreateFleet
impl Send for CreateFleet
impl Sync for CreateFleet
impl Unpin for CreateFleet
impl !UnwindSafe for CreateFleet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more