/
EventDestination.go
105 lines (87 loc) · 2.21 KB
/
EventDestination.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
package awsses
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/v2/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
"github.com/aws/aws-cdk-go/awscdk/v2/awssns"
)
// An event destination.
//
// Example:
// var myConfigurationSet configurationSet
// var myTopic topic
//
//
// myConfigurationSet.AddEventDestination(jsii.String("ToSns"), &ConfigurationSetEventDestinationOptions{
// Destination: ses.EventDestination_SnsTopic(myTopic),
// })
//
type EventDestination interface {
// A list of CloudWatch dimensions upon which to categorize your emails.
// Default: - do not send events to CloudWatch.
//
Dimensions() *[]*CloudWatchDimension
// A SNS topic to use as event destination.
// Default: - do not send events to a SNS topic.
//
Topic() awssns.ITopic
}
// The jsii proxy struct for EventDestination
type jsiiProxy_EventDestination struct {
_ byte // padding
}
func (j *jsiiProxy_EventDestination) Dimensions() *[]*CloudWatchDimension {
var returns *[]*CloudWatchDimension
_jsii_.Get(
j,
"dimensions",
&returns,
)
return returns
}
func (j *jsiiProxy_EventDestination) Topic() awssns.ITopic {
var returns awssns.ITopic
_jsii_.Get(
j,
"topic",
&returns,
)
return returns
}
func NewEventDestination_Override(e EventDestination) {
_init_.Initialize()
_jsii_.Create(
"aws-cdk-lib.aws_ses.EventDestination",
nil, // no parameters
e,
)
}
// Use CloudWatch dimensions as event destination.
func EventDestination_CloudWatchDimensions(dimensions *[]*CloudWatchDimension) EventDestination {
_init_.Initialize()
if err := validateEventDestination_CloudWatchDimensionsParameters(dimensions); err != nil {
panic(err)
}
var returns EventDestination
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_ses.EventDestination",
"cloudWatchDimensions",
[]interface{}{dimensions},
&returns,
)
return returns
}
// Use a SNS topic as event destination.
func EventDestination_SnsTopic(topic awssns.ITopic) EventDestination {
_init_.Initialize()
if err := validateEventDestination_SnsTopicParameters(topic); err != nil {
panic(err)
}
var returns EventDestination
_jsii_.StaticInvoke(
"aws-cdk-lib.aws_ses.EventDestination",
"snsTopic",
[]interface{}{topic},
&returns,
)
return returns
}