/
RuleTargetConfig.go
166 lines (163 loc) · 6.56 KB
/
RuleTargetConfig.go
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
package awsevents
import (
"github.com/aws/aws-cdk-go/awscdk/v2/awsiam"
"github.com/aws/constructs-go/constructs/v10"
)
// Properties for an event rule target.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import "github.com/aws/aws-cdk-go/awscdk"
// import "github.com/aws/aws-cdk-go/awscdk"
// import constructs "github.com/aws/constructs-go/constructs"
//
// var construct construct
// var role role
// var ruleTargetInput ruleTargetInput
//
// ruleTargetConfig := &RuleTargetConfig{
// Arn: jsii.String("arn"),
//
// // the properties below are optional
// BatchParameters: &BatchParametersProperty{
// JobDefinition: jsii.String("jobDefinition"),
// JobName: jsii.String("jobName"),
//
// // the properties below are optional
// ArrayProperties: &BatchArrayPropertiesProperty{
// Size: jsii.Number(123),
// },
// RetryStrategy: &BatchRetryStrategyProperty{
// Attempts: jsii.Number(123),
// },
// },
// DeadLetterConfig: &DeadLetterConfigProperty{
// Arn: jsii.String("arn"),
// },
// EcsParameters: &EcsParametersProperty{
// TaskDefinitionArn: jsii.String("taskDefinitionArn"),
//
// // the properties below are optional
// CapacityProviderStrategy: []interface{}{
// &CapacityProviderStrategyItemProperty{
// CapacityProvider: jsii.String("capacityProvider"),
//
// // the properties below are optional
// Base: jsii.Number(123),
// Weight: jsii.Number(123),
// },
// },
// EnableEcsManagedTags: jsii.Boolean(false),
// EnableExecuteCommand: jsii.Boolean(false),
// Group: jsii.String("group"),
// LaunchType: jsii.String("launchType"),
// NetworkConfiguration: &NetworkConfigurationProperty{
// AwsVpcConfiguration: &AwsVpcConfigurationProperty{
// Subnets: []*string{
// jsii.String("subnets"),
// },
//
// // the properties below are optional
// AssignPublicIp: jsii.String("assignPublicIp"),
// SecurityGroups: []*string{
// jsii.String("securityGroups"),
// },
// },
// },
// PlacementConstraints: []interface{}{
// &PlacementConstraintProperty{
// Expression: jsii.String("expression"),
// Type: jsii.String("type"),
// },
// },
// PlacementStrategies: []interface{}{
// &PlacementStrategyProperty{
// Field: jsii.String("field"),
// Type: jsii.String("type"),
// },
// },
// PlatformVersion: jsii.String("platformVersion"),
// PropagateTags: jsii.String("propagateTags"),
// ReferenceId: jsii.String("referenceId"),
// TagList: []interface{}{
// &CfnTag{
// Key: jsii.String("key"),
// Value: jsii.String("value"),
// },
// },
// TaskCount: jsii.Number(123),
// },
// HttpParameters: &HttpParametersProperty{
// HeaderParameters: map[string]*string{
// "headerParametersKey": jsii.String("headerParameters"),
// },
// PathParameterValues: []*string{
// jsii.String("pathParameterValues"),
// },
// QueryStringParameters: map[string]*string{
// "queryStringParametersKey": jsii.String("queryStringParameters"),
// },
// },
// Input: ruleTargetInput,
// KinesisParameters: &KinesisParametersProperty{
// PartitionKeyPath: jsii.String("partitionKeyPath"),
// },
// RetryPolicy: &RetryPolicyProperty{
// MaximumEventAgeInSeconds: jsii.Number(123),
// MaximumRetryAttempts: jsii.Number(123),
// },
// Role: role,
// RunCommandParameters: &RunCommandParametersProperty{
// RunCommandTargets: []interface{}{
// &RunCommandTargetProperty{
// Key: jsii.String("key"),
// Values: []*string{
// jsii.String("values"),
// },
// },
// },
// },
// SqsParameters: &SqsParametersProperty{
// MessageGroupId: jsii.String("messageGroupId"),
// },
// TargetResource: construct,
// }
//
type RuleTargetConfig struct {
// The Amazon Resource Name (ARN) of the target.
Arn *string `field:"required" json:"arn" yaml:"arn"`
// Parameters used when the rule invokes Amazon AWS Batch Job/Queue.
BatchParameters *CfnRule_BatchParametersProperty `field:"optional" json:"batchParameters" yaml:"batchParameters"`
// Contains information about a dead-letter queue configuration.
DeadLetterConfig *CfnRule_DeadLetterConfigProperty `field:"optional" json:"deadLetterConfig" yaml:"deadLetterConfig"`
// The Amazon ECS task definition and task count to use, if the event target is an Amazon ECS task.
EcsParameters *CfnRule_EcsParametersProperty `field:"optional" json:"ecsParameters" yaml:"ecsParameters"`
// Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge API destination.
HttpParameters *CfnRule_HttpParametersProperty `field:"optional" json:"httpParameters" yaml:"httpParameters"`
// What input to send to the event target.
Input RuleTargetInput `field:"optional" json:"input" yaml:"input"`
// 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.
KinesisParameters *CfnRule_KinesisParametersProperty `field:"optional" json:"kinesisParameters" yaml:"kinesisParameters"`
// A RetryPolicy object that includes information about the retry policy settings.
RetryPolicy *CfnRule_RetryPolicyProperty `field:"optional" json:"retryPolicy" yaml:"retryPolicy"`
// Role to use to invoke this event target.
Role awsiam.IRole `field:"optional" json:"role" yaml:"role"`
// Parameters used when the rule invokes Amazon EC2 Systems Manager Run Command.
RunCommandParameters *CfnRule_RunCommandParametersProperty `field:"optional" json:"runCommandParameters" yaml:"runCommandParameters"`
// Parameters used when the FIFO sqs queue is used an event target by the rule.
SqsParameters *CfnRule_SqsParametersProperty `field:"optional" json:"sqsParameters" yaml:"sqsParameters"`
// 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
//
TargetResource constructs.IConstruct `field:"optional" json:"targetResource" yaml:"targetResource"`
}