Class JobDefinitionProps
(experimental) Construction properties of the {@link JobDefinition} construct.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.AWS.Batch.dll
Syntax (csharp)
public class JobDefinitionProps : Object, IJobDefinitionProps
Syntax (vb)
Public Class JobDefinitionProps
Inherits Object
Implements IJobDefinitionProps
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.SSM;
new JobDefinition(this, "job-def", new JobDefinitionProps {
Container = new JobDefinitionContainer {
Image = EcrImage.FromRegistry("docker/whalesay"),
LogConfiguration = new LogConfiguration {
LogDriver = LogDriver.AWSLOGS,
Options = new Dictionary<string, string> { { "awslogs-region", "us-east-1" } },
SecretOptions = new [] { ExposedSecret.FromParametersStore("xyz", StringParameter.FromStringParameterName(this, "parameter", "xyz")) }
}
}
});
Synopsis
Constructors
JobDefinitionProps() |
Properties
Container | (experimental) An object with various properties specific to container-based jobs. |
JobDefinitionName | (experimental) The name of the job definition. |
NodeProps | (experimental) An object with various properties specific to multi-node parallel jobs. |
Parameters | (experimental) When you submit a job, you can specify parameters that should replace the placeholders or override the default job definition parameters. |
PlatformCapabilities | (experimental) The platform capabilities required by the job definition. |
RetryAttempts | (experimental) The number of times to move a job to the RUNNABLE status. |
Timeout | (experimental) The timeout configuration for jobs that are submitted with this job definition. |
Constructors
JobDefinitionProps()
public JobDefinitionProps()
Properties
Container
(experimental) An object with various properties specific to container-based jobs.
public IJobDefinitionContainer Container { get; set; }
Property Value
Remarks
Stability: Experimental
JobDefinitionName
(experimental) The name of the job definition.
public string JobDefinitionName { get; set; }
Property Value
System.String
Remarks
Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
Default: Cloudformation-generated name
Stability: Experimental
NodeProps
(experimental) An object with various properties specific to multi-node parallel jobs.
public IMultiNodeProps NodeProps { get; set; }
Property Value
Remarks
Default: - undefined
Stability: Experimental
Parameters
(experimental) When you submit a job, you can specify parameters that should replace the placeholders or override the default job definition parameters.
public IDictionary<string, string> Parameters { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Parameters in job submission requests take precedence over the defaults in a job definition. This allows you to use the same job definition for multiple jobs that use the same format, and programmatically change values in the command at submission time.
Default: - undefined
Stability: Experimental
Link: https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html
PlatformCapabilities
(experimental) The platform capabilities required by the job definition.
public PlatformCapabilities[] PlatformCapabilities { get; set; }
Property Value
Remarks
Default: - EC2
Stability: Experimental
RetryAttempts
(experimental) The number of times to move a job to the RUNNABLE status.
public Nullable<double> RetryAttempts { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
You may specify between 1 and 10 attempts. If the value of attempts is greater than one, the job is retried on failure the same number of attempts as the value.
Default: 1
Stability: Experimental
Timeout
(experimental) The timeout configuration for jobs that are submitted with this job definition.
public Duration Timeout { get; set; }
Property Value
Remarks
You can specify a timeout duration after which AWS Batch terminates your jobs if they have not finished.
Default: - undefined
Stability: Experimental