
com.pulumi.aws.glue.Job Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.glue;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.glue.JobArgs;
import com.pulumi.aws.glue.inputs.JobState;
import com.pulumi.aws.glue.outputs.JobCommand;
import com.pulumi.aws.glue.outputs.JobExecutionProperty;
import com.pulumi.aws.glue.outputs.JobNotificationProperty;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* 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](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html) topic in the Glue developer guide for additional information.
*
* ## Example Usage
*
* ### Python Job
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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()
* .name("example")
* .roleArn(exampleAwsIamRole.arn())
* .command(JobCommandArgs.builder()
* .scriptLocation(String.format("s3://%s/example.py", exampleAwsS3Bucket.bucket()))
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Ray Job
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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()
* .name("example")
* .roleArn(exampleAwsIamRole.arn())
* .glueVersion("4.0")
* .workerType("Z.2X")
* .command(JobCommandArgs.builder()
* .name("glueray")
* .pythonVersion("3.9")
* .runtime("Ray2.4")
* .scriptLocation(String.format("s3://%s/example.py", exampleAwsS3Bucket.bucket()))
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Scala Job
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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()
* .name("example")
* .roleArn(exampleAwsIamRole.arn())
* .command(JobCommandArgs.builder()
* .scriptLocation(String.format("s3://%s/example.scala", exampleAwsS3Bucket.bucket()))
* .build())
* .defaultArguments(Map.of("--job-language", "scala"))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Streaming Job
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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()
* .name("example streaming job")
* .roleArn(exampleAwsIamRole.arn())
* .command(JobCommandArgs.builder()
* .name("gluestreaming")
* .scriptLocation(String.format("s3://%s/example.script", exampleAwsS3Bucket.bucket()))
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Enabling CloudWatch Logs and Metrics
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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 example = new LogGroup("example", LogGroupArgs.builder()
* .name("example")
* .retentionInDays(14)
* .build());
*
* var exampleJob = new Job("exampleJob", JobArgs.builder()
* .defaultArguments(Map.ofEntries(
* Map.entry("--continuous-log-logGroup", example.name()),
* Map.entry("--enable-continuous-cloudwatch-log", "true"),
* Map.entry("--enable-continuous-log-filter", "true"),
* Map.entry("--enable-metrics", "")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import Glue Jobs using `name`. For example:
*
* ```sh
* $ pulumi import aws:glue/job:Job MyJob MyJob
* ```
*
*/
@ResourceType(type="aws:glue/job:Job")
public class Job extends com.pulumi.resources.CustomResource {
/**
* Amazon Resource Name (ARN) of Glue Job
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return Amazon Resource Name (ARN) of Glue Job
*
*/
public Output arn() {
return this.arn;
}
/**
* The command of the job. Defined below.
*
*/
@Export(name="command", refs={JobCommand.class}, tree="[0]")
private Output command;
/**
* @return The command of the job. Defined below.
*
*/
public Output command() {
return this.command;
}
/**
* The list of connections used for this job.
*
*/
@Export(name="connections", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> connections;
/**
* @return The list of connections used for this job.
*
*/
public Output>> connections() {
return Codegen.optional(this.connections);
}
/**
* 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](http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) 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](http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) topic in the developer guide.
*
*/
@Export(name="defaultArguments", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> defaultArguments;
/**
* @return 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](http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-calling.html) 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](http://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-glue-arguments.html) topic in the developer guide.
*
*/
public Output>> defaultArguments() {
return Codegen.optional(this.defaultArguments);
}
/**
* Description of the job.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return Description of the job.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* 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`.
*
*/
@Export(name="executionClass", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> executionClass;
/**
* @return 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`.
*
*/
public Output> executionClass() {
return Codegen.optional(this.executionClass);
}
/**
* Execution property of the job. Defined below.
*
*/
@Export(name="executionProperty", refs={JobExecutionProperty.class}, tree="[0]")
private Output executionProperty;
/**
* @return Execution property of the job. Defined below.
*
*/
public Output executionProperty() {
return this.executionProperty;
}
/**
* The version of glue to use, for example "1.0". Ray jobs should set this to 4.0 or greater. For information about available versions, see the [AWS Glue Release Notes](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html).
*
*/
@Export(name="glueVersion", refs={String.class}, tree="[0]")
private Output glueVersion;
/**
* @return The version of glue to use, for example "1.0". Ray jobs should set this to 4.0 or greater. For information about available versions, see the [AWS Glue Release Notes](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html).
*
*/
public Output glueVersion() {
return this.glueVersion;
}
/**
* Specifies whether job run queuing is enabled for the job runs for this job. A value of true means job run queuing is enabled for the job runs. If false or not populated, the job runs will not be considered for queueing.
*
*/
@Export(name="jobRunQueuingEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> jobRunQueuingEnabled;
/**
* @return Specifies whether job run queuing is enabled for the job runs for this job. A value of true means job run queuing is enabled for the job runs. If false or not populated, the job runs will not be considered for queueing.
*
*/
public Output> jobRunQueuingEnabled() {
return Codegen.optional(this.jobRunQueuingEnabled);
}
/**
* Specifies the day of the week and hour for the maintenance window for streaming jobs.
*
*/
@Export(name="maintenanceWindow", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> maintenanceWindow;
/**
* @return Specifies the day of the week and hour for the maintenance window for streaming jobs.
*
*/
public Output> maintenanceWindow() {
return Codegen.optional(this.maintenanceWindow);
}
/**
* 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.
*
*/
@Export(name="maxCapacity", refs={Double.class}, tree="[0]")
private Output maxCapacity;
/**
* @return 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.
*
*/
public Output maxCapacity() {
return this.maxCapacity;
}
/**
* The maximum number of times to retry this job if it fails.
*
*/
@Export(name="maxRetries", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> maxRetries;
/**
* @return The maximum number of times to retry this job if it fails.
*
*/
public Output> maxRetries() {
return Codegen.optional(this.maxRetries);
}
/**
* The name you assign to this job. It must be unique in your account.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name you assign to this job. It must be unique in your account.
*
*/
public Output name() {
return this.name;
}
/**
* Non-overridable arguments for this job, specified as name-value pairs.
*
*/
@Export(name="nonOverridableArguments", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> nonOverridableArguments;
/**
* @return Non-overridable arguments for this job, specified as name-value pairs.
*
*/
public Output>> nonOverridableArguments() {
return Codegen.optional(this.nonOverridableArguments);
}
/**
* Notification property of the job. Defined below.
*
*/
@Export(name="notificationProperty", refs={JobNotificationProperty.class}, tree="[0]")
private Output notificationProperty;
/**
* @return Notification property of the job. Defined below.
*
*/
public Output notificationProperty() {
return this.notificationProperty;
}
/**
* The number of workers of a defined workerType that are allocated when a job runs.
*
*/
@Export(name="numberOfWorkers", refs={Integer.class}, tree="[0]")
private Output numberOfWorkers;
/**
* @return The number of workers of a defined workerType that are allocated when a job runs.
*
*/
public Output numberOfWorkers() {
return this.numberOfWorkers;
}
/**
* The ARN of the IAM role associated with this job.
*
*/
@Export(name="roleArn", refs={String.class}, tree="[0]")
private Output roleArn;
/**
* @return The ARN of the IAM role associated with this job.
*
*/
public Output roleArn() {
return this.roleArn;
}
/**
* The name of the Security Configuration to be associated with the job.
*
*/
@Export(name="securityConfiguration", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> securityConfiguration;
/**
* @return The name of the Security Configuration to be associated with the job.
*
*/
public Output> securityConfiguration() {
return Codegen.optional(this.securityConfiguration);
}
/**
* 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.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return 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.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy