This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
liveOutput.go
254 lines (230 loc) · 8.96 KB
/
liveOutput.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
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20180701
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// The Live Output.
type LiveOutput struct {
pulumi.CustomResourceState
// ISO 8601 timespan duration of the archive window length. This is duration that customer want to retain the recorded content.
ArchiveWindowLength pulumi.StringOutput `pulumi:"archiveWindowLength"`
// The asset name.
AssetName pulumi.StringOutput `pulumi:"assetName"`
// The exact time the Live Output was created.
Created pulumi.StringOutput `pulumi:"created"`
// The description of the Live Output.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The HLS configuration.
Hls HlsResponsePtrOutput `pulumi:"hls"`
// The exact time the Live Output was last modified.
LastModified pulumi.StringOutput `pulumi:"lastModified"`
// The manifest file name. If not provided, the service will generate one automatically.
ManifestName pulumi.StringPtrOutput `pulumi:"manifestName"`
// The name of the resource.
Name pulumi.StringOutput `pulumi:"name"`
// The output snapshot time.
OutputSnapTime pulumi.Float64PtrOutput `pulumi:"outputSnapTime"`
// The provisioning state of the Live Output.
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// The resource state of the Live Output.
ResourceState pulumi.StringOutput `pulumi:"resourceState"`
// The type of the resource.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewLiveOutput registers a new resource with the given unique name, arguments, and options.
func NewLiveOutput(ctx *pulumi.Context,
name string, args *LiveOutputArgs, opts ...pulumi.ResourceOption) (*LiveOutput, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccountName == nil {
return nil, errors.New("invalid value for required argument 'AccountName'")
}
if args.ArchiveWindowLength == nil {
return nil, errors.New("invalid value for required argument 'ArchiveWindowLength'")
}
if args.AssetName == nil {
return nil, errors.New("invalid value for required argument 'AssetName'")
}
if args.LiveEventName == nil {
return nil, errors.New("invalid value for required argument 'LiveEventName'")
}
if args.LiveOutputName == nil {
return nil, errors.New("invalid value for required argument 'LiveOutputName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:media/latest:LiveOutput"),
},
{
Type: pulumi.String("azure-nextgen:media/v20180330preview:LiveOutput"),
},
{
Type: pulumi.String("azure-nextgen:media/v20180601preview:LiveOutput"),
},
{
Type: pulumi.String("azure-nextgen:media/v20190501preview:LiveOutput"),
},
{
Type: pulumi.String("azure-nextgen:media/v20200501:LiveOutput"),
},
})
opts = append(opts, aliases)
var resource LiveOutput
err := ctx.RegisterResource("azure-nextgen:media/v20180701:LiveOutput", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLiveOutput gets an existing LiveOutput 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 GetLiveOutput(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LiveOutputState, opts ...pulumi.ResourceOption) (*LiveOutput, error) {
var resource LiveOutput
err := ctx.ReadResource("azure-nextgen:media/v20180701:LiveOutput", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LiveOutput resources.
type liveOutputState struct {
// ISO 8601 timespan duration of the archive window length. This is duration that customer want to retain the recorded content.
ArchiveWindowLength *string `pulumi:"archiveWindowLength"`
// The asset name.
AssetName *string `pulumi:"assetName"`
// The exact time the Live Output was created.
Created *string `pulumi:"created"`
// The description of the Live Output.
Description *string `pulumi:"description"`
// The HLS configuration.
Hls *HlsResponse `pulumi:"hls"`
// The exact time the Live Output was last modified.
LastModified *string `pulumi:"lastModified"`
// The manifest file name. If not provided, the service will generate one automatically.
ManifestName *string `pulumi:"manifestName"`
// The name of the resource.
Name *string `pulumi:"name"`
// The output snapshot time.
OutputSnapTime *float64 `pulumi:"outputSnapTime"`
// The provisioning state of the Live Output.
ProvisioningState *string `pulumi:"provisioningState"`
// The resource state of the Live Output.
ResourceState *string `pulumi:"resourceState"`
// The type of the resource.
Type *string `pulumi:"type"`
}
type LiveOutputState struct {
// ISO 8601 timespan duration of the archive window length. This is duration that customer want to retain the recorded content.
ArchiveWindowLength pulumi.StringPtrInput
// The asset name.
AssetName pulumi.StringPtrInput
// The exact time the Live Output was created.
Created pulumi.StringPtrInput
// The description of the Live Output.
Description pulumi.StringPtrInput
// The HLS configuration.
Hls HlsResponsePtrInput
// The exact time the Live Output was last modified.
LastModified pulumi.StringPtrInput
// The manifest file name. If not provided, the service will generate one automatically.
ManifestName pulumi.StringPtrInput
// The name of the resource.
Name pulumi.StringPtrInput
// The output snapshot time.
OutputSnapTime pulumi.Float64PtrInput
// The provisioning state of the Live Output.
ProvisioningState pulumi.StringPtrInput
// The resource state of the Live Output.
ResourceState pulumi.StringPtrInput
// The type of the resource.
Type pulumi.StringPtrInput
}
func (LiveOutputState) ElementType() reflect.Type {
return reflect.TypeOf((*liveOutputState)(nil)).Elem()
}
type liveOutputArgs struct {
// The Media Services account name.
AccountName string `pulumi:"accountName"`
// ISO 8601 timespan duration of the archive window length. This is duration that customer want to retain the recorded content.
ArchiveWindowLength string `pulumi:"archiveWindowLength"`
// The asset name.
AssetName string `pulumi:"assetName"`
// The description of the Live Output.
Description *string `pulumi:"description"`
// The HLS configuration.
Hls *Hls `pulumi:"hls"`
// The name of the Live Event.
LiveEventName string `pulumi:"liveEventName"`
// The name of the Live Output.
LiveOutputName string `pulumi:"liveOutputName"`
// The manifest file name. If not provided, the service will generate one automatically.
ManifestName *string `pulumi:"manifestName"`
// The output snapshot time.
OutputSnapTime *float64 `pulumi:"outputSnapTime"`
// The name of the resource group within the Azure subscription.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a LiveOutput resource.
type LiveOutputArgs struct {
// The Media Services account name.
AccountName pulumi.StringInput
// ISO 8601 timespan duration of the archive window length. This is duration that customer want to retain the recorded content.
ArchiveWindowLength pulumi.StringInput
// The asset name.
AssetName pulumi.StringInput
// The description of the Live Output.
Description pulumi.StringPtrInput
// The HLS configuration.
Hls HlsPtrInput
// The name of the Live Event.
LiveEventName pulumi.StringInput
// The name of the Live Output.
LiveOutputName pulumi.StringInput
// The manifest file name. If not provided, the service will generate one automatically.
ManifestName pulumi.StringPtrInput
// The output snapshot time.
OutputSnapTime pulumi.Float64PtrInput
// The name of the resource group within the Azure subscription.
ResourceGroupName pulumi.StringInput
}
func (LiveOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*liveOutputArgs)(nil)).Elem()
}
type LiveOutputInput interface {
pulumi.Input
ToLiveOutputOutput() LiveOutputOutput
ToLiveOutputOutputWithContext(ctx context.Context) LiveOutputOutput
}
func (*LiveOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LiveOutput)(nil))
}
func (i *LiveOutput) ToLiveOutputOutput() LiveOutputOutput {
return i.ToLiveOutputOutputWithContext(context.Background())
}
func (i *LiveOutput) ToLiveOutputOutputWithContext(ctx context.Context) LiveOutputOutput {
return pulumi.ToOutputWithContext(ctx, i).(LiveOutputOutput)
}
type LiveOutputOutput struct {
*pulumi.OutputState
}
func (LiveOutputOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LiveOutput)(nil))
}
func (o LiveOutputOutput) ToLiveOutputOutput() LiveOutputOutput {
return o
}
func (o LiveOutputOutput) ToLiveOutputOutputWithContext(ctx context.Context) LiveOutputOutput {
return o
}
func init() {
pulumi.RegisterOutputType(LiveOutputOutput{})
}