-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathtarget.ts
114 lines (100 loc) · 3.43 KB
/
target.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
import * as iam from '@aws-cdk/aws-iam';
import { IConstruct } from 'constructs';
import { CfnRule } from './events.generated';
import { RuleTargetInput } from './input';
import { IRule } from './rule-ref';
/**
* An abstract target for EventRules.
*/
export interface IRuleTarget {
/**
* Returns the rule target specification.
* NOTE: Do not use the various `inputXxx` options. They can be set in a call to `addTarget`.
*
* @param rule The EventBridge Rule that would trigger this target.
* @param id The id of the target that will be attached to the rule.
*/
bind(rule: IRule, id?: string): RuleTargetConfig;
}
/**
* Properties for an event rule target
*/
export interface RuleTargetConfig {
/**
* A unique, user-defined identifier for the target. Acceptable values
* include alphanumeric characters, periods (.), hyphens (-), and
* underscores (_).
*
* @default - an auto-generated id
* @deprecated no replacement. we will always use an autogenerated id.
*/
readonly id?: string;
/**
* The Amazon Resource Name (ARN) of the target.
*/
readonly arn: string;
/**
* Role to use to invoke this event target
*/
readonly role?: iam.IRole;
/**
* Parameters used when the rule invokes Amazon AWS Batch Job/Queue
* @default no parameters set
*/
readonly batchParameters?: CfnRule.BatchParametersProperty;
/**
* Contains information about a dead-letter queue configuration.
* @default no dead-letter queue set
*/
readonly deadLetterConfig?: CfnRule.DeadLetterConfigProperty;
/**
* A RetryPolicy object that includes information about the retry policy settings.
* @default EventBridge default retry policy
*/
readonly retryPolicy?: CfnRule.RetryPolicyProperty;
/**
* The Amazon ECS task definition and task count to use, if the event target
* is an Amazon ECS task.
*/
readonly ecsParameters?: CfnRule.EcsParametersProperty;
/**
* Contains the HTTP parameters to use when the target is a API Gateway REST endpoint
* or EventBridge API destination.
* @default - None
*/
readonly httpParameters?: CfnRule.HttpParametersProperty;
/**
* Settings that control shard assignment, when the target is a Kinesis
* stream. If you don't include this parameter, eventId is used as the
* partition key.
*/
readonly kinesisParameters?: CfnRule.KinesisParametersProperty;
/**
* Parameters used when the rule invokes Amazon EC2 Systems Manager Run
* Command.
*/
readonly runCommandParameters?: CfnRule.RunCommandParametersProperty;
/**
* Parameters used when the FIFO sqs queue is used an event target by the
* rule.
*/
readonly sqsParameters?: CfnRule.SqsParametersProperty;
/**
* What input to send to the event target
*
* @default the entire event
*/
readonly input?: RuleTargetInput;
/**
* The resource that is backing this target.
* This is the resource that will actually have some action performed on it when used as a target
* (for example, start a build for a CodeBuild project).
* We need it to determine whether the rule belongs to a different account than the target -
* if so, we generate a more complex setup,
* including an additional stack containing the EventBusPolicy.
*
* @see https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html
* @default the target is not backed by any resource
*/
readonly targetResource?: IConstruct;
}