Class JobBase
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.glue.alpha.JobBase
- All Implemented Interfaces:
IResource,IJob,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
Job
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:23.520Z")
@Stability(Experimental)
public abstract class JobBase
extends Resource
implements IJob
(experimental) A base class is needed to be able to import existing Jobs into a CDK app to reference as part of a larger stack or construct.
JobBase has the subset of attributes required to identify and reference an existing Glue Job, as well as some CloudWatch metric convenience functions to configure an event-driven flow using the job.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.glue.alpha.IJob
IJob.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJobBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedJobBase(software.amazon.jsii.JsiiObjectRef objRef) protectedprotectedJobBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildJobArn(software.constructs.Construct scope, String jobName) (experimental) Returns the job arn.abstract IPrincipal(experimental) The principal to grant permissions to.abstract String(experimental) The ARN of the job.abstract String(experimental) The name of the job.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.protected RuleonStateChange(String id, JobState jobState) (experimental) Create a CloudWatch Event Rule for the transition into the input jobState.protected RuleonStateChange(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.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
JobBase
protected JobBase(software.amazon.jsii.JsiiObjectRef objRef) -
JobBase
protected JobBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
JobBase
@Stability(Stable) protected JobBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
JobBase
@Stability(Stable) protected JobBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
buildJobArn
@Stability(Experimental) @NotNull protected String buildJobArn(@NotNull software.constructs.Construct scope, @NotNull String jobName) (experimental) Returns the job arn.- Parameters:
scope- This parameter is required.jobName- 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:
metricFailurein 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:
metricFailurein 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:
metricSuccessin 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:
metricSuccessin 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:
metricTimeoutin 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:
metricTimeoutin 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 protected Rule onStateChange(@NotNull String id, @NotNull JobState jobState, @Nullable OnEventOptions options) (experimental) Create a CloudWatch Event Rule for the transition into the input jobState.- Parameters:
id- construct id. This parameter is required.jobState- the job state. This parameter is required.options- optional event options.
-
onStateChange
@Stability(Experimental) @NotNull protected Rule onStateChange(@NotNull String id, @NotNull JobState jobState) (experimental) Create a CloudWatch Event Rule for the transition into the input jobState.- Parameters:
id- construct id. This parameter is required.jobState- the job state. This parameter is required.
-
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 to grant permissions to.- Specified by:
getGrantPrincipalin interfaceIGrantable
-
getJobArn
(experimental) The ARN of the job. -
getJobName
(experimental) The name of the job.- Specified by:
getJobNamein interfaceIJob
-