@aws-cdk/aws-glue-alpha
The CDK Construct Library for AWS::Glue
npm install @aws-cdk/aws-glue-alpha@2.195.0-alpha.0
IJob
-
Extends: IResource, IGrantable
-
Implemented By: Job, JobBase, PySparkEtlJob, PySparkFlexEtlJob, PySparkStreamingJob, PythonShellJob, RayJob, ScalaSparkEtlJob, ScalaSparkFlexEtlJob, ScalaSparkStreamingJob, SparkJob, IJob
Interface representing a new or an imported Glue Job.
| Name | Description |
|---|---|
metric | Create a CloudWatch metric. |
metricFailure | Create a CloudWatch Metric indicating job failure. |
metricSuccess | Create a CloudWatch Metric indicating job success. |
metricTimeout | Create a CloudWatch Metric indicating job timeout. |
onEvent | Defines a CloudWatch event rule triggered when something happens with this job. |
onFailure | Defines a CloudWatch event rule triggered when this job moves to the FAILED state. |
onSuccess | Defines a CloudWatch event rule triggered when this job moves to the SUCCEEDED state. |
onTimeout | Defines a CloudWatch event rule triggered when this job moves to the TIMEOUT state. |
public metric(metricName: string, type: MetricType, props?: MetricOptions): Metric
Create a CloudWatch metric.
https://docs.aws.amazon.com/glue/latest/dg/monitoring-awsglue-with-cloudwatch-metrics.html
- Type: string
name of the metric typically prefixed with glue.driver., glue.<executorId>. or glue.ALL..
- Type: MetricType
the metric type.
- Type: MetricOptions
metric options.
public metricFailure(props?: MetricOptions): Metric
Create a CloudWatch Metric indicating job failure.
- Type: MetricOptions
public metricSuccess(props?: MetricOptions): Metric
Create a CloudWatch Metric indicating job success.
- Type: MetricOptions
public metricTimeout(props?: MetricOptions): Metric
Create a CloudWatch Metric indicating job timeout.
- Type: MetricOptions
public onEvent(id: string, options?: OnEventOptions): Rule
Defines a CloudWatch event rule triggered when something happens with this job.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
- Type: string
- Type: OnEventOptions
public onFailure(id: string, options?: OnEventOptions): Rule
Defines a CloudWatch event rule triggered when this job moves to the FAILED state.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
- Type: string
- Type: OnEventOptions
public onSuccess(id: string, options?: OnEventOptions): Rule
Defines a CloudWatch event rule triggered when this job moves to the SUCCEEDED state.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
- Type: string
- Type: OnEventOptions
public onTimeout(id: string, options?: OnEventOptions): Rule
Defines a CloudWatch event rule triggered when this job moves to the TIMEOUT state.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#glue-event-types
- Type: string
- Type: OnEventOptions
| Name | Type | Description |
|---|---|---|
node | Node | The tree node. |
env | ResourceEnvironment | The environment this resource belongs to. |
stack | Stack | The stack in which this resource is defined. |
grantPrincipal | IPrincipal | The principal to grant permissions to. |
jobArn | string | The ARN of the job. |
jobName | string | The name of the job. |
public readonly node: Node;
- Type: Node
The tree node.
public readonly env: ResourceEnvironment;
- Type: ResourceEnvironment
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.
public readonly stack: Stack;
- Type: Stack
The stack in which this resource is defined.
public readonly grantPrincipal: IPrincipal;
- Type: IPrincipal
The principal to grant permissions to.
public readonly jobArn: string;
- Type: string
The ARN of the job.
public readonly jobName: string;
- Type: string
The name of the job.
Use the snippets below in your Git repositories or elsewhere to add a button that links to this package. The button will automatically update to light mode or dark mode based on whether the user's client has requested a light or dark theme.
[](https://constructs.dev/packages/@aws-cdk/aws-glue-alpha)
<a href="https://constructs.dev/packages/@aws-cdk/aws-glue-alpha"><img src="https://constructs.dev/badge?package=%40aws-cdk%2Faws-glue-alpha" alt="View on Construct Hub"/></a>