generated from pulumi/pulumi-tf-provider-boilerplate
/
streamDistributionChannel.go
398 lines (341 loc) · 18.5 KB
/
streamDistributionChannel.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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
// 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 mediaservices
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-oci/sdk/go/oci/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// This resource provides the Stream Distribution Channel resource in Oracle Cloud Infrastructure Media Services service.
//
// Creates a new Stream Distribution Channel.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-oci/sdk/go/oci/MediaServices"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := MediaServices.NewStreamDistributionChannel(ctx, "test_stream_distribution_channel", &MediaServices.StreamDistributionChannelArgs{
// CompartmentId: pulumi.Any(compartmentId),
// DisplayName: pulumi.Any(streamDistributionChannelDisplayName),
// DefinedTags: pulumi.Map{
// "foo-namespace.bar-key": pulumi.Any("value"),
// },
// FreeformTags: pulumi.Map{
// "bar-key": pulumi.Any("value"),
// },
// Locks: mediaservices.StreamDistributionChannelLockArray{
// &mediaservices.StreamDistributionChannelLockArgs{
// CompartmentId: pulumi.Any(compartmentId),
// Type: pulumi.Any(streamDistributionChannelLocksType),
// Message: pulumi.Any(streamDistributionChannelLocksMessage),
// RelatedResourceId: pulumi.Any(testResource.Id),
// TimeCreated: pulumi.Any(streamDistributionChannelLocksTimeCreated),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// StreamDistributionChannels can be imported using the `id`, e.g.
//
// ```sh
// $ pulumi import oci:MediaServices/streamDistributionChannel:StreamDistributionChannel test_stream_distribution_channel "id"
// ```
type StreamDistributionChannel struct {
pulumi.CustomResourceState
// (Updatable) The compartment ID of the lock.
CompartmentId pulumi.StringOutput `pulumi:"compartmentId"`
// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
DefinedTags pulumi.MapOutput `pulumi:"definedTags"`
// (Updatable) Stream Distribution Channel display name. Avoid entering confidential information.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// Unique domain name of the Distribution Channel.
DomainName pulumi.StringOutput `pulumi:"domainName"`
// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
FreeformTags pulumi.MapOutput `pulumi:"freeformTags"`
IsLockOverride pulumi.BoolOutput `pulumi:"isLockOverride"`
// Locks associated with this resource.
Locks StreamDistributionChannelLockArrayOutput `pulumi:"locks"`
// The current state of the Stream Distribution Channel.
State pulumi.StringOutput `pulumi:"state"`
// Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
SystemTags pulumi.MapOutput `pulumi:"systemTags"`
// When the lock was created.
TimeCreated pulumi.StringOutput `pulumi:"timeCreated"`
// The time when the Stream Distribution Channel was updated. An RFC3339 formatted datetime string.
TimeUpdated pulumi.StringOutput `pulumi:"timeUpdated"`
}
// NewStreamDistributionChannel registers a new resource with the given unique name, arguments, and options.
func NewStreamDistributionChannel(ctx *pulumi.Context,
name string, args *StreamDistributionChannelArgs, opts ...pulumi.ResourceOption) (*StreamDistributionChannel, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CompartmentId == nil {
return nil, errors.New("invalid value for required argument 'CompartmentId'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource StreamDistributionChannel
err := ctx.RegisterResource("oci:MediaServices/streamDistributionChannel:StreamDistributionChannel", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStreamDistributionChannel gets an existing StreamDistributionChannel 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 GetStreamDistributionChannel(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StreamDistributionChannelState, opts ...pulumi.ResourceOption) (*StreamDistributionChannel, error) {
var resource StreamDistributionChannel
err := ctx.ReadResource("oci:MediaServices/streamDistributionChannel:StreamDistributionChannel", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StreamDistributionChannel resources.
type streamDistributionChannelState struct {
// (Updatable) The compartment ID of the lock.
CompartmentId *string `pulumi:"compartmentId"`
// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// (Updatable) Stream Distribution Channel display name. Avoid entering confidential information.
DisplayName *string `pulumi:"displayName"`
// Unique domain name of the Distribution Channel.
DomainName *string `pulumi:"domainName"`
// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
IsLockOverride *bool `pulumi:"isLockOverride"`
// Locks associated with this resource.
Locks []StreamDistributionChannelLock `pulumi:"locks"`
// The current state of the Stream Distribution Channel.
State *string `pulumi:"state"`
// Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
SystemTags map[string]interface{} `pulumi:"systemTags"`
// When the lock was created.
TimeCreated *string `pulumi:"timeCreated"`
// The time when the Stream Distribution Channel was updated. An RFC3339 formatted datetime string.
TimeUpdated *string `pulumi:"timeUpdated"`
}
type StreamDistributionChannelState struct {
// (Updatable) The compartment ID of the lock.
CompartmentId pulumi.StringPtrInput
// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
DefinedTags pulumi.MapInput
// (Updatable) Stream Distribution Channel display name. Avoid entering confidential information.
DisplayName pulumi.StringPtrInput
// Unique domain name of the Distribution Channel.
DomainName pulumi.StringPtrInput
// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
FreeformTags pulumi.MapInput
IsLockOverride pulumi.BoolPtrInput
// Locks associated with this resource.
Locks StreamDistributionChannelLockArrayInput
// The current state of the Stream Distribution Channel.
State pulumi.StringPtrInput
// Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
SystemTags pulumi.MapInput
// When the lock was created.
TimeCreated pulumi.StringPtrInput
// The time when the Stream Distribution Channel was updated. An RFC3339 formatted datetime string.
TimeUpdated pulumi.StringPtrInput
}
func (StreamDistributionChannelState) ElementType() reflect.Type {
return reflect.TypeOf((*streamDistributionChannelState)(nil)).Elem()
}
type streamDistributionChannelArgs struct {
// (Updatable) The compartment ID of the lock.
CompartmentId string `pulumi:"compartmentId"`
// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
DefinedTags map[string]interface{} `pulumi:"definedTags"`
// (Updatable) Stream Distribution Channel display name. Avoid entering confidential information.
DisplayName string `pulumi:"displayName"`
// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
FreeformTags map[string]interface{} `pulumi:"freeformTags"`
IsLockOverride *bool `pulumi:"isLockOverride"`
// Locks associated with this resource.
Locks []StreamDistributionChannelLock `pulumi:"locks"`
}
// The set of arguments for constructing a StreamDistributionChannel resource.
type StreamDistributionChannelArgs struct {
// (Updatable) The compartment ID of the lock.
CompartmentId pulumi.StringInput
// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
DefinedTags pulumi.MapInput
// (Updatable) Stream Distribution Channel display name. Avoid entering confidential information.
DisplayName pulumi.StringInput
// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
FreeformTags pulumi.MapInput
IsLockOverride pulumi.BoolPtrInput
// Locks associated with this resource.
Locks StreamDistributionChannelLockArrayInput
}
func (StreamDistributionChannelArgs) ElementType() reflect.Type {
return reflect.TypeOf((*streamDistributionChannelArgs)(nil)).Elem()
}
type StreamDistributionChannelInput interface {
pulumi.Input
ToStreamDistributionChannelOutput() StreamDistributionChannelOutput
ToStreamDistributionChannelOutputWithContext(ctx context.Context) StreamDistributionChannelOutput
}
func (*StreamDistributionChannel) ElementType() reflect.Type {
return reflect.TypeOf((**StreamDistributionChannel)(nil)).Elem()
}
func (i *StreamDistributionChannel) ToStreamDistributionChannelOutput() StreamDistributionChannelOutput {
return i.ToStreamDistributionChannelOutputWithContext(context.Background())
}
func (i *StreamDistributionChannel) ToStreamDistributionChannelOutputWithContext(ctx context.Context) StreamDistributionChannelOutput {
return pulumi.ToOutputWithContext(ctx, i).(StreamDistributionChannelOutput)
}
// StreamDistributionChannelArrayInput is an input type that accepts StreamDistributionChannelArray and StreamDistributionChannelArrayOutput values.
// You can construct a concrete instance of `StreamDistributionChannelArrayInput` via:
//
// StreamDistributionChannelArray{ StreamDistributionChannelArgs{...} }
type StreamDistributionChannelArrayInput interface {
pulumi.Input
ToStreamDistributionChannelArrayOutput() StreamDistributionChannelArrayOutput
ToStreamDistributionChannelArrayOutputWithContext(context.Context) StreamDistributionChannelArrayOutput
}
type StreamDistributionChannelArray []StreamDistributionChannelInput
func (StreamDistributionChannelArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StreamDistributionChannel)(nil)).Elem()
}
func (i StreamDistributionChannelArray) ToStreamDistributionChannelArrayOutput() StreamDistributionChannelArrayOutput {
return i.ToStreamDistributionChannelArrayOutputWithContext(context.Background())
}
func (i StreamDistributionChannelArray) ToStreamDistributionChannelArrayOutputWithContext(ctx context.Context) StreamDistributionChannelArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StreamDistributionChannelArrayOutput)
}
// StreamDistributionChannelMapInput is an input type that accepts StreamDistributionChannelMap and StreamDistributionChannelMapOutput values.
// You can construct a concrete instance of `StreamDistributionChannelMapInput` via:
//
// StreamDistributionChannelMap{ "key": StreamDistributionChannelArgs{...} }
type StreamDistributionChannelMapInput interface {
pulumi.Input
ToStreamDistributionChannelMapOutput() StreamDistributionChannelMapOutput
ToStreamDistributionChannelMapOutputWithContext(context.Context) StreamDistributionChannelMapOutput
}
type StreamDistributionChannelMap map[string]StreamDistributionChannelInput
func (StreamDistributionChannelMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StreamDistributionChannel)(nil)).Elem()
}
func (i StreamDistributionChannelMap) ToStreamDistributionChannelMapOutput() StreamDistributionChannelMapOutput {
return i.ToStreamDistributionChannelMapOutputWithContext(context.Background())
}
func (i StreamDistributionChannelMap) ToStreamDistributionChannelMapOutputWithContext(ctx context.Context) StreamDistributionChannelMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StreamDistributionChannelMapOutput)
}
type StreamDistributionChannelOutput struct{ *pulumi.OutputState }
func (StreamDistributionChannelOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StreamDistributionChannel)(nil)).Elem()
}
func (o StreamDistributionChannelOutput) ToStreamDistributionChannelOutput() StreamDistributionChannelOutput {
return o
}
func (o StreamDistributionChannelOutput) ToStreamDistributionChannelOutputWithContext(ctx context.Context) StreamDistributionChannelOutput {
return o
}
// (Updatable) The compartment ID of the lock.
func (o StreamDistributionChannelOutput) CompartmentId() pulumi.StringOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.StringOutput { return v.CompartmentId }).(pulumi.StringOutput)
}
// (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`
func (o StreamDistributionChannelOutput) DefinedTags() pulumi.MapOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.MapOutput { return v.DefinedTags }).(pulumi.MapOutput)
}
// (Updatable) Stream Distribution Channel display name. Avoid entering confidential information.
func (o StreamDistributionChannelOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// Unique domain name of the Distribution Channel.
func (o StreamDistributionChannelOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput)
}
// (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
func (o StreamDistributionChannelOutput) FreeformTags() pulumi.MapOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.MapOutput { return v.FreeformTags }).(pulumi.MapOutput)
}
func (o StreamDistributionChannelOutput) IsLockOverride() pulumi.BoolOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.BoolOutput { return v.IsLockOverride }).(pulumi.BoolOutput)
}
// Locks associated with this resource.
func (o StreamDistributionChannelOutput) Locks() StreamDistributionChannelLockArrayOutput {
return o.ApplyT(func(v *StreamDistributionChannel) StreamDistributionChannelLockArrayOutput { return v.Locks }).(StreamDistributionChannelLockArrayOutput)
}
// The current state of the Stream Distribution Channel.
func (o StreamDistributionChannelOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`
func (o StreamDistributionChannelOutput) SystemTags() pulumi.MapOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.MapOutput { return v.SystemTags }).(pulumi.MapOutput)
}
// When the lock was created.
func (o StreamDistributionChannelOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.StringOutput { return v.TimeCreated }).(pulumi.StringOutput)
}
// The time when the Stream Distribution Channel was updated. An RFC3339 formatted datetime string.
func (o StreamDistributionChannelOutput) TimeUpdated() pulumi.StringOutput {
return o.ApplyT(func(v *StreamDistributionChannel) pulumi.StringOutput { return v.TimeUpdated }).(pulumi.StringOutput)
}
type StreamDistributionChannelArrayOutput struct{ *pulumi.OutputState }
func (StreamDistributionChannelArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StreamDistributionChannel)(nil)).Elem()
}
func (o StreamDistributionChannelArrayOutput) ToStreamDistributionChannelArrayOutput() StreamDistributionChannelArrayOutput {
return o
}
func (o StreamDistributionChannelArrayOutput) ToStreamDistributionChannelArrayOutputWithContext(ctx context.Context) StreamDistributionChannelArrayOutput {
return o
}
func (o StreamDistributionChannelArrayOutput) Index(i pulumi.IntInput) StreamDistributionChannelOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StreamDistributionChannel {
return vs[0].([]*StreamDistributionChannel)[vs[1].(int)]
}).(StreamDistributionChannelOutput)
}
type StreamDistributionChannelMapOutput struct{ *pulumi.OutputState }
func (StreamDistributionChannelMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StreamDistributionChannel)(nil)).Elem()
}
func (o StreamDistributionChannelMapOutput) ToStreamDistributionChannelMapOutput() StreamDistributionChannelMapOutput {
return o
}
func (o StreamDistributionChannelMapOutput) ToStreamDistributionChannelMapOutputWithContext(ctx context.Context) StreamDistributionChannelMapOutput {
return o
}
func (o StreamDistributionChannelMapOutput) MapIndex(k pulumi.StringInput) StreamDistributionChannelOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StreamDistributionChannel {
return vs[0].(map[string]*StreamDistributionChannel)[vs[1].(string)]
}).(StreamDistributionChannelOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StreamDistributionChannelInput)(nil)).Elem(), &StreamDistributionChannel{})
pulumi.RegisterInputType(reflect.TypeOf((*StreamDistributionChannelArrayInput)(nil)).Elem(), StreamDistributionChannelArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StreamDistributionChannelMapInput)(nil)).Elem(), StreamDistributionChannelMap{})
pulumi.RegisterOutputType(StreamDistributionChannelOutput{})
pulumi.RegisterOutputType(StreamDistributionChannelArrayOutput{})
pulumi.RegisterOutputType(StreamDistributionChannelMapOutput{})
}