aws_sdk_gamelift/operation/create_fleet/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_fleet::_create_fleet_output::CreateFleetOutputBuilder;
3
4pub use crate::operation::create_fleet::_create_fleet_input::CreateFleetInputBuilder;
5
6impl crate::operation::create_fleet::builders::CreateFleetInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_fleet::CreateFleetOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_fleet::CreateFleetError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_fleet();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateFleet`.
24///
25/// <p><b>This API works with the following fleet types:</b> EC2, Anywhere, Container</p>
26/// <p>Creates a fleet of compute resources to host your game servers. Use this operation to set up a fleet for the following compute types:</p>
27/// <p><b>Managed EC2 fleet</b></p>
28/// <p>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 <code>Compute</code>.</p>
29/// <p>To create an EC2 fleet, provide these required parameters:</p>
30/// <ul>
31/// <li>
32/// <p>Either <code>BuildId</code> or <code>ScriptId</code></p></li>
33/// <li>
34/// <p><code>ComputeType</code> set to <code>EC2</code> (the default value)</p></li>
35/// <li>
36/// <p><code>EC2InboundPermissions</code></p></li>
37/// <li>
38/// <p><code>EC2InstanceType</code></p></li>
39/// <li>
40/// <p><code>FleetType</code></p></li>
41/// <li>
42/// <p><code>Name</code></p></li>
43/// <li>
44/// <p><code>RuntimeConfiguration</code> with at least one <code>ServerProcesses</code> configuration</p></li>
45/// </ul>
46/// <p>If successful, this operation creates a new fleet resource and places it in <code>NEW</code> status while Amazon GameLift Servers initiates the <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-all.html#fleets-creation-workflow">fleet creation workflow</a>. 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.</p>
47/// <p>When the fleet status is ACTIVE, you can adjust capacity settings and turn autoscaling on/off for each location.</p><note>
48/// <p>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 <a href="https://docs.aws.amazon.com/gameliftservers/latest/developerguide/security-best-practices.html"> Security best practices for Amazon GameLift Servers</a>.</p>
49/// </note>
50/// <p><b>Anywhere fleet</b></p>
51/// <p>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.</p>
52/// <p>To create an Anywhere fleet, provide these required parameters:</p>
53/// <ul>
54/// <li>
55/// <p><code>ComputeType</code> set to <code>ANYWHERE</code></p></li>
56/// <li>
57/// <p><code>Locations</code> specifying a custom location</p></li>
58/// <li>
59/// <p><code>Name</code></p></li>
60/// </ul>
61/// <p>If successful, this operation creates a new fleet resource and places it in <code>ACTIVE</code> status. You can register computes with a fleet in <code>ACTIVE</code> status.</p>
62/// <p><b>Learn more</b></p>
63/// <p><a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html">Setting up fleets</a></p>
64/// <p><a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-debug.html#fleets-creating-debug-creation">Debug fleet creation issues</a></p>
65/// <p><a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-intro.html">Multi-location fleets</a></p>
66#[derive(::std::clone::Clone, ::std::fmt::Debug)]
67pub struct CreateFleetFluentBuilder {
68 handle: ::std::sync::Arc<crate::client::Handle>,
69 inner: crate::operation::create_fleet::builders::CreateFleetInputBuilder,
70 config_override: ::std::option::Option<crate::config::Builder>,
71}
72impl
73 crate::client::customize::internal::CustomizableSend<
74 crate::operation::create_fleet::CreateFleetOutput,
75 crate::operation::create_fleet::CreateFleetError,
76 > for CreateFleetFluentBuilder
77{
78 fn send(
79 self,
80 config_override: crate::config::Builder,
81 ) -> crate::client::customize::internal::BoxFuture<
82 crate::client::customize::internal::SendResult<
83 crate::operation::create_fleet::CreateFleetOutput,
84 crate::operation::create_fleet::CreateFleetError,
85 >,
86 > {
87 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
88 }
89}
90impl CreateFleetFluentBuilder {
91 /// Creates a new `CreateFleetFluentBuilder`.
92 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
93 Self {
94 handle,
95 inner: ::std::default::Default::default(),
96 config_override: ::std::option::Option::None,
97 }
98 }
99 /// Access the CreateFleet as a reference.
100 pub fn as_input(&self) -> &crate::operation::create_fleet::builders::CreateFleetInputBuilder {
101 &self.inner
102 }
103 /// Sends the request and returns the response.
104 ///
105 /// If an error occurs, an `SdkError` will be returned with additional details that
106 /// can be matched against.
107 ///
108 /// By default, any retryable failures will be retried twice. Retry behavior
109 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
110 /// set when configuring the client.
111 pub async fn send(
112 self,
113 ) -> ::std::result::Result<
114 crate::operation::create_fleet::CreateFleetOutput,
115 ::aws_smithy_runtime_api::client::result::SdkError<
116 crate::operation::create_fleet::CreateFleetError,
117 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
118 >,
119 > {
120 let input = self
121 .inner
122 .build()
123 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
124 let runtime_plugins = crate::operation::create_fleet::CreateFleet::operation_runtime_plugins(
125 self.handle.runtime_plugins.clone(),
126 &self.handle.conf,
127 self.config_override,
128 );
129 crate::operation::create_fleet::CreateFleet::orchestrate(&runtime_plugins, input).await
130 }
131
132 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
133 pub fn customize(
134 self,
135 ) -> crate::client::customize::CustomizableOperation<
136 crate::operation::create_fleet::CreateFleetOutput,
137 crate::operation::create_fleet::CreateFleetError,
138 Self,
139 > {
140 crate::client::customize::CustomizableOperation::new(self)
141 }
142 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
143 self.set_config_override(::std::option::Option::Some(config_override.into()));
144 self
145 }
146
147 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
148 self.config_override = config_override;
149 self
150 }
151 /// <p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p>
152 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.inner = self.inner.name(input.into());
154 self
155 }
156 /// <p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p>
157 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158 self.inner = self.inner.set_name(input);
159 self
160 }
161 /// <p>A descriptive label that is associated with a fleet. Fleet names do not need to be unique.</p>
162 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
163 self.inner.get_name()
164 }
165 /// <p>A description for the fleet.</p>
166 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167 self.inner = self.inner.description(input.into());
168 self
169 }
170 /// <p>A description for the fleet.</p>
171 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
172 self.inner = self.inner.set_description(input);
173 self
174 }
175 /// <p>A description for the fleet.</p>
176 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
177 self.inner.get_description()
178 }
179 /// <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 Servers and in <code>READY</code> status. This fleet property can't be changed after the fleet is created.</p>
180 pub fn build_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181 self.inner = self.inner.build_id(input.into());
182 self
183 }
184 /// <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 Servers and in <code>READY</code> status. This fleet property can't be changed after the fleet is created.</p>
185 pub fn set_build_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.inner = self.inner.set_build_id(input);
187 self
188 }
189 /// <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 Servers and in <code>READY</code> status. This fleet property can't be changed after the fleet is created.</p>
190 pub fn get_build_id(&self) -> &::std::option::Option<::std::string::String> {
191 self.inner.get_build_id()
192 }
193 /// <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 Servers prior to creating the fleet. This fleet property can't be changed after the fleet is created.</p>
194 pub fn script_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195 self.inner = self.inner.script_id(input.into());
196 self
197 }
198 /// <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 Servers prior to creating the fleet. This fleet property can't be changed after the fleet is created.</p>
199 pub fn set_script_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200 self.inner = self.inner.set_script_id(input);
201 self
202 }
203 /// <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 Servers prior to creating the fleet. This fleet property can't be changed after the fleet is created.</p>
204 pub fn get_script_id(&self) -> &::std::option::Option<::std::string::String> {
205 self.inner.get_script_id()
206 }
207 /// <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>
208 pub fn server_launch_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209 self.inner = self.inner.server_launch_path(input.into());
210 self
211 }
212 /// <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>
213 pub fn set_server_launch_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214 self.inner = self.inner.set_server_launch_path(input);
215 self
216 }
217 /// <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>
218 pub fn get_server_launch_path(&self) -> &::std::option::Option<::std::string::String> {
219 self.inner.get_server_launch_path()
220 }
221 /// <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>
222 pub fn server_launch_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.inner = self.inner.server_launch_parameters(input.into());
224 self
225 }
226 /// <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>
227 pub fn set_server_launch_parameters(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.inner = self.inner.set_server_launch_parameters(input);
229 self
230 }
231 /// <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>
232 pub fn get_server_launch_parameters(&self) -> &::std::option::Option<::std::string::String> {
233 self.inner.get_server_launch_parameters()
234 }
235 ///
236 /// Appends an item to `LogPaths`.
237 ///
238 /// To override the contents of this collection use [`set_log_paths`](Self::set_log_paths).
239 ///
240 /// <p><b>This parameter is no longer used.</b> To specify where Amazon GameLift Servers should store log files once a server process shuts down, use the Amazon GameLift Servers 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 Servers Developer Guide</i>.</p>
241 pub fn log_paths(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242 self.inner = self.inner.log_paths(input.into());
243 self
244 }
245 /// <p><b>This parameter is no longer used.</b> To specify where Amazon GameLift Servers should store log files once a server process shuts down, use the Amazon GameLift Servers 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 Servers Developer Guide</i>.</p>
246 pub fn set_log_paths(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
247 self.inner = self.inner.set_log_paths(input);
248 self
249 }
250 /// <p><b>This parameter is no longer used.</b> To specify where Amazon GameLift Servers should store log files once a server process shuts down, use the Amazon GameLift Servers 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 Servers Developer Guide</i>.</p>
251 pub fn get_log_paths(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
252 self.inner.get_log_paths()
253 }
254 /// <p>The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 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>
255 pub fn ec2_instance_type(mut self, input: crate::types::Ec2InstanceType) -> Self {
256 self.inner = self.inner.ec2_instance_type(input);
257 self
258 }
259 /// <p>The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 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>
260 pub fn set_ec2_instance_type(mut self, input: ::std::option::Option<crate::types::Ec2InstanceType>) -> Self {
261 self.inner = self.inner.set_ec2_instance_type(input);
262 self
263 }
264 /// <p>The Amazon GameLift Servers-supported Amazon EC2 instance type to use with managed EC2 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>
265 pub fn get_ec2_instance_type(&self) -> &::std::option::Option<crate::types::Ec2InstanceType> {
266 self.inner.get_ec2_instance_type()
267 }
268 ///
269 /// Appends an item to `EC2InboundPermissions`.
270 ///
271 /// To override the contents of this collection use [`set_ec2_inbound_permissions`](Self::set_ec2_inbound_permissions).
272 ///
273 /// <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 managed EC2 fleets. You can leave this parameter empty when creating the fleet, but you must call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings">https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings</a> 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 Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically sets TCP and UDP ranges.</p>
274 pub fn ec2_inbound_permissions(mut self, input: crate::types::IpPermission) -> Self {
275 self.inner = self.inner.ec2_inbound_permissions(input);
276 self
277 }
278 /// <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 managed EC2 fleets. You can leave this parameter empty when creating the fleet, but you must call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings">https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings</a> 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 Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically sets TCP and UDP ranges.</p>
279 pub fn set_ec2_inbound_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IpPermission>>) -> Self {
280 self.inner = self.inner.set_ec2_inbound_permissions(input);
281 self
282 }
283 /// <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 managed EC2 fleets. You can leave this parameter empty when creating the fleet, but you must call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings">https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateFleetPortSettings</a> 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 Amazon GameLift Servers Realtime fleets, Amazon GameLift Servers automatically sets TCP and UDP ranges.</p>
284 pub fn get_ec2_inbound_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IpPermission>> {
285 self.inner.get_ec2_inbound_permissions()
286 }
287 /// <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>
288 /// <ul>
289 /// <li>
290 /// <p><b>NoProtection</b> - Game sessions can be terminated during active gameplay as a result of a scale-down event.</p></li>
291 /// <li>
292 /// <p><b>FullProtection</b> - Game sessions in <code>ACTIVE</code> status cannot be terminated during a scale-down event.</p></li>
293 /// </ul>
294 pub fn new_game_session_protection_policy(mut self, input: crate::types::ProtectionPolicy) -> Self {
295 self.inner = self.inner.new_game_session_protection_policy(input);
296 self
297 }
298 /// <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>
299 /// <ul>
300 /// <li>
301 /// <p><b>NoProtection</b> - Game sessions can be terminated during active gameplay as a result of a scale-down event.</p></li>
302 /// <li>
303 /// <p><b>FullProtection</b> - Game sessions in <code>ACTIVE</code> status cannot be terminated during a scale-down event.</p></li>
304 /// </ul>
305 pub fn set_new_game_session_protection_policy(mut self, input: ::std::option::Option<crate::types::ProtectionPolicy>) -> Self {
306 self.inner = self.inner.set_new_game_session_protection_policy(input);
307 self
308 }
309 /// <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>
310 /// <ul>
311 /// <li>
312 /// <p><b>NoProtection</b> - Game sessions can be terminated during active gameplay as a result of a scale-down event.</p></li>
313 /// <li>
314 /// <p><b>FullProtection</b> - Game sessions in <code>ACTIVE</code> status cannot be terminated during a scale-down event.</p></li>
315 /// </ul>
316 pub fn get_new_game_session_protection_policy(&self) -> &::std::option::Option<crate::types::ProtectionPolicy> {
317 self.inner.get_new_game_session_protection_policy()
318 }
319 /// <p>Instructions for how to launch and run server processes on the fleet. Set runtime configuration for managed EC2 fleets. For an Anywhere fleets, set this parameter only if the fleet is running the Amazon GameLift Servers 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>
320 /// <p>This parameter replaces the parameters <code>ServerLaunchPath</code> and <code>ServerLaunchParameters</code>, which are still supported for backward compatibility.</p>
321 /// </note>
322 pub fn runtime_configuration(mut self, input: crate::types::RuntimeConfiguration) -> Self {
323 self.inner = self.inner.runtime_configuration(input);
324 self
325 }
326 /// <p>Instructions for how to launch and run server processes on the fleet. Set runtime configuration for managed EC2 fleets. For an Anywhere fleets, set this parameter only if the fleet is running the Amazon GameLift Servers 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>
327 /// <p>This parameter replaces the parameters <code>ServerLaunchPath</code> and <code>ServerLaunchParameters</code>, which are still supported for backward compatibility.</p>
328 /// </note>
329 pub fn set_runtime_configuration(mut self, input: ::std::option::Option<crate::types::RuntimeConfiguration>) -> Self {
330 self.inner = self.inner.set_runtime_configuration(input);
331 self
332 }
333 /// <p>Instructions for how to launch and run server processes on the fleet. Set runtime configuration for managed EC2 fleets. For an Anywhere fleets, set this parameter only if the fleet is running the Amazon GameLift Servers 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>
334 /// <p>This parameter replaces the parameters <code>ServerLaunchPath</code> and <code>ServerLaunchParameters</code>, which are still supported for backward compatibility.</p>
335 /// </note>
336 pub fn get_runtime_configuration(&self) -> &::std::option::Option<crate::types::RuntimeConfiguration> {
337 self.inner.get_runtime_configuration()
338 }
339 /// <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>
340 pub fn resource_creation_limit_policy(mut self, input: crate::types::ResourceCreationLimitPolicy) -> Self {
341 self.inner = self.inner.resource_creation_limit_policy(input);
342 self
343 }
344 /// <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>
345 pub fn set_resource_creation_limit_policy(mut self, input: ::std::option::Option<crate::types::ResourceCreationLimitPolicy>) -> Self {
346 self.inner = self.inner.set_resource_creation_limit_policy(input);
347 self
348 }
349 /// <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>
350 pub fn get_resource_creation_limit_policy(&self) -> &::std::option::Option<crate::types::ResourceCreationLimitPolicy> {
351 self.inner.get_resource_creation_limit_policy()
352 }
353 ///
354 /// Appends an item to `MetricGroups`.
355 ///
356 /// To override the contents of this collection use [`set_metric_groups`](Self::set_metric_groups).
357 ///
358 /// <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>
359 pub fn metric_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360 self.inner = self.inner.metric_groups(input.into());
361 self
362 }
363 /// <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>
364 pub fn set_metric_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
365 self.inner = self.inner.set_metric_groups(input);
366 self
367 }
368 /// <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>
369 pub fn get_metric_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
370 self.inner.get_metric_groups()
371 }
372 /// <p>Used when peering your Amazon GameLift Servers 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>
373 pub fn peer_vpc_aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
374 self.inner = self.inner.peer_vpc_aws_account_id(input.into());
375 self
376 }
377 /// <p>Used when peering your Amazon GameLift Servers 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>
378 pub fn set_peer_vpc_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
379 self.inner = self.inner.set_peer_vpc_aws_account_id(input);
380 self
381 }
382 /// <p>Used when peering your Amazon GameLift Servers 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>
383 pub fn get_peer_vpc_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
384 self.inner.get_peer_vpc_aws_account_id()
385 }
386 /// <p>A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers 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 Servers Fleets</a>.</p>
387 pub fn peer_vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
388 self.inner = self.inner.peer_vpc_id(input.into());
389 self
390 }
391 /// <p>A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers 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 Servers Fleets</a>.</p>
392 pub fn set_peer_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
393 self.inner = self.inner.set_peer_vpc_id(input);
394 self
395 }
396 /// <p>A unique identifier for a VPC with resources to be accessed by your Amazon GameLift Servers 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 Servers Fleets</a>.</p>
397 pub fn get_peer_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
398 self.inner.get_peer_vpc_id()
399 }
400 /// <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>
401 pub fn fleet_type(mut self, input: crate::types::FleetType) -> Self {
402 self.inner = self.inner.fleet_type(input);
403 self
404 }
405 /// <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>
406 pub fn set_fleet_type(mut self, input: ::std::option::Option<crate::types::FleetType>) -> Self {
407 self.inner = self.inner.set_fleet_type(input);
408 self
409 }
410 /// <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>
411 pub fn get_fleet_type(&self) -> &::std::option::Option<crate::types::FleetType> {
412 self.inner.get_fleet_type()
413 }
414 /// <p>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 <a href="https://console.aws.amazon.com/iam/">IAM dashboard</a> in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html"> Access external resources from a game server</a>. This fleet property can't be changed after the fleet is created.</p>
415 pub fn instance_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
416 self.inner = self.inner.instance_role_arn(input.into());
417 self
418 }
419 /// <p>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 <a href="https://console.aws.amazon.com/iam/">IAM dashboard</a> in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html"> Access external resources from a game server</a>. This fleet property can't be changed after the fleet is created.</p>
420 pub fn set_instance_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
421 self.inner = self.inner.set_instance_role_arn(input);
422 self
423 }
424 /// <p>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 <a href="https://console.aws.amazon.com/iam/">IAM dashboard</a> in the Amazon Web Services Management Console. Learn more about using on-box credentials for your game servers at <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html"> Access external resources from a game server</a>. This fleet property can't be changed after the fleet is created.</p>
425 pub fn get_instance_role_arn(&self) -> &::std::option::Option<::std::string::String> {
426 self.inner.get_instance_role_arn()
427 }
428 /// <p>Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. Amazon GameLift Servers uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift Servers. By default, the <code>CertificateConfiguration</code> is <code>DISABLED</code>. You can't change this property after you create the fleet.</p>
429 /// <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>
430 /// <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>
431 /// </note>
432 pub fn certificate_configuration(mut self, input: crate::types::CertificateConfiguration) -> Self {
433 self.inner = self.inner.certificate_configuration(input);
434 self
435 }
436 /// <p>Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. Amazon GameLift Servers uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift Servers. By default, the <code>CertificateConfiguration</code> is <code>DISABLED</code>. You can't change this property after you create the fleet.</p>
437 /// <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>
438 /// <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>
439 /// </note>
440 pub fn set_certificate_configuration(mut self, input: ::std::option::Option<crate::types::CertificateConfiguration>) -> Self {
441 self.inner = self.inner.set_certificate_configuration(input);
442 self
443 }
444 /// <p>Prompts Amazon GameLift Servers to generate a TLS/SSL certificate for the fleet. Amazon GameLift Servers uses the certificates to encrypt traffic between game clients and the game servers running on Amazon GameLift Servers. By default, the <code>CertificateConfiguration</code> is <code>DISABLED</code>. You can't change this property after you create the fleet.</p>
445 /// <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>
446 /// <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>
447 /// </note>
448 pub fn get_certificate_configuration(&self) -> &::std::option::Option<crate::types::CertificateConfiguration> {
449 self.inner.get_certificate_configuration()
450 }
451 ///
452 /// Appends an item to `Locations`.
453 ///
454 /// To override the contents of this collection use [`set_locations`](Self::set_locations).
455 ///
456 /// <p>A set of remote locations to deploy additional instances to and manage as a multi-location fleet. Use this parameter when creating a fleet in Amazon Web Services Regions that support multiple locations. You can add any Amazon Web Services Region or Local Zone that's supported by Amazon GameLift Servers. Provide a list of one or more Amazon Web Services Region codes, such as <code>us-west-2</code>, or Local Zone names. When using this parameter, Amazon GameLift Servers requires you to include your home location in the request. For a list of supported Regions and Local Zones, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-regions.html"> Amazon GameLift Servers service locations</a> for managed hosting.</p>
457 pub fn locations(mut self, input: crate::types::LocationConfiguration) -> Self {
458 self.inner = self.inner.locations(input);
459 self
460 }
461 /// <p>A set of remote locations to deploy additional instances to and manage as a multi-location fleet. Use this parameter when creating a fleet in Amazon Web Services Regions that support multiple locations. You can add any Amazon Web Services Region or Local Zone that's supported by Amazon GameLift Servers. Provide a list of one or more Amazon Web Services Region codes, such as <code>us-west-2</code>, or Local Zone names. When using this parameter, Amazon GameLift Servers requires you to include your home location in the request. For a list of supported Regions and Local Zones, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-regions.html"> Amazon GameLift Servers service locations</a> for managed hosting.</p>
462 pub fn set_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LocationConfiguration>>) -> Self {
463 self.inner = self.inner.set_locations(input);
464 self
465 }
466 /// <p>A set of remote locations to deploy additional instances to and manage as a multi-location fleet. Use this parameter when creating a fleet in Amazon Web Services Regions that support multiple locations. You can add any Amazon Web Services Region or Local Zone that's supported by Amazon GameLift Servers. Provide a list of one or more Amazon Web Services Region codes, such as <code>us-west-2</code>, or Local Zone names. When using this parameter, Amazon GameLift Servers requires you to include your home location in the request. For a list of supported Regions and Local Zones, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-regions.html"> Amazon GameLift Servers service locations</a> for managed hosting.</p>
467 pub fn get_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LocationConfiguration>> {
468 self.inner.get_locations()
469 }
470 ///
471 /// Appends an item to `Tags`.
472 ///
473 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
474 ///
475 /// <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>
476 pub fn tags(mut self, input: crate::types::Tag) -> Self {
477 self.inner = self.inner.tags(input);
478 self
479 }
480 /// <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>
481 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
482 self.inner = self.inner.set_tags(input);
483 self
484 }
485 /// <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>
486 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
487 self.inner.get_tags()
488 }
489 /// <p>The type of compute resource used to host your game servers.</p>
490 /// <ul>
491 /// <li>
492 /// <p><code>EC2</code> – The game server build is deployed to Amazon EC2 instances for cloud hosting. This is the default setting.</p></li>
493 /// <li>
494 /// <p><code>ANYWHERE</code> – Game servers and supporting software are deployed to compute resources that you provide and manage. With this compute type, you can also set the <code>AnywhereConfiguration</code> parameter.</p></li>
495 /// </ul>
496 pub fn compute_type(mut self, input: crate::types::ComputeType) -> Self {
497 self.inner = self.inner.compute_type(input);
498 self
499 }
500 /// <p>The type of compute resource used to host your game servers.</p>
501 /// <ul>
502 /// <li>
503 /// <p><code>EC2</code> – The game server build is deployed to Amazon EC2 instances for cloud hosting. This is the default setting.</p></li>
504 /// <li>
505 /// <p><code>ANYWHERE</code> – Game servers and supporting software are deployed to compute resources that you provide and manage. With this compute type, you can also set the <code>AnywhereConfiguration</code> parameter.</p></li>
506 /// </ul>
507 pub fn set_compute_type(mut self, input: ::std::option::Option<crate::types::ComputeType>) -> Self {
508 self.inner = self.inner.set_compute_type(input);
509 self
510 }
511 /// <p>The type of compute resource used to host your game servers.</p>
512 /// <ul>
513 /// <li>
514 /// <p><code>EC2</code> – The game server build is deployed to Amazon EC2 instances for cloud hosting. This is the default setting.</p></li>
515 /// <li>
516 /// <p><code>ANYWHERE</code> – Game servers and supporting software are deployed to compute resources that you provide and manage. With this compute type, you can also set the <code>AnywhereConfiguration</code> parameter.</p></li>
517 /// </ul>
518 pub fn get_compute_type(&self) -> &::std::option::Option<crate::types::ComputeType> {
519 self.inner.get_compute_type()
520 }
521 /// <p>Amazon GameLift Servers Anywhere configuration options.</p>
522 pub fn anywhere_configuration(mut self, input: crate::types::AnywhereConfiguration) -> Self {
523 self.inner = self.inner.anywhere_configuration(input);
524 self
525 }
526 /// <p>Amazon GameLift Servers Anywhere configuration options.</p>
527 pub fn set_anywhere_configuration(mut self, input: ::std::option::Option<crate::types::AnywhereConfiguration>) -> Self {
528 self.inner = self.inner.set_anywhere_configuration(input);
529 self
530 }
531 /// <p>Amazon GameLift Servers Anywhere configuration options.</p>
532 pub fn get_anywhere_configuration(&self) -> &::std::option::Option<crate::types::AnywhereConfiguration> {
533 self.inner.get_anywhere_configuration()
534 }
535 /// <p>Prompts Amazon GameLift Servers 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>
536 pub fn instance_role_credentials_provider(mut self, input: crate::types::InstanceRoleCredentialsProvider) -> Self {
537 self.inner = self.inner.instance_role_credentials_provider(input);
538 self
539 }
540 /// <p>Prompts Amazon GameLift Servers 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>
541 pub fn set_instance_role_credentials_provider(mut self, input: ::std::option::Option<crate::types::InstanceRoleCredentialsProvider>) -> Self {
542 self.inner = self.inner.set_instance_role_credentials_provider(input);
543 self
544 }
545 /// <p>Prompts Amazon GameLift Servers 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>
546 pub fn get_instance_role_credentials_provider(&self) -> &::std::option::Option<crate::types::InstanceRoleCredentialsProvider> {
547 self.inner.get_instance_role_credentials_provider()
548 }
549}