/
appSecEval.go
313 lines (259 loc) · 11.3 KB
/
appSecEval.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
// 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 AppSecEval struct {
pulumi.CustomResourceState
// Unique identifier of the security configuration
ConfigId pulumi.IntOutput `pulumi:"configId"`
// Versioning information for the Kona Rule Set currently in use in production
CurrentRuleset pulumi.StringOutput `pulumi:"currentRuleset"`
// Evaluation mode (ASE_AUTO or ASE_MANUAL)
EvalMode pulumi.StringPtrOutput `pulumi:"evalMode"`
// Evaluation mode operation (START, STOP, RESTART, UPDATE or COMPLETE)
EvalOperation pulumi.StringOutput `pulumi:"evalOperation"`
// Whether an evaluation is currently in progress
EvalStatus pulumi.StringOutput `pulumi:"evalStatus"`
// Versioning information for the Kona Rule Set being evaluated
EvaluatingRuleset pulumi.StringOutput `pulumi:"evaluatingRuleset"`
// Date when the evaluation period ends
ExpirationDate pulumi.StringOutput `pulumi:"expirationDate"`
// Unique identifier of the security policy
SecurityPolicyId pulumi.StringOutput `pulumi:"securityPolicyId"`
}
// NewAppSecEval registers a new resource with the given unique name, arguments, and options.
func NewAppSecEval(ctx *pulumi.Context,
name string, args *AppSecEvalArgs, opts ...pulumi.ResourceOption) (*AppSecEval, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ConfigId == nil {
return nil, errors.New("invalid value for required argument 'ConfigId'")
}
if args.EvalOperation == nil {
return nil, errors.New("invalid value for required argument 'EvalOperation'")
}
if args.SecurityPolicyId == nil {
return nil, errors.New("invalid value for required argument 'SecurityPolicyId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AppSecEval
err := ctx.RegisterResource("akamai:index/appSecEval:AppSecEval", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAppSecEval gets an existing AppSecEval 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 GetAppSecEval(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AppSecEvalState, opts ...pulumi.ResourceOption) (*AppSecEval, error) {
var resource AppSecEval
err := ctx.ReadResource("akamai:index/appSecEval:AppSecEval", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AppSecEval resources.
type appSecEvalState struct {
// Unique identifier of the security configuration
ConfigId *int `pulumi:"configId"`
// Versioning information for the Kona Rule Set currently in use in production
CurrentRuleset *string `pulumi:"currentRuleset"`
// Evaluation mode (ASE_AUTO or ASE_MANUAL)
EvalMode *string `pulumi:"evalMode"`
// Evaluation mode operation (START, STOP, RESTART, UPDATE or COMPLETE)
EvalOperation *string `pulumi:"evalOperation"`
// Whether an evaluation is currently in progress
EvalStatus *string `pulumi:"evalStatus"`
// Versioning information for the Kona Rule Set being evaluated
EvaluatingRuleset *string `pulumi:"evaluatingRuleset"`
// Date when the evaluation period ends
ExpirationDate *string `pulumi:"expirationDate"`
// Unique identifier of the security policy
SecurityPolicyId *string `pulumi:"securityPolicyId"`
}
type AppSecEvalState struct {
// Unique identifier of the security configuration
ConfigId pulumi.IntPtrInput
// Versioning information for the Kona Rule Set currently in use in production
CurrentRuleset pulumi.StringPtrInput
// Evaluation mode (ASE_AUTO or ASE_MANUAL)
EvalMode pulumi.StringPtrInput
// Evaluation mode operation (START, STOP, RESTART, UPDATE or COMPLETE)
EvalOperation pulumi.StringPtrInput
// Whether an evaluation is currently in progress
EvalStatus pulumi.StringPtrInput
// Versioning information for the Kona Rule Set being evaluated
EvaluatingRuleset pulumi.StringPtrInput
// Date when the evaluation period ends
ExpirationDate pulumi.StringPtrInput
// Unique identifier of the security policy
SecurityPolicyId pulumi.StringPtrInput
}
func (AppSecEvalState) ElementType() reflect.Type {
return reflect.TypeOf((*appSecEvalState)(nil)).Elem()
}
type appSecEvalArgs struct {
// Unique identifier of the security configuration
ConfigId int `pulumi:"configId"`
// Evaluation mode (ASE_AUTO or ASE_MANUAL)
EvalMode *string `pulumi:"evalMode"`
// Evaluation mode operation (START, STOP, RESTART, UPDATE or COMPLETE)
EvalOperation string `pulumi:"evalOperation"`
// Unique identifier of the security policy
SecurityPolicyId string `pulumi:"securityPolicyId"`
}
// The set of arguments for constructing a AppSecEval resource.
type AppSecEvalArgs struct {
// Unique identifier of the security configuration
ConfigId pulumi.IntInput
// Evaluation mode (ASE_AUTO or ASE_MANUAL)
EvalMode pulumi.StringPtrInput
// Evaluation mode operation (START, STOP, RESTART, UPDATE or COMPLETE)
EvalOperation pulumi.StringInput
// Unique identifier of the security policy
SecurityPolicyId pulumi.StringInput
}
func (AppSecEvalArgs) ElementType() reflect.Type {
return reflect.TypeOf((*appSecEvalArgs)(nil)).Elem()
}
type AppSecEvalInput interface {
pulumi.Input
ToAppSecEvalOutput() AppSecEvalOutput
ToAppSecEvalOutputWithContext(ctx context.Context) AppSecEvalOutput
}
func (*AppSecEval) ElementType() reflect.Type {
return reflect.TypeOf((**AppSecEval)(nil)).Elem()
}
func (i *AppSecEval) ToAppSecEvalOutput() AppSecEvalOutput {
return i.ToAppSecEvalOutputWithContext(context.Background())
}
func (i *AppSecEval) ToAppSecEvalOutputWithContext(ctx context.Context) AppSecEvalOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecEvalOutput)
}
// AppSecEvalArrayInput is an input type that accepts AppSecEvalArray and AppSecEvalArrayOutput values.
// You can construct a concrete instance of `AppSecEvalArrayInput` via:
//
// AppSecEvalArray{ AppSecEvalArgs{...} }
type AppSecEvalArrayInput interface {
pulumi.Input
ToAppSecEvalArrayOutput() AppSecEvalArrayOutput
ToAppSecEvalArrayOutputWithContext(context.Context) AppSecEvalArrayOutput
}
type AppSecEvalArray []AppSecEvalInput
func (AppSecEvalArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AppSecEval)(nil)).Elem()
}
func (i AppSecEvalArray) ToAppSecEvalArrayOutput() AppSecEvalArrayOutput {
return i.ToAppSecEvalArrayOutputWithContext(context.Background())
}
func (i AppSecEvalArray) ToAppSecEvalArrayOutputWithContext(ctx context.Context) AppSecEvalArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecEvalArrayOutput)
}
// AppSecEvalMapInput is an input type that accepts AppSecEvalMap and AppSecEvalMapOutput values.
// You can construct a concrete instance of `AppSecEvalMapInput` via:
//
// AppSecEvalMap{ "key": AppSecEvalArgs{...} }
type AppSecEvalMapInput interface {
pulumi.Input
ToAppSecEvalMapOutput() AppSecEvalMapOutput
ToAppSecEvalMapOutputWithContext(context.Context) AppSecEvalMapOutput
}
type AppSecEvalMap map[string]AppSecEvalInput
func (AppSecEvalMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AppSecEval)(nil)).Elem()
}
func (i AppSecEvalMap) ToAppSecEvalMapOutput() AppSecEvalMapOutput {
return i.ToAppSecEvalMapOutputWithContext(context.Background())
}
func (i AppSecEvalMap) ToAppSecEvalMapOutputWithContext(ctx context.Context) AppSecEvalMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecEvalMapOutput)
}
type AppSecEvalOutput struct{ *pulumi.OutputState }
func (AppSecEvalOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AppSecEval)(nil)).Elem()
}
func (o AppSecEvalOutput) ToAppSecEvalOutput() AppSecEvalOutput {
return o
}
func (o AppSecEvalOutput) ToAppSecEvalOutputWithContext(ctx context.Context) AppSecEvalOutput {
return o
}
// Unique identifier of the security configuration
func (o AppSecEvalOutput) ConfigId() pulumi.IntOutput {
return o.ApplyT(func(v *AppSecEval) pulumi.IntOutput { return v.ConfigId }).(pulumi.IntOutput)
}
// Versioning information for the Kona Rule Set currently in use in production
func (o AppSecEvalOutput) CurrentRuleset() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecEval) pulumi.StringOutput { return v.CurrentRuleset }).(pulumi.StringOutput)
}
// Evaluation mode (ASE_AUTO or ASE_MANUAL)
func (o AppSecEvalOutput) EvalMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AppSecEval) pulumi.StringPtrOutput { return v.EvalMode }).(pulumi.StringPtrOutput)
}
// Evaluation mode operation (START, STOP, RESTART, UPDATE or COMPLETE)
func (o AppSecEvalOutput) EvalOperation() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecEval) pulumi.StringOutput { return v.EvalOperation }).(pulumi.StringOutput)
}
// Whether an evaluation is currently in progress
func (o AppSecEvalOutput) EvalStatus() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecEval) pulumi.StringOutput { return v.EvalStatus }).(pulumi.StringOutput)
}
// Versioning information for the Kona Rule Set being evaluated
func (o AppSecEvalOutput) EvaluatingRuleset() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecEval) pulumi.StringOutput { return v.EvaluatingRuleset }).(pulumi.StringOutput)
}
// Date when the evaluation period ends
func (o AppSecEvalOutput) ExpirationDate() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecEval) pulumi.StringOutput { return v.ExpirationDate }).(pulumi.StringOutput)
}
// Unique identifier of the security policy
func (o AppSecEvalOutput) SecurityPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecEval) pulumi.StringOutput { return v.SecurityPolicyId }).(pulumi.StringOutput)
}
type AppSecEvalArrayOutput struct{ *pulumi.OutputState }
func (AppSecEvalArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AppSecEval)(nil)).Elem()
}
func (o AppSecEvalArrayOutput) ToAppSecEvalArrayOutput() AppSecEvalArrayOutput {
return o
}
func (o AppSecEvalArrayOutput) ToAppSecEvalArrayOutputWithContext(ctx context.Context) AppSecEvalArrayOutput {
return o
}
func (o AppSecEvalArrayOutput) Index(i pulumi.IntInput) AppSecEvalOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AppSecEval {
return vs[0].([]*AppSecEval)[vs[1].(int)]
}).(AppSecEvalOutput)
}
type AppSecEvalMapOutput struct{ *pulumi.OutputState }
func (AppSecEvalMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AppSecEval)(nil)).Elem()
}
func (o AppSecEvalMapOutput) ToAppSecEvalMapOutput() AppSecEvalMapOutput {
return o
}
func (o AppSecEvalMapOutput) ToAppSecEvalMapOutputWithContext(ctx context.Context) AppSecEvalMapOutput {
return o
}
func (o AppSecEvalMapOutput) MapIndex(k pulumi.StringInput) AppSecEvalOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AppSecEval {
return vs[0].(map[string]*AppSecEval)[vs[1].(string)]
}).(AppSecEvalOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AppSecEvalInput)(nil)).Elem(), &AppSecEval{})
pulumi.RegisterInputType(reflect.TypeOf((*AppSecEvalArrayInput)(nil)).Elem(), AppSecEvalArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AppSecEvalMapInput)(nil)).Elem(), AppSecEvalMap{})
pulumi.RegisterOutputType(AppSecEvalOutput{})
pulumi.RegisterOutputType(AppSecEvalArrayOutput{})
pulumi.RegisterOutputType(AppSecEvalMapOutput{})
}