JobDefinitionProps
- class aws_cdk.aws_batch.JobDefinitionProps(*, container, job_definition_name=None, node_props=None, parameters=None, platform_capabilities=None, retry_attempts=None, timeout=None)
Bases:
object
(experimental) Construction properties of the {@link JobDefinition} construct.
- Parameters:
container (
Union
[JobDefinitionContainer
,Dict
[str
,Any
]]) – (experimental) An object with various properties specific to container-based jobs.job_definition_name (
Optional
[str
]) – (experimental) The name of the job definition. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Default: Cloudformation-generated namenode_props (
Optional
[IMultiNodeProps
]) – (experimental) An object with various properties specific to multi-node parallel jobs. Default: - undefinedparameters (
Optional
[Mapping
[str
,str
]]) – (experimental) When you submit a job, you can specify parameters that should replace the placeholders or override the default job definition parameters. 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: - undefinedplatform_capabilities (
Optional
[Sequence
[PlatformCapabilities
]]) – (experimental) The platform capabilities required by the job definition. Default: - EC2retry_attempts (
Union
[int
,float
,None
]) – (experimental) The number of times to move a job to the RUNNABLE status. 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: 1timeout (
Optional
[Duration
]) – (experimental) The timeout configuration for jobs that are submitted with this job definition. You can specify a timeout duration after which AWS Batch terminates your jobs if they have not finished. Default: - undefined
- Stability:
experimental
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_ssm as ssm batch.JobDefinition(self, "job-def", container=batch.JobDefinitionContainer( image=ecs.EcrImage.from_registry("docker/whalesay"), log_configuration=batch.LogConfiguration( log_driver=batch.LogDriver.AWSLOGS, options={"awslogs-region": "us-east-1"}, secret_options=[ batch.ExposedSecret.from_parameters_store("xyz", ssm.StringParameter.from_string_parameter_name(self, "parameter", "xyz")) ] ) ) )
Attributes
- container
(experimental) An object with various properties specific to container-based jobs.
- Stability:
experimental
- job_definition_name
(experimental) The name of the job definition.
Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
- Default:
Cloudformation-generated name
- Stability:
experimental
- node_props
(experimental) An object with various properties specific to multi-node parallel jobs.
- 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.
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:
- platform_capabilities
(experimental) The platform capabilities required by the job definition.
- Default:
EC2
- Stability:
experimental
- retry_attempts
(experimental) The number of times to move a job to the RUNNABLE status.
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.
You can specify a timeout duration after which AWS Batch terminates your jobs if they have not finished.
- Default:
undefined
- Stability:
experimental