Skip to content
v2.273.0

IJob Interface ​

Interface representing a new or an imported Glue Job.

Properties ​

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

grantPrincipalIPrincipalgrant_principalIPrincipalgrantPrincipalIPrincipalGrantPrincipalIPrincipalGrantPrincipalIPrincipalrequired#
The principal to grant permissions to.
jobArnstringjob_arnstrjobArnStringJobArnstringJobArn*stringrequired#
The ARN of the job.
jobNamestringjob_namestrjobNameStringJobNamestringJobName*stringrequired#
The name of the job.
A reference to a Job resource.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.

Methods ​

applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

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: string, type: MetricType, props?: MetricOptions): Metricdef metric(self, metric_name: str, type: MetricType, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricType type, MetricOptions props)public Metric Metric(string metricName, MetricType type, MetricOptions? props = null)func Metric(MetricName *string, Type MetricType, Props MetricOptions) Metric#
Create a CloudWatch metric.
3 parameters

Parameters

  • metricNamemetric_namemetricNamemetricNameMetricName — name of the metric typically prefixed with glue.driver., glue.<executorId>. or glue.ALL..
  • typetypetypetypeType — the metric type.
  • propspropspropspropsProps — metric options.
metricFailure(props?: MetricOptions): Metricdef metric_failure(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricFailure(MetricOptions props)public Metric MetricFailure(MetricOptions? props = null)func MetricFailure(Props MetricOptions) Metric#
Create a CloudWatch Metric indicating job failure.
metricSuccess(props?: MetricOptions): Metricdef metric_success(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricSuccess(MetricOptions props)public Metric MetricSuccess(MetricOptions? props = null)func MetricSuccess(Props MetricOptions) Metric#
Create a CloudWatch Metric indicating job success.
metricTimeout(props?: MetricOptions): Metricdef metric_timeout(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTimeout(MetricOptions props)public Metric MetricTimeout(MetricOptions? props = null)func MetricTimeout(Props MetricOptions) Metric#
Create a CloudWatch Metric indicating job timeout.
onEvent(id: string, options?: OnEventOptions): Ruledef on_event(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onEvent(String id, OnEventOptions options)public Rule OnEvent(string id, OnEventOptions? options = null)func OnEvent(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule triggered when something happens with this job.
onFailure(id: string, options?: OnEventOptions): Ruledef on_failure(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onFailure(String id, OnEventOptions options)public Rule OnFailure(string id, OnEventOptions? options = null)func OnFailure(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule triggered when this job moves to the FAILED state.
onSuccess(id: string, options?: OnEventOptions): Ruledef on_success(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onSuccess(String id, OnEventOptions options)public Rule OnSuccess(string id, OnEventOptions? options = null)func OnSuccess(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule triggered when this job moves to the SUCCEEDED state.
onTimeout(id: string, options?: OnEventOptions): Ruledef on_timeout(self, id: str, options: typing.Optional[OnEventOptions] = None) -> Rulepublic Rule onTimeout(String id, OnEventOptions options)public Rule OnTimeout(string id, OnEventOptions? options = null)func OnTimeout(Id *string, Options OnEventOptions) Rule#
Defines a CloudWatch event rule triggered when this job moves to the TIMEOUT state.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining