-
Notifications
You must be signed in to change notification settings - Fork 17
/
awssns_SubscriptionOptions.go
58 lines (55 loc) · 2.26 KB
/
awssns_SubscriptionOptions.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
package awssns
import (
"github.com/aws/aws-cdk-go/awscdk/v2/awssqs"
)
// Options for creating a new subscription.
//
// 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"
//
// var queue queue
// var subscriptionFilter subscriptionFilter
//
// subscriptionOptions := &subscriptionOptions{
// endpoint: jsii.String("endpoint"),
// protocol: awscdk.Aws_sns.subscriptionProtocol_HTTP,
//
// // the properties below are optional
// deadLetterQueue: queue,
// filterPolicy: map[string]*subscriptionFilter{
// "filterPolicyKey": subscriptionFilter,
// },
// rawMessageDelivery: jsii.Boolean(false),
// region: jsii.String("region"),
// subscriptionRoleArn: jsii.String("subscriptionRoleArn"),
// }
//
type SubscriptionOptions struct {
// The subscription endpoint.
//
// The meaning of this value depends on the value for 'protocol'.
Endpoint *string `field:"required" json:"endpoint" yaml:"endpoint"`
// What type of subscription to add.
Protocol SubscriptionProtocol `field:"required" json:"protocol" yaml:"protocol"`
// Queue to be used as dead letter queue.
//
// If not passed no dead letter queue is enabled.
DeadLetterQueue awssqs.IQueue `field:"optional" json:"deadLetterQueue" yaml:"deadLetterQueue"`
// The filter policy.
FilterPolicy *map[string]SubscriptionFilter `field:"optional" json:"filterPolicy" yaml:"filterPolicy"`
// true if raw message delivery is enabled for the subscription.
//
// Raw messages are free of JSON formatting and can be
// sent to HTTP/S and Amazon SQS endpoints. For more information, see GetSubscriptionAttributes in the Amazon Simple
// Notification Service API Reference.
RawMessageDelivery *bool `field:"optional" json:"rawMessageDelivery" yaml:"rawMessageDelivery"`
// The region where the topic resides, in the case of cross-region subscriptions.
Region *string `field:"optional" json:"region" yaml:"region"`
// Arn of role allowing access to firehose delivery stream.
//
// Required for a firehose subscription protocol.
SubscriptionRoleArn *string `field:"optional" json:"subscriptionRoleArn" yaml:"subscriptionRoleArn"`
}