/
originEndpoint.go
262 lines (222 loc) · 12.9 KB
/
originEndpoint.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package mediapackage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource schema for AWS::MediaPackage::OriginEndpoint
type OriginEndpoint struct {
pulumi.CustomResourceState
// The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
Arn pulumi.StringOutput `pulumi:"arn"`
Authorization OriginEndpointAuthorizationPtrOutput `pulumi:"authorization"`
// The ID of the OriginEndpoint.
AwsId pulumi.StringOutput `pulumi:"awsId"`
// The ID of the Channel the OriginEndpoint is associated with.
ChannelId pulumi.StringOutput `pulumi:"channelId"`
CmafPackage OriginEndpointCmafPackagePtrOutput `pulumi:"cmafPackage"`
DashPackage OriginEndpointDashPackagePtrOutput `pulumi:"dashPackage"`
// A short text description of the OriginEndpoint.
Description pulumi.StringPtrOutput `pulumi:"description"`
HlsPackage OriginEndpointHlsPackagePtrOutput `pulumi:"hlsPackage"`
// A short string appended to the end of the OriginEndpoint URL.
ManifestName pulumi.StringPtrOutput `pulumi:"manifestName"`
MssPackage OriginEndpointMssPackagePtrOutput `pulumi:"mssPackage"`
// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
Origination OriginEndpointOriginationPtrOutput `pulumi:"origination"`
// Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
StartoverWindowSeconds pulumi.IntPtrOutput `pulumi:"startoverWindowSeconds"`
// A collection of tags associated with a resource
Tags aws.TagArrayOutput `pulumi:"tags"`
// Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
TimeDelaySeconds pulumi.IntPtrOutput `pulumi:"timeDelaySeconds"`
// The URL of the packaged OriginEndpoint for consumption.
Url pulumi.StringOutput `pulumi:"url"`
// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
Whitelist pulumi.StringArrayOutput `pulumi:"whitelist"`
}
// NewOriginEndpoint registers a new resource with the given unique name, arguments, and options.
func NewOriginEndpoint(ctx *pulumi.Context,
name string, args *OriginEndpointArgs, opts ...pulumi.ResourceOption) (*OriginEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AwsId == nil {
return nil, errors.New("invalid value for required argument 'AwsId'")
}
if args.ChannelId == nil {
return nil, errors.New("invalid value for required argument 'ChannelId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource OriginEndpoint
err := ctx.RegisterResource("aws-native:mediapackage:OriginEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOriginEndpoint gets an existing OriginEndpoint 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 GetOriginEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OriginEndpointState, opts ...pulumi.ResourceOption) (*OriginEndpoint, error) {
var resource OriginEndpoint
err := ctx.ReadResource("aws-native:mediapackage:OriginEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OriginEndpoint resources.
type originEndpointState struct {
}
type OriginEndpointState struct {
}
func (OriginEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*originEndpointState)(nil)).Elem()
}
type originEndpointArgs struct {
Authorization *OriginEndpointAuthorization `pulumi:"authorization"`
// The ID of the OriginEndpoint.
AwsId string `pulumi:"awsId"`
// The ID of the Channel the OriginEndpoint is associated with.
ChannelId string `pulumi:"channelId"`
CmafPackage *OriginEndpointCmafPackage `pulumi:"cmafPackage"`
DashPackage *OriginEndpointDashPackage `pulumi:"dashPackage"`
// A short text description of the OriginEndpoint.
Description *string `pulumi:"description"`
HlsPackage *OriginEndpointHlsPackage `pulumi:"hlsPackage"`
// A short string appended to the end of the OriginEndpoint URL.
ManifestName *string `pulumi:"manifestName"`
MssPackage *OriginEndpointMssPackage `pulumi:"mssPackage"`
// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
Origination *OriginEndpointOrigination `pulumi:"origination"`
// Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
StartoverWindowSeconds *int `pulumi:"startoverWindowSeconds"`
// A collection of tags associated with a resource
Tags []aws.Tag `pulumi:"tags"`
// Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
TimeDelaySeconds *int `pulumi:"timeDelaySeconds"`
// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
Whitelist []string `pulumi:"whitelist"`
}
// The set of arguments for constructing a OriginEndpoint resource.
type OriginEndpointArgs struct {
Authorization OriginEndpointAuthorizationPtrInput
// The ID of the OriginEndpoint.
AwsId pulumi.StringInput
// The ID of the Channel the OriginEndpoint is associated with.
ChannelId pulumi.StringInput
CmafPackage OriginEndpointCmafPackagePtrInput
DashPackage OriginEndpointDashPackagePtrInput
// A short text description of the OriginEndpoint.
Description pulumi.StringPtrInput
HlsPackage OriginEndpointHlsPackagePtrInput
// A short string appended to the end of the OriginEndpoint URL.
ManifestName pulumi.StringPtrInput
MssPackage OriginEndpointMssPackagePtrInput
// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
Origination OriginEndpointOriginationPtrInput
// Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
StartoverWindowSeconds pulumi.IntPtrInput
// A collection of tags associated with a resource
Tags aws.TagArrayInput
// Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
TimeDelaySeconds pulumi.IntPtrInput
// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
Whitelist pulumi.StringArrayInput
}
func (OriginEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*originEndpointArgs)(nil)).Elem()
}
type OriginEndpointInput interface {
pulumi.Input
ToOriginEndpointOutput() OriginEndpointOutput
ToOriginEndpointOutputWithContext(ctx context.Context) OriginEndpointOutput
}
func (*OriginEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**OriginEndpoint)(nil)).Elem()
}
func (i *OriginEndpoint) ToOriginEndpointOutput() OriginEndpointOutput {
return i.ToOriginEndpointOutputWithContext(context.Background())
}
func (i *OriginEndpoint) ToOriginEndpointOutputWithContext(ctx context.Context) OriginEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(OriginEndpointOutput)
}
type OriginEndpointOutput struct{ *pulumi.OutputState }
func (OriginEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**OriginEndpoint)(nil)).Elem()
}
func (o OriginEndpointOutput) ToOriginEndpointOutput() OriginEndpointOutput {
return o
}
func (o OriginEndpointOutput) ToOriginEndpointOutputWithContext(ctx context.Context) OriginEndpointOutput {
return o
}
// The Amazon Resource Name (ARN) assigned to the OriginEndpoint.
func (o OriginEndpointOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
}
func (o OriginEndpointOutput) Authorization() OriginEndpointAuthorizationPtrOutput {
return o.ApplyT(func(v *OriginEndpoint) OriginEndpointAuthorizationPtrOutput { return v.Authorization }).(OriginEndpointAuthorizationPtrOutput)
}
// The ID of the OriginEndpoint.
func (o OriginEndpointOutput) AwsId() pulumi.StringOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.StringOutput { return v.AwsId }).(pulumi.StringOutput)
}
// The ID of the Channel the OriginEndpoint is associated with.
func (o OriginEndpointOutput) ChannelId() pulumi.StringOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.StringOutput { return v.ChannelId }).(pulumi.StringOutput)
}
func (o OriginEndpointOutput) CmafPackage() OriginEndpointCmafPackagePtrOutput {
return o.ApplyT(func(v *OriginEndpoint) OriginEndpointCmafPackagePtrOutput { return v.CmafPackage }).(OriginEndpointCmafPackagePtrOutput)
}
func (o OriginEndpointOutput) DashPackage() OriginEndpointDashPackagePtrOutput {
return o.ApplyT(func(v *OriginEndpoint) OriginEndpointDashPackagePtrOutput { return v.DashPackage }).(OriginEndpointDashPackagePtrOutput)
}
// A short text description of the OriginEndpoint.
func (o OriginEndpointOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
func (o OriginEndpointOutput) HlsPackage() OriginEndpointHlsPackagePtrOutput {
return o.ApplyT(func(v *OriginEndpoint) OriginEndpointHlsPackagePtrOutput { return v.HlsPackage }).(OriginEndpointHlsPackagePtrOutput)
}
// A short string appended to the end of the OriginEndpoint URL.
func (o OriginEndpointOutput) ManifestName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.StringPtrOutput { return v.ManifestName }).(pulumi.StringPtrOutput)
}
func (o OriginEndpointOutput) MssPackage() OriginEndpointMssPackagePtrOutput {
return o.ApplyT(func(v *OriginEndpoint) OriginEndpointMssPackagePtrOutput { return v.MssPackage }).(OriginEndpointMssPackagePtrOutput)
}
// Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination
func (o OriginEndpointOutput) Origination() OriginEndpointOriginationPtrOutput {
return o.ApplyT(func(v *OriginEndpoint) OriginEndpointOriginationPtrOutput { return v.Origination }).(OriginEndpointOriginationPtrOutput)
}
// Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint.
func (o OriginEndpointOutput) StartoverWindowSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.IntPtrOutput { return v.StartoverWindowSeconds }).(pulumi.IntPtrOutput)
}
// A collection of tags associated with a resource
func (o OriginEndpointOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *OriginEndpoint) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
// Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint.
func (o OriginEndpointOutput) TimeDelaySeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.IntPtrOutput { return v.TimeDelaySeconds }).(pulumi.IntPtrOutput)
}
// The URL of the packaged OriginEndpoint for consumption.
func (o OriginEndpointOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
// A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.
func (o OriginEndpointOutput) Whitelist() pulumi.StringArrayOutput {
return o.ApplyT(func(v *OriginEndpoint) pulumi.StringArrayOutput { return v.Whitelist }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*OriginEndpointInput)(nil)).Elem(), &OriginEndpoint{})
pulumi.RegisterOutputType(OriginEndpointOutput{})
}