generated from pulumi/pulumi-tf-provider-boilerplate
/
padRuleAttachment.go
300 lines (250 loc) · 10.2 KB
/
padRuleAttachment.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
// 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 css
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a resource to create a css padRuleAttachment
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Css"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := Css.NewPadRuleAttachment(ctx, "padRuleAttachment", &Css.PadRuleAttachmentArgs{
// AppName: pulumi.String("qqq"),
// DomainName: pulumi.String("177154.push.tlivecloud.com"),
// StreamName: pulumi.String("ppp"),
// TemplateId: pulumi.Int(17067),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// css pad_rule_attachment can be imported using the id, e.g.
//
// ```sh
// $ pulumi import tencentcloud:Css/padRuleAttachment:PadRuleAttachment pad_rule_attachment templateId#domainName
// ```
type PadRuleAttachment struct {
pulumi.CustomResourceState
// Push path, must same with play path, default is live.
AppName pulumi.StringPtrOutput `pulumi:"appName"`
// Push domain.
DomainName pulumi.StringOutput `pulumi:"domainName"`
// Stream name.
StreamName pulumi.StringPtrOutput `pulumi:"streamName"`
// Template id.
TemplateId pulumi.IntOutput `pulumi:"templateId"`
}
// NewPadRuleAttachment registers a new resource with the given unique name, arguments, and options.
func NewPadRuleAttachment(ctx *pulumi.Context,
name string, args *PadRuleAttachmentArgs, opts ...pulumi.ResourceOption) (*PadRuleAttachment, 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.TemplateId == nil {
return nil, errors.New("invalid value for required argument 'TemplateId'")
}
opts = pkgResourceDefaultOpts(opts)
var resource PadRuleAttachment
err := ctx.RegisterResource("tencentcloud:Css/padRuleAttachment:PadRuleAttachment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPadRuleAttachment gets an existing PadRuleAttachment 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 GetPadRuleAttachment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PadRuleAttachmentState, opts ...pulumi.ResourceOption) (*PadRuleAttachment, error) {
var resource PadRuleAttachment
err := ctx.ReadResource("tencentcloud:Css/padRuleAttachment:PadRuleAttachment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PadRuleAttachment resources.
type padRuleAttachmentState struct {
// Push path, must same with play path, default is live.
AppName *string `pulumi:"appName"`
// Push domain.
DomainName *string `pulumi:"domainName"`
// Stream name.
StreamName *string `pulumi:"streamName"`
// Template id.
TemplateId *int `pulumi:"templateId"`
}
type PadRuleAttachmentState struct {
// Push path, must same with play path, default is live.
AppName pulumi.StringPtrInput
// Push domain.
DomainName pulumi.StringPtrInput
// Stream name.
StreamName pulumi.StringPtrInput
// Template id.
TemplateId pulumi.IntPtrInput
}
func (PadRuleAttachmentState) ElementType() reflect.Type {
return reflect.TypeOf((*padRuleAttachmentState)(nil)).Elem()
}
type padRuleAttachmentArgs struct {
// Push path, must same with play path, default is live.
AppName *string `pulumi:"appName"`
// Push domain.
DomainName string `pulumi:"domainName"`
// Stream name.
StreamName *string `pulumi:"streamName"`
// Template id.
TemplateId int `pulumi:"templateId"`
}
// The set of arguments for constructing a PadRuleAttachment resource.
type PadRuleAttachmentArgs struct {
// Push path, must same with play path, default is live.
AppName pulumi.StringPtrInput
// Push domain.
DomainName pulumi.StringInput
// Stream name.
StreamName pulumi.StringPtrInput
// Template id.
TemplateId pulumi.IntInput
}
func (PadRuleAttachmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*padRuleAttachmentArgs)(nil)).Elem()
}
type PadRuleAttachmentInput interface {
pulumi.Input
ToPadRuleAttachmentOutput() PadRuleAttachmentOutput
ToPadRuleAttachmentOutputWithContext(ctx context.Context) PadRuleAttachmentOutput
}
func (*PadRuleAttachment) ElementType() reflect.Type {
return reflect.TypeOf((**PadRuleAttachment)(nil)).Elem()
}
func (i *PadRuleAttachment) ToPadRuleAttachmentOutput() PadRuleAttachmentOutput {
return i.ToPadRuleAttachmentOutputWithContext(context.Background())
}
func (i *PadRuleAttachment) ToPadRuleAttachmentOutputWithContext(ctx context.Context) PadRuleAttachmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(PadRuleAttachmentOutput)
}
// PadRuleAttachmentArrayInput is an input type that accepts PadRuleAttachmentArray and PadRuleAttachmentArrayOutput values.
// You can construct a concrete instance of `PadRuleAttachmentArrayInput` via:
//
// PadRuleAttachmentArray{ PadRuleAttachmentArgs{...} }
type PadRuleAttachmentArrayInput interface {
pulumi.Input
ToPadRuleAttachmentArrayOutput() PadRuleAttachmentArrayOutput
ToPadRuleAttachmentArrayOutputWithContext(context.Context) PadRuleAttachmentArrayOutput
}
type PadRuleAttachmentArray []PadRuleAttachmentInput
func (PadRuleAttachmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PadRuleAttachment)(nil)).Elem()
}
func (i PadRuleAttachmentArray) ToPadRuleAttachmentArrayOutput() PadRuleAttachmentArrayOutput {
return i.ToPadRuleAttachmentArrayOutputWithContext(context.Background())
}
func (i PadRuleAttachmentArray) ToPadRuleAttachmentArrayOutputWithContext(ctx context.Context) PadRuleAttachmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PadRuleAttachmentArrayOutput)
}
// PadRuleAttachmentMapInput is an input type that accepts PadRuleAttachmentMap and PadRuleAttachmentMapOutput values.
// You can construct a concrete instance of `PadRuleAttachmentMapInput` via:
//
// PadRuleAttachmentMap{ "key": PadRuleAttachmentArgs{...} }
type PadRuleAttachmentMapInput interface {
pulumi.Input
ToPadRuleAttachmentMapOutput() PadRuleAttachmentMapOutput
ToPadRuleAttachmentMapOutputWithContext(context.Context) PadRuleAttachmentMapOutput
}
type PadRuleAttachmentMap map[string]PadRuleAttachmentInput
func (PadRuleAttachmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PadRuleAttachment)(nil)).Elem()
}
func (i PadRuleAttachmentMap) ToPadRuleAttachmentMapOutput() PadRuleAttachmentMapOutput {
return i.ToPadRuleAttachmentMapOutputWithContext(context.Background())
}
func (i PadRuleAttachmentMap) ToPadRuleAttachmentMapOutputWithContext(ctx context.Context) PadRuleAttachmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PadRuleAttachmentMapOutput)
}
type PadRuleAttachmentOutput struct{ *pulumi.OutputState }
func (PadRuleAttachmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PadRuleAttachment)(nil)).Elem()
}
func (o PadRuleAttachmentOutput) ToPadRuleAttachmentOutput() PadRuleAttachmentOutput {
return o
}
func (o PadRuleAttachmentOutput) ToPadRuleAttachmentOutputWithContext(ctx context.Context) PadRuleAttachmentOutput {
return o
}
// Push path, must same with play path, default is live.
func (o PadRuleAttachmentOutput) AppName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *PadRuleAttachment) pulumi.StringPtrOutput { return v.AppName }).(pulumi.StringPtrOutput)
}
// Push domain.
func (o PadRuleAttachmentOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v *PadRuleAttachment) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput)
}
// Stream name.
func (o PadRuleAttachmentOutput) StreamName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *PadRuleAttachment) pulumi.StringPtrOutput { return v.StreamName }).(pulumi.StringPtrOutput)
}
// Template id.
func (o PadRuleAttachmentOutput) TemplateId() pulumi.IntOutput {
return o.ApplyT(func(v *PadRuleAttachment) pulumi.IntOutput { return v.TemplateId }).(pulumi.IntOutput)
}
type PadRuleAttachmentArrayOutput struct{ *pulumi.OutputState }
func (PadRuleAttachmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PadRuleAttachment)(nil)).Elem()
}
func (o PadRuleAttachmentArrayOutput) ToPadRuleAttachmentArrayOutput() PadRuleAttachmentArrayOutput {
return o
}
func (o PadRuleAttachmentArrayOutput) ToPadRuleAttachmentArrayOutputWithContext(ctx context.Context) PadRuleAttachmentArrayOutput {
return o
}
func (o PadRuleAttachmentArrayOutput) Index(i pulumi.IntInput) PadRuleAttachmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PadRuleAttachment {
return vs[0].([]*PadRuleAttachment)[vs[1].(int)]
}).(PadRuleAttachmentOutput)
}
type PadRuleAttachmentMapOutput struct{ *pulumi.OutputState }
func (PadRuleAttachmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PadRuleAttachment)(nil)).Elem()
}
func (o PadRuleAttachmentMapOutput) ToPadRuleAttachmentMapOutput() PadRuleAttachmentMapOutput {
return o
}
func (o PadRuleAttachmentMapOutput) ToPadRuleAttachmentMapOutputWithContext(ctx context.Context) PadRuleAttachmentMapOutput {
return o
}
func (o PadRuleAttachmentMapOutput) MapIndex(k pulumi.StringInput) PadRuleAttachmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PadRuleAttachment {
return vs[0].(map[string]*PadRuleAttachment)[vs[1].(string)]
}).(PadRuleAttachmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PadRuleAttachmentInput)(nil)).Elem(), &PadRuleAttachment{})
pulumi.RegisterInputType(reflect.TypeOf((*PadRuleAttachmentArrayInput)(nil)).Elem(), PadRuleAttachmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PadRuleAttachmentMapInput)(nil)).Elem(), PadRuleAttachmentMap{})
pulumi.RegisterOutputType(PadRuleAttachmentOutput{})
pulumi.RegisterOutputType(PadRuleAttachmentArrayOutput{})
pulumi.RegisterOutputType(PadRuleAttachmentMapOutput{})
}