Class CfnJob
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.glue.CfnJob
- All Implemented Interfaces:
IInspectable,IJobRef,IEnvironmentAware,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:37.507Z")
@Stability(Stable)
public class CfnJob
extends CfnResource
implements IInspectable, IJobRef, ITaggable
The
AWS::Glue::Job resource specifies an AWS Glue job in the data catalog.
For more information, see Adding Jobs in AWS Glue and Job Structure in the AWS Glue Developer Guide.
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.*;
Object defaultArguments;
Object nonOverridableArguments;
Object tags;
CfnJob cfnJob = CfnJob.Builder.create(this, "MyCfnJob")
.command(JobCommandProperty.builder()
.name("name")
.pythonVersion("pythonVersion")
.runtime("runtime")
.scriptLocation("scriptLocation")
.build())
.role("role")
// the properties below are optional
.allocatedCapacity(123)
.connections(ConnectionsListProperty.builder()
.connections(List.of("connections"))
.build())
.defaultArguments(defaultArguments)
.description("description")
.executionClass("executionClass")
.executionProperty(ExecutionPropertyProperty.builder()
.maxConcurrentRuns(123)
.build())
.glueVersion("glueVersion")
.jobMode("jobMode")
.jobRunQueuingEnabled(false)
.logUri("logUri")
.maintenanceWindow("maintenanceWindow")
.maxCapacity(123)
.maxRetries(123)
.name("name")
.nonOverridableArguments(nonOverridableArguments)
.notificationProperty(NotificationPropertyProperty.builder()
.notifyDelayAfter(123)
.build())
.numberOfWorkers(123)
.securityConfiguration("securityConfiguration")
.tags(tags)
.timeout(123)
.workerType("workerType")
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnJob.static interfaceSpecifies the connections used by a job.static interfaceAn execution property of a job.static interfaceSpecifies code executed when a job is run.static interfaceSpecifies configuration properties of a notification.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.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.glue.IJobRef
IJobRef.Jsii$Default, IJobRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnJob(software.amazon.jsii.JsiiObjectRef objRef) CfnJob(software.constructs.Construct scope, String id, CfnJobProps props) Create a newAWS::Glue::Job. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic IJobReffromJobName(software.constructs.Construct scope, String id, String jobName) Creates a new IJobRef from a jobName.This parameter is no longer supported.The code that executes a job.The connections used for this job.The default arguments for this job, specified as name-value pairs.A description of the job.Indicates whether the job is run with a standard or flexible execution class.The maximum number of concurrent runs that are allowed for this job.Glue version determines the versions of Apache Spark and Python that AWS Glue supports.A mode that describes how a job was created.A reference to a Job resource.Specifies whether job run queuing is enabled for the job runs for this job.This field is reserved for future use.This field specifies a day of the week and hour for a maintenance window for streaming jobs.The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.The maximum number of times to retry this job after a JobRun fails.getName()The name you assign to this job definition.Non-overridable arguments for this job, specified as name-value pairs.Specifies configuration properties of a notification.The number of workers of a definedworkerTypethat are allocated when a job runs.getRole()The name or Amazon Resource Name (ARN) of the IAM role associated with this job.The name of theSecurityConfigurationstructure to be used with this job.getTags()Tag Manager which manages the tags for this resource.The tags to use with this job.The job timeout in minutes.The type of predefined worker that is allocated when a job runs.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnJob.renderProperties(Map<String, Object> props) voidsetAllocatedCapacity(Number value) This parameter is no longer supported.voidsetCommand(IResolvable value) The code that executes a job.voidThe code that executes a job.voidsetConnections(IResolvable value) The connections used for this job.voidThe connections used for this job.voidsetDefaultArguments(Object value) The default arguments for this job, specified as name-value pairs.voidsetDescription(String value) A description of the job.voidsetExecutionClass(String value) Indicates whether the job is run with a standard or flexible execution class.voidsetExecutionProperty(IResolvable value) The maximum number of concurrent runs that are allowed for this job.voidThe maximum number of concurrent runs that are allowed for this job.voidsetGlueVersion(String value) Glue version determines the versions of Apache Spark and Python that AWS Glue supports.voidsetJobMode(String value) A mode that describes how a job was created.voidsetJobRunQueuingEnabled(Boolean value) Specifies whether job run queuing is enabled for the job runs for this job.voidSpecifies whether job run queuing is enabled for the job runs for this job.voidThis field is reserved for future use.voidsetMaintenanceWindow(String value) This field specifies a day of the week and hour for a maintenance window for streaming jobs.voidsetMaxCapacity(Number value) The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.voidsetMaxRetries(Number value) The maximum number of times to retry this job after a JobRun fails.voidThe name you assign to this job definition.voidsetNonOverridableArguments(Object value) Non-overridable arguments for this job, specified as name-value pairs.voidSpecifies configuration properties of a notification.voidSpecifies configuration properties of a notification.voidsetNumberOfWorkers(Number value) The number of workers of a definedworkerTypethat are allocated when a job runs.voidThe name or Amazon Resource Name (ARN) of the IAM role associated with this job.voidsetSecurityConfiguration(String value) The name of theSecurityConfigurationstructure to be used with this job.voidsetTagsRaw(Object value) The tags to use with this job.voidsetTimeout(Number value) The job timeout in minutes.voidsetWorkerType(String value) The type of predefined worker that is allocated when a job runs.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnJob
protected CfnJob(software.amazon.jsii.JsiiObjectRef objRef) -
CfnJob
protected CfnJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnJob
@Stability(Stable) public CfnJob(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnJobProps props) Create a newAWS::Glue::Job.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForJob
- Parameters:
resource- This parameter is required.
-
fromJobName
@Stability(Stable) @NotNull public static IJobRef fromJobName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String jobName) Creates a new IJobRef from a jobName.- Parameters:
scope- This parameter is required.id- This parameter is required.jobName- This parameter is required.
-
isCfnJob
Checks whether the given object is a CfnJob.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getJobRef
A reference to a Job resource. -
getTags
Tag Manager which manages the tags for this resource. -
getCommand
The code that executes a job.Returns union: either
IResolvableorCfnJob.JobCommandProperty -
setCommand
The code that executes a job. -
setCommand
The code that executes a job. -
getRole
The name or Amazon Resource Name (ARN) of the IAM role associated with this job. -
setRole
The name or Amazon Resource Name (ARN) of the IAM role associated with this job. -
getAllocatedCapacity
This parameter is no longer supported.Use
MaxCapacityinstead. -
setAllocatedCapacity
This parameter is no longer supported.Use
MaxCapacityinstead. -
getConnections
The connections used for this job.Returns union: either
IResolvableorCfnJob.ConnectionsListProperty -
setConnections
The connections used for this job. -
setConnections
The connections used for this job. -
getDefaultArguments
The default arguments for this job, specified as name-value pairs. -
setDefaultArguments
The default arguments for this job, specified as name-value pairs. -
getDescription
A description of the job. -
setDescription
A description of the job. -
getExecutionClass
Indicates whether the job is run with a standard or flexible execution class. -
setExecutionClass
Indicates whether the job is run with a standard or flexible execution class. -
getExecutionProperty
The maximum number of concurrent runs that are allowed for this job.Returns union: either
IResolvableorCfnJob.ExecutionPropertyProperty -
setExecutionProperty
The maximum number of concurrent runs that are allowed for this job. -
setExecutionProperty
@Stability(Stable) public void setExecutionProperty(@Nullable CfnJob.ExecutionPropertyProperty value) The maximum number of concurrent runs that are allowed for this job. -
getGlueVersion
Glue version determines the versions of Apache Spark and Python that AWS Glue supports. -
setGlueVersion
Glue version determines the versions of Apache Spark and Python that AWS Glue supports. -
getJobMode
A mode that describes how a job was created.Valid values are:.
-
setJobMode
A mode that describes how a job was created.Valid values are:.
-
getJobRunQueuingEnabled
Specifies whether job run queuing is enabled for the job runs for this job.Returns union: either
BooleanorIResolvable -
setJobRunQueuingEnabled
Specifies whether job run queuing is enabled for the job runs for this job. -
setJobRunQueuingEnabled
Specifies whether job run queuing is enabled for the job runs for this job. -
getLogUri
This field is reserved for future use. -
setLogUri
This field is reserved for future use. -
getMaintenanceWindow
This field specifies a day of the week and hour for a maintenance window for streaming jobs. -
setMaintenanceWindow
This field specifies a day of the week and hour for a maintenance window for streaming jobs. -
getMaxCapacity
The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs. -
setMaxCapacity
The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs. -
getMaxRetries
The maximum number of times to retry this job after a JobRun fails. -
setMaxRetries
The maximum number of times to retry this job after a JobRun fails. -
getName
The name you assign to this job definition. -
setName
The name you assign to this job definition. -
getNonOverridableArguments
Non-overridable arguments for this job, specified as name-value pairs. -
setNonOverridableArguments
Non-overridable arguments for this job, specified as name-value pairs. -
getNotificationProperty
Specifies configuration properties of a notification.Returns union: either
IResolvableorCfnJob.NotificationPropertyProperty -
setNotificationProperty
Specifies configuration properties of a notification. -
setNotificationProperty
@Stability(Stable) public void setNotificationProperty(@Nullable CfnJob.NotificationPropertyProperty value) Specifies configuration properties of a notification. -
getNumberOfWorkers
The number of workers of a definedworkerTypethat are allocated when a job runs. -
setNumberOfWorkers
The number of workers of a definedworkerTypethat are allocated when a job runs. -
getSecurityConfiguration
The name of theSecurityConfigurationstructure to be used with this job. -
setSecurityConfiguration
The name of theSecurityConfigurationstructure to be used with this job. -
getTagsRaw
The tags to use with this job. -
setTagsRaw
The tags to use with this job. -
getTimeout
The job timeout in minutes. -
setTimeout
The job timeout in minutes. -
getWorkerType
The type of predefined worker that is allocated when a job runs. -
setWorkerType
The type of predefined worker that is allocated when a job runs.
-