aws_sdk_gamelift/operation/create_container_fleet/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_container_fleet::_create_container_fleet_output::CreateContainerFleetOutputBuilder;
3
4pub use crate::operation::create_container_fleet::_create_container_fleet_input::CreateContainerFleetInputBuilder;
5
6impl crate::operation::create_container_fleet::builders::CreateContainerFleetInputBuilder {
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_container_fleet::CreateContainerFleetOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_container_fleet::CreateContainerFleetError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_container_fleet();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateContainerFleet`.
24///
25/// <p><b>This API works with the following fleet types:</b> Container</p>
26/// <p>Creates a managed fleet of Amazon Elastic Compute Cloud (Amazon EC2) instances to host your containerized game servers. Use this operation to define how to deploy a container architecture onto each fleet instance and configure fleet settings. You can create a container fleet in any Amazon Web Services Regions that Amazon GameLift Servers supports for multi-location fleets. A container fleet can be deployed to a single location or multiple locations. Container fleets are deployed with Amazon Linux 2023 as the instance operating system.</p>
27/// <p>Define the fleet's container architecture using container group definitions. Each fleet can have one of the following container group types:</p>
28/// <ul>
29/// <li>
30/// <p>The game server container group runs your game server build and dependent software. Amazon GameLift Servers deploys one or more replicas of this container group to each fleet instance. The number of replicas depends on the computing capabilities of the fleet instance in use.</p></li>
31/// <li>
32/// <p>An optional per-instance container group might be used to run other software that only needs to run once per instance, such as background services, logging, or test processes. One per-instance container group is deployed to each fleet instance.</p></li>
33/// </ul>
34/// <p>Each container group can include the definition for one or more containers. A container definition specifies a container image that is stored in an Amazon Elastic Container Registry (Amazon ECR) public or private repository.</p>
35/// <p><b>Request options</b></p>
36/// <p>Use this operation to make the following types of requests. Most fleet settings have default values, so you can create a working fleet with a minimal configuration and default values, which you can customize later.</p>
37/// <ul>
38/// <li>
39/// <p>Create a fleet with no container groups. You can configure a container fleet and then add container group definitions later. In this scenario, no fleet instances are deployed, and the fleet can't host game sessions until you add a game server container group definition. Provide the following required parameter values:</p>
40/// <ul>
41/// <li>
42/// <p><code>FleetRoleArn</code></p></li>
43/// </ul></li>
44/// <li>
45/// <p>Create a fleet with a game server container group. Provide the following required parameter values:</p>
46/// <ul>
47/// <li>
48/// <p><code>FleetRoleArn</code></p></li>
49/// <li>
50/// <p><code>GameServerContainerGroupDefinitionName</code></p></li>
51/// </ul></li>
52/// <li>
53/// <p>Create a fleet with a game server container group and a per-instance container group. Provide the following required parameter values:</p>
54/// <ul>
55/// <li>
56/// <p><code>FleetRoleArn</code></p></li>
57/// <li>
58/// <p><code>GameServerContainerGroupDefinitionName</code></p></li>
59/// <li>
60/// <p><code>PerInstanceContainerGroupDefinitionName</code></p></li>
61/// </ul></li>
62/// </ul>
63/// <p><b>Results</b></p>
64/// <p>If successful, this operation creates a new container fleet resource, places it in <code>PENDING</code> status, and initiates the <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-creating-all.html#fleets-creation-workflow">fleet creation workflow</a>. For fleets with container groups, this workflow starts a fleet deployment and transitions the status to <code>ACTIVE</code>. Fleets without a container group are placed in <code>CREATED</code> status.</p>
65/// <p>You can update most of the properties of a fleet, including container group definitions, and deploy the update across all fleet instances. Use <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateContainerFleet.html">UpdateContainerFleet</a> to deploy a new game server version update across the container fleet.</p><note>
66/// <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>
67/// </note>
68#[derive(::std::clone::Clone, ::std::fmt::Debug)]
69pub struct CreateContainerFleetFluentBuilder {
70 handle: ::std::sync::Arc<crate::client::Handle>,
71 inner: crate::operation::create_container_fleet::builders::CreateContainerFleetInputBuilder,
72 config_override: ::std::option::Option<crate::config::Builder>,
73}
74impl
75 crate::client::customize::internal::CustomizableSend<
76 crate::operation::create_container_fleet::CreateContainerFleetOutput,
77 crate::operation::create_container_fleet::CreateContainerFleetError,
78 > for CreateContainerFleetFluentBuilder
79{
80 fn send(
81 self,
82 config_override: crate::config::Builder,
83 ) -> crate::client::customize::internal::BoxFuture<
84 crate::client::customize::internal::SendResult<
85 crate::operation::create_container_fleet::CreateContainerFleetOutput,
86 crate::operation::create_container_fleet::CreateContainerFleetError,
87 >,
88 > {
89 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
90 }
91}
92impl CreateContainerFleetFluentBuilder {
93 /// Creates a new `CreateContainerFleetFluentBuilder`.
94 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
95 Self {
96 handle,
97 inner: ::std::default::Default::default(),
98 config_override: ::std::option::Option::None,
99 }
100 }
101 /// Access the CreateContainerFleet as a reference.
102 pub fn as_input(&self) -> &crate::operation::create_container_fleet::builders::CreateContainerFleetInputBuilder {
103 &self.inner
104 }
105 /// Sends the request and returns the response.
106 ///
107 /// If an error occurs, an `SdkError` will be returned with additional details that
108 /// can be matched against.
109 ///
110 /// By default, any retryable failures will be retried twice. Retry behavior
111 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
112 /// set when configuring the client.
113 pub async fn send(
114 self,
115 ) -> ::std::result::Result<
116 crate::operation::create_container_fleet::CreateContainerFleetOutput,
117 ::aws_smithy_runtime_api::client::result::SdkError<
118 crate::operation::create_container_fleet::CreateContainerFleetError,
119 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
120 >,
121 > {
122 let input = self
123 .inner
124 .build()
125 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
126 let runtime_plugins = crate::operation::create_container_fleet::CreateContainerFleet::operation_runtime_plugins(
127 self.handle.runtime_plugins.clone(),
128 &self.handle.conf,
129 self.config_override,
130 );
131 crate::operation::create_container_fleet::CreateContainerFleet::orchestrate(&runtime_plugins, input).await
132 }
133
134 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
135 pub fn customize(
136 self,
137 ) -> crate::client::customize::CustomizableOperation<
138 crate::operation::create_container_fleet::CreateContainerFleetOutput,
139 crate::operation::create_container_fleet::CreateContainerFleetError,
140 Self,
141 > {
142 crate::client::customize::CustomizableOperation::new(self)
143 }
144 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
145 self.set_config_override(::std::option::Option::Some(config_override.into()));
146 self
147 }
148
149 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
150 self.config_override = config_override;
151 self
152 }
153 /// <p>The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. Use an IAM service role with the <code>GameLiftContainerFleetPolicy</code> managed policy attached. For more information, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/setting-up-role.html">Set up an IAM service role</a>. You can't change this fleet property after the fleet is created.</p>
154 /// <p>IAM role ARN values use the following pattern: <code>arn:aws:iam::\[Amazon Web Services account\]:role/\[role name\]</code>.</p>
155 pub fn fleet_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.fleet_role_arn(input.into());
157 self
158 }
159 /// <p>The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. Use an IAM service role with the <code>GameLiftContainerFleetPolicy</code> managed policy attached. For more information, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/setting-up-role.html">Set up an IAM service role</a>. You can't change this fleet property after the fleet is created.</p>
160 /// <p>IAM role ARN values use the following pattern: <code>arn:aws:iam::\[Amazon Web Services account\]:role/\[role name\]</code>.</p>
161 pub fn set_fleet_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.inner = self.inner.set_fleet_role_arn(input);
163 self
164 }
165 /// <p>The unique identifier for an Identity and Access Management (IAM) role with permissions to run your containers on resources that are managed by Amazon GameLift Servers. Use an IAM service role with the <code>GameLiftContainerFleetPolicy</code> managed policy attached. For more information, see <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/setting-up-role.html">Set up an IAM service role</a>. You can't change this fleet property after the fleet is created.</p>
166 /// <p>IAM role ARN values use the following pattern: <code>arn:aws:iam::\[Amazon Web Services account\]:role/\[role name\]</code>.</p>
167 pub fn get_fleet_role_arn(&self) -> &::std::option::Option<::std::string::String> {
168 self.inner.get_fleet_role_arn()
169 }
170 /// <p>A meaningful description of the container fleet.</p>
171 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.inner = self.inner.description(input.into());
173 self
174 }
175 /// <p>A meaningful description of the container fleet.</p>
176 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.inner = self.inner.set_description(input);
178 self
179 }
180 /// <p>A meaningful description of the container fleet.</p>
181 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
182 self.inner.get_description()
183 }
184 /// <p>A container group definition resource that describes how to deploy containers with your game server build and support software onto each fleet instance. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.</p>
185 /// <p>Create a container group definition by calling <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html">CreateContainerGroupDefinition</a>. This operation creates a <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html">ContainerGroupDefinition</a> resource.</p>
186 pub fn game_server_container_group_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187 self.inner = self.inner.game_server_container_group_definition_name(input.into());
188 self
189 }
190 /// <p>A container group definition resource that describes how to deploy containers with your game server build and support software onto each fleet instance. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.</p>
191 /// <p>Create a container group definition by calling <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html">CreateContainerGroupDefinition</a>. This operation creates a <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html">ContainerGroupDefinition</a> resource.</p>
192 pub fn set_game_server_container_group_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193 self.inner = self.inner.set_game_server_container_group_definition_name(input);
194 self
195 }
196 /// <p>A container group definition resource that describes how to deploy containers with your game server build and support software onto each fleet instance. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.</p>
197 /// <p>Create a container group definition by calling <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html">CreateContainerGroupDefinition</a>. This operation creates a <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html">ContainerGroupDefinition</a> resource.</p>
198 pub fn get_game_server_container_group_definition_name(&self) -> &::std::option::Option<::std::string::String> {
199 self.inner.get_game_server_container_group_definition_name()
200 }
201 /// <p>The name of a container group definition resource that describes a set of axillary software. A fleet instance has one process for executables in this container group. A per-instance container group is optional. You can update the fleet to add or remove a per-instance container group at any time. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.</p>
202 /// <p>Create a container group definition by calling <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html">https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html</a>. This operation creates a <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html">https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html</a> resource.</p>
203 pub fn per_instance_container_group_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204 self.inner = self.inner.per_instance_container_group_definition_name(input.into());
205 self
206 }
207 /// <p>The name of a container group definition resource that describes a set of axillary software. A fleet instance has one process for executables in this container group. A per-instance container group is optional. You can update the fleet to add or remove a per-instance container group at any time. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.</p>
208 /// <p>Create a container group definition by calling <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html">https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html</a>. This operation creates a <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html">https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html</a> resource.</p>
209 pub fn set_per_instance_container_group_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210 self.inner = self.inner.set_per_instance_container_group_definition_name(input);
211 self
212 }
213 /// <p>The name of a container group definition resource that describes a set of axillary software. A fleet instance has one process for executables in this container group. A per-instance container group is optional. You can update the fleet to add or remove a per-instance container group at any time. You can specify the container group definition's name to use the latest version. Alternatively, provide an ARN value with a specific version number.</p>
214 /// <p>Create a container group definition by calling <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html">https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateContainerGroupDefinition.html</a>. This operation creates a <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html">https://docs.aws.amazon.com/gamelift/latest/apireference/API_ContainerGroupDefinition.html</a> resource.</p>
215 pub fn get_per_instance_container_group_definition_name(&self) -> &::std::option::Option<::std::string::String> {
216 self.inner.get_per_instance_container_group_definition_name()
217 }
218 /// <p>The set of port numbers to open on each fleet instance. A fleet's connection ports map to container ports that are configured in the fleet's container group definitions.</p>
219 /// <p>By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:</p>
220 /// <ul>
221 /// <li>
222 /// <p>Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: <code>4192 + \[# of game server container groups per fleet instance\] * \[# of container ports in the game server container group definition\] + \[# of container ports in the game server container group definition\]</code></p></li>
223 /// </ul>
224 /// <p>You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's inbound permissions port range.</p><note>
225 /// <p>If you set values manually, Amazon GameLift Servers no longer calculates a port range for you, even if you later remove the manual settings.</p>
226 /// </note>
227 pub fn instance_connection_port_range(mut self, input: crate::types::ConnectionPortRange) -> Self {
228 self.inner = self.inner.instance_connection_port_range(input);
229 self
230 }
231 /// <p>The set of port numbers to open on each fleet instance. A fleet's connection ports map to container ports that are configured in the fleet's container group definitions.</p>
232 /// <p>By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:</p>
233 /// <ul>
234 /// <li>
235 /// <p>Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: <code>4192 + \[# of game server container groups per fleet instance\] * \[# of container ports in the game server container group definition\] + \[# of container ports in the game server container group definition\]</code></p></li>
236 /// </ul>
237 /// <p>You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's inbound permissions port range.</p><note>
238 /// <p>If you set values manually, Amazon GameLift Servers no longer calculates a port range for you, even if you later remove the manual settings.</p>
239 /// </note>
240 pub fn set_instance_connection_port_range(mut self, input: ::std::option::Option<crate::types::ConnectionPortRange>) -> Self {
241 self.inner = self.inner.set_instance_connection_port_range(input);
242 self
243 }
244 /// <p>The set of port numbers to open on each fleet instance. A fleet's connection ports map to container ports that are configured in the fleet's container group definitions.</p>
245 /// <p>By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:</p>
246 /// <ul>
247 /// <li>
248 /// <p>Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: <code>4192 + \[# of game server container groups per fleet instance\] * \[# of container ports in the game server container group definition\] + \[# of container ports in the game server container group definition\]</code></p></li>
249 /// </ul>
250 /// <p>You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's inbound permissions port range.</p><note>
251 /// <p>If you set values manually, Amazon GameLift Servers no longer calculates a port range for you, even if you later remove the manual settings.</p>
252 /// </note>
253 pub fn get_instance_connection_port_range(&self) -> &::std::option::Option<crate::types::ConnectionPortRange> {
254 self.inner.get_instance_connection_port_range()
255 }
256 ///
257 /// Appends an item to `InstanceInboundPermissions`.
258 ///
259 /// To override the contents of this collection use [`set_instance_inbound_permissions`](Self::set_instance_inbound_permissions).
260 ///
261 /// <p>The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. As a best practice, when remotely accessing a fleet instance, we recommend opening ports only when you need them and closing them when you're finished.</p>
262 /// <p>By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:</p>
263 /// <ul>
264 /// <li>
265 /// <p>Protocol: UDP</p></li>
266 /// <li>
267 /// <p>Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: <code>4192 + \[# of game server container groups per fleet instance\] * \[# of container ports in the game server container group definition\] + \[# of container ports in the game server container group definition\]</code></p></li>
268 /// </ul>
269 /// <p>You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's connection port range.</p><note>
270 /// <p>If you set values manually, Amazon GameLift Servers no longer calculates a port range for you, even if you later remove the manual settings.</p>
271 /// </note>
272 pub fn instance_inbound_permissions(mut self, input: crate::types::IpPermission) -> Self {
273 self.inner = self.inner.instance_inbound_permissions(input);
274 self
275 }
276 /// <p>The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. As a best practice, when remotely accessing a fleet instance, we recommend opening ports only when you need them and closing them when you're finished.</p>
277 /// <p>By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:</p>
278 /// <ul>
279 /// <li>
280 /// <p>Protocol: UDP</p></li>
281 /// <li>
282 /// <p>Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: <code>4192 + \[# of game server container groups per fleet instance\] * \[# of container ports in the game server container group definition\] + \[# of container ports in the game server container group definition\]</code></p></li>
283 /// </ul>
284 /// <p>You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's connection port range.</p><note>
285 /// <p>If you set values manually, Amazon GameLift Servers no longer calculates a port range for you, even if you later remove the manual settings.</p>
286 /// </note>
287 pub fn set_instance_inbound_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IpPermission>>) -> Self {
288 self.inner = self.inner.set_instance_inbound_permissions(input);
289 self
290 }
291 /// <p>The IP address ranges and port settings that allow inbound traffic to access game server processes and other processes on this fleet. As a best practice, when remotely accessing a fleet instance, we recommend opening ports only when you need them and closing them when you're finished.</p>
292 /// <p>By default, Amazon GameLift Servers calculates an optimal port range based on your fleet configuration. To use the calculated range, don't set this parameter. The values are:</p>
293 /// <ul>
294 /// <li>
295 /// <p>Protocol: UDP</p></li>
296 /// <li>
297 /// <p>Port range: 4192 to a number calculated based on your fleet configuration. Amazon GameLift Servers uses the following formula: <code>4192 + \[# of game server container groups per fleet instance\] * \[# of container ports in the game server container group definition\] + \[# of container ports in the game server container group definition\]</code></p></li>
298 /// </ul>
299 /// <p>You can also choose to manually set this parameter. When manually setting this parameter, you must use port numbers that match the fleet's connection port range.</p><note>
300 /// <p>If you set values manually, Amazon GameLift Servers no longer calculates a port range for you, even if you later remove the manual settings.</p>
301 /// </note>
302 pub fn get_instance_inbound_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IpPermission>> {
303 self.inner.get_instance_inbound_permissions()
304 }
305 /// <p>The number of times to replicate the game server container group on each fleet instance.</p>
306 /// <p>By default, Amazon GameLift Servers calculates the maximum number of game server container groups that can fit on each instance. This calculation is based on the CPU and memory resources of the fleet's instance type). To use the calculated maximum, don't set this parameter. If you set this number manually, Amazon GameLift Servers uses your value as long as it's less than the calculated maximum.</p>
307 pub fn game_server_container_groups_per_instance(mut self, input: i32) -> Self {
308 self.inner = self.inner.game_server_container_groups_per_instance(input);
309 self
310 }
311 /// <p>The number of times to replicate the game server container group on each fleet instance.</p>
312 /// <p>By default, Amazon GameLift Servers calculates the maximum number of game server container groups that can fit on each instance. This calculation is based on the CPU and memory resources of the fleet's instance type). To use the calculated maximum, don't set this parameter. If you set this number manually, Amazon GameLift Servers uses your value as long as it's less than the calculated maximum.</p>
313 pub fn set_game_server_container_groups_per_instance(mut self, input: ::std::option::Option<i32>) -> Self {
314 self.inner = self.inner.set_game_server_container_groups_per_instance(input);
315 self
316 }
317 /// <p>The number of times to replicate the game server container group on each fleet instance.</p>
318 /// <p>By default, Amazon GameLift Servers calculates the maximum number of game server container groups that can fit on each instance. This calculation is based on the CPU and memory resources of the fleet's instance type). To use the calculated maximum, don't set this parameter. If you set this number manually, Amazon GameLift Servers uses your value as long as it's less than the calculated maximum.</p>
319 pub fn get_game_server_container_groups_per_instance(&self) -> &::std::option::Option<i32> {
320 self.inner.get_game_server_container_groups_per_instance()
321 }
322 /// <p>The Amazon EC2 instance type to use for all instances in the fleet. For multi-location fleets, the instance type must be available in the home region and all remote locations. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity.</p>
323 /// <p>By default, Amazon GameLift Servers selects an instance type that fits the needs of your container groups and is available in all selected fleet locations. You can also choose to manually set this parameter. 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>
324 /// <p>You can't update this fleet property later.</p>
325 pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
326 self.inner = self.inner.instance_type(input.into());
327 self
328 }
329 /// <p>The Amazon EC2 instance type to use for all instances in the fleet. For multi-location fleets, the instance type must be available in the home region and all remote locations. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity.</p>
330 /// <p>By default, Amazon GameLift Servers selects an instance type that fits the needs of your container groups and is available in all selected fleet locations. You can also choose to manually set this parameter. 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>
331 /// <p>You can't update this fleet property later.</p>
332 pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
333 self.inner = self.inner.set_instance_type(input);
334 self
335 }
336 /// <p>The Amazon EC2 instance type to use for all instances in the fleet. For multi-location fleets, the instance type must be available in the home region and all remote locations. Instance type determines the computing resources and processing power that's available to host your game servers. This includes including CPU, memory, storage, and networking capacity.</p>
337 /// <p>By default, Amazon GameLift Servers selects an instance type that fits the needs of your container groups and is available in all selected fleet locations. You can also choose to manually set this parameter. 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>
338 /// <p>You can't update this fleet property later.</p>
339 pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
340 self.inner.get_instance_type()
341 }
342 /// <p>Indicates whether to use On-Demand or Spot instances for this fleet. 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>
343 /// <p>By default, this property is set to <code>ON_DEMAND</code>.</p>
344 /// <p>You can't update this fleet property later.</p>
345 pub fn billing_type(mut self, input: crate::types::ContainerFleetBillingType) -> Self {
346 self.inner = self.inner.billing_type(input);
347 self
348 }
349 /// <p>Indicates whether to use On-Demand or Spot instances for this fleet. 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>
350 /// <p>By default, this property is set to <code>ON_DEMAND</code>.</p>
351 /// <p>You can't update this fleet property later.</p>
352 pub fn set_billing_type(mut self, input: ::std::option::Option<crate::types::ContainerFleetBillingType>) -> Self {
353 self.inner = self.inner.set_billing_type(input);
354 self
355 }
356 /// <p>Indicates whether to use On-Demand or Spot instances for this fleet. 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>
357 /// <p>By default, this property is set to <code>ON_DEMAND</code>.</p>
358 /// <p>You can't update this fleet property later.</p>
359 pub fn get_billing_type(&self) -> &::std::option::Option<crate::types::ContainerFleetBillingType> {
360 self.inner.get_billing_type()
361 }
362 ///
363 /// Appends an item to `Locations`.
364 ///
365 /// To override the contents of this collection use [`set_locations`](Self::set_locations).
366 ///
367 /// <p>A set of locations to deploy container fleet instances to. 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. Also include the fleet's home Region, which is the Amazon Web Services Region where the fleet is created. 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>
368 pub fn locations(mut self, input: crate::types::LocationConfiguration) -> Self {
369 self.inner = self.inner.locations(input);
370 self
371 }
372 /// <p>A set of locations to deploy container fleet instances to. 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. Also include the fleet's home Region, which is the Amazon Web Services Region where the fleet is created. 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>
373 pub fn set_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LocationConfiguration>>) -> Self {
374 self.inner = self.inner.set_locations(input);
375 self
376 }
377 /// <p>A set of locations to deploy container fleet instances to. 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. Also include the fleet's home Region, which is the Amazon Web Services Region where the fleet is created. 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>
378 pub fn get_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LocationConfiguration>> {
379 self.inner.get_locations()
380 }
381 ///
382 /// Appends an item to `MetricGroups`.
383 ///
384 /// To override the contents of this collection use [`set_metric_groups`](Self::set_metric_groups).
385 ///
386 /// <p>The name of an Amazon Web Services CloudWatch metric group to add this fleet to. You can use a metric group to aggregate metrics for multiple fleets. You can specify an existing metric group name or use a new name to create a new metric group. Each fleet can have only one metric group, but you can change this value at any time.</p>
387 pub fn metric_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
388 self.inner = self.inner.metric_groups(input.into());
389 self
390 }
391 /// <p>The name of an Amazon Web Services CloudWatch metric group to add this fleet to. You can use a metric group to aggregate metrics for multiple fleets. You can specify an existing metric group name or use a new name to create a new metric group. Each fleet can have only one metric group, but you can change this value at any time.</p>
392 pub fn set_metric_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
393 self.inner = self.inner.set_metric_groups(input);
394 self
395 }
396 /// <p>The name of an Amazon Web Services CloudWatch metric group to add this fleet to. You can use a metric group to aggregate metrics for multiple fleets. You can specify an existing metric group name or use a new name to create a new metric group. Each fleet can have only one metric group, but you can change this value at any time.</p>
397 pub fn get_metric_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
398 self.inner.get_metric_groups()
399 }
400 /// <p>Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using <a href="gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a>.</p>
401 /// <ul>
402 /// <li>
403 /// <p><b>NoProtection</b> -- Game sessions can be shut down during active gameplay.</p></li>
404 /// <li>
405 /// <p><b>FullProtection</b> -- Game sessions in <code>ACTIVE</code> status can't be shut down.</p></li>
406 /// </ul>
407 /// <p>By default, this property is set to <code>NoProtection</code>.</p>
408 pub fn new_game_session_protection_policy(mut self, input: crate::types::ProtectionPolicy) -> Self {
409 self.inner = self.inner.new_game_session_protection_policy(input);
410 self
411 }
412 /// <p>Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using <a href="gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a>.</p>
413 /// <ul>
414 /// <li>
415 /// <p><b>NoProtection</b> -- Game sessions can be shut down during active gameplay.</p></li>
416 /// <li>
417 /// <p><b>FullProtection</b> -- Game sessions in <code>ACTIVE</code> status can't be shut down.</p></li>
418 /// </ul>
419 /// <p>By default, this property is set to <code>NoProtection</code>.</p>
420 pub fn set_new_game_session_protection_policy(mut self, input: ::std::option::Option<crate::types::ProtectionPolicy>) -> Self {
421 self.inner = self.inner.set_new_game_session_protection_policy(input);
422 self
423 }
424 /// <p>Determines whether Amazon GameLift Servers can shut down game sessions on the fleet that are actively running and hosting players. Amazon GameLift Servers might prompt an instance shutdown when scaling down fleet capacity or when retiring unhealthy instances. You can also set game session protection for individual game sessions using <a href="gamelift/latest/apireference/API_UpdateGameSession.html">UpdateGameSession</a>.</p>
425 /// <ul>
426 /// <li>
427 /// <p><b>NoProtection</b> -- Game sessions can be shut down during active gameplay.</p></li>
428 /// <li>
429 /// <p><b>FullProtection</b> -- Game sessions in <code>ACTIVE</code> status can't be shut down.</p></li>
430 /// </ul>
431 /// <p>By default, this property is set to <code>NoProtection</code>.</p>
432 pub fn get_new_game_session_protection_policy(&self) -> &::std::option::Option<crate::types::ProtectionPolicy> {
433 self.inner.get_new_game_session_protection_policy()
434 }
435 /// <p>A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.</p>
436 pub fn game_session_creation_limit_policy(mut self, input: crate::types::GameSessionCreationLimitPolicy) -> Self {
437 self.inner = self.inner.game_session_creation_limit_policy(input);
438 self
439 }
440 /// <p>A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.</p>
441 pub fn set_game_session_creation_limit_policy(mut self, input: ::std::option::Option<crate::types::GameSessionCreationLimitPolicy>) -> Self {
442 self.inner = self.inner.set_game_session_creation_limit_policy(input);
443 self
444 }
445 /// <p>A policy that limits the number of game sessions that each individual player can create on instances in this fleet. The limit applies for a specified span of time.</p>
446 pub fn get_game_session_creation_limit_policy(&self) -> &::std::option::Option<crate::types::GameSessionCreationLimitPolicy> {
447 self.inner.get_game_session_creation_limit_policy()
448 }
449 /// <p>A method for collecting container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs. You can select from the following methods:</p>
450 /// <ul>
451 /// <li>
452 /// <p><code>CLOUDWATCH</code> -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.</p></li>
453 /// <li>
454 /// <p><code>S3</code> -- Store logs in an Amazon S3 bucket that you define.</p></li>
455 /// <li>
456 /// <p><code>NONE</code> -- Don't collect container logs.</p></li>
457 /// </ul>
458 /// <p>By default, this property is set to <code>CLOUDWATCH</code>.</p>
459 /// <p>Amazon GameLift Servers requires permissions to send logs other Amazon Web Services services in your account. These permissions are included in the IAM fleet role for this container fleet (see <code>FleetRoleArn)</code>.</p>
460 pub fn log_configuration(mut self, input: crate::types::LogConfiguration) -> Self {
461 self.inner = self.inner.log_configuration(input);
462 self
463 }
464 /// <p>A method for collecting container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs. You can select from the following methods:</p>
465 /// <ul>
466 /// <li>
467 /// <p><code>CLOUDWATCH</code> -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.</p></li>
468 /// <li>
469 /// <p><code>S3</code> -- Store logs in an Amazon S3 bucket that you define.</p></li>
470 /// <li>
471 /// <p><code>NONE</code> -- Don't collect container logs.</p></li>
472 /// </ul>
473 /// <p>By default, this property is set to <code>CLOUDWATCH</code>.</p>
474 /// <p>Amazon GameLift Servers requires permissions to send logs other Amazon Web Services services in your account. These permissions are included in the IAM fleet role for this container fleet (see <code>FleetRoleArn)</code>.</p>
475 pub fn set_log_configuration(mut self, input: ::std::option::Option<crate::types::LogConfiguration>) -> Self {
476 self.inner = self.inner.set_log_configuration(input);
477 self
478 }
479 /// <p>A method for collecting container logs for the fleet. Amazon GameLift Servers saves all standard output for each container in logs, including game session logs. You can select from the following methods:</p>
480 /// <ul>
481 /// <li>
482 /// <p><code>CLOUDWATCH</code> -- Send logs to an Amazon CloudWatch log group that you define. Each container emits a log stream, which is organized in the log group.</p></li>
483 /// <li>
484 /// <p><code>S3</code> -- Store logs in an Amazon S3 bucket that you define.</p></li>
485 /// <li>
486 /// <p><code>NONE</code> -- Don't collect container logs.</p></li>
487 /// </ul>
488 /// <p>By default, this property is set to <code>CLOUDWATCH</code>.</p>
489 /// <p>Amazon GameLift Servers requires permissions to send logs other Amazon Web Services services in your account. These permissions are included in the IAM fleet role for this container fleet (see <code>FleetRoleArn)</code>.</p>
490 pub fn get_log_configuration(&self) -> &::std::option::Option<crate::types::LogConfiguration> {
491 self.inner.get_log_configuration()
492 }
493 ///
494 /// Appends an item to `Tags`.
495 ///
496 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
497 ///
498 /// <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>
499 pub fn tags(mut self, input: crate::types::Tag) -> Self {
500 self.inner = self.inner.tags(input);
501 self
502 }
503 /// <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>
504 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
505 self.inner = self.inner.set_tags(input);
506 self
507 }
508 /// <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>
509 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
510 self.inner.get_tags()
511 }
512}