Class Job.Builder

java.lang.Object
software.amazon.awscdk.services.glue.Job.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Job>
Enclosing class:
Job

@Stability(Experimental) public static final class Job.Builder extends Object implements software.amazon.jsii.Builder<Job>
(experimental) A fluent builder for Job.
  • Method Details

    • create

      @Stability(Experimental) public static Job.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Job.Builder.
    • executable

      @Stability(Experimental) public Job.Builder executable(JobExecutable executable)
      (experimental) The job's executable properties.

      Parameters:
      executable - The job's executable properties. This parameter is required.
      Returns:
      this
    • connections

      @Stability(Experimental) public Job.Builder connections(List<? extends IConnection> connections)
      (experimental) The Connections used for this job.

      Connections are used to connect to other AWS Service or resources within a VPC.

      Default: [] - no connections are added to the job

      Parameters:
      connections - The Connections used for this job. This parameter is required.
      Returns:
      this
    • continuousLogging

      @Stability(Experimental) public Job.Builder continuousLogging(ContinuousLoggingProps continuousLogging)
      (experimental) Enables continuous logging with the specified props.

      Default: - continuous logging is disabled.

      Parameters:
      continuousLogging - Enables continuous logging with the specified props. This parameter is required.
      Returns:
      this
      See Also:
    • defaultArguments

      @Stability(Experimental) public Job.Builder defaultArguments(Map<String,String> defaultArguments)
      (experimental) The default arguments for this job, specified as name-value pairs.

      Default: - no arguments

      Parameters:
      defaultArguments - The default arguments for this job, specified as name-value pairs. This parameter is required.
      Returns:
      this
      See Also:
    • description

      @Stability(Experimental) public Job.Builder description(String description)
      (experimental) The description of the job.

      Default: - no value

      Parameters:
      description - The description of the job. This parameter is required.
      Returns:
      this
    • enableProfilingMetrics

      @Stability(Experimental) public Job.Builder enableProfilingMetrics(Boolean enableProfilingMetrics)
      (experimental) Enables the collection of metrics for job profiling.

      Default: - no profiling metrics emitted.

      Parameters:
      enableProfilingMetrics - Enables the collection of metrics for job profiling. This parameter is required.
      Returns:
      this
      See Also:
    • jobName

      @Stability(Experimental) public Job.Builder jobName(String jobName)
      (experimental) The name of the job.

      Default: - a name is automatically generated

      Parameters:
      jobName - The name of the job. This parameter is required.
      Returns:
      this
    • maxCapacity

      @Stability(Experimental) public Job.Builder maxCapacity(Number maxCapacity)
      (experimental) The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.

      Cannot be used for Glue version 2.0 and later - workerType and workerCount should be used instead.

      Default: - 10 when job type is Apache Spark ETL or streaming, 0.0625 when job type is Python shell

      Parameters:
      maxCapacity - The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs. This parameter is required.
      Returns:
      this
    • maxConcurrentRuns

      @Stability(Experimental) public Job.Builder maxConcurrentRuns(Number maxConcurrentRuns)
      (experimental) The maximum number of concurrent runs allowed for the job.

      An error is returned when this threshold is reached. The maximum value you can specify is controlled by a service limit.

      Default: 1

      Parameters:
      maxConcurrentRuns - The maximum number of concurrent runs allowed for the job. This parameter is required.
      Returns:
      this
    • maxRetries

      @Stability(Experimental) public Job.Builder maxRetries(Number maxRetries)
      (experimental) The maximum number of times to retry this job after a job run fails.

      Default: 0

      Parameters:
      maxRetries - The maximum number of times to retry this job after a job run fails. This parameter is required.
      Returns:
      this
    • notifyDelayAfter

      @Stability(Experimental) public Job.Builder notifyDelayAfter(Duration notifyDelayAfter)
      (experimental) The number of minutes to wait after a job run starts, before sending a job run delay notification.

      Default: - no delay notifications

      Parameters:
      notifyDelayAfter - The number of minutes to wait after a job run starts, before sending a job run delay notification. This parameter is required.
      Returns:
      this
    • role

      @Stability(Experimental) public Job.Builder role(IRole role)
      (experimental) The IAM role assumed by Glue to run this job.

      If providing a custom role, it needs to trust the Glue service principal (glue.amazonaws.com) and be granted sufficient permissions.

      Default: - a role is automatically generated

      Parameters:
      role - The IAM role assumed by Glue to run this job. This parameter is required.
      Returns:
      this
      See Also:
    • securityConfiguration

      @Stability(Experimental) public Job.Builder securityConfiguration(ISecurityConfiguration securityConfiguration)
      (experimental) The SecurityConfiguration to use for this job.

      Default: - no security configuration.

      Parameters:
      securityConfiguration - The SecurityConfiguration to use for this job. This parameter is required.
      Returns:
      this
    • sparkUi

      @Stability(Experimental) public Job.Builder sparkUi(SparkUIProps sparkUi)
      (experimental) Enables the Spark UI debugging and monitoring with the specified props.

      Default: - Spark UI debugging and monitoring is disabled.

      Parameters:
      sparkUi - Enables the Spark UI debugging and monitoring with the specified props. This parameter is required.
      Returns:
      this
      See Also:
    • tags

      @Stability(Experimental) public Job.Builder tags(Map<String,String> tags)
      (experimental) The tags to add to the resources on which the job runs.

      Default: {} - no tags

      Parameters:
      tags - The tags to add to the resources on which the job runs. This parameter is required.
      Returns:
      this
    • timeout

      @Stability(Experimental) public Job.Builder timeout(Duration timeout)
      (experimental) The maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status.

      Default: cdk.Duration.hours(48)

      Parameters:
      timeout - The maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. This parameter is required.
      Returns:
      this
    • workerCount

      @Stability(Experimental) public Job.Builder workerCount(Number workerCount)
      (experimental) The number of workers of a defined WorkerType that are allocated when a job runs.

      Default: - differs based on specific Glue version/worker type

      Parameters:
      workerCount - The number of workers of a defined WorkerType that are allocated when a job runs. This parameter is required.
      Returns:
      this
    • workerType

      @Stability(Experimental) public Job.Builder workerType(WorkerType workerType)
      (experimental) The type of predefined worker that is allocated when a job runs.

      Default: - differs based on specific Glue version

      Parameters:
      workerType - The type of predefined worker that is allocated when a job runs. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public Job build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Job>
      Returns:
      a newly built instance of Job.