/
eventStream.go
188 lines (156 loc) · 6.46 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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package customerprofiles
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// An Event Stream resource of Amazon Connect Customer Profiles
type EventStream struct {
pulumi.CustomResourceState
// The timestamp of when the export was created.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Details regarding the Kinesis stream.
DestinationDetails DestinationDetailsPropertiesOutput `pulumi:"destinationDetails"`
// The unique name of the domain.
DomainName pulumi.StringOutput `pulumi:"domainName"`
// A unique identifier for the event stream.
EventStreamArn pulumi.StringOutput `pulumi:"eventStreamArn"`
// The name of the event stream.
EventStreamName pulumi.StringOutput `pulumi:"eventStreamName"`
// The operational state of destination stream for export.
State EventStreamStateEnumOutput `pulumi:"state"`
// The tags used to organize, track, or control access for this resource.
Tags aws.TagArrayOutput `pulumi:"tags"`
Uri pulumi.StringOutput `pulumi:"uri"`
}
// 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 {
return nil, errors.New("missing one or more required arguments")
}
if args.DomainName == nil {
return nil, errors.New("invalid value for required argument 'DomainName'")
}
if args.Uri == nil {
return nil, errors.New("invalid value for required argument 'Uri'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"domainName",
"eventStreamName",
"uri",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventStream
err := ctx.RegisterResource("aws-native:customerprofiles: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-native:customerprofiles: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 {
}
type EventStreamState struct {
}
func (EventStreamState) ElementType() reflect.Type {
return reflect.TypeOf((*eventStreamState)(nil)).Elem()
}
type eventStreamArgs struct {
// The unique name of the domain.
DomainName string `pulumi:"domainName"`
// The name of the event stream.
EventStreamName *string `pulumi:"eventStreamName"`
// The tags used to organize, track, or control access for this resource.
Tags []aws.Tag `pulumi:"tags"`
Uri string `pulumi:"uri"`
}
// The set of arguments for constructing a EventStream resource.
type EventStreamArgs struct {
// The unique name of the domain.
DomainName pulumi.StringInput
// The name of the event stream.
EventStreamName pulumi.StringPtrInput
// The tags used to organize, track, or control access for this resource.
Tags aws.TagArrayInput
Uri pulumi.StringInput
}
func (EventStreamArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventStreamArgs)(nil)).Elem()
}
type EventStreamInput interface {
pulumi.Input
ToEventStreamOutput() EventStreamOutput
ToEventStreamOutputWithContext(ctx context.Context) EventStreamOutput
}
func (*EventStream) ElementType() reflect.Type {
return reflect.TypeOf((**EventStream)(nil)).Elem()
}
func (i *EventStream) ToEventStreamOutput() EventStreamOutput {
return i.ToEventStreamOutputWithContext(context.Background())
}
func (i *EventStream) ToEventStreamOutputWithContext(ctx context.Context) EventStreamOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventStreamOutput)
}
type EventStreamOutput struct{ *pulumi.OutputState }
func (EventStreamOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventStream)(nil)).Elem()
}
func (o EventStreamOutput) ToEventStreamOutput() EventStreamOutput {
return o
}
func (o EventStreamOutput) ToEventStreamOutputWithContext(ctx context.Context) EventStreamOutput {
return o
}
// The timestamp of when the export was created.
func (o EventStreamOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *EventStream) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Details regarding the Kinesis stream.
func (o EventStreamOutput) DestinationDetails() DestinationDetailsPropertiesOutput {
return o.ApplyT(func(v *EventStream) DestinationDetailsPropertiesOutput { return v.DestinationDetails }).(DestinationDetailsPropertiesOutput)
}
// The unique name of the domain.
func (o EventStreamOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v *EventStream) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput)
}
// A unique identifier for the event stream.
func (o EventStreamOutput) EventStreamArn() pulumi.StringOutput {
return o.ApplyT(func(v *EventStream) pulumi.StringOutput { return v.EventStreamArn }).(pulumi.StringOutput)
}
// The name of the event stream.
func (o EventStreamOutput) EventStreamName() pulumi.StringOutput {
return o.ApplyT(func(v *EventStream) pulumi.StringOutput { return v.EventStreamName }).(pulumi.StringOutput)
}
// The operational state of destination stream for export.
func (o EventStreamOutput) State() EventStreamStateEnumOutput {
return o.ApplyT(func(v *EventStream) EventStreamStateEnumOutput { return v.State }).(EventStreamStateEnumOutput)
}
// The tags used to organize, track, or control access for this resource.
func (o EventStreamOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *EventStream) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func (o EventStreamOutput) Uri() pulumi.StringOutput {
return o.ApplyT(func(v *EventStream) pulumi.StringOutput { return v.Uri }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EventStreamInput)(nil)).Elem(), &EventStream{})
pulumi.RegisterOutputType(EventStreamOutput{})
}