interface EksJobDefinitionProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Batch.EksJobDefinitionProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsbatch#EksJobDefinitionProps |
![]() | software.amazon.awscdk.services.batch.EksJobDefinitionProps |
![]() | aws_cdk.aws_batch.EksJobDefinitionProps |
![]() | aws-cdk-lib » aws_batch » EksJobDefinitionProps |
Props for EksJobDefinition.
Example
const jobDefn = new batch.EksJobDefinition(this, 'eksf2', {
container: new batch.EksContainerDefinition(this, 'container', {
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
volumes: [batch.EksVolume.emptyDir({
name: 'myEmptyDirVolume',
mountPath: '/mount/path',
medium: batch.EmptyDirMediumType.MEMORY,
readonly: true,
sizeLimit: cdk.Size.mebibytes(2048),
})],
}),
});
Properties
Name | Type | Description |
---|---|---|
container | Eks | The container this Job Definition will run. |
dns | Dns | The DNS Policy of the pod used by this Job Definition. |
job | string | The name of this job definition. |
parameters? | { [string]: any } | The default parameters passed to the container These parameters can be referenced in the command that you give to the container. |
retry | number | The number of times to retry a job. |
retry | Retry [] | Defines the retry behavior for this job. |
scheduling | number | The priority of this Job. |
service | string | The name of the service account that's used to run the container. |
timeout? | Duration | The timeout time for jobs that are submitted with this job definition. |
use | boolean | If specified, the Pod used by this Job Definition will use the host's network IP address. |
container
Type:
Eks
The container this Job Definition will run.
dnsPolicy?
Type:
Dns
(optional, default: DnsPolicy.CLUSTER_FIRST
)
The DNS Policy of the pod used by this Job Definition.
See also: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
jobDefinitionName?
Type:
string
(optional, default: generated by CloudFormation)
The name of this job definition.
parameters?
Type:
{ [string]: any }
(optional, default: none)
The default parameters passed to the container These parameters can be referenced in the command
that you give to the container.
retryAttempts?
Type:
number
(optional, default: 1)
The number of times to retry a job.
The job is retried on failure the same number of attempts as the value.
retryStrategies?
Type:
Retry
[]
(optional, default: no RetryStrategy
)
Defines the retry behavior for this job.
schedulingPriority?
Type:
number
(optional, default: none)
The priority of this Job.
Only used in Fairshare Scheduling to decide which job to run first when there are multiple jobs with the same share identifier.
serviceAccount?
Type:
string
(optional, default: the default service account of the container)
The name of the service account that's used to run the container.
service accounts are Kubernetes method of identification and authentication, roughly analogous to IAM users.
timeout?
Type:
Duration
(optional, default: no timeout)
The timeout time for jobs that are submitted with this job definition.
After the amount of time you specify passes, Batch terminates your jobs if they aren't finished.
useHostNetwork?
Type:
boolean
(optional, default: true)
If specified, the Pod used by this Job Definition will use the host's network IP address.
Otherwise, the Kubernetes pod networking model is enabled. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections.
See also: https://kubernetes.io/docs/concepts/workloads/pods/#pod-networking