aws_sdk_ecs/operation/run_task/
_run_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 RunTaskInput {
6    /// <p>The capacity provider strategy to use for the task.</p><note>
7    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
8    /// </note>
9    /// <p>If a <code>capacityProviderStrategy</code> is specified, the <code>launchType</code> parameter must be omitted. If no <code>capacityProviderStrategy</code> or <code>launchType</code> is specified, the <code>defaultCapacityProviderStrategy</code> for the cluster is used.</p>
10    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
11    /// <p>A capacity provider strategy can contain a maximum of 20 capacity providers.</p>
12    pub capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
13    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a cluster, the default cluster is assumed.</p>
14    /// <p>Each account receives a default cluster the first time you use the service, but you may also create other clusters.</p>
15    pub cluster: ::std::option::Option<::std::string::String>,
16    /// <p>The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.</p>
17    pub count: ::std::option::Option<i32>,
18    /// <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>
19    pub enable_ecs_managed_tags: ::std::option::Option<bool>,
20    /// <p>Determines whether to use the execute command functionality for the containers in this task. If <code>true</code>, this enables execute command functionality on all containers in the task.</p>
21    /// <p>If <code>true</code>, then the task definition must have a task role, or you must provide one as an override.</p>
22    pub enable_execute_command: ::std::option::Option<bool>,
23    /// <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, <code>family:my-family-name</code>).</p>
24    pub group: ::std::option::Option<::std::string::String>,
25    /// <p>The infrastructure to run your standalone task on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p><note>
26    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
27    /// </note>
28    /// <p>The <code>FARGATE</code> launch type runs your tasks on Fargate On-Demand infrastructure.</p><note>
29    /// <p>Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-capacity-providers.html">Fargate capacity providers</a> in the <i>Amazon ECS Developer Guide</i>.</p>
30    /// </note>
31    /// <p>The <code>EC2</code> launch type runs your tasks on Amazon EC2 instances registered to your cluster.</p>
32    /// <p>The <code>EXTERNAL</code> launch type runs your tasks on your on-premises server or virtual machine (VM) capacity registered to your cluster.</p>
33    /// <p>A task can use either a launch type or a capacity provider strategy. If a <code>launchType</code> is specified, the <code>capacityProviderStrategy</code> parameter must be omitted.</p>
34    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
35    pub launch_type: ::std::option::Option<crate::types::LaunchType>,
36    /// <p>The network configuration for the task. This parameter is required for task definitions that use the <code>awsvpc</code> network mode to receive their own elastic network interface, and it isn't supported for other network modes. 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>
37    pub network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
38    /// <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 should receive. 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>
39    /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
40    pub overrides: ::std::option::Option<crate::types::TaskOverride>,
41    /// <p>An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task (including constraints in the task definition and those specified at runtime).</p>
42    pub placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
43    /// <p>The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task.</p>
44    pub placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
45    /// <p>The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate platform versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
46    pub platform_version: ::std::option::Option<::std::string::String>,
47    /// <p>Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the<a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p><note>
48    /// <p>An error will be received if you specify the <code>SERVICE</code> option when running a task.</p>
49    /// </note>
50    pub propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
51    /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
52    pub reference_id: ::std::option::Option<::std::string::String>,
53    /// <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 128 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
54    /// <p>If a task is started by an Amazon ECS service, then the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
55    pub started_by: ::std::option::Option<::std::string::String>,
56    /// <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>
57    /// <p>The following basic restrictions apply to tags:</p>
58    /// <ul>
59    /// <li>
60    /// <p>Maximum number of tags per resource - 50</p></li>
61    /// <li>
62    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
63    /// <li>
64    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
65    /// <li>
66    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
67    /// <li>
68    /// <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>
69    /// <li>
70    /// <p>Tag keys and values are case-sensitive.</p></li>
71    /// <li>
72    /// <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>
73    /// </ul>
74    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
75    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
76    /// <p>The full ARN value must match the value that you specified as the <code>Resource</code> of the principal's permissions policy.</p>
77    /// <p>When you specify a task definition, you must either specify a specific revision, or all revisions in the ARN.</p>
78    /// <p>To specify a specific revision, include the revision number in the ARN. For example, to specify revision 2, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:2</code>.</p>
79    /// <p>To specify all revisions, use the wildcard (*) in the ARN. For example, to specify all revisions, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*</code>.</p>
80    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources">Policy Resources for Amazon ECS</a> in the Amazon Elastic Container Service Developer Guide.</p>
81    pub task_definition: ::std::option::Option<::std::string::String>,
82    /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html">Ensuring idempotency</a>.</p>
83    pub client_token: ::std::option::Option<::std::string::String>,
84    /// <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>
85    pub volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::TaskVolumeConfiguration>>,
86}
87impl RunTaskInput {
88    /// <p>The capacity provider strategy to use for the task.</p><note>
89    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
90    /// </note>
91    /// <p>If a <code>capacityProviderStrategy</code> is specified, the <code>launchType</code> parameter must be omitted. If no <code>capacityProviderStrategy</code> or <code>launchType</code> is specified, the <code>defaultCapacityProviderStrategy</code> for the cluster is used.</p>
92    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
93    /// <p>A capacity provider strategy can contain a maximum of 20 capacity providers.</p>
94    ///
95    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capacity_provider_strategy.is_none()`.
96    pub fn capacity_provider_strategy(&self) -> &[crate::types::CapacityProviderStrategyItem] {
97        self.capacity_provider_strategy.as_deref().unwrap_or_default()
98    }
99    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a cluster, the default cluster is assumed.</p>
100    /// <p>Each account receives a default cluster the first time you use the service, but you may also create other clusters.</p>
101    pub fn cluster(&self) -> ::std::option::Option<&str> {
102        self.cluster.as_deref()
103    }
104    /// <p>The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.</p>
105    pub fn count(&self) -> ::std::option::Option<i32> {
106        self.count
107    }
108    /// <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>
109    pub fn enable_ecs_managed_tags(&self) -> ::std::option::Option<bool> {
110        self.enable_ecs_managed_tags
111    }
112    /// <p>Determines whether to use the execute command functionality for the containers in this task. If <code>true</code>, this enables execute command functionality on all containers in the task.</p>
113    /// <p>If <code>true</code>, then the task definition must have a task role, or you must provide one as an override.</p>
114    pub fn enable_execute_command(&self) -> ::std::option::Option<bool> {
115        self.enable_execute_command
116    }
117    /// <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, <code>family:my-family-name</code>).</p>
118    pub fn group(&self) -> ::std::option::Option<&str> {
119        self.group.as_deref()
120    }
121    /// <p>The infrastructure to run your standalone task on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p><note>
122    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
123    /// </note>
124    /// <p>The <code>FARGATE</code> launch type runs your tasks on Fargate On-Demand infrastructure.</p><note>
125    /// <p>Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-capacity-providers.html">Fargate capacity providers</a> in the <i>Amazon ECS Developer Guide</i>.</p>
126    /// </note>
127    /// <p>The <code>EC2</code> launch type runs your tasks on Amazon EC2 instances registered to your cluster.</p>
128    /// <p>The <code>EXTERNAL</code> launch type runs your tasks on your on-premises server or virtual machine (VM) capacity registered to your cluster.</p>
129    /// <p>A task can use either a launch type or a capacity provider strategy. If a <code>launchType</code> is specified, the <code>capacityProviderStrategy</code> parameter must be omitted.</p>
130    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
131    pub fn launch_type(&self) -> ::std::option::Option<&crate::types::LaunchType> {
132        self.launch_type.as_ref()
133    }
134    /// <p>The network configuration for the task. This parameter is required for task definitions that use the <code>awsvpc</code> network mode to receive their own elastic network interface, and it isn't supported for other network modes. 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>
135    pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::NetworkConfiguration> {
136        self.network_configuration.as_ref()
137    }
138    /// <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 should receive. 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>
139    /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
140    pub fn overrides(&self) -> ::std::option::Option<&crate::types::TaskOverride> {
141        self.overrides.as_ref()
142    }
143    /// <p>An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task (including constraints in the task definition and those specified at runtime).</p>
144    ///
145    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.placement_constraints.is_none()`.
146    pub fn placement_constraints(&self) -> &[crate::types::PlacementConstraint] {
147        self.placement_constraints.as_deref().unwrap_or_default()
148    }
149    /// <p>The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task.</p>
150    ///
151    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.placement_strategy.is_none()`.
152    pub fn placement_strategy(&self) -> &[crate::types::PlacementStrategy] {
153        self.placement_strategy.as_deref().unwrap_or_default()
154    }
155    /// <p>The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate platform versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
156    pub fn platform_version(&self) -> ::std::option::Option<&str> {
157        self.platform_version.as_deref()
158    }
159    /// <p>Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the<a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p><note>
160    /// <p>An error will be received if you specify the <code>SERVICE</code> option when running a task.</p>
161    /// </note>
162    pub fn propagate_tags(&self) -> ::std::option::Option<&crate::types::PropagateTags> {
163        self.propagate_tags.as_ref()
164    }
165    /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
166    pub fn reference_id(&self) -> ::std::option::Option<&str> {
167        self.reference_id.as_deref()
168    }
169    /// <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 128 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
170    /// <p>If a task is started by an Amazon ECS service, then the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
171    pub fn started_by(&self) -> ::std::option::Option<&str> {
172        self.started_by.as_deref()
173    }
174    /// <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>
175    /// <p>The following basic restrictions apply to tags:</p>
176    /// <ul>
177    /// <li>
178    /// <p>Maximum number of tags per resource - 50</p></li>
179    /// <li>
180    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
181    /// <li>
182    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
183    /// <li>
184    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
185    /// <li>
186    /// <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>
187    /// <li>
188    /// <p>Tag keys and values are case-sensitive.</p></li>
189    /// <li>
190    /// <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>
191    /// </ul>
192    ///
193    /// 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()`.
194    pub fn tags(&self) -> &[crate::types::Tag] {
195        self.tags.as_deref().unwrap_or_default()
196    }
197    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
198    /// <p>The full ARN value must match the value that you specified as the <code>Resource</code> of the principal's permissions policy.</p>
199    /// <p>When you specify a task definition, you must either specify a specific revision, or all revisions in the ARN.</p>
200    /// <p>To specify a specific revision, include the revision number in the ARN. For example, to specify revision 2, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:2</code>.</p>
201    /// <p>To specify all revisions, use the wildcard (*) in the ARN. For example, to specify all revisions, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*</code>.</p>
202    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources">Policy Resources for Amazon ECS</a> in the Amazon Elastic Container Service Developer Guide.</p>
203    pub fn task_definition(&self) -> ::std::option::Option<&str> {
204        self.task_definition.as_deref()
205    }
206    /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html">Ensuring idempotency</a>.</p>
207    pub fn client_token(&self) -> ::std::option::Option<&str> {
208        self.client_token.as_deref()
209    }
210    /// <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>
211    ///
212    /// 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()`.
213    pub fn volume_configurations(&self) -> &[crate::types::TaskVolumeConfiguration] {
214        self.volume_configurations.as_deref().unwrap_or_default()
215    }
216}
217impl RunTaskInput {
218    /// Creates a new builder-style object to manufacture [`RunTaskInput`](crate::operation::run_task::RunTaskInput).
219    pub fn builder() -> crate::operation::run_task::builders::RunTaskInputBuilder {
220        crate::operation::run_task::builders::RunTaskInputBuilder::default()
221    }
222}
223
224/// A builder for [`RunTaskInput`](crate::operation::run_task::RunTaskInput).
225#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
226#[non_exhaustive]
227pub struct RunTaskInputBuilder {
228    pub(crate) capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
229    pub(crate) cluster: ::std::option::Option<::std::string::String>,
230    pub(crate) count: ::std::option::Option<i32>,
231    pub(crate) enable_ecs_managed_tags: ::std::option::Option<bool>,
232    pub(crate) enable_execute_command: ::std::option::Option<bool>,
233    pub(crate) group: ::std::option::Option<::std::string::String>,
234    pub(crate) launch_type: ::std::option::Option<crate::types::LaunchType>,
235    pub(crate) network_configuration: ::std::option::Option<crate::types::NetworkConfiguration>,
236    pub(crate) overrides: ::std::option::Option<crate::types::TaskOverride>,
237    pub(crate) placement_constraints: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>,
238    pub(crate) placement_strategy: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>,
239    pub(crate) platform_version: ::std::option::Option<::std::string::String>,
240    pub(crate) propagate_tags: ::std::option::Option<crate::types::PropagateTags>,
241    pub(crate) reference_id: ::std::option::Option<::std::string::String>,
242    pub(crate) started_by: ::std::option::Option<::std::string::String>,
243    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
244    pub(crate) task_definition: ::std::option::Option<::std::string::String>,
245    pub(crate) client_token: ::std::option::Option<::std::string::String>,
246    pub(crate) volume_configurations: ::std::option::Option<::std::vec::Vec<crate::types::TaskVolumeConfiguration>>,
247}
248impl RunTaskInputBuilder {
249    /// Appends an item to `capacity_provider_strategy`.
250    ///
251    /// To override the contents of this collection use [`set_capacity_provider_strategy`](Self::set_capacity_provider_strategy).
252    ///
253    /// <p>The capacity provider strategy to use for the task.</p><note>
254    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
255    /// </note>
256    /// <p>If a <code>capacityProviderStrategy</code> is specified, the <code>launchType</code> parameter must be omitted. If no <code>capacityProviderStrategy</code> or <code>launchType</code> is specified, the <code>defaultCapacityProviderStrategy</code> for the cluster is used.</p>
257    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
258    /// <p>A capacity provider strategy can contain a maximum of 20 capacity providers.</p>
259    pub fn capacity_provider_strategy(mut self, input: crate::types::CapacityProviderStrategyItem) -> Self {
260        let mut v = self.capacity_provider_strategy.unwrap_or_default();
261        v.push(input);
262        self.capacity_provider_strategy = ::std::option::Option::Some(v);
263        self
264    }
265    /// <p>The capacity provider strategy to use for the task.</p><note>
266    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
267    /// </note>
268    /// <p>If a <code>capacityProviderStrategy</code> is specified, the <code>launchType</code> parameter must be omitted. If no <code>capacityProviderStrategy</code> or <code>launchType</code> is specified, the <code>defaultCapacityProviderStrategy</code> for the cluster is used.</p>
269    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
270    /// <p>A capacity provider strategy can contain a maximum of 20 capacity providers.</p>
271    pub fn set_capacity_provider_strategy(
272        mut self,
273        input: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
274    ) -> Self {
275        self.capacity_provider_strategy = input;
276        self
277    }
278    /// <p>The capacity provider strategy to use for the task.</p><note>
279    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
280    /// </note>
281    /// <p>If a <code>capacityProviderStrategy</code> is specified, the <code>launchType</code> parameter must be omitted. If no <code>capacityProviderStrategy</code> or <code>launchType</code> is specified, the <code>defaultCapacityProviderStrategy</code> for the cluster is used.</p>
282    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
283    /// <p>A capacity provider strategy can contain a maximum of 20 capacity providers.</p>
284    pub fn get_capacity_provider_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>> {
285        &self.capacity_provider_strategy
286    }
287    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a cluster, the default cluster is assumed.</p>
288    /// <p>Each account receives a default cluster the first time you use the service, but you may also create other clusters.</p>
289    pub fn cluster(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
290        self.cluster = ::std::option::Option::Some(input.into());
291        self
292    }
293    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a cluster, the default cluster is assumed.</p>
294    /// <p>Each account receives a default cluster the first time you use the service, but you may also create other clusters.</p>
295    pub fn set_cluster(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296        self.cluster = input;
297        self
298    }
299    /// <p>The short name or full Amazon Resource Name (ARN) of the cluster to run your task on. If you do not specify a cluster, the default cluster is assumed.</p>
300    /// <p>Each account receives a default cluster the first time you use the service, but you may also create other clusters.</p>
301    pub fn get_cluster(&self) -> &::std::option::Option<::std::string::String> {
302        &self.cluster
303    }
304    /// <p>The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.</p>
305    pub fn count(mut self, input: i32) -> Self {
306        self.count = ::std::option::Option::Some(input);
307        self
308    }
309    /// <p>The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.</p>
310    pub fn set_count(mut self, input: ::std::option::Option<i32>) -> Self {
311        self.count = input;
312        self
313    }
314    /// <p>The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.</p>
315    pub fn get_count(&self) -> &::std::option::Option<i32> {
316        &self.count
317    }
318    /// <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>
319    pub fn enable_ecs_managed_tags(mut self, input: bool) -> Self {
320        self.enable_ecs_managed_tags = ::std::option::Option::Some(input);
321        self
322    }
323    /// <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>
324    pub fn set_enable_ecs_managed_tags(mut self, input: ::std::option::Option<bool>) -> Self {
325        self.enable_ecs_managed_tags = input;
326        self
327    }
328    /// <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>
329    pub fn get_enable_ecs_managed_tags(&self) -> &::std::option::Option<bool> {
330        &self.enable_ecs_managed_tags
331    }
332    /// <p>Determines whether to use the execute command functionality for the containers in this task. If <code>true</code>, this enables execute command functionality on all containers in the task.</p>
333    /// <p>If <code>true</code>, then the task definition must have a task role, or you must provide one as an override.</p>
334    pub fn enable_execute_command(mut self, input: bool) -> Self {
335        self.enable_execute_command = ::std::option::Option::Some(input);
336        self
337    }
338    /// <p>Determines whether to use the execute command functionality for the containers in this task. If <code>true</code>, this enables execute command functionality on all containers in the task.</p>
339    /// <p>If <code>true</code>, then the task definition must have a task role, or you must provide one as an override.</p>
340    pub fn set_enable_execute_command(mut self, input: ::std::option::Option<bool>) -> Self {
341        self.enable_execute_command = input;
342        self
343    }
344    /// <p>Determines whether to use the execute command functionality for the containers in this task. If <code>true</code>, this enables execute command functionality on all containers in the task.</p>
345    /// <p>If <code>true</code>, then the task definition must have a task role, or you must provide one as an override.</p>
346    pub fn get_enable_execute_command(&self) -> &::std::option::Option<bool> {
347        &self.enable_execute_command
348    }
349    /// <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, <code>family:my-family-name</code>).</p>
350    pub fn group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351        self.group = ::std::option::Option::Some(input.into());
352        self
353    }
354    /// <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, <code>family:my-family-name</code>).</p>
355    pub fn set_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356        self.group = input;
357        self
358    }
359    /// <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, <code>family:my-family-name</code>).</p>
360    pub fn get_group(&self) -> &::std::option::Option<::std::string::String> {
361        &self.group
362    }
363    /// <p>The infrastructure to run your standalone task on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p><note>
364    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
365    /// </note>
366    /// <p>The <code>FARGATE</code> launch type runs your tasks on Fargate On-Demand infrastructure.</p><note>
367    /// <p>Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-capacity-providers.html">Fargate capacity providers</a> in the <i>Amazon ECS Developer Guide</i>.</p>
368    /// </note>
369    /// <p>The <code>EC2</code> launch type runs your tasks on Amazon EC2 instances registered to your cluster.</p>
370    /// <p>The <code>EXTERNAL</code> launch type runs your tasks on your on-premises server or virtual machine (VM) capacity registered to your cluster.</p>
371    /// <p>A task can use either a launch type or a capacity provider strategy. If a <code>launchType</code> is specified, the <code>capacityProviderStrategy</code> parameter must be omitted.</p>
372    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
373    pub fn launch_type(mut self, input: crate::types::LaunchType) -> Self {
374        self.launch_type = ::std::option::Option::Some(input);
375        self
376    }
377    /// <p>The infrastructure to run your standalone task on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p><note>
378    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
379    /// </note>
380    /// <p>The <code>FARGATE</code> launch type runs your tasks on Fargate On-Demand infrastructure.</p><note>
381    /// <p>Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-capacity-providers.html">Fargate capacity providers</a> in the <i>Amazon ECS Developer Guide</i>.</p>
382    /// </note>
383    /// <p>The <code>EC2</code> launch type runs your tasks on Amazon EC2 instances registered to your cluster.</p>
384    /// <p>The <code>EXTERNAL</code> launch type runs your tasks on your on-premises server or virtual machine (VM) capacity registered to your cluster.</p>
385    /// <p>A task can use either a launch type or a capacity provider strategy. If a <code>launchType</code> is specified, the <code>capacityProviderStrategy</code> parameter must be omitted.</p>
386    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
387    pub fn set_launch_type(mut self, input: ::std::option::Option<crate::types::LaunchType>) -> Self {
388        self.launch_type = input;
389        self
390    }
391    /// <p>The infrastructure to run your standalone task on. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS launch types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p><note>
392    /// <p>If you want to use Amazon ECS Managed Instances, you must use the <code>capacityProviderStrategy</code> request parameter and omit the <code>launchType</code> request parameter.</p>
393    /// </note>
394    /// <p>The <code>FARGATE</code> launch type runs your tasks on Fargate On-Demand infrastructure.</p><note>
395    /// <p>Fargate Spot infrastructure is available for use but a capacity provider strategy must be used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-capacity-providers.html">Fargate capacity providers</a> in the <i>Amazon ECS Developer Guide</i>.</p>
396    /// </note>
397    /// <p>The <code>EC2</code> launch type runs your tasks on Amazon EC2 instances registered to your cluster.</p>
398    /// <p>The <code>EXTERNAL</code> launch type runs your tasks on your on-premises server or virtual machine (VM) capacity registered to your cluster.</p>
399    /// <p>A task can use either a launch type or a capacity provider strategy. If a <code>launchType</code> is specified, the <code>capacityProviderStrategy</code> parameter must be omitted.</p>
400    /// <p>When you use cluster auto scaling, you must specify <code>capacityProviderStrategy</code> and not <code>launchType</code>.</p>
401    pub fn get_launch_type(&self) -> &::std::option::Option<crate::types::LaunchType> {
402        &self.launch_type
403    }
404    /// <p>The network configuration for the task. This parameter is required for task definitions that use the <code>awsvpc</code> network mode to receive their own elastic network interface, and it isn't supported for other network modes. 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>
405    pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
406        self.network_configuration = ::std::option::Option::Some(input);
407        self
408    }
409    /// <p>The network configuration for the task. This parameter is required for task definitions that use the <code>awsvpc</code> network mode to receive their own elastic network interface, and it isn't supported for other network modes. 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>
410    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
411        self.network_configuration = input;
412        self
413    }
414    /// <p>The network configuration for the task. This parameter is required for task definitions that use the <code>awsvpc</code> network mode to receive their own elastic network interface, and it isn't supported for other network modes. 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>
415    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
416        &self.network_configuration
417    }
418    /// <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 should receive. 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>
419    /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
420    pub fn overrides(mut self, input: crate::types::TaskOverride) -> Self {
421        self.overrides = ::std::option::Option::Some(input);
422        self
423    }
424    /// <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 should receive. 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>
425    /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
426    pub fn set_overrides(mut self, input: ::std::option::Option<crate::types::TaskOverride>) -> Self {
427        self.overrides = input;
428        self
429    }
430    /// <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 should receive. 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>
431    /// <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p>
432    pub fn get_overrides(&self) -> &::std::option::Option<crate::types::TaskOverride> {
433        &self.overrides
434    }
435    /// Appends an item to `placement_constraints`.
436    ///
437    /// To override the contents of this collection use [`set_placement_constraints`](Self::set_placement_constraints).
438    ///
439    /// <p>An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task (including constraints in the task definition and those specified at runtime).</p>
440    pub fn placement_constraints(mut self, input: crate::types::PlacementConstraint) -> Self {
441        let mut v = self.placement_constraints.unwrap_or_default();
442        v.push(input);
443        self.placement_constraints = ::std::option::Option::Some(v);
444        self
445    }
446    /// <p>An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task (including constraints in the task definition and those specified at runtime).</p>
447    pub fn set_placement_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>>) -> Self {
448        self.placement_constraints = input;
449        self
450    }
451    /// <p>An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task (including constraints in the task definition and those specified at runtime).</p>
452    pub fn get_placement_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementConstraint>> {
453        &self.placement_constraints
454    }
455    /// Appends an item to `placement_strategy`.
456    ///
457    /// To override the contents of this collection use [`set_placement_strategy`](Self::set_placement_strategy).
458    ///
459    /// <p>The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task.</p>
460    pub fn placement_strategy(mut self, input: crate::types::PlacementStrategy) -> Self {
461        let mut v = self.placement_strategy.unwrap_or_default();
462        v.push(input);
463        self.placement_strategy = ::std::option::Option::Some(v);
464        self
465    }
466    /// <p>The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task.</p>
467    pub fn set_placement_strategy(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>>) -> Self {
468        self.placement_strategy = input;
469        self
470    }
471    /// <p>The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task.</p>
472    pub fn get_placement_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementStrategy>> {
473        &self.placement_strategy
474    }
475    /// <p>The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate platform versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
476    pub fn platform_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
477        self.platform_version = ::std::option::Option::Some(input.into());
478        self
479    }
480    /// <p>The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate platform versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
481    pub fn set_platform_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
482        self.platform_version = input;
483        self
484    }
485    /// <p>The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the <code>LATEST</code> platform version is used. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">Fargate platform versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
486    pub fn get_platform_version(&self) -> &::std::option::Option<::std::string::String> {
487        &self.platform_version
488    }
489    /// <p>Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the<a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p><note>
490    /// <p>An error will be received if you specify the <code>SERVICE</code> option when running a task.</p>
491    /// </note>
492    pub fn propagate_tags(mut self, input: crate::types::PropagateTags) -> Self {
493        self.propagate_tags = ::std::option::Option::Some(input);
494        self
495    }
496    /// <p>Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the<a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p><note>
497    /// <p>An error will be received if you specify the <code>SERVICE</code> option when running a task.</p>
498    /// </note>
499    pub fn set_propagate_tags(mut self, input: ::std::option::Option<crate::types::PropagateTags>) -> Self {
500        self.propagate_tags = input;
501        self
502    }
503    /// <p>Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the<a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html">TagResource</a> API action.</p><note>
504    /// <p>An error will be received if you specify the <code>SERVICE</code> option when running a task.</p>
505    /// </note>
506    pub fn get_propagate_tags(&self) -> &::std::option::Option<crate::types::PropagateTags> {
507        &self.propagate_tags
508    }
509    /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
510    pub fn reference_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
511        self.reference_id = ::std::option::Option::Some(input.into());
512        self
513    }
514    /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
515    pub fn set_reference_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
516        self.reference_id = input;
517        self
518    }
519    /// <p>This parameter is only used by Amazon ECS. It is not intended for use by customers.</p>
520    pub fn get_reference_id(&self) -> &::std::option::Option<::std::string::String> {
521        &self.reference_id
522    }
523    /// <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 128 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
524    /// <p>If a task is started by an Amazon ECS service, then the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
525    pub fn started_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
526        self.started_by = ::std::option::Option::Some(input.into());
527        self
528    }
529    /// <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 128 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
530    /// <p>If a task is started by an Amazon ECS service, then the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
531    pub fn set_started_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
532        self.started_by = input;
533        self
534    }
535    /// <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 128 letters (uppercase and lowercase), numbers, hyphens (-), forward slash (/), and underscores (_) are allowed.</p>
536    /// <p>If a task is started by an Amazon ECS service, then the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p>
537    pub fn get_started_by(&self) -> &::std::option::Option<::std::string::String> {
538        &self.started_by
539    }
540    /// Appends an item to `tags`.
541    ///
542    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
543    ///
544    /// <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>
545    /// <p>The following basic restrictions apply to tags:</p>
546    /// <ul>
547    /// <li>
548    /// <p>Maximum number of tags per resource - 50</p></li>
549    /// <li>
550    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
551    /// <li>
552    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
553    /// <li>
554    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
555    /// <li>
556    /// <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>
557    /// <li>
558    /// <p>Tag keys and values are case-sensitive.</p></li>
559    /// <li>
560    /// <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>
561    /// </ul>
562    pub fn tags(mut self, input: crate::types::Tag) -> Self {
563        let mut v = self.tags.unwrap_or_default();
564        v.push(input);
565        self.tags = ::std::option::Option::Some(v);
566        self
567    }
568    /// <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>
569    /// <p>The following basic restrictions apply to tags:</p>
570    /// <ul>
571    /// <li>
572    /// <p>Maximum number of tags per resource - 50</p></li>
573    /// <li>
574    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
575    /// <li>
576    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
577    /// <li>
578    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
579    /// <li>
580    /// <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>
581    /// <li>
582    /// <p>Tag keys and values are case-sensitive.</p></li>
583    /// <li>
584    /// <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>
585    /// </ul>
586    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
587        self.tags = input;
588        self
589    }
590    /// <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>
591    /// <p>The following basic restrictions apply to tags:</p>
592    /// <ul>
593    /// <li>
594    /// <p>Maximum number of tags per resource - 50</p></li>
595    /// <li>
596    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
597    /// <li>
598    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
599    /// <li>
600    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
601    /// <li>
602    /// <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>
603    /// <li>
604    /// <p>Tag keys and values are case-sensitive.</p></li>
605    /// <li>
606    /// <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>
607    /// </ul>
608    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
609        &self.tags
610    }
611    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
612    /// <p>The full ARN value must match the value that you specified as the <code>Resource</code> of the principal's permissions policy.</p>
613    /// <p>When you specify a task definition, you must either specify a specific revision, or all revisions in the ARN.</p>
614    /// <p>To specify a specific revision, include the revision number in the ARN. For example, to specify revision 2, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:2</code>.</p>
615    /// <p>To specify all revisions, use the wildcard (*) in the ARN. For example, to specify all revisions, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*</code>.</p>
616    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources">Policy Resources for Amazon ECS</a> in the Amazon Elastic Container Service Developer Guide.</p>
617    /// This field is required.
618    pub fn task_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
619        self.task_definition = ::std::option::Option::Some(input.into());
620        self
621    }
622    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
623    /// <p>The full ARN value must match the value that you specified as the <code>Resource</code> of the principal's permissions policy.</p>
624    /// <p>When you specify a task definition, you must either specify a specific revision, or all revisions in the ARN.</p>
625    /// <p>To specify a specific revision, include the revision number in the ARN. For example, to specify revision 2, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:2</code>.</p>
626    /// <p>To specify all revisions, use the wildcard (*) in the ARN. For example, to specify all revisions, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*</code>.</p>
627    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources">Policy Resources for Amazon ECS</a> in the Amazon Elastic Container Service Developer Guide.</p>
628    pub fn set_task_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
629        self.task_definition = input;
630        self
631    }
632    /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run. If a <code>revision</code> isn't specified, the latest <code>ACTIVE</code> revision is used.</p>
633    /// <p>The full ARN value must match the value that you specified as the <code>Resource</code> of the principal's permissions policy.</p>
634    /// <p>When you specify a task definition, you must either specify a specific revision, or all revisions in the ARN.</p>
635    /// <p>To specify a specific revision, include the revision number in the ARN. For example, to specify revision 2, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:2</code>.</p>
636    /// <p>To specify all revisions, use the wildcard (*) in the ARN. For example, to specify all revisions, use <code>arn:aws:ecs:us-east-1:111122223333:task-definition/TaskFamilyName:*</code>.</p>
637    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources">Policy Resources for Amazon ECS</a> in the Amazon Elastic Container Service Developer Guide.</p>
638    pub fn get_task_definition(&self) -> &::std::option::Option<::std::string::String> {
639        &self.task_definition
640    }
641    /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html">Ensuring idempotency</a>.</p>
642    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
643        self.client_token = ::std::option::Option::Some(input.into());
644        self
645    }
646    /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html">Ensuring idempotency</a>.</p>
647    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
648        self.client_token = input;
649        self
650    }
651    /// <p>An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/ECS_Idempotency.html">Ensuring idempotency</a>.</p>
652    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
653        &self.client_token
654    }
655    /// Appends an item to `volume_configurations`.
656    ///
657    /// To override the contents of this collection use [`set_volume_configurations`](Self::set_volume_configurations).
658    ///
659    /// <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>
660    pub fn volume_configurations(mut self, input: crate::types::TaskVolumeConfiguration) -> Self {
661        let mut v = self.volume_configurations.unwrap_or_default();
662        v.push(input);
663        self.volume_configurations = ::std::option::Option::Some(v);
664        self
665    }
666    /// <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>
667    pub fn set_volume_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TaskVolumeConfiguration>>) -> Self {
668        self.volume_configurations = input;
669        self
670    }
671    /// <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>
672    pub fn get_volume_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TaskVolumeConfiguration>> {
673        &self.volume_configurations
674    }
675    /// Consumes the builder and constructs a [`RunTaskInput`](crate::operation::run_task::RunTaskInput).
676    pub fn build(self) -> ::std::result::Result<crate::operation::run_task::RunTaskInput, ::aws_smithy_types::error::operation::BuildError> {
677        ::std::result::Result::Ok(crate::operation::run_task::RunTaskInput {
678            capacity_provider_strategy: self.capacity_provider_strategy,
679            cluster: self.cluster,
680            count: self.count,
681            enable_ecs_managed_tags: self.enable_ecs_managed_tags,
682            enable_execute_command: self.enable_execute_command,
683            group: self.group,
684            launch_type: self.launch_type,
685            network_configuration: self.network_configuration,
686            overrides: self.overrides,
687            placement_constraints: self.placement_constraints,
688            placement_strategy: self.placement_strategy,
689            platform_version: self.platform_version,
690            propagate_tags: self.propagate_tags,
691            reference_id: self.reference_id,
692            started_by: self.started_by,
693            tags: self.tags,
694            task_definition: self.task_definition,
695            client_token: self.client_token,
696            volume_configurations: self.volume_configurations,
697        })
698    }
699}