/
propertyInclude.go
370 lines (312 loc) · 14.1 KB
/
propertyInclude.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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
// 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/sdk/v3/go/pulumi"
)
type PropertyInclude struct {
pulumi.CustomResourceState
// Identifies the contract to which the include is assigned
ContractId pulumi.StringOutput `pulumi:"contractId"`
// Identifies the group to which the include is assigned
GroupId pulumi.StringOutput `pulumi:"groupId"`
// Specifies the most recent version of the include
LatestVersion pulumi.IntOutput `pulumi:"latestVersion"`
// A descriptive name for the include
Name pulumi.StringOutput `pulumi:"name"`
// The product assigned to the include
ProductId pulumi.StringPtrOutput `pulumi:"productId"`
// The most recent version to be activated to the production network
ProductionVersion pulumi.StringOutput `pulumi:"productionVersion"`
// Rule validation errors
RuleErrors pulumi.StringOutput `pulumi:"ruleErrors"`
// Indicates the versioned set of features and criteria
RuleFormat pulumi.StringOutput `pulumi:"ruleFormat"`
// Rule validation warnings
RuleWarnings pulumi.StringOutput `pulumi:"ruleWarnings"`
// Property Rules as JSON
Rules pulumi.StringOutput `pulumi:"rules"`
// The most recent version to be activated to the staging network
StagingVersion pulumi.StringOutput `pulumi:"stagingVersion"`
// Specifies the type of the include, either 'MICROSERVICES' or 'COMMON_SETTINGS'
Type pulumi.StringOutput `pulumi:"type"`
}
// NewPropertyInclude registers a new resource with the given unique name, arguments, and options.
func NewPropertyInclude(ctx *pulumi.Context,
name string, args *PropertyIncludeArgs, opts ...pulumi.ResourceOption) (*PropertyInclude, 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.GroupId == nil {
return nil, errors.New("invalid value for required argument 'GroupId'")
}
if args.RuleFormat == nil {
return nil, errors.New("invalid value for required argument 'RuleFormat'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
var resource PropertyInclude
err := ctx.RegisterResource("akamai:index/propertyInclude:PropertyInclude", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPropertyInclude gets an existing PropertyInclude 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 GetPropertyInclude(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PropertyIncludeState, opts ...pulumi.ResourceOption) (*PropertyInclude, error) {
var resource PropertyInclude
err := ctx.ReadResource("akamai:index/propertyInclude:PropertyInclude", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PropertyInclude resources.
type propertyIncludeState struct {
// Identifies the contract to which the include is assigned
ContractId *string `pulumi:"contractId"`
// Identifies the group to which the include is assigned
GroupId *string `pulumi:"groupId"`
// Specifies the most recent version of the include
LatestVersion *int `pulumi:"latestVersion"`
// A descriptive name for the include
Name *string `pulumi:"name"`
// The product assigned to the include
ProductId *string `pulumi:"productId"`
// The most recent version to be activated to the production network
ProductionVersion *string `pulumi:"productionVersion"`
// Rule validation errors
RuleErrors *string `pulumi:"ruleErrors"`
// Indicates the versioned set of features and criteria
RuleFormat *string `pulumi:"ruleFormat"`
// Rule validation warnings
RuleWarnings *string `pulumi:"ruleWarnings"`
// Property Rules as JSON
Rules *string `pulumi:"rules"`
// The most recent version to be activated to the staging network
StagingVersion *string `pulumi:"stagingVersion"`
// Specifies the type of the include, either 'MICROSERVICES' or 'COMMON_SETTINGS'
Type *string `pulumi:"type"`
}
type PropertyIncludeState struct {
// Identifies the contract to which the include is assigned
ContractId pulumi.StringPtrInput
// Identifies the group to which the include is assigned
GroupId pulumi.StringPtrInput
// Specifies the most recent version of the include
LatestVersion pulumi.IntPtrInput
// A descriptive name for the include
Name pulumi.StringPtrInput
// The product assigned to the include
ProductId pulumi.StringPtrInput
// The most recent version to be activated to the production network
ProductionVersion pulumi.StringPtrInput
// Rule validation errors
RuleErrors pulumi.StringPtrInput
// Indicates the versioned set of features and criteria
RuleFormat pulumi.StringPtrInput
// Rule validation warnings
RuleWarnings pulumi.StringPtrInput
// Property Rules as JSON
Rules pulumi.StringPtrInput
// The most recent version to be activated to the staging network
StagingVersion pulumi.StringPtrInput
// Specifies the type of the include, either 'MICROSERVICES' or 'COMMON_SETTINGS'
Type pulumi.StringPtrInput
}
func (PropertyIncludeState) ElementType() reflect.Type {
return reflect.TypeOf((*propertyIncludeState)(nil)).Elem()
}
type propertyIncludeArgs struct {
// Identifies the contract to which the include is assigned
ContractId string `pulumi:"contractId"`
// Identifies the group to which the include is assigned
GroupId string `pulumi:"groupId"`
// A descriptive name for the include
Name *string `pulumi:"name"`
// The product assigned to the include
ProductId *string `pulumi:"productId"`
// Indicates the versioned set of features and criteria
RuleFormat string `pulumi:"ruleFormat"`
// Property Rules as JSON
Rules *string `pulumi:"rules"`
// Specifies the type of the include, either 'MICROSERVICES' or 'COMMON_SETTINGS'
Type string `pulumi:"type"`
}
// The set of arguments for constructing a PropertyInclude resource.
type PropertyIncludeArgs struct {
// Identifies the contract to which the include is assigned
ContractId pulumi.StringInput
// Identifies the group to which the include is assigned
GroupId pulumi.StringInput
// A descriptive name for the include
Name pulumi.StringPtrInput
// The product assigned to the include
ProductId pulumi.StringPtrInput
// Indicates the versioned set of features and criteria
RuleFormat pulumi.StringInput
// Property Rules as JSON
Rules pulumi.StringPtrInput
// Specifies the type of the include, either 'MICROSERVICES' or 'COMMON_SETTINGS'
Type pulumi.StringInput
}
func (PropertyIncludeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*propertyIncludeArgs)(nil)).Elem()
}
type PropertyIncludeInput interface {
pulumi.Input
ToPropertyIncludeOutput() PropertyIncludeOutput
ToPropertyIncludeOutputWithContext(ctx context.Context) PropertyIncludeOutput
}
func (*PropertyInclude) ElementType() reflect.Type {
return reflect.TypeOf((**PropertyInclude)(nil)).Elem()
}
func (i *PropertyInclude) ToPropertyIncludeOutput() PropertyIncludeOutput {
return i.ToPropertyIncludeOutputWithContext(context.Background())
}
func (i *PropertyInclude) ToPropertyIncludeOutputWithContext(ctx context.Context) PropertyIncludeOutput {
return pulumi.ToOutputWithContext(ctx, i).(PropertyIncludeOutput)
}
// PropertyIncludeArrayInput is an input type that accepts PropertyIncludeArray and PropertyIncludeArrayOutput values.
// You can construct a concrete instance of `PropertyIncludeArrayInput` via:
//
// PropertyIncludeArray{ PropertyIncludeArgs{...} }
type PropertyIncludeArrayInput interface {
pulumi.Input
ToPropertyIncludeArrayOutput() PropertyIncludeArrayOutput
ToPropertyIncludeArrayOutputWithContext(context.Context) PropertyIncludeArrayOutput
}
type PropertyIncludeArray []PropertyIncludeInput
func (PropertyIncludeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PropertyInclude)(nil)).Elem()
}
func (i PropertyIncludeArray) ToPropertyIncludeArrayOutput() PropertyIncludeArrayOutput {
return i.ToPropertyIncludeArrayOutputWithContext(context.Background())
}
func (i PropertyIncludeArray) ToPropertyIncludeArrayOutputWithContext(ctx context.Context) PropertyIncludeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PropertyIncludeArrayOutput)
}
// PropertyIncludeMapInput is an input type that accepts PropertyIncludeMap and PropertyIncludeMapOutput values.
// You can construct a concrete instance of `PropertyIncludeMapInput` via:
//
// PropertyIncludeMap{ "key": PropertyIncludeArgs{...} }
type PropertyIncludeMapInput interface {
pulumi.Input
ToPropertyIncludeMapOutput() PropertyIncludeMapOutput
ToPropertyIncludeMapOutputWithContext(context.Context) PropertyIncludeMapOutput
}
type PropertyIncludeMap map[string]PropertyIncludeInput
func (PropertyIncludeMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PropertyInclude)(nil)).Elem()
}
func (i PropertyIncludeMap) ToPropertyIncludeMapOutput() PropertyIncludeMapOutput {
return i.ToPropertyIncludeMapOutputWithContext(context.Background())
}
func (i PropertyIncludeMap) ToPropertyIncludeMapOutputWithContext(ctx context.Context) PropertyIncludeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PropertyIncludeMapOutput)
}
type PropertyIncludeOutput struct{ *pulumi.OutputState }
func (PropertyIncludeOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PropertyInclude)(nil)).Elem()
}
func (o PropertyIncludeOutput) ToPropertyIncludeOutput() PropertyIncludeOutput {
return o
}
func (o PropertyIncludeOutput) ToPropertyIncludeOutputWithContext(ctx context.Context) PropertyIncludeOutput {
return o
}
// Identifies the contract to which the include is assigned
func (o PropertyIncludeOutput) ContractId() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.ContractId }).(pulumi.StringOutput)
}
// Identifies the group to which the include is assigned
func (o PropertyIncludeOutput) GroupId() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.GroupId }).(pulumi.StringOutput)
}
// Specifies the most recent version of the include
func (o PropertyIncludeOutput) LatestVersion() pulumi.IntOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.IntOutput { return v.LatestVersion }).(pulumi.IntOutput)
}
// A descriptive name for the include
func (o PropertyIncludeOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The product assigned to the include
func (o PropertyIncludeOutput) ProductId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringPtrOutput { return v.ProductId }).(pulumi.StringPtrOutput)
}
// The most recent version to be activated to the production network
func (o PropertyIncludeOutput) ProductionVersion() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.ProductionVersion }).(pulumi.StringOutput)
}
// Rule validation errors
func (o PropertyIncludeOutput) RuleErrors() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.RuleErrors }).(pulumi.StringOutput)
}
// Indicates the versioned set of features and criteria
func (o PropertyIncludeOutput) RuleFormat() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.RuleFormat }).(pulumi.StringOutput)
}
// Rule validation warnings
func (o PropertyIncludeOutput) RuleWarnings() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.RuleWarnings }).(pulumi.StringOutput)
}
// Property Rules as JSON
func (o PropertyIncludeOutput) Rules() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.Rules }).(pulumi.StringOutput)
}
// The most recent version to be activated to the staging network
func (o PropertyIncludeOutput) StagingVersion() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.StagingVersion }).(pulumi.StringOutput)
}
// Specifies the type of the include, either 'MICROSERVICES' or 'COMMON_SETTINGS'
func (o PropertyIncludeOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *PropertyInclude) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
type PropertyIncludeArrayOutput struct{ *pulumi.OutputState }
func (PropertyIncludeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PropertyInclude)(nil)).Elem()
}
func (o PropertyIncludeArrayOutput) ToPropertyIncludeArrayOutput() PropertyIncludeArrayOutput {
return o
}
func (o PropertyIncludeArrayOutput) ToPropertyIncludeArrayOutputWithContext(ctx context.Context) PropertyIncludeArrayOutput {
return o
}
func (o PropertyIncludeArrayOutput) Index(i pulumi.IntInput) PropertyIncludeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PropertyInclude {
return vs[0].([]*PropertyInclude)[vs[1].(int)]
}).(PropertyIncludeOutput)
}
type PropertyIncludeMapOutput struct{ *pulumi.OutputState }
func (PropertyIncludeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PropertyInclude)(nil)).Elem()
}
func (o PropertyIncludeMapOutput) ToPropertyIncludeMapOutput() PropertyIncludeMapOutput {
return o
}
func (o PropertyIncludeMapOutput) ToPropertyIncludeMapOutputWithContext(ctx context.Context) PropertyIncludeMapOutput {
return o
}
func (o PropertyIncludeMapOutput) MapIndex(k pulumi.StringInput) PropertyIncludeOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PropertyInclude {
return vs[0].(map[string]*PropertyInclude)[vs[1].(string)]
}).(PropertyIncludeOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PropertyIncludeInput)(nil)).Elem(), &PropertyInclude{})
pulumi.RegisterInputType(reflect.TypeOf((*PropertyIncludeArrayInput)(nil)).Elem(), PropertyIncludeArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PropertyIncludeMapInput)(nil)).Elem(), PropertyIncludeMap{})
pulumi.RegisterOutputType(PropertyIncludeOutput{})
pulumi.RegisterOutputType(PropertyIncludeArrayOutput{})
pulumi.RegisterOutputType(PropertyIncludeMapOutput{})
}