aws_sdk_ecs/operation/start_task/_start_task_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StartTaskInput {
6 /// <p>The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify a cluster, the default cluster is assumed.</p>
7 pub cluster: ::std::option::Option<::std::string::String>,
8 /// <p>The container instance IDs or full ARN entries for the container instances where you would like to place your task. You can specify up to 10 container instances.</p>
9 pub container_instances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10 /// <p>Specifies whether to use Amazon ECS managed tags for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
11 pub enable_ecs_managed_tags: ::std::option::Option<bool>,
12 /// <p>Whether or not the execute command functionality is turned on for the task. If <code>true</code>, this turns on the execute command functionality on all containers in the task.</p>
13 pub enable_execute_command: ::std::option::Option<bool>,
14 /// <p>The name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).</p>
15 pub group: ::std::option::Option<::std::string::String>,
16 /// <p>The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the <code>awsvpc</code> networking mode.</p>
17 pub network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
18 /// <p>A list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it receives. You can override the default command for a container (that's specified in the task definition or Docker image) with a <code>command</code> override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with an <code>environment</code> override.</p><note>
19 /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
20 /// </note>
21 pub overrides: ::std::option::Option<crate::types::TaskOverride>,
22 /// <p>Specifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
23 pub propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
24 /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
25 pub reference_id: ::std::option::Option<::std::string::String>,
26 /// <p>An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the <code>startedBy</code> parameter. You can then identify which tasks belong to that job by filtering the results of a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTasks.html">ListTasks</a> call with the <code>startedBy</code> value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
27 /// <p>If a task is started by an Amazon ECS service, the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
28 pub started_by: ::std::option::Option<::std::string::String>,
29 /// <p>The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
30 /// <p>The following basic restrictions apply to tags:</p>
31 /// <ul>
32 /// <li>
33 /// <p>Maximum number of tags per resource - 50</p></li>
34 /// <li>
35 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
36 /// <li>
37 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
38 /// <li>
39 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
40 /// <li>
41 /// <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>
42 /// <li>
43 /// <p>Tag keys and values are case-sensitive.</p></li>
44 /// <li>
45 /// <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>
46 /// </ul>
47 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
48 /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to start. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
49 pub task_definition: ::std::option::Option<::std::string::String>,
50 /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskManagedEBSVolumeConfiguration.html">TaskManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition.</p>
51 pub volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::TaskVolumeConfiguration>>,
52}
53impl StartTaskInput {
54 /// <p>The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify a cluster, the default cluster is assumed.</p>
55 pub fn cluster(&self) -> ::std::option::Option<&str> {
56 self.cluster.as_deref()
57 }
58 /// <p>The container instance IDs or full ARN entries for the container instances where you would like to place your task. You can specify up to 10 container instances.</p>
59 ///
60 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.container_instances.is_none()`.
61 pub fn container_instances(&self) -> &[::std::string::String] {
62 self.container_instances.as_deref().unwrap_or_default()
63 }
64 /// <p>Specifies whether to use Amazon ECS managed tags for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
65 pub fn enable_ecs_managed_tags(&self) -> ::std::option::Option<bool> {
66 self.enable_ecs_managed_tags
67 }
68 /// <p>Whether or not the execute command functionality is turned on for the task. If <code>true</code>, this turns on the execute command functionality on all containers in the task.</p>
69 pub fn enable_execute_command(&self) -> ::std::option::Option<bool> {
70 self.enable_execute_command
71 }
72 /// <p>The name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).</p>
73 pub fn group(&self) -> ::std::option::Option<&str> {
74 self.group.as_deref()
75 }
76 /// <p>The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the <code>awsvpc</code> networking mode.</p>
77 pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::NetworkConfiguration> {
78 self.network_configuration.as_ref()
79 }
80 /// <p>A list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it receives. You can override the default command for a container (that's specified in the task definition or Docker image) with a <code>command</code> override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with an <code>environment</code> override.</p><note>
81 /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
82 /// </note>
83 pub fn overrides(&self) -> ::std::option::Option<&crate::types::TaskOverride> {
84 self.overrides.as_ref()
85 }
86 /// <p>Specifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
87 pub fn propagate_tags(&self) -> ::std::option::Option<&crate::types::PropagateTags> {
88 self.propagate_tags.as_ref()
89 }
90 /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
91 pub fn reference_id(&self) -> ::std::option::Option<&str> {
92 self.reference_id.as_deref()
93 }
94 /// <p>An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the <code>startedBy</code> parameter. You can then identify which tasks belong to that job by filtering the results of a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTasks.html">ListTasks</a> call with the <code>startedBy</code> value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
95 /// <p>If a task is started by an Amazon ECS service, the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
96 pub fn started_by(&self) -> ::std::option::Option<&str> {
97 self.started_by.as_deref()
98 }
99 /// <p>The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
100 /// <p>The following basic restrictions apply to tags:</p>
101 /// <ul>
102 /// <li>
103 /// <p>Maximum number of tags per resource - 50</p></li>
104 /// <li>
105 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
106 /// <li>
107 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
108 /// <li>
109 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
110 /// <li>
111 /// <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>
112 /// <li>
113 /// <p>Tag keys and values are case-sensitive.</p></li>
114 /// <li>
115 /// <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>
116 /// </ul>
117 ///
118 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
119 pub fn tags(&self) -> &[crate::types::Tag] {
120 self.tags.as_deref().unwrap_or_default()
121 }
122 /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to start. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
123 pub fn task_definition(&self) -> ::std::option::Option<&str> {
124 self.task_definition.as_deref()
125 }
126 /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskManagedEBSVolumeConfiguration.html">TaskManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition.</p>
127 ///
128 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.volume_configurations.is_none()`.
129 pub fn volume_configurations(&self) -> &[crate::types::TaskVolumeConfiguration] {
130 self.volume_configurations.as_deref().unwrap_or_default()
131 }
132}
133impl StartTaskInput {
134 /// Creates a new builder-style object to manufacture [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
135 pub fn builder() -> crate::operation::start_task::builders::StartTaskInputBuilder {
136 crate::operation::start_task::builders::StartTaskInputBuilder::default()
137 }
138}
139
140/// A builder for [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
141#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
142#[non_exhaustive]
143pub struct StartTaskInputBuilder {
144 pub(crate) cluster: ::std::option::Option<::std::string::String>,
145 pub(crate) container_instances: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
146 pub(crate) enable_ecs_managed_tags: ::std::option::Option<bool>,
147 pub(crate) enable_execute_command: ::std::option::Option<bool>,
148 pub(crate) group: ::std::option::Option<::std::string::String>,
149 pub(crate) network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
150 pub(crate) overrides: ::std::option::Option<crate::types::TaskOverride>,
151 pub(crate) propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
152 pub(crate) reference_id: ::std::option::Option<::std::string::String>,
153 pub(crate) started_by: ::std::option::Option<::std::string::String>,
154 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
155 pub(crate) task_definition: ::std::option::Option<::std::string::String>,
156 pub(crate) volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::TaskVolumeConfiguration>>,
157}
158impl StartTaskInputBuilder {
159 /// <p>The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify a cluster, the default cluster is assumed.</p>
160 pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.cluster = ::std::option::Option::Some(input.into());
162 self
163 }
164 /// <p>The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify a cluster, the default cluster is assumed.</p>
165 pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.cluster = input;
167 self
168 }
169 /// <p>The short name or full Amazon Resource Name (ARN) of the cluster where to start your task. If you do not specify a cluster, the default cluster is assumed.</p>
170 pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
171 &self.cluster
172 }
173 /// Appends an item to `container_instances`.
174 ///
175 /// To override the contents of this collection use [`set_container_instances`](Self::set_container_instances).
176 ///
177 /// <p>The container instance IDs or full ARN entries for the container instances where you would like to place your task. You can specify up to 10 container instances.</p>
178 pub fn container_instances(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 let mut v = self.container_instances.unwrap_or_default();
180 v.push(input.into());
181 self.container_instances = ::std::option::Option::Some(v);
182 self
183 }
184 /// <p>The container instance IDs or full ARN entries for the container instances where you would like to place your task. You can specify up to 10 container instances.</p>
185 pub fn set_container_instances(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
186 self.container_instances = input;
187 self
188 }
189 /// <p>The container instance IDs or full ARN entries for the container instances where you would like to place your task. You can specify up to 10 container instances.</p>
190 pub fn get_container_instances(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
191 &self.container_instances
192 }
193 /// <p>Specifies whether to use Amazon ECS managed tags for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
194 pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
195 self.enable_ecs_managed_tags = ::std::option::Option::Some(input);
196 self
197 }
198 /// <p>Specifies whether to use Amazon ECS managed tags for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
199 pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
200 self.enable_ecs_managed_tags = input;
201 self
202 }
203 /// <p>Specifies whether to use Amazon ECS managed tags for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
204 pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
205 &self.enable_ecs_managed_tags
206 }
207 /// <p>Whether or not the execute command functionality is turned on for the task. If <code>true</code>, this turns on the execute command functionality on all containers in the task.</p>
208 pub fn enable_execute_command(mut self, input: bool) -> Self {
209 self.enable_execute_command = ::std::option::Option::Some(input);
210 self
211 }
212 /// <p>Whether or not the execute command functionality is turned on for the task. If <code>true</code>, this turns on the execute command functionality on all containers in the task.</p>
213 pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
214 self.enable_execute_command = input;
215 self
216 }
217 /// <p>Whether or not the execute command functionality is turned on for the task. If <code>true</code>, this turns on the execute command functionality on all containers in the task.</p>
218 pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
219 &self.enable_execute_command
220 }
221 /// <p>The name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).</p>
222 pub fn group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.group = ::std::option::Option::Some(input.into());
224 self
225 }
226 /// <p>The name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).</p>
227 pub fn set_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228 self.group = input;
229 self
230 }
231 /// <p>The name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).</p>
232 pub fn get_group(&self) -> &::std::option::Option<::std::string::String> {
233 &self.group
234 }
235 /// <p>The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the <code>awsvpc</code> networking mode.</p>
236 pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
237 self.network_configuration = ::std::option::Option::Some(input);
238 self
239 }
240 /// <p>The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the <code>awsvpc</code> networking mode.</p>
241 pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
242 self.network_configuration = input;
243 self
244 }
245 /// <p>The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the <code>awsvpc</code> networking mode.</p>
246 pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
247 &self.network_configuration
248 }
249 /// <p>A list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it receives. You can override the default command for a container (that's specified in the task definition or Docker image) with a <code>command</code> override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with an <code>environment</code> override.</p><note>
250 /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
251 /// </note>
252 pub fn overrides(mut self, input: crate::types::TaskOverride) -> Self {
253 self.overrides = ::std::option::Option::Some(input);
254 self
255 }
256 /// <p>A list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it receives. You can override the default command for a container (that's specified in the task definition or Docker image) with a <code>command</code> override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with an <code>environment</code> override.</p><note>
257 /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
258 /// </note>
259 pub fn set_overrides(mut self, input: ::std::option::Option<crate::types::TaskOverride>) -> Self {
260 self.overrides = input;
261 self
262 }
263 /// <p>A list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it receives. You can override the default command for a container (that's specified in the task definition or Docker image) with a <code>command</code> override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with an <code>environment</code> override.</p><note>
264 /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
265 /// </note>
266 pub fn get_overrides(&self) -> &::std::option::Option<crate::types::TaskOverride> {
267 &self.overrides
268 }
269 /// <p>Specifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
270 pub fn propagate_tags(mut self, input: crate::types::PropagateTags) -> Self {
271 self.propagate_tags = ::std::option::Option::Some(input);
272 self
273 }
274 /// <p>Specifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
275 pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::PropagateTags>) -> Self {
276 self.propagate_tags = input;
277 self
278 }
279 /// <p>Specifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.</p>
280 pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::PropagateTags> {
281 &self.propagate_tags
282 }
283 /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
284 pub fn reference_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
285 self.reference_id = ::std::option::Option::Some(input.into());
286 self
287 }
288 /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
289 pub fn set_reference_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
290 self.reference_id = input;
291 self
292 }
293 /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
294 pub fn get_reference_id(&self) -> &::std::option::Option<::std::string::String> {
295 &self.reference_id
296 }
297 /// <p>An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the <code>startedBy</code> parameter. You can then identify which tasks belong to that job by filtering the results of a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTasks.html">ListTasks</a> call with the <code>startedBy</code> value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
298 /// <p>If a task is started by an Amazon ECS service, the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
299 pub fn started_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
300 self.started_by = ::std::option::Option::Some(input.into());
301 self
302 }
303 /// <p>An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the <code>startedBy</code> parameter. You can then identify which tasks belong to that job by filtering the results of a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTasks.html">ListTasks</a> call with the <code>startedBy</code> value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
304 /// <p>If a task is started by an Amazon ECS service, the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
305 pub fn set_started_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
306 self.started_by = input;
307 self
308 }
309 /// <p>An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the <code>startedBy</code> parameter. You can then identify which tasks belong to that job by filtering the results of a <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTasks.html">ListTasks</a> call with the <code>startedBy</code> value. Up to 36 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
310 /// <p>If a task is started by an Amazon ECS service, the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
311 pub fn get_started_by(&self) -> &::std::option::Option<::std::string::String> {
312 &self.started_by
313 }
314 /// Appends an item to `tags`.
315 ///
316 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
317 ///
318 /// <p>The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
319 /// <p>The following basic restrictions apply to tags:</p>
320 /// <ul>
321 /// <li>
322 /// <p>Maximum number of tags per resource - 50</p></li>
323 /// <li>
324 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
325 /// <li>
326 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
327 /// <li>
328 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
329 /// <li>
330 /// <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>
331 /// <li>
332 /// <p>Tag keys and values are case-sensitive.</p></li>
333 /// <li>
334 /// <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>
335 /// </ul>
336 pub fn tags(mut self, input: crate::types::Tag) -> Self {
337 let mut v = self.tags.unwrap_or_default();
338 v.push(input);
339 self.tags = ::std::option::Option::Some(v);
340 self
341 }
342 /// <p>The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
343 /// <p>The following basic restrictions apply to tags:</p>
344 /// <ul>
345 /// <li>
346 /// <p>Maximum number of tags per resource - 50</p></li>
347 /// <li>
348 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
349 /// <li>
350 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
351 /// <li>
352 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
353 /// <li>
354 /// <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>
355 /// <li>
356 /// <p>Tag keys and values are case-sensitive.</p></li>
357 /// <li>
358 /// <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>
359 /// </ul>
360 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
361 self.tags = input;
362 self
363 }
364 /// <p>The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
365 /// <p>The following basic restrictions apply to tags:</p>
366 /// <ul>
367 /// <li>
368 /// <p>Maximum number of tags per resource - 50</p></li>
369 /// <li>
370 /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
371 /// <li>
372 /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
373 /// <li>
374 /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
375 /// <li>
376 /// <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>
377 /// <li>
378 /// <p>Tag keys and values are case-sensitive.</p></li>
379 /// <li>
380 /// <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>
381 /// </ul>
382 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
383 &self.tags
384 }
385 /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to start. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
386 /// This field is required.
387 pub fn task_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
388 self.task_definition = ::std::option::Option::Some(input.into());
389 self
390 }
391 /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to start. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
392 pub fn set_task_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
393 self.task_definition = input;
394 self
395 }
396 /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to start. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
397 pub fn get_task_definition(&self) -> &::std::option::Option<::std::string::String> {
398 &self.task_definition
399 }
400 /// Appends an item to `volume_configurations`.
401 ///
402 /// To override the contents of this collection use [`set_volume_configurations`](Self::set_volume_configurations).
403 ///
404 /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskManagedEBSVolumeConfiguration.html">TaskManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition.</p>
405 pub fn volume_configurations(mut self, input: crate::types::TaskVolumeConfiguration) -> Self {
406 let mut v = self.volume_configurations.unwrap_or_default();
407 v.push(input);
408 self.volume_configurations = ::std::option::Option::Some(v);
409 self
410 }
411 /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskManagedEBSVolumeConfiguration.html">TaskManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition.</p>
412 pub fn set_volume_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TaskVolumeConfiguration>>) -> Self {
413 self.volume_configurations = input;
414 self
415 }
416 /// <p>The details of the volume that was <code>configuredAtLaunch</code>. You can configure the size, volumeType, IOPS, throughput, snapshot and encryption in <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TaskManagedEBSVolumeConfiguration.html">TaskManagedEBSVolumeConfiguration</a>. The <code>name</code> of the volume must match the <code>name</code> from the task definition.</p>
417 pub fn get_volume_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TaskVolumeConfiguration>> {
418 &self.volume_configurations
419 }
420 /// Consumes the builder and constructs a [`StartTaskInput`](crate::operation::start_task::StartTaskInput).
421 pub fn build(self) -> ::std::result::Result<crate::operation::start_task::StartTaskInput, ::aws_smithy_types::error::operation::BuildError> {
422 ::std::result::Result::Ok(crate::operation::start_task::StartTaskInput {
423 cluster: self.cluster,
424 container_instances: self.container_instances,
425 enable_ecs_managed_tags: self.enable_ecs_managed_tags,
426 enable_execute_command: self.enable_execute_command,
427 group: self.group,
428 network_configuration: self.network_configuration,
429 overrides: self.overrides,
430 propagate_tags: self.propagate_tags,
431 reference_id: self.reference_id,
432 started_by: self.started_by,
433 tags: self.tags,
434 task_definition: self.task_definition,
435 volume_configurations: self.volume_configurations,
436 })
437 }
438}