aws_sdk_batch/operation/submit_job/
_submit_job_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the parameters for <code>SubmitJob</code>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SubmitJobInput {
7    /// <p>The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).</p>
8    pub job_name: ::std::option::Option<::std::string::String>,
9    /// <p>The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue.</p>
10    pub job_queue: ::std::option::Option<::std::string::String>,
11    /// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified.</p>
12    /// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
13    pub share_identifier: ::std::option::Option<::std::string::String>,
14    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. This overrides any scheduling priority in the job definition and works only within a single share identifier.</p>
15    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
16    pub scheduling_priority_override: ::std::option::Option<i32>,
17    /// <p>The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html">Array Jobs</a> in the <i>Batch User Guide</i>.</p>
18    pub array_properties: ::std::option::Option<crate::types::ArrayProperties>,
19    /// <p>A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a <code>SEQUENTIAL</code> type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an <code>N_TO_N</code> type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.</p>
20    pub depends_on: ::std::option::Option<::std::vec::Vec<crate::types::JobDependency>>,
21    /// <p>The job definition used by this job. This value can be one of <code>definition-name</code>, <code>definition-name:revision</code>, or the Amazon Resource Name (ARN) for the job definition, with or without the revision (<code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i>:<i>revision</i> </code>, or <code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i> </code>).</p>
22    /// <p>If the revision is not specified, then the latest active revision is used.</p>
23    pub job_definition: ::std::option::Option<::std::string::String>,
24    /// <p>Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a <code>SubmitJob</code> request override any corresponding parameter defaults from the job definition.</p>
25    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26    /// <p>An object with properties that override the defaults for the job definition that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container, which is specified in the job definition or the Docker image, with a <code>command</code> override. You can also override existing environment variables on a container or add new environment variables to it with an <code>environment</code> override.</p>
27    pub container_overrides: ::std::option::Option<crate::types::ContainerOverrides>,
28    /// <p>A list of node overrides in JSON format that specify the node range to target and the container overrides for that node range.</p><note>
29    /// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
30    /// </note>
31    pub node_overrides: ::std::option::Option<crate::types::NodeOverrides>,
32    /// <p>The retry strategy to use for failed jobs from this <code>SubmitJob</code> operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.</p>
33    pub retry_strategy: ::std::option::Option<crate::types::RetryStrategy>,
34    /// <p>Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the <code>FAILED</code> state. When specified, this overrides the tag propagation setting in the job definition.</p>
35    pub propagate_tags: ::std::option::Option<bool>,
36    /// <p>The timeout configuration for this <code>SubmitJob</code> operation. You can specify a timeout duration after which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html">Job Timeouts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
37    pub timeout: ::std::option::Option<crate::types::JobTimeout>,
38    /// <p>The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a> in <i>Amazon Web Services General Reference</i>.</p>
39    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
40    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon EKS resources.</p>
41    pub eks_properties_override: ::std::option::Option<crate::types::EksPropertiesOverride>,
42    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon ECS resources.</p>
43    pub ecs_properties_override: ::std::option::Option<crate::types::EcsPropertiesOverride>,
44}
45impl SubmitJobInput {
46    /// <p>The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).</p>
47    pub fn job_name(&self) -> ::std::option::Option<&str> {
48        self.job_name.as_deref()
49    }
50    /// <p>The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue.</p>
51    pub fn job_queue(&self) -> ::std::option::Option<&str> {
52        self.job_queue.as_deref()
53    }
54    /// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified.</p>
55    /// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
56    pub fn share_identifier(&self) -> ::std::option::Option<&str> {
57        self.share_identifier.as_deref()
58    }
59    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. This overrides any scheduling priority in the job definition and works only within a single share identifier.</p>
60    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
61    pub fn scheduling_priority_override(&self) -> ::std::option::Option<i32> {
62        self.scheduling_priority_override
63    }
64    /// <p>The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html">Array Jobs</a> in the <i>Batch User Guide</i>.</p>
65    pub fn array_properties(&self) -> ::std::option::Option<&crate::types::ArrayProperties> {
66        self.array_properties.as_ref()
67    }
68    /// <p>A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a <code>SEQUENTIAL</code> type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an <code>N_TO_N</code> type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.</p>
69    ///
70    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.depends_on.is_none()`.
71    pub fn depends_on(&self) -> &[crate::types::JobDependency] {
72        self.depends_on.as_deref().unwrap_or_default()
73    }
74    /// <p>The job definition used by this job. This value can be one of <code>definition-name</code>, <code>definition-name:revision</code>, or the Amazon Resource Name (ARN) for the job definition, with or without the revision (<code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i>:<i>revision</i> </code>, or <code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i> </code>).</p>
75    /// <p>If the revision is not specified, then the latest active revision is used.</p>
76    pub fn job_definition(&self) -> ::std::option::Option<&str> {
77        self.job_definition.as_deref()
78    }
79    /// <p>Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a <code>SubmitJob</code> request override any corresponding parameter defaults from the job definition.</p>
80    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
81        self.parameters.as_ref()
82    }
83    /// <p>An object with properties that override the defaults for the job definition that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container, which is specified in the job definition or the Docker image, with a <code>command</code> override. You can also override existing environment variables on a container or add new environment variables to it with an <code>environment</code> override.</p>
84    pub fn container_overrides(&self) -> ::std::option::Option<&crate::types::ContainerOverrides> {
85        self.container_overrides.as_ref()
86    }
87    /// <p>A list of node overrides in JSON format that specify the node range to target and the container overrides for that node range.</p><note>
88    /// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
89    /// </note>
90    pub fn node_overrides(&self) -> ::std::option::Option<&crate::types::NodeOverrides> {
91        self.node_overrides.as_ref()
92    }
93    /// <p>The retry strategy to use for failed jobs from this <code>SubmitJob</code> operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.</p>
94    pub fn retry_strategy(&self) -> ::std::option::Option<&crate::types::RetryStrategy> {
95        self.retry_strategy.as_ref()
96    }
97    /// <p>Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the <code>FAILED</code> state. When specified, this overrides the tag propagation setting in the job definition.</p>
98    pub fn propagate_tags(&self) -> ::std::option::Option<bool> {
99        self.propagate_tags
100    }
101    /// <p>The timeout configuration for this <code>SubmitJob</code> operation. You can specify a timeout duration after which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html">Job Timeouts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
102    pub fn timeout(&self) -> ::std::option::Option<&crate::types::JobTimeout> {
103        self.timeout.as_ref()
104    }
105    /// <p>The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a> in <i>Amazon Web Services General Reference</i>.</p>
106    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
107        self.tags.as_ref()
108    }
109    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon EKS resources.</p>
110    pub fn eks_properties_override(&self) -> ::std::option::Option<&crate::types::EksPropertiesOverride> {
111        self.eks_properties_override.as_ref()
112    }
113    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon ECS resources.</p>
114    pub fn ecs_properties_override(&self) -> ::std::option::Option<&crate::types::EcsPropertiesOverride> {
115        self.ecs_properties_override.as_ref()
116    }
117}
118impl SubmitJobInput {
119    /// Creates a new builder-style object to manufacture [`SubmitJobInput`](crate::operation::submit_job::SubmitJobInput).
120    pub fn builder() -> crate::operation::submit_job::builders::SubmitJobInputBuilder {
121        crate::operation::submit_job::builders::SubmitJobInputBuilder::default()
122    }
123}
124
125/// A builder for [`SubmitJobInput`](crate::operation::submit_job::SubmitJobInput).
126#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
127#[non_exhaustive]
128pub struct SubmitJobInputBuilder {
129    pub(crate) job_name: ::std::option::Option<::std::string::String>,
130    pub(crate) job_queue: ::std::option::Option<::std::string::String>,
131    pub(crate) share_identifier: ::std::option::Option<::std::string::String>,
132    pub(crate) scheduling_priority_override: ::std::option::Option<i32>,
133    pub(crate) array_properties: ::std::option::Option<crate::types::ArrayProperties>,
134    pub(crate) depends_on: ::std::option::Option<::std::vec::Vec<crate::types::JobDependency>>,
135    pub(crate) job_definition: ::std::option::Option<::std::string::String>,
136    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
137    pub(crate) container_overrides: ::std::option::Option<crate::types::ContainerOverrides>,
138    pub(crate) node_overrides: ::std::option::Option<crate::types::NodeOverrides>,
139    pub(crate) retry_strategy: ::std::option::Option<crate::types::RetryStrategy>,
140    pub(crate) propagate_tags: ::std::option::Option<bool>,
141    pub(crate) timeout: ::std::option::Option<crate::types::JobTimeout>,
142    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
143    pub(crate) eks_properties_override: ::std::option::Option<crate::types::EksPropertiesOverride>,
144    pub(crate) ecs_properties_override: ::std::option::Option<crate::types::EcsPropertiesOverride>,
145}
146impl SubmitJobInputBuilder {
147    /// <p>The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).</p>
148    /// This field is required.
149    pub fn job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.job_name = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).</p>
154    pub fn set_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.job_name = input;
156        self
157    }
158    /// <p>The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).</p>
159    pub fn get_job_name(&self) -> &::std::option::Option<::std::string::String> {
160        &self.job_name
161    }
162    /// <p>The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue.</p>
163    /// This field is required.
164    pub fn job_queue(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.job_queue = ::std::option::Option::Some(input.into());
166        self
167    }
168    /// <p>The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue.</p>
169    pub fn set_job_queue(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.job_queue = input;
171        self
172    }
173    /// <p>The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue.</p>
174    pub fn get_job_queue(&self) -> &::std::option::Option<::std::string::String> {
175        &self.job_queue
176    }
177    /// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified.</p>
178    /// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
179    pub fn share_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.share_identifier = ::std::option::Option::Some(input.into());
181        self
182    }
183    /// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified.</p>
184    /// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
185    pub fn set_share_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.share_identifier = input;
187        self
188    }
189    /// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a fair-share scheduling policy. If the job queue has a fair-share scheduling policy, then this parameter must be specified.</p>
190    /// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
191    pub fn get_share_identifier(&self) -> &::std::option::Option<::std::string::String> {
192        &self.share_identifier
193    }
194    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. This overrides any scheduling priority in the job definition and works only within a single share identifier.</p>
195    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
196    pub fn scheduling_priority_override(mut self, input: i32) -> Self {
197        self.scheduling_priority_override = ::std::option::Option::Some(input);
198        self
199    }
200    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. This overrides any scheduling priority in the job definition and works only within a single share identifier.</p>
201    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
202    pub fn set_scheduling_priority_override(mut self, input: ::std::option::Option<i32>) -> Self {
203        self.scheduling_priority_override = input;
204        self
205    }
206    /// <p>The scheduling priority for the job. This only affects jobs in job queues with a fair-share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. This overrides any scheduling priority in the job definition and works only within a single share identifier.</p>
207    /// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
208    pub fn get_scheduling_priority_override(&self) -> &::std::option::Option<i32> {
209        &self.scheduling_priority_override
210    }
211    /// <p>The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html">Array Jobs</a> in the <i>Batch User Guide</i>.</p>
212    pub fn array_properties(mut self, input: crate::types::ArrayProperties) -> Self {
213        self.array_properties = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html">Array Jobs</a> in the <i>Batch User Guide</i>.</p>
217    pub fn set_array_properties(mut self, input: ::std::option::Option<crate::types::ArrayProperties>) -> Self {
218        self.array_properties = input;
219        self
220    }
221    /// <p>The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html">Array Jobs</a> in the <i>Batch User Guide</i>.</p>
222    pub fn get_array_properties(&self) -> &::std::option::Option<crate::types::ArrayProperties> {
223        &self.array_properties
224    }
225    /// Appends an item to `depends_on`.
226    ///
227    /// To override the contents of this collection use [`set_depends_on`](Self::set_depends_on).
228    ///
229    /// <p>A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a <code>SEQUENTIAL</code> type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an <code>N_TO_N</code> type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.</p>
230    pub fn depends_on(mut self, input: crate::types::JobDependency) -> Self {
231        let mut v = self.depends_on.unwrap_or_default();
232        v.push(input);
233        self.depends_on = ::std::option::Option::Some(v);
234        self
235    }
236    /// <p>A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a <code>SEQUENTIAL</code> type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an <code>N_TO_N</code> type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.</p>
237    pub fn set_depends_on(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobDependency>>) -> Self {
238        self.depends_on = input;
239        self
240    }
241    /// <p>A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a <code>SEQUENTIAL</code> type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an <code>N_TO_N</code> type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.</p>
242    pub fn get_depends_on(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobDependency>> {
243        &self.depends_on
244    }
245    /// <p>The job definition used by this job. This value can be one of <code>definition-name</code>, <code>definition-name:revision</code>, or the Amazon Resource Name (ARN) for the job definition, with or without the revision (<code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i>:<i>revision</i> </code>, or <code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i> </code>).</p>
246    /// <p>If the revision is not specified, then the latest active revision is used.</p>
247    /// This field is required.
248    pub fn job_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249        self.job_definition = ::std::option::Option::Some(input.into());
250        self
251    }
252    /// <p>The job definition used by this job. This value can be one of <code>definition-name</code>, <code>definition-name:revision</code>, or the Amazon Resource Name (ARN) for the job definition, with or without the revision (<code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i>:<i>revision</i> </code>, or <code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i> </code>).</p>
253    /// <p>If the revision is not specified, then the latest active revision is used.</p>
254    pub fn set_job_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255        self.job_definition = input;
256        self
257    }
258    /// <p>The job definition used by this job. This value can be one of <code>definition-name</code>, <code>definition-name:revision</code>, or the Amazon Resource Name (ARN) for the job definition, with or without the revision (<code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i>:<i>revision</i> </code>, or <code>arn:aws:batch:<i>region</i>:<i>account</i>:job-definition/<i>definition-name</i> </code>).</p>
259    /// <p>If the revision is not specified, then the latest active revision is used.</p>
260    pub fn get_job_definition(&self) -> &::std::option::Option<::std::string::String> {
261        &self.job_definition
262    }
263    /// Adds a key-value pair to `parameters`.
264    ///
265    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
266    ///
267    /// <p>Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a <code>SubmitJob</code> request override any corresponding parameter defaults from the job definition.</p>
268    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
269        let mut hash_map = self.parameters.unwrap_or_default();
270        hash_map.insert(k.into(), v.into());
271        self.parameters = ::std::option::Option::Some(hash_map);
272        self
273    }
274    /// <p>Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a <code>SubmitJob</code> request override any corresponding parameter defaults from the job definition.</p>
275    pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
276        self.parameters = input;
277        self
278    }
279    /// <p>Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a <code>SubmitJob</code> request override any corresponding parameter defaults from the job definition.</p>
280    pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
281        &self.parameters
282    }
283    /// <p>An object with properties that override the defaults for the job definition that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container, which is specified in the job definition or the Docker image, with a <code>command</code> override. You can also override existing environment variables on a container or add new environment variables to it with an <code>environment</code> override.</p>
284    pub fn container_overrides(mut self, input: crate::types::ContainerOverrides) -> Self {
285        self.container_overrides = ::std::option::Option::Some(input);
286        self
287    }
288    /// <p>An object with properties that override the defaults for the job definition that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container, which is specified in the job definition or the Docker image, with a <code>command</code> override. You can also override existing environment variables on a container or add new environment variables to it with an <code>environment</code> override.</p>
289    pub fn set_container_overrides(mut self, input: ::std::option::Option<crate::types::ContainerOverrides>) -> Self {
290        self.container_overrides = input;
291        self
292    }
293    /// <p>An object with properties that override the defaults for the job definition that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container, which is specified in the job definition or the Docker image, with a <code>command</code> override. You can also override existing environment variables on a container or add new environment variables to it with an <code>environment</code> override.</p>
294    pub fn get_container_overrides(&self) -> &::std::option::Option<crate::types::ContainerOverrides> {
295        &self.container_overrides
296    }
297    /// <p>A list of node overrides in JSON format that specify the node range to target and the container overrides for that node range.</p><note>
298    /// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
299    /// </note>
300    pub fn node_overrides(mut self, input: crate::types::NodeOverrides) -> Self {
301        self.node_overrides = ::std::option::Option::Some(input);
302        self
303    }
304    /// <p>A list of node overrides in JSON format that specify the node range to target and the container overrides for that node range.</p><note>
305    /// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
306    /// </note>
307    pub fn set_node_overrides(mut self, input: ::std::option::Option<crate::types::NodeOverrides>) -> Self {
308        self.node_overrides = input;
309        self
310    }
311    /// <p>A list of node overrides in JSON format that specify the node range to target and the container overrides for that node range.</p><note>
312    /// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
313    /// </note>
314    pub fn get_node_overrides(&self) -> &::std::option::Option<crate::types::NodeOverrides> {
315        &self.node_overrides
316    }
317    /// <p>The retry strategy to use for failed jobs from this <code>SubmitJob</code> operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.</p>
318    pub fn retry_strategy(mut self, input: crate::types::RetryStrategy) -> Self {
319        self.retry_strategy = ::std::option::Option::Some(input);
320        self
321    }
322    /// <p>The retry strategy to use for failed jobs from this <code>SubmitJob</code> operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.</p>
323    pub fn set_retry_strategy(mut self, input: ::std::option::Option<crate::types::RetryStrategy>) -> Self {
324        self.retry_strategy = input;
325        self
326    }
327    /// <p>The retry strategy to use for failed jobs from this <code>SubmitJob</code> operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.</p>
328    pub fn get_retry_strategy(&self) -> &::std::option::Option<crate::types::RetryStrategy> {
329        &self.retry_strategy
330    }
331    /// <p>Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the <code>FAILED</code> state. When specified, this overrides the tag propagation setting in the job definition.</p>
332    pub fn propagate_tags(mut self, input: bool) -> Self {
333        self.propagate_tags = ::std::option::Option::Some(input);
334        self
335    }
336    /// <p>Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the <code>FAILED</code> state. When specified, this overrides the tag propagation setting in the job definition.</p>
337    pub fn set_propagate_tags(mut self, input: ::std::option::Option<bool>) -> Self {
338        self.propagate_tags = input;
339        self
340    }
341    /// <p>Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the <code>FAILED</code> state. When specified, this overrides the tag propagation setting in the job definition.</p>
342    pub fn get_propagate_tags(&self) -> &::std::option::Option<bool> {
343        &self.propagate_tags
344    }
345    /// <p>The timeout configuration for this <code>SubmitJob</code> operation. You can specify a timeout duration after which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html">Job Timeouts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
346    pub fn timeout(mut self, input: crate::types::JobTimeout) -> Self {
347        self.timeout = ::std::option::Option::Some(input);
348        self
349    }
350    /// <p>The timeout configuration for this <code>SubmitJob</code> operation. You can specify a timeout duration after which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html">Job Timeouts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
351    pub fn set_timeout(mut self, input: ::std::option::Option<crate::types::JobTimeout>) -> Self {
352        self.timeout = input;
353        self
354    }
355    /// <p>The timeout configuration for this <code>SubmitJob</code> operation. You can specify a timeout duration after which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html">Job Timeouts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
356    pub fn get_timeout(&self) -> &::std::option::Option<crate::types::JobTimeout> {
357        &self.timeout
358    }
359    /// Adds a key-value pair to `tags`.
360    ///
361    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
362    ///
363    /// <p>The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a> in <i>Amazon Web Services General Reference</i>.</p>
364    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
365        let mut hash_map = self.tags.unwrap_or_default();
366        hash_map.insert(k.into(), v.into());
367        self.tags = ::std::option::Option::Some(hash_map);
368        self
369    }
370    /// <p>The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a> in <i>Amazon Web Services General Reference</i>.</p>
371    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
372        self.tags = input;
373        self
374    }
375    /// <p>The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a> in <i>Amazon Web Services General Reference</i>.</p>
376    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
377        &self.tags
378    }
379    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon EKS resources.</p>
380    pub fn eks_properties_override(mut self, input: crate::types::EksPropertiesOverride) -> Self {
381        self.eks_properties_override = ::std::option::Option::Some(input);
382        self
383    }
384    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon EKS resources.</p>
385    pub fn set_eks_properties_override(mut self, input: ::std::option::Option<crate::types::EksPropertiesOverride>) -> Self {
386        self.eks_properties_override = input;
387        self
388    }
389    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon EKS resources.</p>
390    pub fn get_eks_properties_override(&self) -> &::std::option::Option<crate::types::EksPropertiesOverride> {
391        &self.eks_properties_override
392    }
393    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon ECS resources.</p>
394    pub fn ecs_properties_override(mut self, input: crate::types::EcsPropertiesOverride) -> Self {
395        self.ecs_properties_override = ::std::option::Option::Some(input);
396        self
397    }
398    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon ECS resources.</p>
399    pub fn set_ecs_properties_override(mut self, input: ::std::option::Option<crate::types::EcsPropertiesOverride>) -> Self {
400        self.ecs_properties_override = input;
401        self
402    }
403    /// <p>An object, with properties that override defaults for the job definition, can only be specified for jobs that are run on Amazon ECS resources.</p>
404    pub fn get_ecs_properties_override(&self) -> &::std::option::Option<crate::types::EcsPropertiesOverride> {
405        &self.ecs_properties_override
406    }
407    /// Consumes the builder and constructs a [`SubmitJobInput`](crate::operation::submit_job::SubmitJobInput).
408    pub fn build(self) -> ::std::result::Result<crate::operation::submit_job::SubmitJobInput, ::aws_smithy_types::error::operation::BuildError> {
409        ::std::result::Result::Ok(crate::operation::submit_job::SubmitJobInput {
410            job_name: self.job_name,
411            job_queue: self.job_queue,
412            share_identifier: self.share_identifier,
413            scheduling_priority_override: self.scheduling_priority_override,
414            array_properties: self.array_properties,
415            depends_on: self.depends_on,
416            job_definition: self.job_definition,
417            parameters: self.parameters,
418            container_overrides: self.container_overrides,
419            node_overrides: self.node_overrides,
420            retry_strategy: self.retry_strategy,
421            propagate_tags: self.propagate_tags,
422            timeout: self.timeout,
423            tags: self.tags,
424            eks_properties_override: self.eks_properties_override,
425            ecs_properties_override: self.ecs_properties_override,
426        })
427    }
428}