1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateFleet`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_name):<br>required: **true**<br><p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_description):<br>required: **false**<br><p>A description for the fleet.</p><br>
    ///   - [`build_id(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::build_id) / [`set_build_id(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_build_id):<br>required: **false**<br><p>The unique identifier for a custom game server build to be deployed to a fleet with compute type <code>EC2</code>. You can use either the build ID or ARN. The build must be uploaded to Amazon GameLift and in <code>READY</code> status. This fleet property can't be changed after the fleet is created.</p><br>
    ///   - [`script_id(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::script_id) / [`set_script_id(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_script_id):<br>required: **false**<br><p>The unique identifier for a Realtime configuration script to be deployed to a fleet with compute type <code>EC2</code>. You can use either the script ID or ARN. Scripts must be uploaded to Amazon GameLift prior to creating the fleet. This fleet property can't be changed after the fleet is created.</p><br>
    ///   - [`server_launch_path(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::server_launch_path) / [`set_server_launch_path(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_server_launch_path):<br>required: **false**<br><p><b>This parameter is no longer used.</b> Specify a server launch path using the <code>RuntimeConfiguration</code> parameter. Requests that use this parameter instead continue to be valid.</p><br>
    ///   - [`server_launch_parameters(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::server_launch_parameters) / [`set_server_launch_parameters(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_server_launch_parameters):<br>required: **false**<br><p><b>This parameter is no longer used.</b> Specify server launch parameters using the <code>RuntimeConfiguration</code> parameter. Requests that use this parameter instead continue to be valid.</p><br>
    ///   - [`log_paths(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::log_paths) / [`set_log_paths(Option<Vec::<String>>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_log_paths):<br>required: **false**<br><p><b>This parameter is no longer used.</b> To specify where Amazon GameLift should store log files once a server process shuts down, use the Amazon GameLift server API <code>ProcessReady()</code> and specify one or more directory paths in <code>logParameters</code>. For more information, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-initialize">Initialize the server process</a> in the <i>Amazon GameLift Developer Guide</i>.</p><br>
    ///   - [`ec2_instance_type(Ec2InstanceType)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::ec2_instance_type) / [`set_ec2_instance_type(Option<Ec2InstanceType>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_ec2_instance_type):<br>required: **false**<br><p>The Amazon GameLift-supported Amazon EC2 instance type to use with EC2 and container fleets. Instance type determines the computing resources that will be used to host your game servers, including CPU, memory, storage, and networking capacity. See <a href="http://aws.amazon.com/ec2/instance-types/">Amazon Elastic Compute Cloud Instance Types</a> for detailed descriptions of Amazon EC2 instance types.</p><br>
    ///   - [`ec2_inbound_permissions(IpPermission)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::ec2_inbound_permissions) / [`set_ec2_inbound_permissions(Option<Vec::<IpPermission>>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_ec2_inbound_permissions):<br>required: **false**<br><p>The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. Set this parameter for EC2 and container fleets. You can leave this parameter empty when creating the fleet, but you must call <code>UpdateFleetPortSettings</code> to set it before players can connect to game sessions. As a best practice, we recommend opening ports for remote access only when you need them and closing them when you're finished. For Realtime Servers fleets, Amazon GameLift automatically sets TCP and UDP ranges.</p> <p>To manage inbound access for a container fleet, set this parameter to the same port numbers that you set for the fleet's connection port range. During the life of the fleet, update this parameter to control which connection ports are open to inbound traffic.</p><br>
    ///   - [`new_game_session_protection_policy(ProtectionPolicy)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::new_game_session_protection_policy) / [`set_new_game_session_protection_policy(Option<ProtectionPolicy>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_new_game_session_protection_policy):<br>required: **false**<br><p>The status of termination protection for active game sessions on the fleet. By default, this property is set to <code>NoProtection</code>. You can also set game session protection for an individual game session by calling <a href="gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a>.</p> <ul>  <li>   <p><b>NoProtection</b> - Game sessions can be terminated during active gameplay as a result of a scale-down event.</p></li>  <li>   <p><b>FullProtection</b> - Game sessions in <code>ACTIVE</code> status cannot be terminated during a scale-down event.</p></li> </ul><br>
    ///   - [`runtime_configuration(RuntimeConfiguration)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::runtime_configuration) / [`set_runtime_configuration(Option<RuntimeConfiguration>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_runtime_configuration):<br>required: **false**<br><p>Instructions for how to launch and run server processes on the fleet. Set runtime configuration for EC2 fleets and container fleets. For an Anywhere fleets, set this parameter only if the fleet is running the Amazon GameLift Agent. The runtime configuration defines one or more server process configurations. Each server process identifies a game executable or Realtime script file and the number of processes to run concurrently.</p><note>  <p>This parameter replaces the parameters <code>ServerLaunchPath</code> and <code>ServerLaunchParameters</code>, which are still supported for backward compatibility.</p> </note><br>
    ///   - [`resource_creation_limit_policy(ResourceCreationLimitPolicy)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::resource_creation_limit_policy) / [`set_resource_creation_limit_policy(Option<ResourceCreationLimitPolicy>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_resource_creation_limit_policy):<br>required: **false**<br><p>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.</p><br>
    ///   - [`metric_groups(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::metric_groups) / [`set_metric_groups(Option<Vec::<String>>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_metric_groups):<br>required: **false**<br><p>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.</p><br>
    ///   - [`peer_vpc_aws_account_id(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::peer_vpc_aws_account_id) / [`set_peer_vpc_aws_account_id(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_peer_vpc_aws_account_id):<br>required: **false**<br><p>Used when peering your Amazon 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.</p><br>
    ///   - [`peer_vpc_id(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::peer_vpc_id) / [`set_peer_vpc_id(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_peer_vpc_id):<br>required: **false**<br><p>A unique identifier for a VPC with resources to be accessed by your Amazon GameLift fleet. The VPC must be in the same Region as your fleet. To look up a VPC ID, use the <a href="https://console.aws.amazon.com/vpc/">VPC Dashboard</a> in the Amazon Web Services Management Console. Learn more about VPC peering in <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/vpc-peering.html">VPC Peering with Amazon GameLift Fleets</a>.</p><br>
    ///   - [`fleet_type(FleetType)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::fleet_type) / [`set_fleet_type(Option<FleetType>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_fleet_type):<br>required: **false**<br><p>Indicates whether to use On-Demand or Spot instances for this fleet. By default, this property is set to <code>ON_DEMAND</code>. Learn more about when to use <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-ec2-instances.html#gamelift-ec2-instances-spot"> On-Demand versus Spot Instances</a>. This fleet property can't be changed after the fleet is created.</p><br>
    ///   - [`instance_role_arn(impl Into<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::instance_role_arn) / [`set_instance_role_arn(Option<String>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_instance_role_arn):<br>required: **false**<br><p>A unique identifier for an IAM role with access permissions to other Amazon Web Services services. Any application that runs on an instance in the fleet--including install scripts, server processes, and other processes--can use these permissions to interact with Amazon Web Services resources that you own or have access to. For more information about using the role with your game server builds, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html"> Communicate with other Amazon Web Services resources from your fleets</a>. This fleet property can't be changed after the fleet is created.</p><br>
    ///   - [`certificate_configuration(CertificateConfiguration)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::certificate_configuration) / [`set_certificate_configuration(Option<CertificateConfiguration>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_certificate_configuration):<br>required: **false**<br><p>Prompts Amazon GameLift to generate a TLS/SSL certificate for the fleet. Amazon GameLift uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift. By default, the <code>CertificateConfiguration</code> is <code>DISABLED</code>. You can't change this property after you create the fleet.</p> <p>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.</p><note>  <p>ACM isn't available in all Amazon Web Services 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 <a href="https://docs.aws.amazon.com/acm/latest/userguide/acm-regions.html">Supported Regions</a> in the <i>Certificate Manager User Guide</i>.</p> </note><br>
    ///   - [`locations(LocationConfiguration)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::locations) / [`set_locations(Option<Vec::<LocationConfiguration>>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_locations):<br>required: **false**<br><p>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 Amazon GameLift-supported Amazon Web Services Region as a remote location, in the form of an Amazon Web Services Region code, such as <code>us-west-2</code> or Local Zone code. To create a fleet with instances in the home Region only, don't set this parameter.</p> <p>When using this parameter, Amazon GameLift requires you to include your home location in the request.</p><br>
    ///   - [`tags(Tag)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_tags):<br>required: **false**<br><p>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 <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"> Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i>.</p><br>
    ///   - [`compute_type(ComputeType)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::compute_type) / [`set_compute_type(Option<ComputeType>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_compute_type):<br>required: **false**<br><p>The type of compute resource used to host your game servers.</p> <ul>  <li>   <p><code>EC2</code> – The game server build is deployed to Amazon EC2 instances for cloud hosting. This is the default setting.</p></li>  <li>   <p><code>CONTAINER</code> – Container images with your game server build and supporting software are deployed to Amazon EC2 instances for cloud hosting. With this compute type, you must specify the <code>ContainerGroupsConfiguration</code> parameter.</p></li>  <li>   <p><code>ANYWHERE</code> – Game servers or container images with your game server and supporting software are deployed to compute resources that are provided and managed by you. With this compute type, you can also set the <code>AnywhereConfiguration</code> parameter.</p></li> </ul><br>
    ///   - [`anywhere_configuration(AnywhereConfiguration)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::anywhere_configuration) / [`set_anywhere_configuration(Option<AnywhereConfiguration>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_anywhere_configuration):<br>required: **false**<br><p>Amazon GameLift Anywhere configuration options.</p><br>
    ///   - [`instance_role_credentials_provider(InstanceRoleCredentialsProvider)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::instance_role_credentials_provider) / [`set_instance_role_credentials_provider(Option<InstanceRoleCredentialsProvider>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_instance_role_credentials_provider):<br>required: **false**<br><p>Prompts Amazon GameLift to generate a shared credentials file for the IAM role that's defined in <code>InstanceRoleArn</code>. The shared credentials file is stored on each fleet instance and refreshed as needed. Use shared credentials for applications that are deployed along with the game server executable, if the game server is integrated with server SDK version 5.x. For more information about using shared credentials, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html"> Communicate with other Amazon Web Services resources from your fleets</a>.</p><br>
    ///   - [`container_groups_configuration(ContainerGroupsConfiguration)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::container_groups_configuration) / [`set_container_groups_configuration(Option<ContainerGroupsConfiguration>)`](crate::operation::create_fleet::builders::CreateFleetFluentBuilder::set_container_groups_configuration):<br>required: **false**<br><p>The container groups to deploy to instances in the container fleet and other fleet-level configuration settings. Use the <code>CreateContainerGroupDefinition</code> action to create container groups. A container fleet must have exactly one replica container group, and can optionally have one daemon container group. You can't change this property after you create the fleet.</p><br>
    /// - On success, responds with [`CreateFleetOutput`](crate::operation::create_fleet::CreateFleetOutput) with field(s):
    ///   - [`fleet_attributes(Option<FleetAttributes>)`](crate::operation::create_fleet::CreateFleetOutput::fleet_attributes): <p>The properties for the new fleet, including the current status. All fleets are placed in <code>NEW</code> status on creation.</p>
    ///   - [`location_states(Option<Vec::<LocationState>>)`](crate::operation::create_fleet::CreateFleetOutput::location_states): <p>The fleet's locations and life-cycle status of each location. For new fleets, the status of all locations is set to <code>NEW</code>. During fleet creation, Amazon GameLift updates each location status as instances are deployed there and prepared for game hosting. This list includes an entry for the fleet's home Region. For fleets with no remote locations, only one entry, representing the home Region, is returned.</p>
    /// - On failure, responds with [`SdkError<CreateFleetError>`](crate::operation::create_fleet::CreateFleetError)
    pub fn create_fleet(&self) -> crate::operation::create_fleet::builders::CreateFleetFluentBuilder {
        crate::operation::create_fleet::builders::CreateFleetFluentBuilder::new(self.handle.clone())
    }
}