@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-20T22:20:05.624Z") public class CfnJobDefinition extends CfnResource implements IInspectable
The AWS::Batch::JobDefinition
resource specifies the parameters for an AWS Batch job definition. For more information, see Job Definitions in the ** .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.batch.*; Object options; Object parameters; Object tags; CfnJobDefinition cfnJobDefinition = CfnJobDefinition.Builder.create(this, "MyCfnJobDefinition") .type("type") // the properties below are optional .containerProperties(ContainerPropertiesProperty.builder() .image("image") // the properties below are optional .command(List.of("command")) .environment(List.of(EnvironmentProperty.builder() .name("name") .value("value") .build())) .executionRoleArn("executionRoleArn") .fargatePlatformConfiguration(FargatePlatformConfigurationProperty.builder() .platformVersion("platformVersion") .build()) .instanceType("instanceType") .jobRoleArn("jobRoleArn") .linuxParameters(LinuxParametersProperty.builder() .devices(List.of(DeviceProperty.builder() .containerPath("containerPath") .hostPath("hostPath") .permissions(List.of("permissions")) .build())) .initProcessEnabled(false) .maxSwap(123) .sharedMemorySize(123) .swappiness(123) .tmpfs(List.of(TmpfsProperty.builder() .containerPath("containerPath") .size(123) // the properties below are optional .mountOptions(List.of("mountOptions")) .build())) .build()) .logConfiguration(LogConfigurationProperty.builder() .logDriver("logDriver") // the properties below are optional .options(options) .secretOptions(List.of(SecretProperty.builder() .name("name") .valueFrom("valueFrom") .build())) .build()) .memory(123) .mountPoints(List.of(MountPointsProperty.builder() .containerPath("containerPath") .readOnly(false) .sourceVolume("sourceVolume") .build())) .networkConfiguration(NetworkConfigurationProperty.builder() .assignPublicIp("assignPublicIp") .build()) .privileged(false) .readonlyRootFilesystem(false) .resourceRequirements(List.of(ResourceRequirementProperty.builder() .type("type") .value("value") .build())) .secrets(List.of(SecretProperty.builder() .name("name") .valueFrom("valueFrom") .build())) .ulimits(List.of(UlimitProperty.builder() .hardLimit(123) .name("name") .softLimit(123) .build())) .user("user") .vcpus(123) .volumes(List.of(VolumesProperty.builder() .efsVolumeConfiguration(EfsVolumeConfigurationProperty.builder() .fileSystemId("fileSystemId") // the properties below are optional .authorizationConfig(AuthorizationConfigProperty.builder() .accessPointId("accessPointId") .iam("iam") .build()) .rootDirectory("rootDirectory") .transitEncryption("transitEncryption") .transitEncryptionPort(123) .build()) .host(VolumesHostProperty.builder() .sourcePath("sourcePath") .build()) .name("name") .build())) .build()) .jobDefinitionName("jobDefinitionName") .nodeProperties(NodePropertiesProperty.builder() .mainNode(123) .nodeRangeProperties(List.of(NodeRangePropertyProperty.builder() .targetNodes("targetNodes") // the properties below are optional .container(ContainerPropertiesProperty.builder() .image("image") // the properties below are optional .command(List.of("command")) .environment(List.of(EnvironmentProperty.builder() .name("name") .value("value") .build())) .executionRoleArn("executionRoleArn") .fargatePlatformConfiguration(FargatePlatformConfigurationProperty.builder() .platformVersion("platformVersion") .build()) .instanceType("instanceType") .jobRoleArn("jobRoleArn") .linuxParameters(LinuxParametersProperty.builder() .devices(List.of(DeviceProperty.builder() .containerPath("containerPath") .hostPath("hostPath") .permissions(List.of("permissions")) .build())) .initProcessEnabled(false) .maxSwap(123) .sharedMemorySize(123) .swappiness(123) .tmpfs(List.of(TmpfsProperty.builder() .containerPath("containerPath") .size(123) // the properties below are optional .mountOptions(List.of("mountOptions")) .build())) .build()) .logConfiguration(LogConfigurationProperty.builder() .logDriver("logDriver") // the properties below are optional .options(options) .secretOptions(List.of(SecretProperty.builder() .name("name") .valueFrom("valueFrom") .build())) .build()) .memory(123) .mountPoints(List.of(MountPointsProperty.builder() .containerPath("containerPath") .readOnly(false) .sourceVolume("sourceVolume") .build())) .networkConfiguration(NetworkConfigurationProperty.builder() .assignPublicIp("assignPublicIp") .build()) .privileged(false) .readonlyRootFilesystem(false) .resourceRequirements(List.of(ResourceRequirementProperty.builder() .type("type") .value("value") .build())) .secrets(List.of(SecretProperty.builder() .name("name") .valueFrom("valueFrom") .build())) .ulimits(List.of(UlimitProperty.builder() .hardLimit(123) .name("name") .softLimit(123) .build())) .user("user") .vcpus(123) .volumes(List.of(VolumesProperty.builder() .efsVolumeConfiguration(EfsVolumeConfigurationProperty.builder() .fileSystemId("fileSystemId") // the properties below are optional .authorizationConfig(AuthorizationConfigProperty.builder() .accessPointId("accessPointId") .iam("iam") .build()) .rootDirectory("rootDirectory") .transitEncryption("transitEncryption") .transitEncryptionPort(123) .build()) .host(VolumesHostProperty.builder() .sourcePath("sourcePath") .build()) .name("name") .build())) .build()) .build())) .numNodes(123) .build()) .parameters(parameters) .platformCapabilities(List.of("platformCapabilities")) .propagateTags(false) .retryStrategy(RetryStrategyProperty.builder() .attempts(123) .evaluateOnExit(List.of(EvaluateOnExitProperty.builder() .action("action") // the properties below are optional .onExitCode("onExitCode") .onReason("onReason") .onStatusReason("onStatusReason") .build())) .build()) .schedulingPriority(123) .tags(tags) .timeout(TimeoutProperty.builder() .attemptDurationSeconds(123) .build()) .build();
Modifier and Type | Class and Description |
---|---|
static interface |
CfnJobDefinition.AuthorizationConfigProperty
The authorization configuration details for the Amazon EFS file system.
|
static class |
CfnJobDefinition.Builder
A fluent builder for
CfnJobDefinition . |
static interface |
CfnJobDefinition.ContainerPropertiesProperty
Container properties are used in job definitions to describe the container that's launched as part of a job.
|
static interface |
CfnJobDefinition.DeviceProperty
An object representing a container instance host device.
|
static interface |
CfnJobDefinition.EfsVolumeConfigurationProperty
This is used when you're using an Amazon Elastic File System file system for job storage.
|
static interface |
CfnJobDefinition.EnvironmentProperty
The Environment property type specifies environment variables to use in a job definition.
|
static interface |
CfnJobDefinition.EvaluateOnExitProperty
Specifies a set of conditions to be met, and an action to take ( `RETRY` or `EXIT` ) if all conditions are met.
|
static interface |
CfnJobDefinition.FargatePlatformConfigurationProperty
The platform configuration for jobs that are running on Fargate resources.
|
static interface |
CfnJobDefinition.LinuxParametersProperty
Linux-specific modifications that are applied to the container, such as details for device mappings.
|
static interface |
CfnJobDefinition.LogConfigurationProperty
Log configuration options to send to a custom log driver for the container.
|
static interface |
CfnJobDefinition.MountPointsProperty
Details on a Docker volume mount point that's used in a job's container properties.
|
static interface |
CfnJobDefinition.NetworkConfigurationProperty
The network configuration for jobs that are running on Fargate resources.
|
static interface |
CfnJobDefinition.NodePropertiesProperty
An object representing the node properties of a multi-node parallel job.
|
static interface |
CfnJobDefinition.NodeRangePropertyProperty
An object representing the properties of the node range for a multi-node parallel job.
|
static interface |
CfnJobDefinition.ResourceRequirementProperty
The type and amount of a resource to assign to a container.
|
static interface |
CfnJobDefinition.RetryStrategyProperty
The retry strategy associated with a job.
|
static interface |
CfnJobDefinition.SecretProperty
An object representing the secret to expose to your container.
|
static interface |
CfnJobDefinition.TimeoutProperty
An object representing a job timeout configuration.
|
static interface |
CfnJobDefinition.TmpfsProperty
The container path, mount options, and size of the tmpfs mount.
|
static interface |
CfnJobDefinition.UlimitProperty
The `ulimit` settings to pass to the container.
|
static interface |
CfnJobDefinition.VolumesHostProperty
Determine whether your data volume persists on the host container instance and where it is stored.
|
static interface |
CfnJobDefinition.VolumesProperty
A list of volumes associated with the job.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnJobDefinition(Construct scope,
java.lang.String id,
CfnJobDefinitionProps props)
Create a new `AWS::Batch::JobDefinition`.
|
protected |
CfnJobDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnJobDefinition(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getContainerProperties()
An object with various properties specific to container-based jobs.
|
java.lang.String |
getJobDefinitionName()
The name of the job definition.
|
java.lang.Object |
getNodeProperties()
An object with various properties specific to multi-node parallel jobs.
|
java.lang.Object |
getParameters()
Default parameters or parameter substitution placeholders that are set in the job definition.
|
java.util.List<java.lang.String> |
getPlatformCapabilities()
The platform capabilities required by the job definition.
|
java.lang.Object |
getPropagateTags()
Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task.
|
java.lang.Object |
getRetryStrategy()
The retry strategy to use for failed jobs that are submitted with this job definition.
|
java.lang.Number |
getSchedulingPriority()
The scheduling priority of the job definition.
|
TagManager |
getTags()
The tags applied to the job definition.
|
java.lang.Object |
getTimeout()
The timeout configuration for jobs that are submitted with this job definition.
|
java.lang.String |
getType()
The type of job definition.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setContainerProperties(CfnJobDefinition.ContainerPropertiesProperty value)
An object with various properties specific to container-based jobs.
|
void |
setContainerProperties(IResolvable value)
An object with various properties specific to container-based jobs.
|
void |
setJobDefinitionName(java.lang.String value)
The name of the job definition.
|
void |
setNodeProperties(CfnJobDefinition.NodePropertiesProperty value)
An object with various properties specific to multi-node parallel jobs.
|
void |
setNodeProperties(IResolvable value)
An object with various properties specific to multi-node parallel jobs.
|
void |
setParameters(java.lang.Object value)
Default parameters or parameter substitution placeholders that are set in the job definition.
|
void |
setPlatformCapabilities(java.util.List<java.lang.String> value)
The platform capabilities required by the job definition.
|
void |
setPropagateTags(java.lang.Boolean value)
Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task.
|
void |
setPropagateTags(IResolvable value)
Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task.
|
void |
setRetryStrategy(CfnJobDefinition.RetryStrategyProperty value)
The retry strategy to use for failed jobs that are submitted with this job definition.
|
void |
setRetryStrategy(IResolvable value)
The retry strategy to use for failed jobs that are submitted with this job definition.
|
void |
setSchedulingPriority(java.lang.Number value)
The scheduling priority of the job definition.
|
void |
setTimeout(CfnJobDefinition.TimeoutProperty value)
The timeout configuration for jobs that are submitted with this job definition.
|
void |
setTimeout(IResolvable value)
The timeout configuration for jobs that are submitted with this job definition.
|
void |
setType(java.lang.String value)
The type of job definition.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnJobDefinition(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnJobDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnJobDefinition(Construct scope, java.lang.String id, CfnJobDefinitionProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Object getParameters()
Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob
request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see Job definition parameters in the AWS Batch User Guide .
public void setParameters(java.lang.Object value)
Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob
request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see Job definition parameters in the AWS Batch User Guide .
public java.lang.String getType()
For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the AWS Batch User Guide .
If the job is run on Fargate resources, then
multinode
isn't supported.
public void setType(java.lang.String value)
For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the AWS Batch User Guide .
If the job is run on Fargate resources, then
multinode
isn't supported.
public java.lang.Object getContainerProperties()
public void setContainerProperties(IResolvable value)
public void setContainerProperties(CfnJobDefinition.ContainerPropertiesProperty value)
public java.lang.String getJobDefinitionName()
public void setJobDefinitionName(java.lang.String value)
public java.lang.Object getNodeProperties()
If the job runs on Fargate resources, then you must not specify
nodeProperties
; usecontainerProperties
instead.
public void setNodeProperties(IResolvable value)
If the job runs on Fargate resources, then you must not specify
nodeProperties
; usecontainerProperties
instead.
public void setNodeProperties(CfnJobDefinition.NodePropertiesProperty value)
If the job runs on Fargate resources, then you must not specify
nodeProperties
; usecontainerProperties
instead.
public java.util.List<java.lang.String> getPlatformCapabilities()
If no value is specified, it defaults to EC2
. Jobs run on Fargate resources specify FARGATE
.
public void setPlatformCapabilities(java.util.List<java.lang.String> value)
If no value is specified, it defaults to EC2
. Jobs run on Fargate resources specify FARGATE
.
public java.lang.Object getPropagateTags()
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.
public void setPropagateTags(java.lang.Boolean value)
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.
public void setPropagateTags(IResolvable value)
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.
public java.lang.Object getRetryStrategy()
public void setRetryStrategy(IResolvable value)
public void setRetryStrategy(CfnJobDefinition.RetryStrategyProperty value)
public java.lang.Number getSchedulingPriority()
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.
public void setSchedulingPriority(java.lang.Number value)
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.
public java.lang.Object getTimeout()
You can specify a timeout duration after which AWS Batch terminates your jobs if they haven't finished.
public void setTimeout(IResolvable value)
You can specify a timeout duration after which AWS Batch terminates your jobs if they haven't finished.
public void setTimeout(CfnJobDefinition.TimeoutProperty value)
You can specify a timeout duration after which AWS Batch terminates your jobs if they haven't finished.