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