generated from pulumi/pulumi-tf-provider-boilerplate
/
alertChannel.go
317 lines (262 loc) · 11.9 KB
/
alertChannel.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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package pts
import (
"context"
"reflect"
"errors"
"github.com/mergtil/pulumi-tencentcloud/sdk/go/tencentcloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type AlertChannel struct {
pulumi.CustomResourceState
// AMP Consumer ID.
AmpConsumerId pulumi.StringPtrOutput `pulumi:"ampConsumerId"`
// App ID Note: this field may return null, indicating that a valid value cannot be obtained.
AppId pulumi.IntOutput `pulumi:"appId"`
// Creation time Note: this field may return null, indicating that a valid value cannot be obtained.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// Notice ID.
NoticeId pulumi.StringOutput `pulumi:"noticeId"`
// Project ID.
ProjectId pulumi.StringOutput `pulumi:"projectId"`
// Status Note: this field may return null, indicating that a valid value cannot be obtained.
Status pulumi.IntOutput `pulumi:"status"`
// Sub-user ID Note: this field may return null, indicating that a valid value cannot be obtained.
SubAccountUin pulumi.StringOutput `pulumi:"subAccountUin"`
// User ID Note: this field may return null, indicating that a valid value cannot be obtained.
Uin pulumi.StringOutput `pulumi:"uin"`
// Update time Note: this field may return null, indicating that a valid value cannot be obtained.
UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"`
}
// NewAlertChannel registers a new resource with the given unique name, arguments, and options.
func NewAlertChannel(ctx *pulumi.Context,
name string, args *AlertChannelArgs, opts ...pulumi.ResourceOption) (*AlertChannel, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NoticeId == nil {
return nil, errors.New("invalid value for required argument 'NoticeId'")
}
if args.ProjectId == nil {
return nil, errors.New("invalid value for required argument 'ProjectId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AlertChannel
err := ctx.RegisterResource("tencentcloud:Pts/alertChannel:AlertChannel", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAlertChannel gets an existing AlertChannel 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 GetAlertChannel(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AlertChannelState, opts ...pulumi.ResourceOption) (*AlertChannel, error) {
var resource AlertChannel
err := ctx.ReadResource("tencentcloud:Pts/alertChannel:AlertChannel", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AlertChannel resources.
type alertChannelState struct {
// AMP Consumer ID.
AmpConsumerId *string `pulumi:"ampConsumerId"`
// App ID Note: this field may return null, indicating that a valid value cannot be obtained.
AppId *int `pulumi:"appId"`
// Creation time Note: this field may return null, indicating that a valid value cannot be obtained.
CreatedAt *string `pulumi:"createdAt"`
// Notice ID.
NoticeId *string `pulumi:"noticeId"`
// Project ID.
ProjectId *string `pulumi:"projectId"`
// Status Note: this field may return null, indicating that a valid value cannot be obtained.
Status *int `pulumi:"status"`
// Sub-user ID Note: this field may return null, indicating that a valid value cannot be obtained.
SubAccountUin *string `pulumi:"subAccountUin"`
// User ID Note: this field may return null, indicating that a valid value cannot be obtained.
Uin *string `pulumi:"uin"`
// Update time Note: this field may return null, indicating that a valid value cannot be obtained.
UpdatedAt *string `pulumi:"updatedAt"`
}
type AlertChannelState struct {
// AMP Consumer ID.
AmpConsumerId pulumi.StringPtrInput
// App ID Note: this field may return null, indicating that a valid value cannot be obtained.
AppId pulumi.IntPtrInput
// Creation time Note: this field may return null, indicating that a valid value cannot be obtained.
CreatedAt pulumi.StringPtrInput
// Notice ID.
NoticeId pulumi.StringPtrInput
// Project ID.
ProjectId pulumi.StringPtrInput
// Status Note: this field may return null, indicating that a valid value cannot be obtained.
Status pulumi.IntPtrInput
// Sub-user ID Note: this field may return null, indicating that a valid value cannot be obtained.
SubAccountUin pulumi.StringPtrInput
// User ID Note: this field may return null, indicating that a valid value cannot be obtained.
Uin pulumi.StringPtrInput
// Update time Note: this field may return null, indicating that a valid value cannot be obtained.
UpdatedAt pulumi.StringPtrInput
}
func (AlertChannelState) ElementType() reflect.Type {
return reflect.TypeOf((*alertChannelState)(nil)).Elem()
}
type alertChannelArgs struct {
// AMP Consumer ID.
AmpConsumerId *string `pulumi:"ampConsumerId"`
// Notice ID.
NoticeId string `pulumi:"noticeId"`
// Project ID.
ProjectId string `pulumi:"projectId"`
}
// The set of arguments for constructing a AlertChannel resource.
type AlertChannelArgs struct {
// AMP Consumer ID.
AmpConsumerId pulumi.StringPtrInput
// Notice ID.
NoticeId pulumi.StringInput
// Project ID.
ProjectId pulumi.StringInput
}
func (AlertChannelArgs) ElementType() reflect.Type {
return reflect.TypeOf((*alertChannelArgs)(nil)).Elem()
}
type AlertChannelInput interface {
pulumi.Input
ToAlertChannelOutput() AlertChannelOutput
ToAlertChannelOutputWithContext(ctx context.Context) AlertChannelOutput
}
func (*AlertChannel) ElementType() reflect.Type {
return reflect.TypeOf((**AlertChannel)(nil)).Elem()
}
func (i *AlertChannel) ToAlertChannelOutput() AlertChannelOutput {
return i.ToAlertChannelOutputWithContext(context.Background())
}
func (i *AlertChannel) ToAlertChannelOutputWithContext(ctx context.Context) AlertChannelOutput {
return pulumi.ToOutputWithContext(ctx, i).(AlertChannelOutput)
}
// AlertChannelArrayInput is an input type that accepts AlertChannelArray and AlertChannelArrayOutput values.
// You can construct a concrete instance of `AlertChannelArrayInput` via:
//
// AlertChannelArray{ AlertChannelArgs{...} }
type AlertChannelArrayInput interface {
pulumi.Input
ToAlertChannelArrayOutput() AlertChannelArrayOutput
ToAlertChannelArrayOutputWithContext(context.Context) AlertChannelArrayOutput
}
type AlertChannelArray []AlertChannelInput
func (AlertChannelArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AlertChannel)(nil)).Elem()
}
func (i AlertChannelArray) ToAlertChannelArrayOutput() AlertChannelArrayOutput {
return i.ToAlertChannelArrayOutputWithContext(context.Background())
}
func (i AlertChannelArray) ToAlertChannelArrayOutputWithContext(ctx context.Context) AlertChannelArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AlertChannelArrayOutput)
}
// AlertChannelMapInput is an input type that accepts AlertChannelMap and AlertChannelMapOutput values.
// You can construct a concrete instance of `AlertChannelMapInput` via:
//
// AlertChannelMap{ "key": AlertChannelArgs{...} }
type AlertChannelMapInput interface {
pulumi.Input
ToAlertChannelMapOutput() AlertChannelMapOutput
ToAlertChannelMapOutputWithContext(context.Context) AlertChannelMapOutput
}
type AlertChannelMap map[string]AlertChannelInput
func (AlertChannelMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AlertChannel)(nil)).Elem()
}
func (i AlertChannelMap) ToAlertChannelMapOutput() AlertChannelMapOutput {
return i.ToAlertChannelMapOutputWithContext(context.Background())
}
func (i AlertChannelMap) ToAlertChannelMapOutputWithContext(ctx context.Context) AlertChannelMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AlertChannelMapOutput)
}
type AlertChannelOutput struct{ *pulumi.OutputState }
func (AlertChannelOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AlertChannel)(nil)).Elem()
}
func (o AlertChannelOutput) ToAlertChannelOutput() AlertChannelOutput {
return o
}
func (o AlertChannelOutput) ToAlertChannelOutputWithContext(ctx context.Context) AlertChannelOutput {
return o
}
// AMP Consumer ID.
func (o AlertChannelOutput) AmpConsumerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.StringPtrOutput { return v.AmpConsumerId }).(pulumi.StringPtrOutput)
}
// App ID Note: this field may return null, indicating that a valid value cannot be obtained.
func (o AlertChannelOutput) AppId() pulumi.IntOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.IntOutput { return v.AppId }).(pulumi.IntOutput)
}
// Creation time Note: this field may return null, indicating that a valid value cannot be obtained.
func (o AlertChannelOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput)
}
// Notice ID.
func (o AlertChannelOutput) NoticeId() pulumi.StringOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.StringOutput { return v.NoticeId }).(pulumi.StringOutput)
}
// Project ID.
func (o AlertChannelOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.StringOutput { return v.ProjectId }).(pulumi.StringOutput)
}
// Status Note: this field may return null, indicating that a valid value cannot be obtained.
func (o AlertChannelOutput) Status() pulumi.IntOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.IntOutput { return v.Status }).(pulumi.IntOutput)
}
// Sub-user ID Note: this field may return null, indicating that a valid value cannot be obtained.
func (o AlertChannelOutput) SubAccountUin() pulumi.StringOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.StringOutput { return v.SubAccountUin }).(pulumi.StringOutput)
}
// User ID Note: this field may return null, indicating that a valid value cannot be obtained.
func (o AlertChannelOutput) Uin() pulumi.StringOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.StringOutput { return v.Uin }).(pulumi.StringOutput)
}
// Update time Note: this field may return null, indicating that a valid value cannot be obtained.
func (o AlertChannelOutput) UpdatedAt() pulumi.StringOutput {
return o.ApplyT(func(v *AlertChannel) pulumi.StringOutput { return v.UpdatedAt }).(pulumi.StringOutput)
}
type AlertChannelArrayOutput struct{ *pulumi.OutputState }
func (AlertChannelArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AlertChannel)(nil)).Elem()
}
func (o AlertChannelArrayOutput) ToAlertChannelArrayOutput() AlertChannelArrayOutput {
return o
}
func (o AlertChannelArrayOutput) ToAlertChannelArrayOutputWithContext(ctx context.Context) AlertChannelArrayOutput {
return o
}
func (o AlertChannelArrayOutput) Index(i pulumi.IntInput) AlertChannelOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertChannel {
return vs[0].([]*AlertChannel)[vs[1].(int)]
}).(AlertChannelOutput)
}
type AlertChannelMapOutput struct{ *pulumi.OutputState }
func (AlertChannelMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AlertChannel)(nil)).Elem()
}
func (o AlertChannelMapOutput) ToAlertChannelMapOutput() AlertChannelMapOutput {
return o
}
func (o AlertChannelMapOutput) ToAlertChannelMapOutputWithContext(ctx context.Context) AlertChannelMapOutput {
return o
}
func (o AlertChannelMapOutput) MapIndex(k pulumi.StringInput) AlertChannelOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertChannel {
return vs[0].(map[string]*AlertChannel)[vs[1].(string)]
}).(AlertChannelOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AlertChannelInput)(nil)).Elem(), &AlertChannel{})
pulumi.RegisterInputType(reflect.TypeOf((*AlertChannelArrayInput)(nil)).Elem(), AlertChannelArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AlertChannelMapInput)(nil)).Elem(), AlertChannelMap{})
pulumi.RegisterOutputType(AlertChannelOutput{})
pulumi.RegisterOutputType(AlertChannelArrayOutput{})
pulumi.RegisterOutputType(AlertChannelMapOutput{})
}