JobArgs

data class JobArgs(val command: Output<JobCommandArgs>? = null, val connections: Output<List<String>>? = null, val defaultArguments: Output<Map<String, String>>? = null, val description: Output<String>? = null, val executionClass: Output<String>? = null, val executionProperty: Output<JobExecutionPropertyArgs>? = null, val glueVersion: Output<String>? = null, val maxCapacity: Output<Double>? = null, val maxRetries: Output<Int>? = null, val name: Output<String>? = null, val nonOverridableArguments: Output<Map<String, String>>? = null, val notificationProperty: Output<JobNotificationPropertyArgs>? = null, val numberOfWorkers: Output<Int>? = null, val roleArn: Output<String>? = null, val securityConfiguration: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val timeout: Output<Int>? = null, val workerType: Output<String>? = null) : ConvertibleToJava<JobArgs>

Provides a Glue Job resource.

Glue functionality, such as monitoring and logging of jobs, is typically managed with the default_arguments argument. See the Special Parameters Used by AWS Glue topic in the Glue developer guide for additional information.

Example Usage

Python Job

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.Job;
import com.pulumi.aws.glue.JobArgs;
import com.pulumi.aws.glue.inputs.JobCommandArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Job("example", JobArgs.builder()
.roleArn(aws_iam_role.example().arn())
.command(JobCommandArgs.builder()
.scriptLocation(String.format("s3://%s/example.py", aws_s3_bucket.example().bucket()))
.build())
.build());
}
}

Scala Job

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.Job;
import com.pulumi.aws.glue.JobArgs;
import com.pulumi.aws.glue.inputs.JobCommandArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Job("example", JobArgs.builder()
.roleArn(aws_iam_role.example().arn())
.command(JobCommandArgs.builder()
.scriptLocation(String.format("s3://%s/example.scala", aws_s3_bucket.example().bucket()))
.build())
.defaultArguments(Map.of("--job-language", "scala"))
.build());
}
}

Streaming Job

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.Job;
import com.pulumi.aws.glue.JobArgs;
import com.pulumi.aws.glue.inputs.JobCommandArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Job("example", JobArgs.builder()
.roleArn(aws_iam_role.example().arn())
.command(JobCommandArgs.builder()
.name("gluestreaming")
.scriptLocation(String.format("s3://%s/example.script", aws_s3_bucket.example().bucket()))
.build())
.build());
}
}

Enabling CloudWatch Logs and Metrics

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.LogGroup;
import com.pulumi.aws.cloudwatch.LogGroupArgs;
import com.pulumi.aws.glue.Job;
import com.pulumi.aws.glue.JobArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleLogGroup = new LogGroup("exampleLogGroup", LogGroupArgs.builder()
.retentionInDays(14)
.build());
var exampleJob = new Job("exampleJob", JobArgs.builder()
.defaultArguments(Map.ofEntries(
Map.entry("--continuous-log-logGroup", exampleLogGroup.name()),
Map.entry("--enable-continuous-cloudwatch-log", "true"),
Map.entry("--enable-continuous-log-filter", "true"),
Map.entry("--enable-metrics", "")
))
.build());
}
}

Import

Glue Jobs can be imported using name, e.g.,

$ pulumi import aws:glue/job:Job MyJob MyJob

Constructors

Link copied to clipboard
constructor(command: Output<JobCommandArgs>? = null, connections: Output<List<String>>? = null, defaultArguments: Output<Map<String, String>>? = null, description: Output<String>? = null, executionClass: Output<String>? = null, executionProperty: Output<JobExecutionPropertyArgs>? = null, glueVersion: Output<String>? = null, maxCapacity: Output<Double>? = null, maxRetries: Output<Int>? = null, name: Output<String>? = null, nonOverridableArguments: Output<Map<String, String>>? = null, notificationProperty: Output<JobNotificationPropertyArgs>? = null, numberOfWorkers: Output<Int>? = null, roleArn: Output<String>? = null, securityConfiguration: Output<String>? = null, tags: Output<Map<String, String>>? = null, timeout: Output<Int>? = null, workerType: Output<String>? = null)

Properties

Link copied to clipboard
val command: Output<JobCommandArgs>? = null

The command of the job. Defined below.

Link copied to clipboard
val connections: Output<List<String>>? = null

The list of connections used for this job.

Link copied to clipboard
val defaultArguments: Output<Map<String, String>>? = null

The map of default arguments for this job. You can specify arguments here that your own job-execution script consumes, as well as arguments that AWS Glue itself consumes. For information about how to specify and consume your own Job arguments, see the Calling AWS Glue APIs in Python topic in the developer guide. For information about the key-value pairs that AWS Glue consumes to set up your job, see the Special Parameters Used by AWS Glue topic in the developer guide.

Link copied to clipboard
val description: Output<String>? = null

Description of the job.

Link copied to clipboard
val executionClass: Output<String>? = null

Indicates whether the job is run with a standard or flexible execution class. The standard execution class is ideal for time-sensitive workloads that require fast job startup and dedicated resources. Valid value: FLEX, STANDARD.

Link copied to clipboard

Execution property of the job. Defined below.

Link copied to clipboard
val glueVersion: Output<String>? = null

The version of glue to use, for example "1.0". For information about available versions, see the AWS Glue Release Notes.

Link copied to clipboard
val maxCapacity: Output<Double>? = null

The maximum number of AWS Glue data processing units (DPUs) that can be allocated when this job runs. Required when pythonshell is set, accept either 0.0625 or 1.0. Use number_of_workers and worker_type arguments instead with glue_version 2.0 and above.

Link copied to clipboard
val maxRetries: Output<Int>? = null

The maximum number of times to retry this job if it fails.

Link copied to clipboard
val name: Output<String>? = null

The name you assign to this job. It must be unique in your account.

Link copied to clipboard
val nonOverridableArguments: Output<Map<String, String>>? = null

Non-overridable arguments for this job, specified as name-value pairs.

Link copied to clipboard

Notification property of the job. Defined below.

Link copied to clipboard
val numberOfWorkers: Output<Int>? = null

The number of workers of a defined workerType that are allocated when a job runs.

Link copied to clipboard
val roleArn: Output<String>? = null

The ARN of the IAM role associated with this job.

Link copied to clipboard
val securityConfiguration: Output<String>? = null

The name of the Security Configuration to be associated with the job.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val timeout: Output<Int>? = null

The job timeout in minutes. The default is 2880 minutes (48 hours) for glueetl and pythonshell jobs, and null (unlimited) for gluestreaming jobs.

Link copied to clipboard
val workerType: Output<String>? = null

The type of predefined worker that is allocated when a job runs. Accepts a value of Standard, G.1X, or G.2X.

Functions

Link copied to clipboard
open override fun toJava(): JobArgs