@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-20T22:20:01.746Z") public class Job extends Resource implements IJob
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();
Modifier and Type | Class and Description |
---|---|
static class |
Job.Builder
(experimental) A fluent builder for
Job . |
IJob.Jsii$Default, IJob.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Job(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Job(software.amazon.jsii.JsiiObjectRef objRef) |
|
Job(software.constructs.Construct scope,
java.lang.String id,
JobProps props) |
Modifier and Type | Method and Description |
---|---|
static IJob |
fromJobAttributes(software.constructs.Construct scope,
java.lang.String id,
JobAttributes attrs)
(experimental) Creates a Glue Job.
|
IPrincipal |
getGrantPrincipal()
(experimental) The principal this Glue Job is running as.
|
java.lang.String |
getJobArn()
(experimental) The ARN of the job.
|
java.lang.String |
getJobName()
(experimental) The name of the job.
|
IRole |
getRole()
(experimental) The IAM role Glue assumes to run this job.
|
SparkUILoggingLocation |
getSparkUILoggingLocation()
(experimental) The Spark UI logs location if Spark UI monitoring and debugging is enabled.
|
Metric |
metric(java.lang.String metricName,
MetricType type)
(experimental) Create a CloudWatch metric.
|
Metric |
metric(java.lang.String metricName,
MetricType type,
MetricOptions props)
(experimental) Create a CloudWatch metric.
|
Metric |
metricFailure()
(experimental) Return a CloudWatch Metric indicating job failure.
|
Metric |
metricFailure(MetricOptions props)
(experimental) Return a CloudWatch Metric indicating job failure.
|
Metric |
metricSuccess()
(experimental) Return a CloudWatch Metric indicating job success.
|
Metric |
metricSuccess(MetricOptions props)
(experimental) Return a CloudWatch Metric indicating job success.
|
Metric |
metricTimeout()
(experimental) Return a CloudWatch Metric indicating job timeout.
|
Metric |
metricTimeout(MetricOptions props)
(experimental) Return a CloudWatch Metric indicating job timeout.
|
Rule |
onEvent(java.lang.String id)
(experimental) Create a CloudWatch Event Rule for this Glue Job when it's in a given state.
|
Rule |
onEvent(java.lang.String id,
OnEventOptions options)
(experimental) Create a CloudWatch Event Rule for this Glue Job when it's in a given state.
|
Rule |
onFailure(java.lang.String id)
(experimental) Return a CloudWatch Event Rule matching FAILED state.
|
Rule |
onFailure(java.lang.String id,
OnEventOptions options)
(experimental) Return a CloudWatch Event Rule matching FAILED state.
|
Rule |
onStateChange(java.lang.String id,
JobState jobState)
(experimental) Create a CloudWatch Event Rule for the transition into the input jobState.
|
Rule |
onStateChange(java.lang.String id,
JobState jobState,
OnEventOptions options)
(experimental) Create a CloudWatch Event Rule for the transition into the input jobState.
|
Rule |
onSuccess(java.lang.String id)
(experimental) Create a CloudWatch Event Rule matching JobState.SUCCEEDED.
|
Rule |
onSuccess(java.lang.String id,
OnEventOptions options)
(experimental) Create a CloudWatch Event Rule matching JobState.SUCCEEDED.
|
Rule |
onTimeout(java.lang.String id)
(experimental) Return a CloudWatch Event Rule matching TIMEOUT state.
|
Rule |
onTimeout(java.lang.String id,
OnEventOptions options)
(experimental) Return a CloudWatch Event Rule matching TIMEOUT state.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected Job(software.amazon.jsii.JsiiObjectRef objRef)
protected Job(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public Job(software.constructs.Construct scope, java.lang.String id, JobProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IJob fromJobAttributes(software.constructs.Construct scope, java.lang.String id, JobAttributes attrs)
scope
- The scope creating construct (usually `this`). This parameter is required.id
- The construct's id. This parameter is required.attrs
- Import attributes. This parameter is required.public Metric metric(java.lang.String metricName, MetricType type, MetricOptions props)
metric
in interface IJob
metricName
- name of the metric typically prefixed with `glue.driver.`, `glue.type
- the metric type. This parameter is required.props
- metric options.https://docs.aws.amazon.com/glue/latest/dg/monitoring-awsglue-with-cloudwatch-metrics.html
public Metric metric(java.lang.String metricName, MetricType type)
metric
in interface IJob
metricName
- name of the metric typically prefixed with `glue.driver.`, `glue.type
- the metric type. This parameter is required.https://docs.aws.amazon.com/glue/latest/dg/monitoring-awsglue-with-cloudwatch-metrics.html
public Metric metricFailure(MetricOptions props)
This metric is based on the Rule returned by no-args onFailure() call.
metricFailure
in interface IJob
props
- public Metric metricFailure()
This metric is based on the Rule returned by no-args onFailure() call.
metricFailure
in interface IJob
public Metric metricSuccess(MetricOptions props)
This metric is based on the Rule returned by no-args onSuccess() call.
metricSuccess
in interface IJob
props
- public Metric metricSuccess()
This metric is based on the Rule returned by no-args onSuccess() call.
metricSuccess
in interface IJob
public Metric metricTimeout(MetricOptions props)
This metric is based on the Rule returned by no-args onTimeout() call.
metricTimeout
in interface IJob
props
- public Metric metricTimeout()
This metric is based on the Rule returned by no-args onTimeout() call.
metricTimeout
in interface IJob
public Rule onEvent(java.lang.String id, OnEventOptions options)
public Rule onEvent(java.lang.String id)
public Rule onFailure(java.lang.String id, OnEventOptions options)
public Rule onFailure(java.lang.String id)
public Rule onStateChange(java.lang.String id, JobState jobState, OnEventOptions options)
onStateChange
in interface IJob
id
- construct id. This parameter is required.jobState
- the job state. This parameter is required.options
- optional event options.https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
public Rule onStateChange(java.lang.String id, JobState jobState)
onStateChange
in interface IJob
id
- construct id. This parameter is required.jobState
- the job state. This parameter is required.https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
public Rule onSuccess(java.lang.String id, OnEventOptions options)
public Rule onSuccess(java.lang.String id)
public Rule onTimeout(java.lang.String id, OnEventOptions options)
public Rule onTimeout(java.lang.String id)
public IPrincipal getGrantPrincipal()
getGrantPrincipal
in interface IGrantable
public java.lang.String getJobArn()
public java.lang.String getJobName()
getJobName
in interface IJob
public IRole getRole()
public SparkUILoggingLocation getSparkUILoggingLocation()
https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html