1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains the parameters for <code>SubmitJob</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SubmitJobInput {
/// <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>
pub job_name: ::std::option::Option<::std::string::String>,
/// <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>
pub job_queue: ::std::option::Option<::std::string::String>,
/// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy. If the job queue has a scheduling policy, then this parameter must be specified.</p>
/// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
pub share_identifier: ::std::option::Option<::std::string::String>,
/// <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.</p>
/// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
pub scheduling_priority_override: ::std::option::Option<i32>,
/// <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>
pub array_properties: ::std::option::Option<crate::types::ArrayProperties>,
/// <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>
pub depends_on: ::std::option::Option<::std::vec::Vec<crate::types::JobDependency>>,
/// <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>
/// <p>If the revision is not specified, then the latest active revision is used.</p>
pub job_definition: ::std::option::Option<::std::string::String>,
/// <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>
pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>An object with various 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>
pub container_overrides: ::std::option::Option<crate::types::ContainerOverrides>,
/// <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>
/// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
/// </note>
pub node_overrides: ::std::option::Option<crate::types::NodeOverrides>,
/// <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>
pub retry_strategy: ::std::option::Option<crate::types::RetryStrategy>,
/// <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>
pub propagate_tags: ::std::option::Option<bool>,
/// <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>
pub timeout: ::std::option::Option<crate::types::JobTimeout>,
/// <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>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>An object that can only be specified for jobs that are run on Amazon EKS resources with various properties that override defaults for the job definition.</p>
pub eks_properties_override: ::std::option::Option<crate::types::EksPropertiesOverride>,
}
impl SubmitJobInput {
/// <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>
pub fn job_name(&self) -> ::std::option::Option<&str> {
self.job_name.as_deref()
}
/// <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>
pub fn job_queue(&self) -> ::std::option::Option<&str> {
self.job_queue.as_deref()
}
/// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy. If the job queue has a scheduling policy, then this parameter must be specified.</p>
/// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
pub fn share_identifier(&self) -> ::std::option::Option<&str> {
self.share_identifier.as_deref()
}
/// <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.</p>
/// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
pub fn scheduling_priority_override(&self) -> ::std::option::Option<i32> {
self.scheduling_priority_override
}
/// <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>
pub fn array_properties(&self) -> ::std::option::Option<&crate::types::ArrayProperties> {
self.array_properties.as_ref()
}
/// <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>
///
/// 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()`.
pub fn depends_on(&self) -> &[crate::types::JobDependency] {
self.depends_on.as_deref().unwrap_or_default()
}
/// <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>
/// <p>If the revision is not specified, then the latest active revision is used.</p>
pub fn job_definition(&self) -> ::std::option::Option<&str> {
self.job_definition.as_deref()
}
/// <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>
pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.parameters.as_ref()
}
/// <p>An object with various 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>
pub fn container_overrides(&self) -> ::std::option::Option<&crate::types::ContainerOverrides> {
self.container_overrides.as_ref()
}
/// <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>
/// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
/// </note>
pub fn node_overrides(&self) -> ::std::option::Option<&crate::types::NodeOverrides> {
self.node_overrides.as_ref()
}
/// <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>
pub fn retry_strategy(&self) -> ::std::option::Option<&crate::types::RetryStrategy> {
self.retry_strategy.as_ref()
}
/// <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>
pub fn propagate_tags(&self) -> ::std::option::Option<bool> {
self.propagate_tags
}
/// <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>
pub fn timeout(&self) -> ::std::option::Option<&crate::types::JobTimeout> {
self.timeout.as_ref()
}
/// <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>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// <p>An object that can only be specified for jobs that are run on Amazon EKS resources with various properties that override defaults for the job definition.</p>
pub fn eks_properties_override(&self) -> ::std::option::Option<&crate::types::EksPropertiesOverride> {
self.eks_properties_override.as_ref()
}
}
impl SubmitJobInput {
/// Creates a new builder-style object to manufacture [`SubmitJobInput`](crate::operation::submit_job::SubmitJobInput).
pub fn builder() -> crate::operation::submit_job::builders::SubmitJobInputBuilder {
crate::operation::submit_job::builders::SubmitJobInputBuilder::default()
}
}
/// A builder for [`SubmitJobInput`](crate::operation::submit_job::SubmitJobInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SubmitJobInputBuilder {
pub(crate) job_name: ::std::option::Option<::std::string::String>,
pub(crate) job_queue: ::std::option::Option<::std::string::String>,
pub(crate) share_identifier: ::std::option::Option<::std::string::String>,
pub(crate) scheduling_priority_override: ::std::option::Option<i32>,
pub(crate) array_properties: ::std::option::Option<crate::types::ArrayProperties>,
pub(crate) depends_on: ::std::option::Option<::std::vec::Vec<crate::types::JobDependency>>,
pub(crate) job_definition: ::std::option::Option<::std::string::String>,
pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) container_overrides: ::std::option::Option<crate::types::ContainerOverrides>,
pub(crate) node_overrides: ::std::option::Option<crate::types::NodeOverrides>,
pub(crate) retry_strategy: ::std::option::Option<crate::types::RetryStrategy>,
pub(crate) propagate_tags: ::std::option::Option<bool>,
pub(crate) timeout: ::std::option::Option<crate::types::JobTimeout>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) eks_properties_override: ::std::option::Option<crate::types::EksPropertiesOverride>,
}
impl SubmitJobInputBuilder {
/// <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>
/// This field is required.
pub fn job_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_name = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_job_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_name = input;
self
}
/// <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>
pub fn get_job_name(&self) -> &::std::option::Option<::std::string::String> {
&self.job_name
}
/// <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>
/// This field is required.
pub fn job_queue(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_queue = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_job_queue(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_queue = input;
self
}
/// <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>
pub fn get_job_queue(&self) -> &::std::option::Option<::std::string::String> {
&self.job_queue
}
/// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy. If the job queue has a scheduling policy, then this parameter must be specified.</p>
/// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
pub fn share_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.share_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy. If the job queue has a scheduling policy, then this parameter must be specified.</p>
/// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
pub fn set_share_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.share_identifier = input;
self
}
/// <p>The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy. If the job queue has a scheduling policy, then this parameter must be specified.</p>
/// <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p>
pub fn get_share_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.share_identifier
}
/// <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.</p>
/// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
pub fn scheduling_priority_override(mut self, input: i32) -> Self {
self.scheduling_priority_override = ::std::option::Option::Some(input);
self
}
/// <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.</p>
/// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
pub fn set_scheduling_priority_override(mut self, input: ::std::option::Option<i32>) -> Self {
self.scheduling_priority_override = input;
self
}
/// <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.</p>
/// <p>The minimum supported value is 0 and the maximum supported value is 9999.</p>
pub fn get_scheduling_priority_override(&self) -> &::std::option::Option<i32> {
&self.scheduling_priority_override
}
/// <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>
pub fn array_properties(mut self, input: crate::types::ArrayProperties) -> Self {
self.array_properties = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_array_properties(mut self, input: ::std::option::Option<crate::types::ArrayProperties>) -> Self {
self.array_properties = input;
self
}
/// <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>
pub fn get_array_properties(&self) -> &::std::option::Option<crate::types::ArrayProperties> {
&self.array_properties
}
/// Appends an item to `depends_on`.
///
/// To override the contents of this collection use [`set_depends_on`](Self::set_depends_on).
///
/// <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>
pub fn depends_on(mut self, input: crate::types::JobDependency) -> Self {
let mut v = self.depends_on.unwrap_or_default();
v.push(input);
self.depends_on = ::std::option::Option::Some(v);
self
}
/// <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>
pub fn set_depends_on(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobDependency>>) -> Self {
self.depends_on = input;
self
}
/// <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>
pub fn get_depends_on(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobDependency>> {
&self.depends_on
}
/// <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>
/// <p>If the revision is not specified, then the latest active revision is used.</p>
/// This field is required.
pub fn job_definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.job_definition = ::std::option::Option::Some(input.into());
self
}
/// <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>
/// <p>If the revision is not specified, then the latest active revision is used.</p>
pub fn set_job_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.job_definition = input;
self
}
/// <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>
/// <p>If the revision is not specified, then the latest active revision is used.</p>
pub fn get_job_definition(&self) -> &::std::option::Option<::std::string::String> {
&self.job_definition
}
/// Adds a key-value pair to `parameters`.
///
/// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
///
/// <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>
pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.parameters.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.parameters = ::std::option::Option::Some(hash_map);
self
}
/// <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>
pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.parameters = input;
self
}
/// <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>
pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.parameters
}
/// <p>An object with various 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>
pub fn container_overrides(mut self, input: crate::types::ContainerOverrides) -> Self {
self.container_overrides = ::std::option::Option::Some(input);
self
}
/// <p>An object with various 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>
pub fn set_container_overrides(mut self, input: ::std::option::Option<crate::types::ContainerOverrides>) -> Self {
self.container_overrides = input;
self
}
/// <p>An object with various 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>
pub fn get_container_overrides(&self) -> &::std::option::Option<crate::types::ContainerOverrides> {
&self.container_overrides
}
/// <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>
/// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
/// </note>
pub fn node_overrides(mut self, input: crate::types::NodeOverrides) -> Self {
self.node_overrides = ::std::option::Option::Some(input);
self
}
/// <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>
/// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
/// </note>
pub fn set_node_overrides(mut self, input: ::std::option::Option<crate::types::NodeOverrides>) -> Self {
self.node_overrides = input;
self
}
/// <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>
/// <p>This parameter isn't applicable to jobs that are running on Fargate resources; use <code>containerOverrides</code> instead.</p>
/// </note>
pub fn get_node_overrides(&self) -> &::std::option::Option<crate::types::NodeOverrides> {
&self.node_overrides
}
/// <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>
pub fn retry_strategy(mut self, input: crate::types::RetryStrategy) -> Self {
self.retry_strategy = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_retry_strategy(mut self, input: ::std::option::Option<crate::types::RetryStrategy>) -> Self {
self.retry_strategy = input;
self
}
/// <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>
pub fn get_retry_strategy(&self) -> &::std::option::Option<crate::types::RetryStrategy> {
&self.retry_strategy
}
/// <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>
pub fn propagate_tags(mut self, input: bool) -> Self {
self.propagate_tags = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_propagate_tags(mut self, input: ::std::option::Option<bool>) -> Self {
self.propagate_tags = input;
self
}
/// <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>
pub fn get_propagate_tags(&self) -> &::std::option::Option<bool> {
&self.propagate_tags
}
/// <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>
pub fn timeout(mut self, input: crate::types::JobTimeout) -> Self {
self.timeout = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_timeout(mut self, input: ::std::option::Option<crate::types::JobTimeout>) -> Self {
self.timeout = input;
self
}
/// <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>
pub fn get_timeout(&self) -> &::std::option::Option<crate::types::JobTimeout> {
&self.timeout
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <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>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <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>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <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>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// <p>An object that can only be specified for jobs that are run on Amazon EKS resources with various properties that override defaults for the job definition.</p>
pub fn eks_properties_override(mut self, input: crate::types::EksPropertiesOverride) -> Self {
self.eks_properties_override = ::std::option::Option::Some(input);
self
}
/// <p>An object that can only be specified for jobs that are run on Amazon EKS resources with various properties that override defaults for the job definition.</p>
pub fn set_eks_properties_override(mut self, input: ::std::option::Option<crate::types::EksPropertiesOverride>) -> Self {
self.eks_properties_override = input;
self
}
/// <p>An object that can only be specified for jobs that are run on Amazon EKS resources with various properties that override defaults for the job definition.</p>
pub fn get_eks_properties_override(&self) -> &::std::option::Option<crate::types::EksPropertiesOverride> {
&self.eks_properties_override
}
/// Consumes the builder and constructs a [`SubmitJobInput`](crate::operation::submit_job::SubmitJobInput).
pub fn build(self) -> ::std::result::Result<crate::operation::submit_job::SubmitJobInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::submit_job::SubmitJobInput {
job_name: self.job_name,
job_queue: self.job_queue,
share_identifier: self.share_identifier,
scheduling_priority_override: self.scheduling_priority_override,
array_properties: self.array_properties,
depends_on: self.depends_on,
job_definition: self.job_definition,
parameters: self.parameters,
container_overrides: self.container_overrides,
node_overrides: self.node_overrides,
retry_strategy: self.retry_strategy,
propagate_tags: self.propagate_tags,
timeout: self.timeout,
tags: self.tags,
eks_properties_override: self.eks_properties_override,
})
}
}