/
eventStream.go
104 lines (91 loc) · 4.09 KB
/
eventStream.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package pinpoint
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Provides a Pinpoint Event Stream resource.
type EventStream struct {
pulumi.CustomResourceState
// The application ID.
ApplicationId pulumi.StringOutput `pulumi:"applicationId"`
// The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events.
DestinationStreamArn pulumi.StringOutput `pulumi:"destinationStreamArn"`
// The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
RoleArn pulumi.StringOutput `pulumi:"roleArn"`
}
// NewEventStream registers a new resource with the given unique name, arguments, and options.
func NewEventStream(ctx *pulumi.Context,
name string, args *EventStreamArgs, opts ...pulumi.ResourceOption) (*EventStream, error) {
if args == nil || args.ApplicationId == nil {
return nil, errors.New("missing required argument 'ApplicationId'")
}
if args == nil || args.DestinationStreamArn == nil {
return nil, errors.New("missing required argument 'DestinationStreamArn'")
}
if args == nil || args.RoleArn == nil {
return nil, errors.New("missing required argument 'RoleArn'")
}
if args == nil {
args = &EventStreamArgs{}
}
var resource EventStream
err := ctx.RegisterResource("aws:pinpoint/eventStream:EventStream", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventStream gets an existing EventStream resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEventStream(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventStreamState, opts ...pulumi.ResourceOption) (*EventStream, error) {
var resource EventStream
err := ctx.ReadResource("aws:pinpoint/eventStream:EventStream", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventStream resources.
type eventStreamState struct {
// The application ID.
ApplicationId *string `pulumi:"applicationId"`
// The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events.
DestinationStreamArn *string `pulumi:"destinationStreamArn"`
// The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
RoleArn *string `pulumi:"roleArn"`
}
type EventStreamState struct {
// The application ID.
ApplicationId pulumi.StringPtrInput
// The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events.
DestinationStreamArn pulumi.StringPtrInput
// The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
RoleArn pulumi.StringPtrInput
}
func (EventStreamState) ElementType() reflect.Type {
return reflect.TypeOf((*eventStreamState)(nil)).Elem()
}
type eventStreamArgs struct {
// The application ID.
ApplicationId string `pulumi:"applicationId"`
// The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events.
DestinationStreamArn string `pulumi:"destinationStreamArn"`
// The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
RoleArn string `pulumi:"roleArn"`
}
// The set of arguments for constructing a EventStream resource.
type EventStreamArgs struct {
// The application ID.
ApplicationId pulumi.StringInput
// The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery stream to which you want to publish events.
DestinationStreamArn pulumi.StringInput
// The IAM role that authorizes Amazon Pinpoint to publish events to the stream in your account.
RoleArn pulumi.StringInput
}
func (EventStreamArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventStreamArgs)(nil)).Elem()
}