1 | import * as events from '@aws-cdk/aws-events';
|
2 | import { IConstruct } from '@aws-cdk/core';
|
3 | import { TargetBaseProps } from './util';
|
4 | /**
|
5 | * Customize the Batch Job Event Target
|
6 | */
|
7 | export interface BatchJobProps extends TargetBaseProps {
|
8 | /**
|
9 | * The event to send to the Lambda
|
10 | *
|
11 | * This will be the payload sent to the Lambda Function.
|
12 | *
|
13 | * @default the entire EventBridge event
|
14 | */
|
15 | readonly event?: events.RuleTargetInput;
|
16 | /**
|
17 | * The size of the array, if this is an array batch job.
|
18 | *
|
19 | * Valid values are integers between 2 and 10,000.
|
20 | *
|
21 | * @default no arrayProperties are set
|
22 | */
|
23 | readonly size?: number;
|
24 | /**
|
25 | * The number of times to attempt to retry, if the job fails. Valid values are 1–10.
|
26 | *
|
27 | * @default no retryStrategy is set
|
28 | */
|
29 | readonly attempts?: number;
|
30 | /**
|
31 | * The name of the submitted job
|
32 | *
|
33 | * @default - Automatically generated
|
34 | */
|
35 | readonly jobName?: string;
|
36 | }
|
37 | /**
|
38 | * Use an AWS Batch Job / Queue as an event rule target.
|
39 | * Most likely the code will look something like this:
|
40 | * `new BatchJob(jobQueue.jobQueueArn, jobQueue, jobDefinition.jobDefinitionArn, jobDefinition)`
|
41 | *
|
42 | * In the future this API will be improved to be fully typed
|
43 | */
|
44 | export declare class BatchJob implements events.IRuleTarget {
|
45 | /**
|
46 | * The JobQueue arn
|
47 | */
|
48 | private readonly jobQueueArn;
|
49 | /**
|
50 | * The JobQueue Resource
|
51 | */
|
52 | private readonly jobQueueScope;
|
53 | /**
|
54 | * The jobDefinition arn
|
55 | */
|
56 | private readonly jobDefinitionArn;
|
57 | /**
|
58 | * The JobQueue Resource
|
59 | */
|
60 | private readonly jobDefinitionScope;
|
61 | private readonly props;
|
62 | constructor(
|
63 | /**
|
64 | * The JobQueue arn
|
65 | */
|
66 | jobQueueArn: string,
|
67 | /**
|
68 | * The JobQueue Resource
|
69 | */
|
70 | jobQueueScope: IConstruct,
|
71 | /**
|
72 | * The jobDefinition arn
|
73 | */
|
74 | jobDefinitionArn: string,
|
75 | /**
|
76 | * The JobQueue Resource
|
77 | */
|
78 | jobDefinitionScope: IConstruct, props?: BatchJobProps);
|
79 | /**
|
80 | * Returns a RuleTarget that can be used to trigger queue this batch job as a
|
81 | * result from an EventBridge event.
|
82 | */
|
83 | bind(rule: events.IRule, _id?: string): events.RuleTargetConfig;
|
84 | }
|