/
appSecConfiguration.go
328 lines (274 loc) · 13.8 KB
/
appSecConfiguration.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
// 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 AppSecConfiguration struct {
pulumi.CustomResourceState
// Unique identifier of the new security configuration
ConfigId pulumi.IntOutput `pulumi:"configId"`
// Unique identifier of the Akamai contract associated with the new configuration
ContractId pulumi.StringOutput `pulumi:"contractId"`
// Unique identifier of the existing configuration being cloned to create the new configuration
CreateFromConfigId pulumi.IntPtrOutput `pulumi:"createFromConfigId"`
// Version number of the existing configuration being cloned to create the new configuration
CreateFromVersion pulumi.IntPtrOutput `pulumi:"createFromVersion"`
// Brief description of the new configuration
Description pulumi.StringOutput `pulumi:"description"`
// Unique identifier of the contract group associated with the new configuration
GroupId pulumi.IntOutput `pulumi:"groupId"`
// Hostnames to be protected by the new configuration
HostNames pulumi.StringArrayOutput `pulumi:"hostNames"`
// Name of the new configuration
Name pulumi.StringOutput `pulumi:"name"`
}
// NewAppSecConfiguration registers a new resource with the given unique name, arguments, and options.
func NewAppSecConfiguration(ctx *pulumi.Context,
name string, args *AppSecConfigurationArgs, opts ...pulumi.ResourceOption) (*AppSecConfiguration, 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.Description == nil {
return nil, errors.New("invalid value for required argument 'Description'")
}
if args.GroupId == nil {
return nil, errors.New("invalid value for required argument 'GroupId'")
}
if args.HostNames == nil {
return nil, errors.New("invalid value for required argument 'HostNames'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AppSecConfiguration
err := ctx.RegisterResource("akamai:index/appSecConfiguration:AppSecConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAppSecConfiguration gets an existing AppSecConfiguration 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 GetAppSecConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AppSecConfigurationState, opts ...pulumi.ResourceOption) (*AppSecConfiguration, error) {
var resource AppSecConfiguration
err := ctx.ReadResource("akamai:index/appSecConfiguration:AppSecConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AppSecConfiguration resources.
type appSecConfigurationState struct {
// Unique identifier of the new security configuration
ConfigId *int `pulumi:"configId"`
// Unique identifier of the Akamai contract associated with the new configuration
ContractId *string `pulumi:"contractId"`
// Unique identifier of the existing configuration being cloned to create the new configuration
CreateFromConfigId *int `pulumi:"createFromConfigId"`
// Version number of the existing configuration being cloned to create the new configuration
CreateFromVersion *int `pulumi:"createFromVersion"`
// Brief description of the new configuration
Description *string `pulumi:"description"`
// Unique identifier of the contract group associated with the new configuration
GroupId *int `pulumi:"groupId"`
// Hostnames to be protected by the new configuration
HostNames []string `pulumi:"hostNames"`
// Name of the new configuration
Name *string `pulumi:"name"`
}
type AppSecConfigurationState struct {
// Unique identifier of the new security configuration
ConfigId pulumi.IntPtrInput
// Unique identifier of the Akamai contract associated with the new configuration
ContractId pulumi.StringPtrInput
// Unique identifier of the existing configuration being cloned to create the new configuration
CreateFromConfigId pulumi.IntPtrInput
// Version number of the existing configuration being cloned to create the new configuration
CreateFromVersion pulumi.IntPtrInput
// Brief description of the new configuration
Description pulumi.StringPtrInput
// Unique identifier of the contract group associated with the new configuration
GroupId pulumi.IntPtrInput
// Hostnames to be protected by the new configuration
HostNames pulumi.StringArrayInput
// Name of the new configuration
Name pulumi.StringPtrInput
}
func (AppSecConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*appSecConfigurationState)(nil)).Elem()
}
type appSecConfigurationArgs struct {
// Unique identifier of the Akamai contract associated with the new configuration
ContractId string `pulumi:"contractId"`
// Unique identifier of the existing configuration being cloned to create the new configuration
CreateFromConfigId *int `pulumi:"createFromConfigId"`
// Version number of the existing configuration being cloned to create the new configuration
CreateFromVersion *int `pulumi:"createFromVersion"`
// Brief description of the new configuration
Description string `pulumi:"description"`
// Unique identifier of the contract group associated with the new configuration
GroupId int `pulumi:"groupId"`
// Hostnames to be protected by the new configuration
HostNames []string `pulumi:"hostNames"`
// Name of the new configuration
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a AppSecConfiguration resource.
type AppSecConfigurationArgs struct {
// Unique identifier of the Akamai contract associated with the new configuration
ContractId pulumi.StringInput
// Unique identifier of the existing configuration being cloned to create the new configuration
CreateFromConfigId pulumi.IntPtrInput
// Version number of the existing configuration being cloned to create the new configuration
CreateFromVersion pulumi.IntPtrInput
// Brief description of the new configuration
Description pulumi.StringInput
// Unique identifier of the contract group associated with the new configuration
GroupId pulumi.IntInput
// Hostnames to be protected by the new configuration
HostNames pulumi.StringArrayInput
// Name of the new configuration
Name pulumi.StringPtrInput
}
func (AppSecConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*appSecConfigurationArgs)(nil)).Elem()
}
type AppSecConfigurationInput interface {
pulumi.Input
ToAppSecConfigurationOutput() AppSecConfigurationOutput
ToAppSecConfigurationOutputWithContext(ctx context.Context) AppSecConfigurationOutput
}
func (*AppSecConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**AppSecConfiguration)(nil)).Elem()
}
func (i *AppSecConfiguration) ToAppSecConfigurationOutput() AppSecConfigurationOutput {
return i.ToAppSecConfigurationOutputWithContext(context.Background())
}
func (i *AppSecConfiguration) ToAppSecConfigurationOutputWithContext(ctx context.Context) AppSecConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecConfigurationOutput)
}
// AppSecConfigurationArrayInput is an input type that accepts AppSecConfigurationArray and AppSecConfigurationArrayOutput values.
// You can construct a concrete instance of `AppSecConfigurationArrayInput` via:
//
// AppSecConfigurationArray{ AppSecConfigurationArgs{...} }
type AppSecConfigurationArrayInput interface {
pulumi.Input
ToAppSecConfigurationArrayOutput() AppSecConfigurationArrayOutput
ToAppSecConfigurationArrayOutputWithContext(context.Context) AppSecConfigurationArrayOutput
}
type AppSecConfigurationArray []AppSecConfigurationInput
func (AppSecConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AppSecConfiguration)(nil)).Elem()
}
func (i AppSecConfigurationArray) ToAppSecConfigurationArrayOutput() AppSecConfigurationArrayOutput {
return i.ToAppSecConfigurationArrayOutputWithContext(context.Background())
}
func (i AppSecConfigurationArray) ToAppSecConfigurationArrayOutputWithContext(ctx context.Context) AppSecConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecConfigurationArrayOutput)
}
// AppSecConfigurationMapInput is an input type that accepts AppSecConfigurationMap and AppSecConfigurationMapOutput values.
// You can construct a concrete instance of `AppSecConfigurationMapInput` via:
//
// AppSecConfigurationMap{ "key": AppSecConfigurationArgs{...} }
type AppSecConfigurationMapInput interface {
pulumi.Input
ToAppSecConfigurationMapOutput() AppSecConfigurationMapOutput
ToAppSecConfigurationMapOutputWithContext(context.Context) AppSecConfigurationMapOutput
}
type AppSecConfigurationMap map[string]AppSecConfigurationInput
func (AppSecConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AppSecConfiguration)(nil)).Elem()
}
func (i AppSecConfigurationMap) ToAppSecConfigurationMapOutput() AppSecConfigurationMapOutput {
return i.ToAppSecConfigurationMapOutputWithContext(context.Background())
}
func (i AppSecConfigurationMap) ToAppSecConfigurationMapOutputWithContext(ctx context.Context) AppSecConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecConfigurationMapOutput)
}
type AppSecConfigurationOutput struct{ *pulumi.OutputState }
func (AppSecConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AppSecConfiguration)(nil)).Elem()
}
func (o AppSecConfigurationOutput) ToAppSecConfigurationOutput() AppSecConfigurationOutput {
return o
}
func (o AppSecConfigurationOutput) ToAppSecConfigurationOutputWithContext(ctx context.Context) AppSecConfigurationOutput {
return o
}
// Unique identifier of the new security configuration
func (o AppSecConfigurationOutput) ConfigId() pulumi.IntOutput {
return o.ApplyT(func(v *AppSecConfiguration) pulumi.IntOutput { return v.ConfigId }).(pulumi.IntOutput)
}
// Unique identifier of the Akamai contract associated with the new configuration
func (o AppSecConfigurationOutput) ContractId() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecConfiguration) pulumi.StringOutput { return v.ContractId }).(pulumi.StringOutput)
}
// Unique identifier of the existing configuration being cloned to create the new configuration
func (o AppSecConfigurationOutput) CreateFromConfigId() pulumi.IntPtrOutput {
return o.ApplyT(func(v *AppSecConfiguration) pulumi.IntPtrOutput { return v.CreateFromConfigId }).(pulumi.IntPtrOutput)
}
// Version number of the existing configuration being cloned to create the new configuration
func (o AppSecConfigurationOutput) CreateFromVersion() pulumi.IntPtrOutput {
return o.ApplyT(func(v *AppSecConfiguration) pulumi.IntPtrOutput { return v.CreateFromVersion }).(pulumi.IntPtrOutput)
}
// Brief description of the new configuration
func (o AppSecConfigurationOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecConfiguration) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// Unique identifier of the contract group associated with the new configuration
func (o AppSecConfigurationOutput) GroupId() pulumi.IntOutput {
return o.ApplyT(func(v *AppSecConfiguration) pulumi.IntOutput { return v.GroupId }).(pulumi.IntOutput)
}
// Hostnames to be protected by the new configuration
func (o AppSecConfigurationOutput) HostNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AppSecConfiguration) pulumi.StringArrayOutput { return v.HostNames }).(pulumi.StringArrayOutput)
}
// Name of the new configuration
func (o AppSecConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type AppSecConfigurationArrayOutput struct{ *pulumi.OutputState }
func (AppSecConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AppSecConfiguration)(nil)).Elem()
}
func (o AppSecConfigurationArrayOutput) ToAppSecConfigurationArrayOutput() AppSecConfigurationArrayOutput {
return o
}
func (o AppSecConfigurationArrayOutput) ToAppSecConfigurationArrayOutputWithContext(ctx context.Context) AppSecConfigurationArrayOutput {
return o
}
func (o AppSecConfigurationArrayOutput) Index(i pulumi.IntInput) AppSecConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AppSecConfiguration {
return vs[0].([]*AppSecConfiguration)[vs[1].(int)]
}).(AppSecConfigurationOutput)
}
type AppSecConfigurationMapOutput struct{ *pulumi.OutputState }
func (AppSecConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AppSecConfiguration)(nil)).Elem()
}
func (o AppSecConfigurationMapOutput) ToAppSecConfigurationMapOutput() AppSecConfigurationMapOutput {
return o
}
func (o AppSecConfigurationMapOutput) ToAppSecConfigurationMapOutputWithContext(ctx context.Context) AppSecConfigurationMapOutput {
return o
}
func (o AppSecConfigurationMapOutput) MapIndex(k pulumi.StringInput) AppSecConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AppSecConfiguration {
return vs[0].(map[string]*AppSecConfiguration)[vs[1].(string)]
}).(AppSecConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AppSecConfigurationInput)(nil)).Elem(), &AppSecConfiguration{})
pulumi.RegisterInputType(reflect.TypeOf((*AppSecConfigurationArrayInput)(nil)).Elem(), AppSecConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AppSecConfigurationMapInput)(nil)).Elem(), AppSecConfigurationMap{})
pulumi.RegisterOutputType(AppSecConfigurationOutput{})
pulumi.RegisterOutputType(AppSecConfigurationArrayOutput{})
pulumi.RegisterOutputType(AppSecConfigurationMapOutput{})
}