/
imagingPolicySet.go
269 lines (219 loc) · 9.91 KB
/
imagingPolicySet.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
// 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 akamai
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-akamai/sdk/v6/go/akamai/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type ImagingPolicySet struct {
pulumi.CustomResourceState
// The unique identifier for the Akamai Contract containing the Policy Set(s)
ContractId pulumi.StringOutput `pulumi:"contractId"`
// A friendly name for the Policy Set
Name pulumi.StringOutput `pulumi:"name"`
// The geographic region which media using this Policy Set is optimized for
Region pulumi.StringOutput `pulumi:"region"`
// The type of media this Policy Set manages
Type pulumi.StringOutput `pulumi:"type"`
}
// NewImagingPolicySet registers a new resource with the given unique name, arguments, and options.
func NewImagingPolicySet(ctx *pulumi.Context,
name string, args *ImagingPolicySetArgs, opts ...pulumi.ResourceOption) (*ImagingPolicySet, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ContractId == nil {
return nil, errors.New("invalid value for required argument 'ContractId'")
}
if args.Region == nil {
return nil, errors.New("invalid value for required argument 'Region'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ImagingPolicySet
err := ctx.RegisterResource("akamai:index/imagingPolicySet:ImagingPolicySet", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetImagingPolicySet gets an existing ImagingPolicySet 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 GetImagingPolicySet(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ImagingPolicySetState, opts ...pulumi.ResourceOption) (*ImagingPolicySet, error) {
var resource ImagingPolicySet
err := ctx.ReadResource("akamai:index/imagingPolicySet:ImagingPolicySet", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ImagingPolicySet resources.
type imagingPolicySetState struct {
// The unique identifier for the Akamai Contract containing the Policy Set(s)
ContractId *string `pulumi:"contractId"`
// A friendly name for the Policy Set
Name *string `pulumi:"name"`
// The geographic region which media using this Policy Set is optimized for
Region *string `pulumi:"region"`
// The type of media this Policy Set manages
Type *string `pulumi:"type"`
}
type ImagingPolicySetState struct {
// The unique identifier for the Akamai Contract containing the Policy Set(s)
ContractId pulumi.StringPtrInput
// A friendly name for the Policy Set
Name pulumi.StringPtrInput
// The geographic region which media using this Policy Set is optimized for
Region pulumi.StringPtrInput
// The type of media this Policy Set manages
Type pulumi.StringPtrInput
}
func (ImagingPolicySetState) ElementType() reflect.Type {
return reflect.TypeOf((*imagingPolicySetState)(nil)).Elem()
}
type imagingPolicySetArgs struct {
// The unique identifier for the Akamai Contract containing the Policy Set(s)
ContractId string `pulumi:"contractId"`
// A friendly name for the Policy Set
Name *string `pulumi:"name"`
// The geographic region which media using this Policy Set is optimized for
Region string `pulumi:"region"`
// The type of media this Policy Set manages
Type string `pulumi:"type"`
}
// The set of arguments for constructing a ImagingPolicySet resource.
type ImagingPolicySetArgs struct {
// The unique identifier for the Akamai Contract containing the Policy Set(s)
ContractId pulumi.StringInput
// A friendly name for the Policy Set
Name pulumi.StringPtrInput
// The geographic region which media using this Policy Set is optimized for
Region pulumi.StringInput
// The type of media this Policy Set manages
Type pulumi.StringInput
}
func (ImagingPolicySetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*imagingPolicySetArgs)(nil)).Elem()
}
type ImagingPolicySetInput interface {
pulumi.Input
ToImagingPolicySetOutput() ImagingPolicySetOutput
ToImagingPolicySetOutputWithContext(ctx context.Context) ImagingPolicySetOutput
}
func (*ImagingPolicySet) ElementType() reflect.Type {
return reflect.TypeOf((**ImagingPolicySet)(nil)).Elem()
}
func (i *ImagingPolicySet) ToImagingPolicySetOutput() ImagingPolicySetOutput {
return i.ToImagingPolicySetOutputWithContext(context.Background())
}
func (i *ImagingPolicySet) ToImagingPolicySetOutputWithContext(ctx context.Context) ImagingPolicySetOutput {
return pulumi.ToOutputWithContext(ctx, i).(ImagingPolicySetOutput)
}
// ImagingPolicySetArrayInput is an input type that accepts ImagingPolicySetArray and ImagingPolicySetArrayOutput values.
// You can construct a concrete instance of `ImagingPolicySetArrayInput` via:
//
// ImagingPolicySetArray{ ImagingPolicySetArgs{...} }
type ImagingPolicySetArrayInput interface {
pulumi.Input
ToImagingPolicySetArrayOutput() ImagingPolicySetArrayOutput
ToImagingPolicySetArrayOutputWithContext(context.Context) ImagingPolicySetArrayOutput
}
type ImagingPolicySetArray []ImagingPolicySetInput
func (ImagingPolicySetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ImagingPolicySet)(nil)).Elem()
}
func (i ImagingPolicySetArray) ToImagingPolicySetArrayOutput() ImagingPolicySetArrayOutput {
return i.ToImagingPolicySetArrayOutputWithContext(context.Background())
}
func (i ImagingPolicySetArray) ToImagingPolicySetArrayOutputWithContext(ctx context.Context) ImagingPolicySetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ImagingPolicySetArrayOutput)
}
// ImagingPolicySetMapInput is an input type that accepts ImagingPolicySetMap and ImagingPolicySetMapOutput values.
// You can construct a concrete instance of `ImagingPolicySetMapInput` via:
//
// ImagingPolicySetMap{ "key": ImagingPolicySetArgs{...} }
type ImagingPolicySetMapInput interface {
pulumi.Input
ToImagingPolicySetMapOutput() ImagingPolicySetMapOutput
ToImagingPolicySetMapOutputWithContext(context.Context) ImagingPolicySetMapOutput
}
type ImagingPolicySetMap map[string]ImagingPolicySetInput
func (ImagingPolicySetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ImagingPolicySet)(nil)).Elem()
}
func (i ImagingPolicySetMap) ToImagingPolicySetMapOutput() ImagingPolicySetMapOutput {
return i.ToImagingPolicySetMapOutputWithContext(context.Background())
}
func (i ImagingPolicySetMap) ToImagingPolicySetMapOutputWithContext(ctx context.Context) ImagingPolicySetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ImagingPolicySetMapOutput)
}
type ImagingPolicySetOutput struct{ *pulumi.OutputState }
func (ImagingPolicySetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ImagingPolicySet)(nil)).Elem()
}
func (o ImagingPolicySetOutput) ToImagingPolicySetOutput() ImagingPolicySetOutput {
return o
}
func (o ImagingPolicySetOutput) ToImagingPolicySetOutputWithContext(ctx context.Context) ImagingPolicySetOutput {
return o
}
// The unique identifier for the Akamai Contract containing the Policy Set(s)
func (o ImagingPolicySetOutput) ContractId() pulumi.StringOutput {
return o.ApplyT(func(v *ImagingPolicySet) pulumi.StringOutput { return v.ContractId }).(pulumi.StringOutput)
}
// A friendly name for the Policy Set
func (o ImagingPolicySetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ImagingPolicySet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The geographic region which media using this Policy Set is optimized for
func (o ImagingPolicySetOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v *ImagingPolicySet) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput)
}
// The type of media this Policy Set manages
func (o ImagingPolicySetOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *ImagingPolicySet) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
type ImagingPolicySetArrayOutput struct{ *pulumi.OutputState }
func (ImagingPolicySetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ImagingPolicySet)(nil)).Elem()
}
func (o ImagingPolicySetArrayOutput) ToImagingPolicySetArrayOutput() ImagingPolicySetArrayOutput {
return o
}
func (o ImagingPolicySetArrayOutput) ToImagingPolicySetArrayOutputWithContext(ctx context.Context) ImagingPolicySetArrayOutput {
return o
}
func (o ImagingPolicySetArrayOutput) Index(i pulumi.IntInput) ImagingPolicySetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ImagingPolicySet {
return vs[0].([]*ImagingPolicySet)[vs[1].(int)]
}).(ImagingPolicySetOutput)
}
type ImagingPolicySetMapOutput struct{ *pulumi.OutputState }
func (ImagingPolicySetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ImagingPolicySet)(nil)).Elem()
}
func (o ImagingPolicySetMapOutput) ToImagingPolicySetMapOutput() ImagingPolicySetMapOutput {
return o
}
func (o ImagingPolicySetMapOutput) ToImagingPolicySetMapOutputWithContext(ctx context.Context) ImagingPolicySetMapOutput {
return o
}
func (o ImagingPolicySetMapOutput) MapIndex(k pulumi.StringInput) ImagingPolicySetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ImagingPolicySet {
return vs[0].(map[string]*ImagingPolicySet)[vs[1].(string)]
}).(ImagingPolicySetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ImagingPolicySetInput)(nil)).Elem(), &ImagingPolicySet{})
pulumi.RegisterInputType(reflect.TypeOf((*ImagingPolicySetArrayInput)(nil)).Elem(), ImagingPolicySetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ImagingPolicySetMapInput)(nil)).Elem(), ImagingPolicySetMap{})
pulumi.RegisterOutputType(ImagingPolicySetOutput{})
pulumi.RegisterOutputType(ImagingPolicySetArrayOutput{})
pulumi.RegisterOutputType(ImagingPolicySetMapOutput{})
}