@aws-cdk_aws-glue-alpha.IJob

interface IJob ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Glue.Alpha.IJob
Gogithub.com/aws/aws-cdk-go/awscdkgluealpha/v2#IJob
Javasoftware.amazon.awscdk.services.glue.alpha.IJob
Pythonaws_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

NameTypeDescription
env๐Ÿ”นResourceEnvironmentThe environment this resource belongs to.
grantPrincipal๐Ÿ”นIPrincipalThe principal to grant permissions to.
jobArn๐Ÿ”นstringThe ARN of the job.
jobName๐Ÿ”นstringThe name of the job.
node๐Ÿ”นNodeThe tree node.
stack๐Ÿ”นStackThe stack in which this resource is defined.

env๐Ÿ”น

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.


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

NameDescription
applyRemovalPolicy(policy)๐Ÿ”นApply the given removal policy to this resource.
metric(metricName, type, props?)๐Ÿ”นCreate a CloudWatch metric.
metricFailure(props?)๐Ÿ”นCreate a CloudWatch Metric indicating job failure.
metricSuccess(props?)๐Ÿ”นCreate a CloudWatch Metric indicating job success.
metricTimeout(props?)๐Ÿ”นCreate a CloudWatch Metric indicating job timeout.
onEvent(id, options?)๐Ÿ”นDefines a CloudWatch event rule triggered when something happens with this job.
onFailure(id, options?)๐Ÿ”นDefines a CloudWatch event rule triggered when this job moves to the FAILED state.
onStateChange(id, jobState, options?)๐Ÿ”นDefines a CloudWatch event rule triggered when this job moves to the input jobState.
onSuccess(id, options?)๐Ÿ”นDefines a CloudWatch event rule triggered when this job moves to the SUCCEEDED state.
onTimeout(id, options?)๐Ÿ”นDefines a CloudWatch event rule triggered when this job moves to the TIMEOUT state.

applyRemovalPolicy(policy)๐Ÿ”น

public applyRemovalPolicy(policy: RemovalPolicy): void

Parameters

  • policy RemovalPolicy

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 with glue.driver., glue.<executorId>. or glue.ALL..
  • type MetricType โ€” the metric type.
  • props MetricOptions โ€” metric options.

Returns

  • Metric

Create a CloudWatch metric.

See also: https://docs.aws.amazon.com/glue/latest/dg/monitoring-awsglue-with-cloudwatch-metrics.html


metricFailure(props?)๐Ÿ”น

public metricFailure(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

Create a CloudWatch Metric indicating job failure.


metricSuccess(props?)๐Ÿ”น

public metricSuccess(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

Create a CloudWatch Metric indicating job success.


metricTimeout(props?)๐Ÿ”น

public metricTimeout(props?: MetricOptions): Metric

Parameters

  • props MetricOptions

Returns

  • Metric

Create a CloudWatch Metric indicating job timeout.


onEvent(id, options?)๐Ÿ”น

public onEvent(id: string, options?: OnEventOptions): Rule

Parameters

  • id string
  • options OnEventOptions

Returns

  • Rule

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


onFailure(id, options?)๐Ÿ”น

public onFailure(id: string, options?: OnEventOptions): Rule

Parameters

  • id string
  • options OnEventOptions

Returns

  • Rule

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


onStateChange(id, jobState, options?)๐Ÿ”น

public onStateChange(id: string, jobState: JobState, options?: OnEventOptions): Rule

Parameters

  • id string
  • jobState JobState
  • options OnEventOptions

Returns

  • Rule

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


onSuccess(id, options?)๐Ÿ”น

public onSuccess(id: string, options?: OnEventOptions): Rule

Parameters

  • id string
  • options OnEventOptions

Returns

  • Rule

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


onTimeout(id, options?)๐Ÿ”น

public onTimeout(id: string, options?: OnEventOptions): Rule

Parameters

  • id string
  • options OnEventOptions

Returns

  • Rule

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