Class Job
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.glue.Job
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,IJob
,IGrantable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:42.573Z")
@Stability(Experimental)
public class Job
extends Resource
implements IJob
(experimental) A Glue Job.
Example:
Bucket bucket; Job.Builder.create(this, "PythonShellJob") .executable(JobExecutable.pythonShell(PythonShellExecutableProps.builder() .glueVersion(GlueVersion.V1_0) .pythonVersion(PythonVersion.THREE) .script(Code.fromBucket(bucket, "script.py")) .build())) .description("an example Python Shell job") .build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.glue.IJob
IJob.Jsii$Default, IJob.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IJob
fromJobAttributes
(software.constructs.Construct scope, String id, JobAttributes attrs) (experimental) Creates a Glue Job.(experimental) The principal this Glue Job is running as.(experimental) The ARN of the job.(experimental) The name of the job.getRole()
(experimental) The IAM role Glue assumes to run this job.(experimental) The Spark UI logs location if Spark UI monitoring and debugging is enabled.metric
(String metricName, MetricType type) (experimental) Create a CloudWatch metric.metric
(String metricName, MetricType type, MetricOptions props) (experimental) Create a CloudWatch metric.(experimental) Return a CloudWatch Metric indicating job failure.metricFailure
(MetricOptions props) (experimental) Return a CloudWatch Metric indicating job failure.(experimental) Return a CloudWatch Metric indicating job success.metricSuccess
(MetricOptions props) (experimental) Return a CloudWatch Metric indicating job success.(experimental) Return a CloudWatch Metric indicating job timeout.metricTimeout
(MetricOptions props) (experimental) Return a CloudWatch Metric indicating job timeout.(experimental) Create a CloudWatch Event Rule for this Glue Job when it's in a given state.onEvent
(String id, OnEventOptions options) (experimental) Create a CloudWatch Event Rule for this Glue Job when it's in a given state.(experimental) Return a CloudWatch Event Rule matching FAILED state.onFailure
(String id, OnEventOptions options) (experimental) Return a CloudWatch Event Rule matching FAILED state.onStateChange
(String id, JobState jobState) (experimental) Create a CloudWatch Event Rule for the transition into the input jobState.onStateChange
(String id, JobState jobState, OnEventOptions options) (experimental) Create a CloudWatch Event Rule for the transition into the input jobState.(experimental) Create a CloudWatch Event Rule matching JobState.SUCCEEDED.onSuccess
(String id, OnEventOptions options) (experimental) Create a CloudWatch Event Rule matching JobState.SUCCEEDED.(experimental) Return a CloudWatch Event Rule matching TIMEOUT state.onTimeout
(String id, OnEventOptions options) (experimental) Return a CloudWatch Event Rule matching TIMEOUT state.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Job
protected Job(software.amazon.jsii.JsiiObjectRef objRef) -
Job
protected Job(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Job
@Stability(Experimental) public Job(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull JobProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromJobAttributes
@Stability(Experimental) @NotNull public static IJob fromJobAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull JobAttributes attrs) (experimental) Creates a Glue Job.- Parameters:
scope
- The scope creating construct (usuallythis
). This parameter is required.id
- The construct's id. This parameter is required.attrs
- Import attributes. This parameter is required.
-
metric
@Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName, @NotNull MetricType type, @Nullable MetricOptions props) (experimental) Create a CloudWatch metric. -
metric
@Stability(Experimental) @NotNull public Metric metric(@NotNull String metricName, @NotNull MetricType type) (experimental) Create a CloudWatch metric. -
metricFailure
(experimental) Return a CloudWatch Metric indicating job failure.This metric is based on the Rule returned by no-args onFailure() call.
- Specified by:
metricFailure
in interfaceIJob
- Parameters:
props
-
-
metricFailure
(experimental) Return a CloudWatch Metric indicating job failure.This metric is based on the Rule returned by no-args onFailure() call.
- Specified by:
metricFailure
in interfaceIJob
-
metricSuccess
(experimental) Return a CloudWatch Metric indicating job success.This metric is based on the Rule returned by no-args onSuccess() call.
- Specified by:
metricSuccess
in interfaceIJob
- Parameters:
props
-
-
metricSuccess
(experimental) Return a CloudWatch Metric indicating job success.This metric is based on the Rule returned by no-args onSuccess() call.
- Specified by:
metricSuccess
in interfaceIJob
-
metricTimeout
(experimental) Return a CloudWatch Metric indicating job timeout.This metric is based on the Rule returned by no-args onTimeout() call.
- Specified by:
metricTimeout
in interfaceIJob
- Parameters:
props
-
-
metricTimeout
(experimental) Return a CloudWatch Metric indicating job timeout.This metric is based on the Rule returned by no-args onTimeout() call.
- Specified by:
metricTimeout
in interfaceIJob
-
onEvent
@Stability(Experimental) @NotNull public Rule onEvent(@NotNull String id, @Nullable OnEventOptions options) (experimental) Create a CloudWatch Event Rule for this Glue Job when it's in a given state. -
onEvent
(experimental) Create a CloudWatch Event Rule for this Glue Job when it's in a given state. -
onFailure
@Stability(Experimental) @NotNull public Rule onFailure(@NotNull String id, @Nullable OnEventOptions options) (experimental) Return a CloudWatch Event Rule matching FAILED state. -
onFailure
(experimental) Return a CloudWatch Event Rule matching FAILED state. -
onStateChange
@Stability(Experimental) @NotNull public Rule onStateChange(@NotNull String id, @NotNull JobState jobState, @Nullable OnEventOptions options) (experimental) Create a CloudWatch Event Rule for the transition into the input jobState.- Specified by:
onStateChange
in interfaceIJob
- Parameters:
id
- construct id. This parameter is required.jobState
- the job state. This parameter is required.options
- optional event options.- See Also:
-
onStateChange
@Stability(Experimental) @NotNull public Rule onStateChange(@NotNull String id, @NotNull JobState jobState) (experimental) Create a CloudWatch Event Rule for the transition into the input jobState.- Specified by:
onStateChange
in interfaceIJob
- Parameters:
id
- construct id. This parameter is required.jobState
- the job state. This parameter is required.- See Also:
-
onSuccess
@Stability(Experimental) @NotNull public Rule onSuccess(@NotNull String id, @Nullable OnEventOptions options) (experimental) Create a CloudWatch Event Rule matching JobState.SUCCEEDED. -
onSuccess
(experimental) Create a CloudWatch Event Rule matching JobState.SUCCEEDED. -
onTimeout
@Stability(Experimental) @NotNull public Rule onTimeout(@NotNull String id, @Nullable OnEventOptions options) (experimental) Return a CloudWatch Event Rule matching TIMEOUT state. -
onTimeout
(experimental) Return a CloudWatch Event Rule matching TIMEOUT state. -
getGrantPrincipal
(experimental) The principal this Glue Job is running as.- Specified by:
getGrantPrincipal
in interfaceIGrantable
-
getJobArn
(experimental) The ARN of the job. -
getJobName
(experimental) The name of the job.- Specified by:
getJobName
in interfaceIJob
-
getRole
(experimental) The IAM role Glue assumes to run this job. -
getSparkUILoggingLocation
(experimental) The Spark UI logs location if Spark UI monitoring and debugging is enabled.- See Also:
-