@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-17T17:31:17.095Z") 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnJob(Construct scope,
java.lang.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 |
---|---|
java.lang.Number |
getAllocatedCapacity()
The number of capacity units that are allocated to this job.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getCommand()
The code that executes a job.
|
java.lang.Object |
getConnections()
The connections used for this job.
|
java.lang.Object |
getDefaultArguments()
The default arguments for this job, specified as name-value pairs.
|
java.lang.String |
getDescription()
A description of the job.
|
java.lang.Object |
getExecutionProperty()
The maximum number of concurrent runs that are allowed for this job.
|
java.lang.String |
getGlueVersion()
Glue version determines the versions of Apache Spark and Python that AWS Glue supports.
|
java.lang.String |
getLogUri()
This field is reserved for future use.
|
java.lang.Number |
getMaxCapacity()
The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.
|
java.lang.Number |
getMaxRetries()
The maximum number of times to retry this job after a JobRun fails.
|
java.lang.String |
getName()
The name you assign to this job definition.
|
java.lang.Object |
getNotificationProperty()
Specifies configuration properties of a notification.
|
java.lang.Number |
getNumberOfWorkers()
The number of workers of a defined `workerType` that are allocated when a job runs.
|
java.lang.String |
getRole()
The name or Amazon Resource Name (ARN) of the IAM role associated with this job.
|
java.lang.String |
getSecurityConfiguration()
The name of the `SecurityConfiguration` structure to be used with this job.
|
TagManager |
getTags()
The tags to use with this job.
|
java.lang.Number |
getTimeout()
The job timeout in minutes.
|
java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAllocatedCapacity(java.lang.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(java.lang.Object value)
The default arguments for this job, specified as name-value pairs.
|
void |
setDescription(java.lang.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(java.lang.String value)
Glue version determines the versions of Apache Spark and Python that AWS Glue supports.
|
void |
setLogUri(java.lang.String value)
This field is reserved for future use.
|
void |
setMaxCapacity(java.lang.Number value)
The number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.
|
void |
setMaxRetries(java.lang.Number value)
The maximum number of times to retry this job after a JobRun fails.
|
void |
setName(java.lang.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(java.lang.Number value)
The number of workers of a defined `workerType` that are allocated when a job runs.
|
void |
setRole(java.lang.String value)
The name or Amazon Resource Name (ARN) of the IAM role associated with this job.
|
void |
setSecurityConfiguration(java.lang.String value)
The name of the `SecurityConfiguration` structure to be used with this job.
|
void |
setTimeout(java.lang.Number value)
The job timeout in minutes.
|
void |
setWorkerType(java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnJob(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnJob(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnJob(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Object getCommand()
public void setCommand(IResolvable value)
public void setCommand(CfnJob.JobCommandProperty value)
public java.lang.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 .
public void setDefaultArguments(java.lang.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 .
public java.lang.String getRole()
public void setRole(java.lang.String value)
public java.lang.Number getAllocatedCapacity()
public void setAllocatedCapacity(java.lang.Number value)
public java.lang.Object getConnections()
public void setConnections(IResolvable value)
public void setConnections(CfnJob.ConnectionsListProperty value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.Object getExecutionProperty()
public void setExecutionProperty(IResolvable value)
public void setExecutionProperty(CfnJob.ExecutionPropertyProperty value)
public java.lang.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.
public void setGlueVersion(java.lang.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.
public java.lang.String getLogUri()
public void setLogUri(java.lang.String value)
public java.lang.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.public void setMaxCapacity(java.lang.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.public java.lang.Number getMaxRetries()
public void setMaxRetries(java.lang.Number value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.Object getNotificationProperty()
public void setNotificationProperty(IResolvable value)
public void setNotificationProperty(CfnJob.NotificationPropertyProperty value)
public java.lang.Number getNumberOfWorkers()
The maximum number of workers you can define are 299 for G.1X
, and 149 for G.2X
.
public void setNumberOfWorkers(java.lang.Number value)
The maximum number of workers you can define are 299 for G.1X
, and 149 for G.2X
.
public java.lang.String getSecurityConfiguration()
public void setSecurityConfiguration(java.lang.String value)
public java.lang.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).
public void setTimeout(java.lang.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).
public java.lang.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.public void setWorkerType(java.lang.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.