This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
streamingPolicy.go
210 lines (186 loc) · 7.57 KB
/
streamingPolicy.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
// *** 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 v20180601preview
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// A Streaming Policy resource
type StreamingPolicy struct {
pulumi.CustomResourceState
// Configuration of CommonEncryptionCbcs
CommonEncryptionCbcs CommonEncryptionCbcsResponsePtrOutput `pulumi:"commonEncryptionCbcs"`
// Configuration of CommonEncryptionCenc
CommonEncryptionCenc CommonEncryptionCencResponsePtrOutput `pulumi:"commonEncryptionCenc"`
// Creation time of Streaming Policy
Created pulumi.StringOutput `pulumi:"created"`
// Default ContentKey used by current Streaming Policy
DefaultContentKeyPolicyName pulumi.StringPtrOutput `pulumi:"defaultContentKeyPolicyName"`
// Configuration of EnvelopeEncryption
EnvelopeEncryption EnvelopeEncryptionResponsePtrOutput `pulumi:"envelopeEncryption"`
// The name of the resource.
Name pulumi.StringOutput `pulumi:"name"`
// Configurations of NoEncryption
NoEncryption NoEncryptionResponsePtrOutput `pulumi:"noEncryption"`
// The type of the resource.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewStreamingPolicy registers a new resource with the given unique name, arguments, and options.
func NewStreamingPolicy(ctx *pulumi.Context,
name string, args *StreamingPolicyArgs, opts ...pulumi.ResourceOption) (*StreamingPolicy, 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.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StreamingPolicyName == nil {
return nil, errors.New("invalid value for required argument 'StreamingPolicyName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:media/latest:StreamingPolicy"),
},
{
Type: pulumi.String("azure-nextgen:media/v20180330preview:StreamingPolicy"),
},
{
Type: pulumi.String("azure-nextgen:media/v20180701:StreamingPolicy"),
},
{
Type: pulumi.String("azure-nextgen:media/v20200501:StreamingPolicy"),
},
})
opts = append(opts, aliases)
var resource StreamingPolicy
err := ctx.RegisterResource("azure-nextgen:media/v20180601preview:StreamingPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStreamingPolicy gets an existing StreamingPolicy 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 GetStreamingPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StreamingPolicyState, opts ...pulumi.ResourceOption) (*StreamingPolicy, error) {
var resource StreamingPolicy
err := ctx.ReadResource("azure-nextgen:media/v20180601preview:StreamingPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StreamingPolicy resources.
type streamingPolicyState struct {
// Configuration of CommonEncryptionCbcs
CommonEncryptionCbcs *CommonEncryptionCbcsResponse `pulumi:"commonEncryptionCbcs"`
// Configuration of CommonEncryptionCenc
CommonEncryptionCenc *CommonEncryptionCencResponse `pulumi:"commonEncryptionCenc"`
// Creation time of Streaming Policy
Created *string `pulumi:"created"`
// Default ContentKey used by current Streaming Policy
DefaultContentKeyPolicyName *string `pulumi:"defaultContentKeyPolicyName"`
// Configuration of EnvelopeEncryption
EnvelopeEncryption *EnvelopeEncryptionResponse `pulumi:"envelopeEncryption"`
// The name of the resource.
Name *string `pulumi:"name"`
// Configurations of NoEncryption
NoEncryption *NoEncryptionResponse `pulumi:"noEncryption"`
// The type of the resource.
Type *string `pulumi:"type"`
}
type StreamingPolicyState struct {
// Configuration of CommonEncryptionCbcs
CommonEncryptionCbcs CommonEncryptionCbcsResponsePtrInput
// Configuration of CommonEncryptionCenc
CommonEncryptionCenc CommonEncryptionCencResponsePtrInput
// Creation time of Streaming Policy
Created pulumi.StringPtrInput
// Default ContentKey used by current Streaming Policy
DefaultContentKeyPolicyName pulumi.StringPtrInput
// Configuration of EnvelopeEncryption
EnvelopeEncryption EnvelopeEncryptionResponsePtrInput
// The name of the resource.
Name pulumi.StringPtrInput
// Configurations of NoEncryption
NoEncryption NoEncryptionResponsePtrInput
// The type of the resource.
Type pulumi.StringPtrInput
}
func (StreamingPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*streamingPolicyState)(nil)).Elem()
}
type streamingPolicyArgs struct {
// The Media Services account name.
AccountName string `pulumi:"accountName"`
// Configuration of CommonEncryptionCbcs
CommonEncryptionCbcs *CommonEncryptionCbcs `pulumi:"commonEncryptionCbcs"`
// Configuration of CommonEncryptionCenc
CommonEncryptionCenc *CommonEncryptionCenc `pulumi:"commonEncryptionCenc"`
// Default ContentKey used by current Streaming Policy
DefaultContentKeyPolicyName *string `pulumi:"defaultContentKeyPolicyName"`
// Configuration of EnvelopeEncryption
EnvelopeEncryption *EnvelopeEncryption `pulumi:"envelopeEncryption"`
// Configurations of NoEncryption
NoEncryption *NoEncryption `pulumi:"noEncryption"`
// The name of the resource group within the Azure subscription.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Streaming Policy name.
StreamingPolicyName string `pulumi:"streamingPolicyName"`
}
// The set of arguments for constructing a StreamingPolicy resource.
type StreamingPolicyArgs struct {
// The Media Services account name.
AccountName pulumi.StringInput
// Configuration of CommonEncryptionCbcs
CommonEncryptionCbcs CommonEncryptionCbcsPtrInput
// Configuration of CommonEncryptionCenc
CommonEncryptionCenc CommonEncryptionCencPtrInput
// Default ContentKey used by current Streaming Policy
DefaultContentKeyPolicyName pulumi.StringPtrInput
// Configuration of EnvelopeEncryption
EnvelopeEncryption EnvelopeEncryptionPtrInput
// Configurations of NoEncryption
NoEncryption NoEncryptionPtrInput
// The name of the resource group within the Azure subscription.
ResourceGroupName pulumi.StringInput
// The Streaming Policy name.
StreamingPolicyName pulumi.StringInput
}
func (StreamingPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*streamingPolicyArgs)(nil)).Elem()
}
type StreamingPolicyInput interface {
pulumi.Input
ToStreamingPolicyOutput() StreamingPolicyOutput
ToStreamingPolicyOutputWithContext(ctx context.Context) StreamingPolicyOutput
}
func (*StreamingPolicy) ElementType() reflect.Type {
return reflect.TypeOf((*StreamingPolicy)(nil))
}
func (i *StreamingPolicy) ToStreamingPolicyOutput() StreamingPolicyOutput {
return i.ToStreamingPolicyOutputWithContext(context.Background())
}
func (i *StreamingPolicy) ToStreamingPolicyOutputWithContext(ctx context.Context) StreamingPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(StreamingPolicyOutput)
}
type StreamingPolicyOutput struct {
*pulumi.OutputState
}
func (StreamingPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((*StreamingPolicy)(nil))
}
func (o StreamingPolicyOutput) ToStreamingPolicyOutput() StreamingPolicyOutput {
return o
}
func (o StreamingPolicyOutput) ToStreamingPolicyOutputWithContext(ctx context.Context) StreamingPolicyOutput {
return o
}
func init() {
pulumi.RegisterOutputType(StreamingPolicyOutput{})
}