aws_sdk_batch/client/submit_job.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`SubmitJob`](crate::operation::submit_job::builders::SubmitJobFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`job_name(impl Into<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::job_name) / [`set_job_name(Option<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_job_name):<br>required: **true**<br><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><br>
7 /// - [`job_queue(impl Into<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::job_queue) / [`set_job_queue(Option<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_job_queue):<br>required: **true**<br><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><br>
8 /// - [`share_identifier(impl Into<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::share_identifier) / [`set_share_identifier(Option<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_share_identifier):<br>required: **false**<br><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> <p>This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).</p><br>
9 /// - [`scheduling_priority_override(i32)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::scheduling_priority_override) / [`set_scheduling_priority_override(Option<i32>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_scheduling_priority_override):<br>required: **false**<br><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> <p>The minimum supported value is 0 and the maximum supported value is 9999.</p><br>
10 /// - [`array_properties(ArrayProperties)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::array_properties) / [`set_array_properties(Option<ArrayProperties>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_array_properties):<br>required: **false**<br><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><br>
11 /// - [`depends_on(JobDependency)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::depends_on) / [`set_depends_on(Option<Vec::<JobDependency>>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_depends_on):<br>required: **false**<br><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><br>
12 /// - [`job_definition(impl Into<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::job_definition) / [`set_job_definition(Option<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_job_definition):<br>required: **true**<br><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><br>
13 /// - [`parameters(impl Into<String>, impl Into<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::parameters) / [`set_parameters(Option<HashMap::<String, String>>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_parameters):<br>required: **false**<br><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><br>
14 /// - [`container_overrides(ContainerOverrides)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::container_overrides) / [`set_container_overrides(Option<ContainerOverrides>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_container_overrides):<br>required: **false**<br><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><br>
15 /// - [`node_overrides(NodeOverrides)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::node_overrides) / [`set_node_overrides(Option<NodeOverrides>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_node_overrides):<br>required: **false**<br><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><br>
16 /// - [`retry_strategy(RetryStrategy)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::retry_strategy) / [`set_retry_strategy(Option<RetryStrategy>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_retry_strategy):<br>required: **false**<br><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><br>
17 /// - [`propagate_tags(bool)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::propagate_tags) / [`set_propagate_tags(Option<bool>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_propagate_tags):<br>required: **false**<br><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><br>
18 /// - [`timeout(JobTimeout)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::timeout) / [`set_timeout(Option<JobTimeout>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_timeout):<br>required: **false**<br><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><br>
19 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_tags):<br>required: **false**<br><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><br>
20 /// - [`eks_properties_override(EksPropertiesOverride)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::eks_properties_override) / [`set_eks_properties_override(Option<EksPropertiesOverride>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_eks_properties_override):<br>required: **false**<br><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><br>
21 /// - [`ecs_properties_override(EcsPropertiesOverride)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::ecs_properties_override) / [`set_ecs_properties_override(Option<EcsPropertiesOverride>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_ecs_properties_override):<br>required: **false**<br><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><br>
22 /// - [`consumable_resource_properties_override(ConsumableResourceProperties)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::consumable_resource_properties_override) / [`set_consumable_resource_properties_override(Option<ConsumableResourceProperties>)`](crate::operation::submit_job::builders::SubmitJobFluentBuilder::set_consumable_resource_properties_override):<br>required: **false**<br><p>An object that contains overrides for the consumable resources of a job.</p><br>
23 /// - On success, responds with [`SubmitJobOutput`](crate::operation::submit_job::SubmitJobOutput) with field(s):
24 /// - [`job_arn(Option<String>)`](crate::operation::submit_job::SubmitJobOutput::job_arn): <p>The Amazon Resource Name (ARN) for the job.</p>
25 /// - [`job_name(Option<String>)`](crate::operation::submit_job::SubmitJobOutput::job_name): <p>The name of the job.</p>
26 /// - [`job_id(Option<String>)`](crate::operation::submit_job::SubmitJobOutput::job_id): <p>The unique identifier for the job.</p>
27 /// - On failure, responds with [`SdkError<SubmitJobError>`](crate::operation::submit_job::SubmitJobError)
28 pub fn submit_job(&self) -> crate::operation::submit_job::builders::SubmitJobFluentBuilder {
29 crate::operation::submit_job::builders::SubmitJobFluentBuilder::new(self.handle.clone())
30 }
31}