interface IJob
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Glue.Alpha.IJob |
Go | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#IJob |
Java | software.amazon.awscdk.services.glue.alpha.IJob |
Python | aws_cdk.aws_glue_alpha.IJob |
TypeScript (source) | @aws-cdk/aws-glue-alpha ยป IJob |
Implemented by
Job
Obtainable from
Job
.fromJobAttributes()
Interface representing a created or an imported Job
.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
grant | IPrincipal | The principal to grant permissions to. |
job | string | The ARN of the job. |
job | string | The name of the job. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
grantPrincipal
Type:
IPrincipal
The principal to grant permissions to.
jobArn
Type:
string
The ARN of the job.
jobName
Type:
string
The name of the job.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
metric(metricName, type, props?) | Create a CloudWatch metric. |
metric | Create a CloudWatch Metric indicating job failure. |
metric | Create a CloudWatch Metric indicating job success. |
metric | Create a CloudWatch Metric indicating job timeout. |
on | Defines a CloudWatch event rule triggered when something happens with this job. |
on | Defines a CloudWatch event rule triggered when this job moves to the FAILED state. |
on | Defines a CloudWatch event rule triggered when this job moves to the input jobState. |
on | Defines a CloudWatch event rule triggered when this job moves to the SUCCEEDED state. |
on | Defines a CloudWatch event rule triggered when this job moves to the TIMEOUT state. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
metric(metricName, type, props?)
public metric(metricName: string, type: MetricType, props?: MetricOptions): Metric
Parameters
- metricName
string
โ name of the metric typically prefixed withglue.driver.
,glue.<executorId>.
orglue.ALL.
. - type
Metric
โ the metric type.Type - props
Metric
โ metric options.Options
Returns
Create a CloudWatch metric.
See also: https://docs.aws.amazon.com/glue/latest/dg/monitoring-awsglue-with-cloudwatch-metrics.html
Failure(props?)
metricpublic metricFailure(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Create a CloudWatch Metric indicating job failure.
Success(props?)
metricpublic metricSuccess(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Create a CloudWatch Metric indicating job success.
Timeout(props?)
metricpublic metricTimeout(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Create a CloudWatch Metric indicating job timeout.
Event(id, options?)
onpublic onEvent(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule triggered when something happens with this job.
See also: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
Failure(id, options?)
onpublic onFailure(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule triggered when this job moves to the FAILED state.
See also: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
StateChange(id, jobState, options?)
onpublic onStateChange(id: string, jobState: JobState, options?: OnEventOptions): Rule
Parameters
- id
string
- jobState
Job
State - options
On
Event Options
Returns
Defines a CloudWatch event rule triggered when this job moves to the input jobState.
See also: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
Success(id, options?)
onpublic onSuccess(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule triggered when this job moves to the SUCCEEDED state.
See also: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
Timeout(id, options?)
onpublic onTimeout(id: string, options?: OnEventOptions): Rule
Parameters
- id
string
- options
On
Event Options
Returns
Defines a CloudWatch event rule triggered when this job moves to the TIMEOUT state.
See also: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types