@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.555Z") @Stability(value=Stable) public class CfnJob extends CfnResource implements IInspectable
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 tags;
CfnJob cfnJob = CfnJob.Builder.create(this, "MyCfnJob")
.command(JobCommandProperty.builder()
.name("name")
.pythonVersion("pythonVersion")
.scriptLocation("scriptLocation")
.build())
.role("role")
// the properties below are optional
.allocatedCapacity(123)
.connections(ConnectionsListProperty.builder()
.connections(List.of("connections"))
.build())
.defaultArguments(defaultArguments)
.description("description")
.executionProperty(ExecutionPropertyProperty.builder()
.maxConcurrentRuns(123)
.build())
.glueVersion("glueVersion")
.logUri("logUri")
.maxCapacity(123)
.maxRetries(123)
.name("name")
.notificationProperty(NotificationPropertyProperty.builder()
.notifyDelayAfter(123)
.build())
.numberOfWorkers(123)
.securityConfiguration("securityConfiguration")
.tags(tags)
.timeout(123)
.workerType("workerType")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnJob.Builder
A fluent builder for
CfnJob. |
static interface |
CfnJob.ConnectionsListProperty
Specifies the connections used by a job.
|
static interface |
CfnJob.ExecutionPropertyProperty
An execution property of a job.
|
static interface |
CfnJob.JobCommandProperty
Specifies code executed when a job is run.
|
static interface |
CfnJob.NotificationPropertyProperty
Specifies configuration properties of a notification.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnJob(software.constructs.Construct scope,
String id,
CfnJobProps props)
Create a new `AWS::Glue::Job`.
|
protected |
CfnJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnJob(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Number |
getAllocatedCapacity()
The number of capacity units that are allocated to this job.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getCommand()
The code that executes a job.
|
Object |
getConnections()
The connections used for this job.
|
Object |
getDefaultArguments()
The default arguments for this job, specified as name-value pairs.
|
String |
getDescription()
A description of the job.
|
Object |
getExecutionProperty()
The maximum number of concurrent runs that are allowed for this job.
|
String |
getGlueVersion()
Glue version determines the versions of Apache Spark and Python that AWS Glue supports.
|
String |
getLogUri()
This field is reserved for future use.
|
Number |
getMaxCapacity()
The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.
|
Number |
getMaxRetries()
The maximum number of times to retry this job after a JobRun fails.
|
String |
getName()
The name you assign to this job definition.
|
Object |
getNotificationProperty()
Specifies configuration properties of a notification.
|
Number |
getNumberOfWorkers()
The number of workers of a defined `workerType` that are allocated when a job runs.
|
String |
getRole()
The name or Amazon Resource Name (ARN) of the IAM role associated with this job.
|
String |
getSecurityConfiguration()
The name of the `SecurityConfiguration` structure to be used with this job.
|
TagManager |
getTags()
The tags to use with this job.
|
Number |
getTimeout()
The job timeout in minutes.
|
String |
getWorkerType()
The type of predefined worker that is allocated when a job runs.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAllocatedCapacity(Number value)
The number of capacity units that are allocated to this job.
|
void |
setCommand(CfnJob.JobCommandProperty value)
The code that executes a job.
|
void |
setCommand(IResolvable value)
The code that executes a job.
|
void |
setConnections(CfnJob.ConnectionsListProperty value)
The connections used for this job.
|
void |
setConnections(IResolvable value)
The connections used for this job.
|
void |
setDefaultArguments(Object value)
The default arguments for this job, specified as name-value pairs.
|
void |
setDescription(String value)
A description of the job.
|
void |
setExecutionProperty(CfnJob.ExecutionPropertyProperty value)
The maximum number of concurrent runs that are allowed for this job.
|
void |
setExecutionProperty(IResolvable value)
The maximum number of concurrent runs that are allowed for this job.
|
void |
setGlueVersion(String value)
Glue version determines the versions of Apache Spark and Python that AWS Glue supports.
|
void |
setLogUri(String value)
This field is reserved for future use.
|
void |
setMaxCapacity(Number value)
The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.
|
void |
setMaxRetries(Number value)
The maximum number of times to retry this job after a JobRun fails.
|
void |
setName(String value)
The name you assign to this job definition.
|
void |
setNotificationProperty(CfnJob.NotificationPropertyProperty value)
Specifies configuration properties of a notification.
|
void |
setNotificationProperty(IResolvable value)
Specifies configuration properties of a notification.
|
void |
setNumberOfWorkers(Number value)
The number of workers of a defined `workerType` that are allocated when a job runs.
|
void |
setRole(String value)
The name or Amazon Resource Name (ARN) of the IAM role associated with this job.
|
void |
setSecurityConfiguration(String value)
The name of the `SecurityConfiguration` structure to be used with this job.
|
void |
setTimeout(Number value)
The job timeout in minutes.
|
void |
setWorkerType(String value)
The type of predefined worker that is allocated when a job runs.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnJob(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnJob(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnJobProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public Object getCommand()
@Stability(value=Stable)
public void setCommand(@NotNull
CfnJob.JobCommandProperty value)
@Stability(value=Stable)
public void setCommand(@NotNull
IResolvable value)
@Stability(value=Stable) @NotNull public Object getDefaultArguments()
You can specify arguments here that your own job-execution script consumes, in addition to arguments that AWS Glue itself consumes.
For information about how to specify and consume your own job arguments, see Calling AWS Glue APIs in Python in the AWS Glue Developer Guide .
For information about the key-value pairs that AWS Glue consumes to set up your job, see Special Parameters Used by AWS Glue in the AWS Glue Developer Guide .
@Stability(value=Stable)
public void setDefaultArguments(@NotNull
Object value)
You can specify arguments here that your own job-execution script consumes, in addition to arguments that AWS Glue itself consumes.
For information about how to specify and consume your own job arguments, see Calling AWS Glue APIs in Python in the AWS Glue Developer Guide .
For information about the key-value pairs that AWS Glue consumes to set up your job, see Special Parameters Used by AWS Glue in the AWS Glue Developer Guide .
@Stability(value=Stable) @NotNull public String getRole()
@Stability(value=Stable)
public void setRole(@NotNull
String value)
@Stability(value=Stable) @Nullable public Number getAllocatedCapacity()
@Stability(value=Stable)
public void setAllocatedCapacity(@Nullable
Number value)
@Stability(value=Stable) @Nullable public Object getConnections()
@Stability(value=Stable)
public void setConnections(@Nullable
CfnJob.ConnectionsListProperty value)
@Stability(value=Stable)
public void setConnections(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getExecutionProperty()
@Stability(value=Stable)
public void setExecutionProperty(@Nullable
CfnJob.ExecutionPropertyProperty value)
@Stability(value=Stable)
public void setExecutionProperty(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public String getGlueVersion()
The Python version indicates the version supported for jobs of type Spark.
For more information about the available AWS Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
Jobs that are created without specifying a Glue version default to Glue 0.9.
@Stability(value=Stable)
public void setGlueVersion(@Nullable
String value)
The Python version indicates the version supported for jobs of type Spark.
For more information about the available AWS Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
Jobs that are created without specifying a Glue version default to Glue 0.9.
@Stability(value=Stable) @Nullable public String getLogUri()
@Stability(value=Stable)
public void setLogUri(@Nullable
String value)
@Stability(value=Stable) @Nullable public Number getMaxCapacity()
A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory.
Do not set Max Capacity if using WorkerType and NumberOfWorkers .
The value that can be allocated for MaxCapacity depends on whether you are running a Python shell job or an Apache Spark ETL job:
JobCommand.Name ="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU.JobCommand.Name ="glueetl"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation.@Stability(value=Stable)
public void setMaxCapacity(@Nullable
Number value)
A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory.
Do not set Max Capacity if using WorkerType and NumberOfWorkers .
The value that can be allocated for MaxCapacity depends on whether you are running a Python shell job or an Apache Spark ETL job:
JobCommand.Name ="pythonshell"), you can allocate either 0.0625 or 1 DPU. The default is 0.0625 DPU.JobCommand.Name ="glueetl"), you can allocate from 2 to 100 DPUs. The default is 10 DPUs. This job type cannot have a fractional DPU allocation.@Stability(value=Stable) @Nullable public Number getMaxRetries()
@Stability(value=Stable)
public void setMaxRetries(@Nullable
Number value)
@Stability(value=Stable) @Nullable public String getName()
@Stability(value=Stable)
public void setName(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getNotificationProperty()
@Stability(value=Stable)
public void setNotificationProperty(@Nullable
CfnJob.NotificationPropertyProperty value)
@Stability(value=Stable)
public void setNotificationProperty(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Number getNumberOfWorkers()
The maximum number of workers you can define are 299 for G.1X , and 149 for G.2X .
@Stability(value=Stable)
public void setNumberOfWorkers(@Nullable
Number value)
The maximum number of workers you can define are 299 for G.1X , and 149 for G.2X .
@Stability(value=Stable) @Nullable public String getSecurityConfiguration()
@Stability(value=Stable)
public void setSecurityConfiguration(@Nullable
String value)
@Stability(value=Stable) @Nullable public Number getTimeout()
This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours).
@Stability(value=Stable)
public void setTimeout(@Nullable
Number value)
This is the maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status. The default is 2,880 minutes (48 hours).
@Stability(value=Stable) @Nullable public String getWorkerType()
Accepts a value of Standard, G.1X, or G.2X.
Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.G.1X worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.G.2X worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.@Stability(value=Stable)
public void setWorkerType(@Nullable
String value)
Accepts a value of Standard, G.1X, or G.2X.
Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.G.1X worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.G.2X worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.Copyright © 2022. All rights reserved.