/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the batch-2016-08-10.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Batch.Model
{
///
/// Container for the parameters to the SubmitJob operation.
/// Submits an Batch job from a job definition. Parameters that are specified during SubmitJob
/// override parameters defined in the job definition. vCPU and memory requirements that
/// are specified in the resourceRequirements
objects in the job definition
/// are the exception. They can't be overridden this way using the memory
/// and vcpus
parameters. Rather, you must specify updates to job definition
/// parameters in a resourceRequirements
object that's included in the containerOverrides
/// parameter.
///
///
///
/// Job queues with a scheduling policy are limited to 500 active fair share identifiers
/// at a time.
///
///
///
/// Jobs that run on Fargate resources can't be guaranteed to run for more than 14 days.
/// This is because, after 14 days, Fargate resources might become unavailable and job
/// might be terminated.
///
///
///
public partial class SubmitJobRequest : AmazonBatchRequest
{
private ArrayProperties _arrayProperties;
private ContainerOverrides _containerOverrides;
private List _dependsOn = new List();
private EksPropertiesOverride _eksPropertiesOverride;
private string _jobDefinition;
private string _jobName;
private string _jobQueue;
private NodeOverrides _nodeOverrides;
private Dictionary _parameters = new Dictionary();
private bool? _propagateTags;
private RetryStrategy _retryStrategy;
private int? _schedulingPriorityOverride;
private string _shareIdentifier;
private Dictionary _tags = new Dictionary();
private JobTimeout _timeout;
///
/// Gets and sets the property ArrayProperties.
///
/// 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 Array
/// Jobs in the Batch User Guide.
///
///
public ArrayProperties ArrayProperties
{
get { return this._arrayProperties; }
set { this._arrayProperties = value; }
}
// Check to see if ArrayProperties property is set
internal bool IsSetArrayProperties()
{
return this._arrayProperties != null;
}
///
/// Gets and sets the property ContainerOverrides.
///
/// 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 command
override.
/// You can also override existing environment variables on a container or add new environment
/// variables to it with an environment
override.
///
///
public ContainerOverrides ContainerOverrides
{
get { return this._containerOverrides; }
set { this._containerOverrides = value; }
}
// Check to see if ContainerOverrides property is set
internal bool IsSetContainerOverrides()
{
return this._containerOverrides != null;
}
///
/// Gets and sets the property DependsOn.
///
/// A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You
/// can specify a SEQUENTIAL
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 N_TO_N
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.
///
///
public List DependsOn
{
get { return this._dependsOn; }
set { this._dependsOn = value; }
}
// Check to see if DependsOn property is set
internal bool IsSetDependsOn()
{
return this._dependsOn != null && this._dependsOn.Count > 0;
}
///
/// Gets and sets the property EksPropertiesOverride.
///
/// 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.
///
///
public EksPropertiesOverride EksPropertiesOverride
{
get { return this._eksPropertiesOverride; }
set { this._eksPropertiesOverride = value; }
}
// Check to see if EksPropertiesOverride property is set
internal bool IsSetEksPropertiesOverride()
{
return this._eksPropertiesOverride != null;
}
///
/// Gets and sets the property JobDefinition.
///
/// The job definition used by this job. This value can be one of definition-name
,
/// definition-name:revision
, or the Amazon Resource Name (ARN) for the job
/// definition, with or without the revision (arn:aws:batch:region:account:job-definition/definition-name:revision
///
, or arn:aws:batch:region:account:job-definition/definition-name
///
).
///
///
///
/// If the revision is not specified, then the latest active revision is used.
///
///
[AWSProperty(Required=true)]
public string JobDefinition
{
get { return this._jobDefinition; }
set { this._jobDefinition = value; }
}
// Check to see if JobDefinition property is set
internal bool IsSetJobDefinition()
{
return this._jobDefinition != null;
}
///
/// Gets and sets the property JobName.
///
/// 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 (_).
///
///
[AWSProperty(Required=true)]
public string JobName
{
get { return this._jobName; }
set { this._jobName = value; }
}
// Check to see if JobName property is set
internal bool IsSetJobName()
{
return this._jobName != null;
}
///
/// Gets and sets the property JobQueue.
///
/// The job queue where the job is submitted. You can specify either the name or the Amazon
/// Resource Name (ARN) of the queue.
///
///
[AWSProperty(Required=true)]
public string JobQueue
{
get { return this._jobQueue; }
set { this._jobQueue = value; }
}
// Check to see if JobQueue property is set
internal bool IsSetJobQueue()
{
return this._jobQueue != null;
}
///
/// Gets and sets the property NodeOverrides.
///
/// A list of node overrides in JSON format that specify the node range to target and
/// the container overrides for that node range.
///
///
///
/// This parameter isn't applicable to jobs that are running on Fargate resources; use
/// containerOverrides
instead.
///
///
///
public NodeOverrides NodeOverrides
{
get { return this._nodeOverrides; }
set { this._nodeOverrides = value; }
}
// Check to see if NodeOverrides property is set
internal bool IsSetNodeOverrides()
{
return this._nodeOverrides != null;
}
///
/// Gets and sets the property Parameters.
///
/// 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 SubmitJob
request override any corresponding
/// parameter defaults from the job definition.
///
///
public Dictionary Parameters
{
get { return this._parameters; }
set { this._parameters = value; }
}
// Check to see if Parameters property is set
internal bool IsSetParameters()
{
return this._parameters != null && this._parameters.Count > 0;
}
///
/// Gets and sets the property PropagateTags.
///
/// 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 FAILED
/// state. When specified, this overrides the tag propagation setting in the job definition.
///
///
public bool PropagateTags
{
get { return this._propagateTags.GetValueOrDefault(); }
set { this._propagateTags = value; }
}
// Check to see if PropagateTags property is set
internal bool IsSetPropagateTags()
{
return this._propagateTags.HasValue;
}
///
/// Gets and sets the property RetryStrategy.
///
/// The retry strategy to use for failed jobs from this SubmitJob operation. When
/// a retry strategy is specified here, it overrides the retry strategy defined in the
/// job definition.
///
///
public RetryStrategy RetryStrategy
{
get { return this._retryStrategy; }
set { this._retryStrategy = value; }
}
// Check to see if RetryStrategy property is set
internal bool IsSetRetryStrategy()
{
return this._retryStrategy != null;
}
///
/// Gets and sets the property SchedulingPriorityOverride.
///
/// 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.
///
///
///
/// The minimum supported value is 0 and the maximum supported value is 9999.
///
///
public int SchedulingPriorityOverride
{
get { return this._schedulingPriorityOverride.GetValueOrDefault(); }
set { this._schedulingPriorityOverride = value; }
}
// Check to see if SchedulingPriorityOverride property is set
internal bool IsSetSchedulingPriorityOverride()
{
return this._schedulingPriorityOverride.HasValue;
}
///
/// Gets and sets the property ShareIdentifier.
///
/// 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.
///
///
///
/// This string is limited to 255 alphanumeric characters, and can be followed by an asterisk
/// (*).
///
///
public string ShareIdentifier
{
get { return this._shareIdentifier; }
set { this._shareIdentifier = value; }
}
// Check to see if ShareIdentifier property is set
internal bool IsSetShareIdentifier()
{
return this._shareIdentifier != null;
}
///
/// Gets and sets the property Tags.
///
/// 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 Tagging
/// Amazon Web Services Resources in Amazon Web Services General Reference.
///
///
[AWSProperty(Min=1, Max=50)]
public Dictionary Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property Timeout.
///
/// The timeout configuration for this SubmitJob 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 Job
/// Timeouts in the Amazon Elastic Container Service Developer Guide.
///
///
public JobTimeout Timeout
{
get { return this._timeout; }
set { this._timeout = value; }
}
// Check to see if Timeout property is set
internal bool IsSetTimeout()
{
return this._timeout != null;
}
}
}