aws_sdk_ecs/operation/register_task_definition/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::register_task_definition::_register_task_definition_output::RegisterTaskDefinitionOutputBuilder;
3
4pub use crate::operation::register_task_definition::_register_task_definition_input::RegisterTaskDefinitionInputBuilder;
5
6impl crate::operation::register_task_definition::builders::RegisterTaskDefinitionInputBuilder {
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::register_task_definition::RegisterTaskDefinitionOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::register_task_definition::RegisterTaskDefinitionError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.register_task_definition();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `RegisterTaskDefinition`.
24///
25/// <p>Registers a new task definition from the supplied <code>family</code> and <code>containerDefinitions</code>. Optionally, you can add data volumes to your containers with the <code>volumes</code> parameter. For more information about task definition parameters and defaults, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Amazon ECS Task Definitions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
26/// <p>You can specify a role for your task with the <code>taskRoleArn</code> parameter. When you specify a role for a task, its containers can then use the latest versions of the CLI or SDKs to make API requests to the Amazon Web Services services that are specified in the policy that's associated with the role. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html">IAM Roles for Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
27/// <p>You can specify a Docker networking mode for the containers in your task definition with the <code>networkMode</code> parameter. If you specify the <code>awsvpc</code> network mode, the task is allocated an elastic network interface, and you must specify a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html">NetworkConfiguration</a> when you create a service or run a task with the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct RegisterTaskDefinitionFluentBuilder {
30 handle: ::std::sync::Arc<crate::client::Handle>,
31 inner: crate::operation::register_task_definition::builders::RegisterTaskDefinitionInputBuilder,
32 config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35 crate::client::customize::internal::CustomizableSend<
36 crate::operation::register_task_definition::RegisterTaskDefinitionOutput,
37 crate::operation::register_task_definition::RegisterTaskDefinitionError,
38 > for RegisterTaskDefinitionFluentBuilder
39{
40 fn send(
41 self,
42 config_override: crate::config::Builder,
43 ) -> crate::client::customize::internal::BoxFuture<
44 crate::client::customize::internal::SendResult<
45 crate::operation::register_task_definition::RegisterTaskDefinitionOutput,
46 crate::operation::register_task_definition::RegisterTaskDefinitionError,
47 >,
48 > {
49 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50 }
51}
52impl RegisterTaskDefinitionFluentBuilder {
53 /// Creates a new `RegisterTaskDefinitionFluentBuilder`.
54 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55 Self {
56 handle,
57 inner: ::std::default::Default::default(),
58 config_override: ::std::option::Option::None,
59 }
60 }
61 /// Access the RegisterTaskDefinition as a reference.
62 pub fn as_input(&self) -> &crate::operation::register_task_definition::builders::RegisterTaskDefinitionInputBuilder {
63 &self.inner
64 }
65 /// Sends the request and returns the response.
66 ///
67 /// If an error occurs, an `SdkError` will be returned with additional details that
68 /// can be matched against.
69 ///
70 /// By default, any retryable failures will be retried twice. Retry behavior
71 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72 /// set when configuring the client.
73 pub async fn send(
74 self,
75 ) -> ::std::result::Result<
76 crate::operation::register_task_definition::RegisterTaskDefinitionOutput,
77 ::aws_smithy_runtime_api::client::result::SdkError<
78 crate::operation::register_task_definition::RegisterTaskDefinitionError,
79 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80 >,
81 > {
82 let input = self
83 .inner
84 .build()
85 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86 let runtime_plugins = crate::operation::register_task_definition::RegisterTaskDefinition::operation_runtime_plugins(
87 self.handle.runtime_plugins.clone(),
88 &self.handle.conf,
89 self.config_override,
90 );
91 crate::operation::register_task_definition::RegisterTaskDefinition::orchestrate(&runtime_plugins, input).await
92 }
93
94 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95 pub fn customize(
96 self,
97 ) -> crate::client::customize::CustomizableOperation<
98 crate::operation::register_task_definition::RegisterTaskDefinitionOutput,
99 crate::operation::register_task_definition::RegisterTaskDefinitionError,
100 Self,
101 > {
102 crate::client::customize::CustomizableOperation::new(self)
103 }
104 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105 self.set_config_override(::std::option::Option::Some(config_override.into()));
106 self
107 }
108
109 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110 self.config_override = config_override;
111 self
112 }
113 /// <p>You must specify a <code>family</code> for a task definition. You can use it track multiple versions of the same task definition. The <code>family</code> is used as a name for your task definition. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
114 pub fn family(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.inner = self.inner.family(input.into());
116 self
117 }
118 /// <p>You must specify a <code>family</code> for a task definition. You can use it track multiple versions of the same task definition. The <code>family</code> is used as a name for your task definition. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
119 pub fn set_family(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.inner = self.inner.set_family(input);
121 self
122 }
123 /// <p>You must specify a <code>family</code> for a task definition. You can use it track multiple versions of the same task definition. The <code>family</code> is used as a name for your task definition. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p>
124 pub fn get_family(&self) -> &::std::option::Option<::std::string::String> {
125 self.inner.get_family()
126 }
127 /// <p>The short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html">IAM Roles for Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
128 pub fn task_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.inner = self.inner.task_role_arn(input.into());
130 self
131 }
132 /// <p>The short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html">IAM Roles for Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
133 pub fn set_task_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.inner = self.inner.set_task_role_arn(input);
135 self
136 }
137 /// <p>The short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html">IAM Roles for Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
138 pub fn get_task_role_arn(&self) -> &::std::option::Option<::std::string::String> {
139 self.inner.get_task_role_arn()
140 }
141 /// <p>The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf. For informationabout the required IAM roles for Amazon ECS, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-ecs-iam-role-overview.html">IAM roles for Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
142 pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.inner = self.inner.execution_role_arn(input.into());
144 self
145 }
146 /// <p>The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf. For informationabout the required IAM roles for Amazon ECS, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-ecs-iam-role-overview.html">IAM roles for Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
147 pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.inner = self.inner.set_execution_role_arn(input);
149 self
150 }
151 /// <p>The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf. For informationabout the required IAM roles for Amazon ECS, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-ecs-iam-role-overview.html">IAM roles for Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
152 pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
153 self.inner.get_execution_role_arn()
154 }
155 /// <p>The Docker networking mode to use for the containers in the task. The valid values are <code>none</code>, <code>bridge</code>, <code>awsvpc</code>, and <code>host</code>. If no network mode is specified, the default is <code>bridge</code>.</p>
156 /// <p>For Amazon ECS tasks on Fargate, the <code>awsvpc</code> network mode is required. For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, <code><default></default></code> or <code>awsvpc</code> can be used. If the network mode is set to <code>none</code>, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The <code>host</code> and <code>awsvpc</code> network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the <code>bridge</code> mode.</p>
157 /// <p>With the <code>host</code> and <code>awsvpc</code> network modes, exposed container ports are mapped directly to the corresponding host port (for the <code>host</code> network mode) or the attached elastic network interface port (for the <code>awsvpc</code> network mode), so you cannot take advantage of dynamic host port mappings.</p><important>
158 /// <p>When using the <code>host</code> network mode, you should not run containers using the root user (UID 0). It is considered best practice to use a non-root user.</p>
159 /// </important>
160 /// <p>If the network mode is <code>awsvpc</code>, the task is allocated an elastic network interface, and you must specify a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html">NetworkConfiguration</a> value when you create a service or run a task with the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
161 /// <p>If the network mode is <code>host</code>, you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.</p>
162 pub fn network_mode(mut self, input: crate::types::NetworkMode) -> Self {
163 self.inner = self.inner.network_mode(input);
164 self
165 }
166 /// <p>The Docker networking mode to use for the containers in the task. The valid values are <code>none</code>, <code>bridge</code>, <code>awsvpc</code>, and <code>host</code>. If no network mode is specified, the default is <code>bridge</code>.</p>
167 /// <p>For Amazon ECS tasks on Fargate, the <code>awsvpc</code> network mode is required. For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, <code><default></default></code> or <code>awsvpc</code> can be used. If the network mode is set to <code>none</code>, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The <code>host</code> and <code>awsvpc</code> network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the <code>bridge</code> mode.</p>
168 /// <p>With the <code>host</code> and <code>awsvpc</code> network modes, exposed container ports are mapped directly to the corresponding host port (for the <code>host</code> network mode) or the attached elastic network interface port (for the <code>awsvpc</code> network mode), so you cannot take advantage of dynamic host port mappings.</p><important>
169 /// <p>When using the <code>host</code> network mode, you should not run containers using the root user (UID 0). It is considered best practice to use a non-root user.</p>
170 /// </important>
171 /// <p>If the network mode is <code>awsvpc</code>, the task is allocated an elastic network interface, and you must specify a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html">NetworkConfiguration</a> value when you create a service or run a task with the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
172 /// <p>If the network mode is <code>host</code>, you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.</p>
173 pub fn set_network_mode(mut self, input: ::std::option::Option<crate::types::NetworkMode>) -> Self {
174 self.inner = self.inner.set_network_mode(input);
175 self
176 }
177 /// <p>The Docker networking mode to use for the containers in the task. The valid values are <code>none</code>, <code>bridge</code>, <code>awsvpc</code>, and <code>host</code>. If no network mode is specified, the default is <code>bridge</code>.</p>
178 /// <p>For Amazon ECS tasks on Fargate, the <code>awsvpc</code> network mode is required. For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, <code><default></default></code> or <code>awsvpc</code> can be used. If the network mode is set to <code>none</code>, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The <code>host</code> and <code>awsvpc</code> network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the <code>bridge</code> mode.</p>
179 /// <p>With the <code>host</code> and <code>awsvpc</code> network modes, exposed container ports are mapped directly to the corresponding host port (for the <code>host</code> network mode) or the attached elastic network interface port (for the <code>awsvpc</code> network mode), so you cannot take advantage of dynamic host port mappings.</p><important>
180 /// <p>When using the <code>host</code> network mode, you should not run containers using the root user (UID 0). It is considered best practice to use a non-root user.</p>
181 /// </important>
182 /// <p>If the network mode is <code>awsvpc</code>, the task is allocated an elastic network interface, and you must specify a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html">NetworkConfiguration</a> value when you create a service or run a task with the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
183 /// <p>If the network mode is <code>host</code>, you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.</p>
184 pub fn get_network_mode(&self) -> &::std::option::Option<crate::types::NetworkMode> {
185 self.inner.get_network_mode()
186 }
187 ///
188 /// Appends an item to `containerDefinitions`.
189 ///
190 /// To override the contents of this collection use [`set_container_definitions`](Self::set_container_definitions).
191 ///
192 /// <p>A list of container definitions in JSON format that describe the different containers that make up your task.</p>
193 pub fn container_definitions(mut self, input: crate::types::ContainerDefinition) -> Self {
194 self.inner = self.inner.container_definitions(input);
195 self
196 }
197 /// <p>A list of container definitions in JSON format that describe the different containers that make up your task.</p>
198 pub fn set_container_definitions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>>) -> Self {
199 self.inner = self.inner.set_container_definitions(input);
200 self
201 }
202 /// <p>A list of container definitions in JSON format that describe the different containers that make up your task.</p>
203 pub fn get_container_definitions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>> {
204 self.inner.get_container_definitions()
205 }
206 ///
207 /// Appends an item to `volumes`.
208 ///
209 /// To override the contents of this collection use [`set_volumes`](Self::set_volumes).
210 ///
211 /// <p>A list of volume definitions in JSON format that containers in your task might use.</p>
212 pub fn volumes(mut self, input: crate::types::Volume) -> Self {
213 self.inner = self.inner.volumes(input);
214 self
215 }
216 /// <p>A list of volume definitions in JSON format that containers in your task might use.</p>
217 pub fn set_volumes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Volume>>) -> Self {
218 self.inner = self.inner.set_volumes(input);
219 self
220 }
221 /// <p>A list of volume definitions in JSON format that containers in your task might use.</p>
222 pub fn get_volumes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Volume>> {
223 self.inner.get_volumes()
224 }
225 ///
226 /// Appends an item to `placementConstraints`.
227 ///
228 /// To override the contents of this collection use [`set_placement_constraints`](Self::set_placement_constraints).
229 ///
230 /// <p>An array of placement constraint objects to use for the task. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.</p>
231 pub fn placement_constraints(mut self, input: crate::types::TaskDefinitionPlacementConstraint) -> Self {
232 self.inner = self.inner.placement_constraints(input);
233 self
234 }
235 /// <p>An array of placement constraint objects to use for the task. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.</p>
236 pub fn set_placement_constraints(
237 mut self,
238 input: ::std::option::Option<::std::vec::Vec<crate::types::TaskDefinitionPlacementConstraint>>,
239 ) -> Self {
240 self.inner = self.inner.set_placement_constraints(input);
241 self
242 }
243 /// <p>An array of placement constraint objects to use for the task. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.</p>
244 pub fn get_placement_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TaskDefinitionPlacementConstraint>> {
245 self.inner.get_placement_constraints()
246 }
247 ///
248 /// Appends an item to `requiresCompatibilities`.
249 ///
250 /// To override the contents of this collection use [`set_requires_compatibilities`](Self::set_requires_compatibilities).
251 ///
252 /// <p>The task launch type that Amazon ECS validates the task definition against. A client exception is returned if the task definition doesn't validate against the compatibilities specified. If no value is specified, the parameter is omitted from the response.</p>
253 pub fn requires_compatibilities(mut self, input: crate::types::Compatibility) -> Self {
254 self.inner = self.inner.requires_compatibilities(input);
255 self
256 }
257 /// <p>The task launch type that Amazon ECS validates the task definition against. A client exception is returned if the task definition doesn't validate against the compatibilities specified. If no value is specified, the parameter is omitted from the response.</p>
258 pub fn set_requires_compatibilities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Compatibility>>) -> Self {
259 self.inner = self.inner.set_requires_compatibilities(input);
260 self
261 }
262 /// <p>The task launch type that Amazon ECS validates the task definition against. A client exception is returned if the task definition doesn't validate against the compatibilities specified. If no value is specified, the parameter is omitted from the response.</p>
263 pub fn get_requires_compatibilities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Compatibility>> {
264 self.inner.get_requires_compatibilities()
265 }
266 /// <p>The number of CPU units used by the task. It can be expressed as an integer using CPU units (for example, <code>1024</code>) or as a string using vCPUs (for example, <code>1 vCPU</code> or <code>1 vcpu</code>) in a task definition. String values are converted to an integer indicating the CPU units when the task definition is registered.</p><note>
267 /// <p>Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.</p>
268 /// </note>
269 /// <p>If you're using the EC2 launch type or external launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>196608</code> CPU units (<code>192</code> vCPUs). If you do not specify a value, the parameter is ignored.</p>
270 /// <p>This field is required for Fargate. For information about the valid values, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size">Task size</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
271 pub fn cpu(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
272 self.inner = self.inner.cpu(input.into());
273 self
274 }
275 /// <p>The number of CPU units used by the task. It can be expressed as an integer using CPU units (for example, <code>1024</code>) or as a string using vCPUs (for example, <code>1 vCPU</code> or <code>1 vcpu</code>) in a task definition. String values are converted to an integer indicating the CPU units when the task definition is registered.</p><note>
276 /// <p>Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.</p>
277 /// </note>
278 /// <p>If you're using the EC2 launch type or external launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>196608</code> CPU units (<code>192</code> vCPUs). If you do not specify a value, the parameter is ignored.</p>
279 /// <p>This field is required for Fargate. For information about the valid values, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size">Task size</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
280 pub fn set_cpu(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
281 self.inner = self.inner.set_cpu(input);
282 self
283 }
284 /// <p>The number of CPU units used by the task. It can be expressed as an integer using CPU units (for example, <code>1024</code>) or as a string using vCPUs (for example, <code>1 vCPU</code> or <code>1 vcpu</code>) in a task definition. String values are converted to an integer indicating the CPU units when the task definition is registered.</p><note>
285 /// <p>Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.</p>
286 /// </note>
287 /// <p>If you're using the EC2 launch type or external launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>196608</code> CPU units (<code>192</code> vCPUs). If you do not specify a value, the parameter is ignored.</p>
288 /// <p>This field is required for Fargate. For information about the valid values, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size">Task size</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
289 pub fn get_cpu(&self) -> &::std::option::Option<::std::string::String> {
290 self.inner.get_cpu()
291 }
292 /// <p>The amount of memory (in MiB) used by the task. It can be expressed as an integer using MiB (for example ,<code>1024</code>) or as a string using GB (for example, <code>1GB</code> or <code>1 GB</code>) in a task definition. String values are converted to an integer indicating the MiB when the task definition is registered.</p><note>
293 /// <p>Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.</p>
294 /// </note>
295 /// <p>If using the EC2 launch type, this field is optional.</p>
296 /// <p>If using the Fargate launch type, this field is required and you must use one of the following values. This determines your range of supported values for the <code>cpu</code> parameter.</p>
297 /// <p>The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.</p>
298 /// <ul>
299 /// <li>
300 /// <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p></li>
301 /// <li>
302 /// <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p></li>
303 /// <li>
304 /// <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p></li>
305 /// <li>
306 /// <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p></li>
307 /// <li>
308 /// <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p></li>
309 /// <li>
310 /// <p>Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)</p>
311 /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
312 /// <li>
313 /// <p>Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)</p>
314 /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
315 /// </ul>
316 pub fn memory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
317 self.inner = self.inner.memory(input.into());
318 self
319 }
320 /// <p>The amount of memory (in MiB) used by the task. It can be expressed as an integer using MiB (for example ,<code>1024</code>) or as a string using GB (for example, <code>1GB</code> or <code>1 GB</code>) in a task definition. String values are converted to an integer indicating the MiB when the task definition is registered.</p><note>
321 /// <p>Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.</p>
322 /// </note>
323 /// <p>If using the EC2 launch type, this field is optional.</p>
324 /// <p>If using the Fargate launch type, this field is required and you must use one of the following values. This determines your range of supported values for the <code>cpu</code> parameter.</p>
325 /// <p>The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.</p>
326 /// <ul>
327 /// <li>
328 /// <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p></li>
329 /// <li>
330 /// <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p></li>
331 /// <li>
332 /// <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p></li>
333 /// <li>
334 /// <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p></li>
335 /// <li>
336 /// <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p></li>
337 /// <li>
338 /// <p>Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)</p>
339 /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
340 /// <li>
341 /// <p>Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)</p>
342 /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
343 /// </ul>
344 pub fn set_memory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
345 self.inner = self.inner.set_memory(input);
346 self
347 }
348 /// <p>The amount of memory (in MiB) used by the task. It can be expressed as an integer using MiB (for example ,<code>1024</code>) or as a string using GB (for example, <code>1GB</code> or <code>1 GB</code>) in a task definition. String values are converted to an integer indicating the MiB when the task definition is registered.</p><note>
349 /// <p>Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.</p>
350 /// </note>
351 /// <p>If using the EC2 launch type, this field is optional.</p>
352 /// <p>If using the Fargate launch type, this field is required and you must use one of the following values. This determines your range of supported values for the <code>cpu</code> parameter.</p>
353 /// <p>The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.</p>
354 /// <ul>
355 /// <li>
356 /// <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p></li>
357 /// <li>
358 /// <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p></li>
359 /// <li>
360 /// <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p></li>
361 /// <li>
362 /// <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p></li>
363 /// <li>
364 /// <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p></li>
365 /// <li>
366 /// <p>Between 16 GB and 60 GB in 4 GB increments - Available <code>cpu</code> values: 8192 (8 vCPU)</p>
367 /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
368 /// <li>
369 /// <p>Between 32GB and 120 GB in 8 GB increments - Available <code>cpu</code> values: 16384 (16 vCPU)</p>
370 /// <p>This option requires Linux platform <code>1.4.0</code> or later.</p></li>
371 /// </ul>
372 pub fn get_memory(&self) -> &::std::option::Option<::std::string::String> {
373 self.inner.get_memory()
374 }
375 ///
376 /// Appends an item to `tags`.
377 ///
378 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
379 ///
380 /// <p>The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.</p>
381 /// <p>The following basic restrictions apply to tags:</p>
382 /// <ul>
383 /// <li>
384 /// <p>Maximum number of tags per resource - 50</p></li>
385 /// <li>
386 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
387 /// <li>
388 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
389 /// <li>
390 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
391 /// <li>
392 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
393 /// <li>
394 /// <p>Tag keys and values are case-sensitive.</p></li>
395 /// <li>
396 /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
397 /// </ul>
398 pub fn tags(mut self, input: crate::types::Tag) -> Self {
399 self.inner = self.inner.tags(input);
400 self
401 }
402 /// <p>The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.</p>
403 /// <p>The following basic restrictions apply to tags:</p>
404 /// <ul>
405 /// <li>
406 /// <p>Maximum number of tags per resource - 50</p></li>
407 /// <li>
408 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
409 /// <li>
410 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
411 /// <li>
412 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
413 /// <li>
414 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
415 /// <li>
416 /// <p>Tag keys and values are case-sensitive.</p></li>
417 /// <li>
418 /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
419 /// </ul>
420 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
421 self.inner = self.inner.set_tags(input);
422 self
423 }
424 /// <p>The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.</p>
425 /// <p>The following basic restrictions apply to tags:</p>
426 /// <ul>
427 /// <li>
428 /// <p>Maximum number of tags per resource - 50</p></li>
429 /// <li>
430 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
431 /// <li>
432 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
433 /// <li>
434 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
435 /// <li>
436 /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
437 /// <li>
438 /// <p>Tag keys and values are case-sensitive.</p></li>
439 /// <li>
440 /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
441 /// </ul>
442 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
443 self.inner.get_tags()
444 }
445 /// <p>The process namespace to use for the containers in the task. The valid values are <code>host</code> or <code>task</code>. On Fargate for Linux containers, the only valid value is <code>task</code>. For example, monitoring sidecars might need <code>pidMode</code> to access information about other containers running in the same task.</p>
446 /// <p>If <code>host</code> is specified, all containers within the tasks that specified the <code>host</code> PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance.</p>
447 /// <p>If <code>task</code> is specified, all containers within the specified task share the same process namespace.</p>
448 /// <p>If no value is specified, the The default is a private namespace for each container.</p>
449 /// <p>If the <code>host</code> PID mode is used, there's a heightened risk of undesired process namespace exposure.</p><note>
450 /// <p>This parameter is not supported for Windows containers.</p>
451 /// </note> <note>
452 /// <p>This parameter is only supported for tasks that are hosted on Fargate if the tasks are using platform version <code>1.4.0</code> or later (Linux). This isn't supported for Windows containers on Fargate.</p>
453 /// </note>
454 pub fn pid_mode(mut self, input: crate::types::PidMode) -> Self {
455 self.inner = self.inner.pid_mode(input);
456 self
457 }
458 /// <p>The process namespace to use for the containers in the task. The valid values are <code>host</code> or <code>task</code>. On Fargate for Linux containers, the only valid value is <code>task</code>. For example, monitoring sidecars might need <code>pidMode</code> to access information about other containers running in the same task.</p>
459 /// <p>If <code>host</code> is specified, all containers within the tasks that specified the <code>host</code> PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance.</p>
460 /// <p>If <code>task</code> is specified, all containers within the specified task share the same process namespace.</p>
461 /// <p>If no value is specified, the The default is a private namespace for each container.</p>
462 /// <p>If the <code>host</code> PID mode is used, there's a heightened risk of undesired process namespace exposure.</p><note>
463 /// <p>This parameter is not supported for Windows containers.</p>
464 /// </note> <note>
465 /// <p>This parameter is only supported for tasks that are hosted on Fargate if the tasks are using platform version <code>1.4.0</code> or later (Linux). This isn't supported for Windows containers on Fargate.</p>
466 /// </note>
467 pub fn set_pid_mode(mut self, input: ::std::option::Option<crate::types::PidMode>) -> Self {
468 self.inner = self.inner.set_pid_mode(input);
469 self
470 }
471 /// <p>The process namespace to use for the containers in the task. The valid values are <code>host</code> or <code>task</code>. On Fargate for Linux containers, the only valid value is <code>task</code>. For example, monitoring sidecars might need <code>pidMode</code> to access information about other containers running in the same task.</p>
472 /// <p>If <code>host</code> is specified, all containers within the tasks that specified the <code>host</code> PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance.</p>
473 /// <p>If <code>task</code> is specified, all containers within the specified task share the same process namespace.</p>
474 /// <p>If no value is specified, the The default is a private namespace for each container.</p>
475 /// <p>If the <code>host</code> PID mode is used, there's a heightened risk of undesired process namespace exposure.</p><note>
476 /// <p>This parameter is not supported for Windows containers.</p>
477 /// </note> <note>
478 /// <p>This parameter is only supported for tasks that are hosted on Fargate if the tasks are using platform version <code>1.4.0</code> or later (Linux). This isn't supported for Windows containers on Fargate.</p>
479 /// </note>
480 pub fn get_pid_mode(&self) -> &::std::option::Option<crate::types::PidMode> {
481 self.inner.get_pid_mode()
482 }
483 /// <p>The IPC resource namespace to use for the containers in the task. The valid values are <code>host</code>, <code>task</code>, or <code>none</code>. If <code>host</code> is specified, then all containers within the tasks that specified the <code>host</code> IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If <code>task</code> is specified, all containers within the specified task share the same IPC resources. If <code>none</code> is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance.</p>
484 /// <p>If the <code>host</code> IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose.</p>
485 /// <p>If you are setting namespaced kernel parameters using <code>systemControls</code> for the containers in the task, the following will apply to your IPC resource namespace. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html">System Controls</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
486 /// <ul>
487 /// <li>
488 /// <p>For tasks that use the <code>host</code> IPC mode, IPC namespace related <code>systemControls</code> are not supported.</p></li>
489 /// <li>
490 /// <p>For tasks that use the <code>task</code> IPC mode, IPC namespace related <code>systemControls</code> will apply to all containers within a task.</p></li>
491 /// </ul><note>
492 /// <p>This parameter is not supported for Windows containers or tasks run on Fargate.</p>
493 /// </note>
494 pub fn ipc_mode(mut self, input: crate::types::IpcMode) -> Self {
495 self.inner = self.inner.ipc_mode(input);
496 self
497 }
498 /// <p>The IPC resource namespace to use for the containers in the task. The valid values are <code>host</code>, <code>task</code>, or <code>none</code>. If <code>host</code> is specified, then all containers within the tasks that specified the <code>host</code> IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If <code>task</code> is specified, all containers within the specified task share the same IPC resources. If <code>none</code> is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance.</p>
499 /// <p>If the <code>host</code> IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose.</p>
500 /// <p>If you are setting namespaced kernel parameters using <code>systemControls</code> for the containers in the task, the following will apply to your IPC resource namespace. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html">System Controls</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
501 /// <ul>
502 /// <li>
503 /// <p>For tasks that use the <code>host</code> IPC mode, IPC namespace related <code>systemControls</code> are not supported.</p></li>
504 /// <li>
505 /// <p>For tasks that use the <code>task</code> IPC mode, IPC namespace related <code>systemControls</code> will apply to all containers within a task.</p></li>
506 /// </ul><note>
507 /// <p>This parameter is not supported for Windows containers or tasks run on Fargate.</p>
508 /// </note>
509 pub fn set_ipc_mode(mut self, input: ::std::option::Option<crate::types::IpcMode>) -> Self {
510 self.inner = self.inner.set_ipc_mode(input);
511 self
512 }
513 /// <p>The IPC resource namespace to use for the containers in the task. The valid values are <code>host</code>, <code>task</code>, or <code>none</code>. If <code>host</code> is specified, then all containers within the tasks that specified the <code>host</code> IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If <code>task</code> is specified, all containers within the specified task share the same IPC resources. If <code>none</code> is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance.</p>
514 /// <p>If the <code>host</code> IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose.</p>
515 /// <p>If you are setting namespaced kernel parameters using <code>systemControls</code> for the containers in the task, the following will apply to your IPC resource namespace. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html">System Controls</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
516 /// <ul>
517 /// <li>
518 /// <p>For tasks that use the <code>host</code> IPC mode, IPC namespace related <code>systemControls</code> are not supported.</p></li>
519 /// <li>
520 /// <p>For tasks that use the <code>task</code> IPC mode, IPC namespace related <code>systemControls</code> will apply to all containers within a task.</p></li>
521 /// </ul><note>
522 /// <p>This parameter is not supported for Windows containers or tasks run on Fargate.</p>
523 /// </note>
524 pub fn get_ipc_mode(&self) -> &::std::option::Option<crate::types::IpcMode> {
525 self.inner.get_ipc_mode()
526 }
527 /// <p>The configuration details for the App Mesh proxy.</p>
528 /// <p>For tasks hosted on Amazon EC2 instances, the container instances require at least version <code>1.26.0</code> of the container agent and at least version <code>1.26.0-1</code> of the <code>ecs-init</code> package to use a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-ami-versions.html">Amazon ECS-optimized AMI versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
529 pub fn proxy_configuration(mut self, input: crate::types::ProxyConfiguration) -> Self {
530 self.inner = self.inner.proxy_configuration(input);
531 self
532 }
533 /// <p>The configuration details for the App Mesh proxy.</p>
534 /// <p>For tasks hosted on Amazon EC2 instances, the container instances require at least version <code>1.26.0</code> of the container agent and at least version <code>1.26.0-1</code> of the <code>ecs-init</code> package to use a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-ami-versions.html">Amazon ECS-optimized AMI versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
535 pub fn set_proxy_configuration(mut self, input: ::std::option::Option<crate::types::ProxyConfiguration>) -> Self {
536 self.inner = self.inner.set_proxy_configuration(input);
537 self
538 }
539 /// <p>The configuration details for the App Mesh proxy.</p>
540 /// <p>For tasks hosted on Amazon EC2 instances, the container instances require at least version <code>1.26.0</code> of the container agent and at least version <code>1.26.0-1</code> of the <code>ecs-init</code> package to use a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-ami-versions.html">Amazon ECS-optimized AMI versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
541 pub fn get_proxy_configuration(&self) -> &::std::option::Option<crate::types::ProxyConfiguration> {
542 self.inner.get_proxy_configuration()
543 }
544 ///
545 /// Appends an item to `inferenceAccelerators`.
546 ///
547 /// To override the contents of this collection use [`set_inference_accelerators`](Self::set_inference_accelerators).
548 ///
549 /// <p>The Elastic Inference accelerators to use for the containers in the task.</p>
550 pub fn inference_accelerators(mut self, input: crate::types::InferenceAccelerator) -> Self {
551 self.inner = self.inner.inference_accelerators(input);
552 self
553 }
554 /// <p>The Elastic Inference accelerators to use for the containers in the task.</p>
555 pub fn set_inference_accelerators(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InferenceAccelerator>>) -> Self {
556 self.inner = self.inner.set_inference_accelerators(input);
557 self
558 }
559 /// <p>The Elastic Inference accelerators to use for the containers in the task.</p>
560 pub fn get_inference_accelerators(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InferenceAccelerator>> {
561 self.inner.get_inference_accelerators()
562 }
563 /// <p>The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html">Using data volumes in tasks</a> in the <i>Amazon ECS Developer Guide</i>.</p><note>
564 /// <p>For tasks using the Fargate launch type, the task requires the following platforms:</p>
565 /// <ul>
566 /// <li>
567 /// <p>Linux platform version <code>1.4.0</code> or later.</p></li>
568 /// <li>
569 /// <p>Windows platform version <code>1.0.0</code> or later.</p></li>
570 /// </ul>
571 /// </note>
572 pub fn ephemeral_storage(mut self, input: crate::types::EphemeralStorage) -> Self {
573 self.inner = self.inner.ephemeral_storage(input);
574 self
575 }
576 /// <p>The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html">Using data volumes in tasks</a> in the <i>Amazon ECS Developer Guide</i>.</p><note>
577 /// <p>For tasks using the Fargate launch type, the task requires the following platforms:</p>
578 /// <ul>
579 /// <li>
580 /// <p>Linux platform version <code>1.4.0</code> or later.</p></li>
581 /// <li>
582 /// <p>Windows platform version <code>1.0.0</code> or later.</p></li>
583 /// </ul>
584 /// </note>
585 pub fn set_ephemeral_storage(mut self, input: ::std::option::Option<crate::types::EphemeralStorage>) -> Self {
586 self.inner = self.inner.set_ephemeral_storage(input);
587 self
588 }
589 /// <p>The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html">Using data volumes in tasks</a> in the <i>Amazon ECS Developer Guide</i>.</p><note>
590 /// <p>For tasks using the Fargate launch type, the task requires the following platforms:</p>
591 /// <ul>
592 /// <li>
593 /// <p>Linux platform version <code>1.4.0</code> or later.</p></li>
594 /// <li>
595 /// <p>Windows platform version <code>1.0.0</code> or later.</p></li>
596 /// </ul>
597 /// </note>
598 pub fn get_ephemeral_storage(&self) -> &::std::option::Option<crate::types::EphemeralStorage> {
599 self.inner.get_ephemeral_storage()
600 }
601 /// <p>The operating system that your tasks definitions run on. A platform family is specified only for tasks using the Fargate launch type.</p>
602 pub fn runtime_platform(mut self, input: crate::types::RuntimePlatform) -> Self {
603 self.inner = self.inner.runtime_platform(input);
604 self
605 }
606 /// <p>The operating system that your tasks definitions run on. A platform family is specified only for tasks using the Fargate launch type.</p>
607 pub fn set_runtime_platform(mut self, input: ::std::option::Option<crate::types::RuntimePlatform>) -> Self {
608 self.inner = self.inner.set_runtime_platform(input);
609 self
610 }
611 /// <p>The operating system that your tasks definitions run on. A platform family is specified only for tasks using the Fargate launch type.</p>
612 pub fn get_runtime_platform(&self) -> &::std::option::Option<crate::types::RuntimePlatform> {
613 self.inner.get_runtime_platform()
614 }
615 /// <p>Enables fault injection when you register your task definition and allows for fault injection requests to be accepted from the task's containers. The default value is <code>false</code>.</p>
616 pub fn enable_fault_injection(mut self, input: bool) -> Self {
617 self.inner = self.inner.enable_fault_injection(input);
618 self
619 }
620 /// <p>Enables fault injection when you register your task definition and allows for fault injection requests to be accepted from the task's containers. The default value is <code>false</code>.</p>
621 pub fn set_enable_fault_injection(mut self, input: ::std::option::Option<bool>) -> Self {
622 self.inner = self.inner.set_enable_fault_injection(input);
623 self
624 }
625 /// <p>Enables fault injection when you register your task definition and allows for fault injection requests to be accepted from the task's containers. The default value is <code>false</code>.</p>
626 pub fn get_enable_fault_injection(&self) -> &::std::option::Option<bool> {
627 self.inner.get_enable_fault_injection()
628 }
629}