Class Job
- All Implemented Interfaces:
IJobRef,IEnvironmentAware,IResource,IJob,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
PythonShellJob,RayJob,SparkJob
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.alpha.*;
import software.amazon.awscdk.services.iam.*;
Role role;
IJob job = Job.fromJobAttributes(this, "MyJob", JobAttributes.builder()
.jobName("jobName")
// the properties below are optional
.role(role)
.build());
-
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
ConstructorsModifierConstructorDescriptionprotectedJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) Deprecated.protectedJob(software.amazon.jsii.JsiiObjectRef objRef) Deprecated.protectedDeprecated.protectedJob(software.constructs.Construct scope, String id, ResourceProps props) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcodeS3ObjectUrl(Code code) Deprecated.static IJobfromJobAttributes(software.constructs.Construct scope, String id, JobAttributes attrs) Deprecated.abstract IRolegetRole()Deprecated.Deprecated.mergeDefaultArguments(Map<String, String> defaultArguments) Deprecated.protected voidsetManagedArgument(String key) Deprecated.protected voidsetManagedArgument(String key, String value) Deprecated.protected voidsetupContinuousLogging(IRole role) Deprecated.protected voidsetupContinuousLogging(IRole role, ContinuousLoggingProps props) Deprecated.protected voidsetupContinuousLogging(IRole role, ContinuousLoggingProps props, ISecurityConfiguration securityConfiguration) Deprecated.Methods inherited from class software.amazon.awscdk.services.glue.alpha.JobBase
buildJobArn, getGrantPrincipal, getJobArn, getJobName, getJobRef, metric, metric, metricFailure, metricFailure, metricSuccess, metricSuccess, metricTimeout, metricTimeout, onEvent, onEvent, onFailure, onFailure, onStateChange, onStateChange, onSuccess, onSuccess, onTimeout, onTimeoutMethods inherited from class software.amazon.awscdk.Resource
applyCrossStackReferenceStrength, applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource, withMethods 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
getNode, withMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Job
protected Job(software.amazon.jsii.JsiiObjectRef objRef) Deprecated. -
Job
protected Job(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) Deprecated. -
Job
@Stability(Stable) protected Job(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) Deprecated.- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
Job
Deprecated.- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromJobAttributes
@Stability(Deprecated) @Deprecated @NotNull public static IJob fromJobAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull JobAttributes attrs) Deprecated.(deprecated) Identifies an existing Glue Job from a subset of attributes that can be referenced from within another Stack or Construct.- Parameters:
scope- The scope creating construct (usuallythis). This parameter is required.id- The construct's id. This parameter is required.attrs- Attributes for the Glue Job we want to import. This parameter is required.
-
codeS3ObjectUrl
Deprecated.- Parameters:
code- This parameter is required.
-
mergeDefaultArguments
@Stability(Deprecated) @Deprecated @NotNull protected Map<String,String> mergeDefaultArguments(@Nullable Map<String, String> defaultArguments) Deprecated.(deprecated) Merge the customer-supplieddefaultArgumentswith the arguments this construct manages.The construct owns every argument it emits — whether the value comes from a dedicated typed prop (e.g. `continuousLogging`, `enableMetrics`, `sparkUI`) or from the job class itself (e.g. `--job-language`). Those arguments, plus the arguments Glue reserves for its own use, MUST be configured through their dedicated props rather than the untyped `defaultArguments` map, so there is exactly one way to express each intent. Passing such a key through `defaultArguments` therefore throws instead of silently winning or being silently dropped. A managed key whose supplied value is identical to the construct's value is not contradictory, so it is allowed rather than rejected (auto-correcting config is preferred over errors). Glue-reserved keys are never emitted by the construct, so there is no value to reconcile and they always throw. The reserved set is `_managedArgumentKeys` — every key the construct declared through
setManagedArgument(java.lang.String,java.lang.String), whether or not a value was emitted for it. It is deliberately NOT derived from the keys that carry a value: a typed prop that turns a feature *off* (e.g. `enableMetrics: false`) emits no value but still reserves its key, so `defaultArguments` cannot silently re-enable it. Conflict detection relies on string equality of the argument keys, which cannot see through unresolved tokens (e.g. a key produced by `CfnJson` that only resolves at deploy time). If a key is a token, the check is skipped for that key and a synthesis-time warning is emitted, so the (rare) case where a token key resolves to a managed argument at deploy time — in which the construct-managed value would silently take precedence — is surfaced rather than hidden.- Parameters:
defaultArguments- the caller-supplied escape-hatch arguments, if any.- See Also:
-
mergeDefaultArguments
Deprecated.(deprecated) Merge the customer-supplieddefaultArgumentswith the arguments this construct manages.The construct owns every argument it emits — whether the value comes from a dedicated typed prop (e.g. `continuousLogging`, `enableMetrics`, `sparkUI`) or from the job class itself (e.g. `--job-language`). Those arguments, plus the arguments Glue reserves for its own use, MUST be configured through their dedicated props rather than the untyped `defaultArguments` map, so there is exactly one way to express each intent. Passing such a key through `defaultArguments` therefore throws instead of silently winning or being silently dropped. A managed key whose supplied value is identical to the construct's value is not contradictory, so it is allowed rather than rejected (auto-correcting config is preferred over errors). Glue-reserved keys are never emitted by the construct, so there is no value to reconcile and they always throw. The reserved set is `_managedArgumentKeys` — every key the construct declared through
setManagedArgument(java.lang.String,java.lang.String), whether or not a value was emitted for it. It is deliberately NOT derived from the keys that carry a value: a typed prop that turns a feature *off* (e.g. `enableMetrics: false`) emits no value but still reserves its key, so `defaultArguments` cannot silently re-enable it. Conflict detection relies on string equality of the argument keys, which cannot see through unresolved tokens (e.g. a key produced by `CfnJson` that only resolves at deploy time). If a key is a token, the check is skipped for that key and a synthesis-time warning is emitted, so the (rare) case where a token key resolves to a managed argument at deploy time — in which the construct-managed value would silently take precedence — is surfaced rather than hidden.- See Also:
-
setManagedArgument
@Stability(Deprecated) @Deprecated protected void setManagedArgument(@NotNull String key, @Nullable String value) Deprecated.(deprecated) Declarekeyas construct-managed and, whenvalueis defined, emit it into the job's arguments.This is the single sink for every argument a job construct derives from its typed props (or from the job class itself). Call it once per managed key, passing
undefinedas the value when the corresponding feature is turned off or unset — the key is still reserved fromdefaultArgumentseither way, so a disabled feature cannot be re-enabled through the escape hatch. There is deliberately no other way for a subclass to emit a managed argument, so the reserved set can never drift from what is emitted.- Parameters:
key- the Glue argument key, e.g.--enable-metrics. This parameter is required.value- the value to emit, orundefinedto reserve the key without emitting it.
-
setManagedArgument
Deprecated.(deprecated) Declarekeyas construct-managed and, whenvalueis defined, emit it into the job's arguments.This is the single sink for every argument a job construct derives from its typed props (or from the job class itself). Call it once per managed key, passing
undefinedas the value when the corresponding feature is turned off or unset — the key is still reserved fromdefaultArgumentseither way, so a disabled feature cannot be re-enabled through the escape hatch. There is deliberately no other way for a subclass to emit a managed argument, so the reserved set can never drift from what is emitted.- Parameters:
key- the Glue argument key, e.g.--enable-metrics. This parameter is required.
-
setupContinuousLogging
@Stability(Deprecated) @Deprecated protected void setupContinuousLogging(@NotNull IRole role, @Nullable ContinuousLoggingProps props, @Nullable ISecurityConfiguration securityConfiguration) Deprecated.(deprecated) Register (and, when enabled, emit) the continuous-logging arguments this job manages.All five continuous-logging keys are reserved on every job type regardless of configuration: they are always registered through
setManagedArgument(java.lang.String,java.lang.String), and carry a value only when logging is enabled. This keeps `defaultArguments` from re-enabling logging a user turned off.- Parameters:
role- The IAM role to grant write access to a custom log group, if one is provided. This parameter is required.props- The properties for continuous logging configuration.securityConfiguration- The security configuration attached to the job, if any.
-
setupContinuousLogging
@Stability(Deprecated) @Deprecated protected void setupContinuousLogging(@NotNull IRole role, @Nullable ContinuousLoggingProps props) Deprecated.(deprecated) Register (and, when enabled, emit) the continuous-logging arguments this job manages.All five continuous-logging keys are reserved on every job type regardless of configuration: they are always registered through
setManagedArgument(java.lang.String,java.lang.String), and carry a value only when logging is enabled. This keeps `defaultArguments` from re-enabling logging a user turned off.- Parameters:
role- The IAM role to grant write access to a custom log group, if one is provided. This parameter is required.props- The properties for continuous logging configuration.
-
setupContinuousLogging
Deprecated.(deprecated) Register (and, when enabled, emit) the continuous-logging arguments this job manages.All five continuous-logging keys are reserved on every job type regardless of configuration: they are always registered through
setManagedArgument(java.lang.String,java.lang.String), and carry a value only when logging is enabled. This keeps `defaultArguments` from re-enabling logging a user turned off.- Parameters:
role- The IAM role to grant write access to a custom log group, if one is provided. This parameter is required.
-
getRole
Deprecated.(deprecated) The IAM role Glue assumes to run this job.
-