forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
liveOutput.go
294 lines (256 loc) · 13.5 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
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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package media
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The Live Output.
// Azure REST API version: 2022-11-01. Prior API version in Azure Native 1.x: 2020-05-01.
type LiveOutput struct {
pulumi.CustomResourceState
// ISO 8601 time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the asset for this live output. This also sets the maximum content length for the rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window.
ArchiveWindowLength pulumi.StringOutput `pulumi:"archiveWindowLength"`
// The asset that the live output will write to.
AssetName pulumi.StringOutput `pulumi:"assetName"`
// The creation time the live output.
Created pulumi.StringOutput `pulumi:"created"`
// The description of the live output.
Description pulumi.StringPtrOutput `pulumi:"description"`
// HTTP Live Streaming (HLS) packing setting for the live output.
Hls HlsResponsePtrOutput `pulumi:"hls"`
// The 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 initial timestamp that the live output will start at, any content before this value will not be archived.
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"`
// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL.
RewindWindowLength pulumi.StringPtrOutput `pulumi:"rewindWindowLength"`
// The system metadata relating to this resource.
SystemData SystemDataResponseOutput `pulumi:"systemData"`
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-native:media/v20180330preview:LiveOutput"),
},
{
Type: pulumi.String("azure-native:media/v20180601preview:LiveOutput"),
},
{
Type: pulumi.String("azure-native:media/v20180701:LiveOutput"),
},
{
Type: pulumi.String("azure-native:media/v20190501preview:LiveOutput"),
},
{
Type: pulumi.String("azure-native:media/v20200501:LiveOutput"),
},
{
Type: pulumi.String("azure-native:media/v20210601:LiveOutput"),
},
{
Type: pulumi.String("azure-native:media/v20211101:LiveOutput"),
},
{
Type: pulumi.String("azure-native:media/v20220801:LiveOutput"),
},
{
Type: pulumi.String("azure-native:media/v20221101:LiveOutput"),
},
})
opts = append(opts, aliases)
opts = utilities.PkgResourceDefaultOpts(opts)
var resource LiveOutput
err := ctx.RegisterResource("azure-native:media: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-native:media: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 {
}
type LiveOutputState struct {
}
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 time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the asset for this live output. This also sets the maximum content length for the rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window.
ArchiveWindowLength string `pulumi:"archiveWindowLength"`
// The asset that the live output will write to.
AssetName string `pulumi:"assetName"`
// The description of the live output.
Description *string `pulumi:"description"`
// HTTP Live Streaming (HLS) packing setting for the live output.
Hls *Hls `pulumi:"hls"`
// The name of the live event, maximum length is 32.
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 initial timestamp that the live output will start at, any content before this value will not be archived.
OutputSnapTime *float64 `pulumi:"outputSnapTime"`
// The name of the resource group within the Azure subscription.
ResourceGroupName string `pulumi:"resourceGroupName"`
// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL.
RewindWindowLength *string `pulumi:"rewindWindowLength"`
}
// The set of arguments for constructing a LiveOutput resource.
type LiveOutputArgs struct {
// The Media Services account name.
AccountName pulumi.StringInput
// ISO 8601 time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the asset for this live output. This also sets the maximum content length for the rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window.
ArchiveWindowLength pulumi.StringInput
// The asset that the live output will write to.
AssetName pulumi.StringInput
// The description of the live output.
Description pulumi.StringPtrInput
// HTTP Live Streaming (HLS) packing setting for the live output.
Hls HlsPtrInput
// The name of the live event, maximum length is 32.
LiveEventName pulumi.StringInput
// The name of the live output.
LiveOutputName pulumi.StringPtrInput
// The manifest file name. If not provided, the service will generate one automatically.
ManifestName pulumi.StringPtrInput
// The initial timestamp that the live output will start at, any content before this value will not be archived.
OutputSnapTime pulumi.Float64PtrInput
// The name of the resource group within the Azure subscription.
ResourceGroupName pulumi.StringInput
// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL.
RewindWindowLength pulumi.StringPtrInput
}
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)).Elem()
}
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)).Elem()
}
func (o LiveOutputOutput) ToLiveOutputOutput() LiveOutputOutput {
return o
}
func (o LiveOutputOutput) ToLiveOutputOutputWithContext(ctx context.Context) LiveOutputOutput {
return o
}
// ISO 8601 time between 1 minute to 25 hours to indicate the maximum content length that can be archived in the asset for this live output. This also sets the maximum content length for the rewind window. For example, use PT1H30M to indicate 1 hour and 30 minutes of archive window.
func (o LiveOutputOutput) ArchiveWindowLength() pulumi.StringOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringOutput { return v.ArchiveWindowLength }).(pulumi.StringOutput)
}
// The asset that the live output will write to.
func (o LiveOutputOutput) AssetName() pulumi.StringOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringOutput { return v.AssetName }).(pulumi.StringOutput)
}
// The creation time the live output.
func (o LiveOutputOutput) Created() pulumi.StringOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringOutput { return v.Created }).(pulumi.StringOutput)
}
// The description of the live output.
func (o LiveOutputOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// HTTP Live Streaming (HLS) packing setting for the live output.
func (o LiveOutputOutput) Hls() HlsResponsePtrOutput {
return o.ApplyT(func(v *LiveOutput) HlsResponsePtrOutput { return v.Hls }).(HlsResponsePtrOutput)
}
// The time the live output was last modified.
func (o LiveOutputOutput) LastModified() pulumi.StringOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringOutput { return v.LastModified }).(pulumi.StringOutput)
}
// The manifest file name. If not provided, the service will generate one automatically.
func (o LiveOutputOutput) ManifestName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringPtrOutput { return v.ManifestName }).(pulumi.StringPtrOutput)
}
// The name of the resource
func (o LiveOutputOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The initial timestamp that the live output will start at, any content before this value will not be archived.
func (o LiveOutputOutput) OutputSnapTime() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.Float64PtrOutput { return v.OutputSnapTime }).(pulumi.Float64PtrOutput)
}
// The provisioning state of the live output.
func (o LiveOutputOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringOutput { return v.ProvisioningState }).(pulumi.StringOutput)
}
// The resource state of the live output.
func (o LiveOutputOutput) ResourceState() pulumi.StringOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringOutput { return v.ResourceState }).(pulumi.StringOutput)
}
// ISO 8601 time between 1 minute to the duration of archiveWindowLength to control seek-able window length during Live. The service won't use this property once LiveOutput stops. The archived VOD will have full content with original ArchiveWindowLength. For example, use PT1H30M to indicate 1 hour and 30 minutes of rewind window length. Service will use implicit default value 30m only if Live Event enables LL.
func (o LiveOutputOutput) RewindWindowLength() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringPtrOutput { return v.RewindWindowLength }).(pulumi.StringPtrOutput)
}
// The system metadata relating to this resource.
func (o LiveOutputOutput) SystemData() SystemDataResponseOutput {
return o.ApplyT(func(v *LiveOutput) SystemDataResponseOutput { return v.SystemData }).(SystemDataResponseOutput)
}
// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
func (o LiveOutputOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *LiveOutput) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LiveOutputOutput{})
}