/
appSecWafMode.go
307 lines (253 loc) · 11.4 KB
/
appSecWafMode.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
// 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 AppSecWafMode struct {
pulumi.CustomResourceState
// Unique identifier of the security configuration
ConfigId pulumi.IntOutput `pulumi:"configId"`
// Versioning information for the current Kona Rule Set
CurrentRuleset pulumi.StringOutput `pulumi:"currentRuleset"`
// Date on which the evaluation period ends, if applicable
EvalExpirationDate pulumi.StringOutput `pulumi:"evalExpirationDate"`
// Versioning information for the Kona Rule Set being evaluated, if applicable
EvalRuleset pulumi.StringOutput `pulumi:"evalRuleset"`
// Whether an evaluation is currently in progress
EvalStatus pulumi.StringOutput `pulumi:"evalStatus"`
// How Kona Rule Set rules should be upgraded (KRS, AAG, ASE_MANUAL or ASE_AUTO)
Mode pulumi.StringOutput `pulumi:"mode"`
// Text representation
OutputText pulumi.StringOutput `pulumi:"outputText"`
// Unique identifier of the security policy
SecurityPolicyId pulumi.StringOutput `pulumi:"securityPolicyId"`
}
// NewAppSecWafMode registers a new resource with the given unique name, arguments, and options.
func NewAppSecWafMode(ctx *pulumi.Context,
name string, args *AppSecWafModeArgs, opts ...pulumi.ResourceOption) (*AppSecWafMode, 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.Mode == nil {
return nil, errors.New("invalid value for required argument 'Mode'")
}
if args.SecurityPolicyId == nil {
return nil, errors.New("invalid value for required argument 'SecurityPolicyId'")
}
var resource AppSecWafMode
err := ctx.RegisterResource("akamai:index/appSecWafMode:AppSecWafMode", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAppSecWafMode gets an existing AppSecWafMode 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 GetAppSecWafMode(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AppSecWafModeState, opts ...pulumi.ResourceOption) (*AppSecWafMode, error) {
var resource AppSecWafMode
err := ctx.ReadResource("akamai:index/appSecWafMode:AppSecWafMode", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AppSecWafMode resources.
type appSecWafModeState struct {
// Unique identifier of the security configuration
ConfigId *int `pulumi:"configId"`
// Versioning information for the current Kona Rule Set
CurrentRuleset *string `pulumi:"currentRuleset"`
// Date on which the evaluation period ends, if applicable
EvalExpirationDate *string `pulumi:"evalExpirationDate"`
// Versioning information for the Kona Rule Set being evaluated, if applicable
EvalRuleset *string `pulumi:"evalRuleset"`
// Whether an evaluation is currently in progress
EvalStatus *string `pulumi:"evalStatus"`
// How Kona Rule Set rules should be upgraded (KRS, AAG, ASE_MANUAL or ASE_AUTO)
Mode *string `pulumi:"mode"`
// Text representation
OutputText *string `pulumi:"outputText"`
// Unique identifier of the security policy
SecurityPolicyId *string `pulumi:"securityPolicyId"`
}
type AppSecWafModeState struct {
// Unique identifier of the security configuration
ConfigId pulumi.IntPtrInput
// Versioning information for the current Kona Rule Set
CurrentRuleset pulumi.StringPtrInput
// Date on which the evaluation period ends, if applicable
EvalExpirationDate pulumi.StringPtrInput
// Versioning information for the Kona Rule Set being evaluated, if applicable
EvalRuleset pulumi.StringPtrInput
// Whether an evaluation is currently in progress
EvalStatus pulumi.StringPtrInput
// How Kona Rule Set rules should be upgraded (KRS, AAG, ASE_MANUAL or ASE_AUTO)
Mode pulumi.StringPtrInput
// Text representation
OutputText pulumi.StringPtrInput
// Unique identifier of the security policy
SecurityPolicyId pulumi.StringPtrInput
}
func (AppSecWafModeState) ElementType() reflect.Type {
return reflect.TypeOf((*appSecWafModeState)(nil)).Elem()
}
type appSecWafModeArgs struct {
// Unique identifier of the security configuration
ConfigId int `pulumi:"configId"`
// How Kona Rule Set rules should be upgraded (KRS, AAG, ASE_MANUAL or ASE_AUTO)
Mode string `pulumi:"mode"`
// Unique identifier of the security policy
SecurityPolicyId string `pulumi:"securityPolicyId"`
}
// The set of arguments for constructing a AppSecWafMode resource.
type AppSecWafModeArgs struct {
// Unique identifier of the security configuration
ConfigId pulumi.IntInput
// How Kona Rule Set rules should be upgraded (KRS, AAG, ASE_MANUAL or ASE_AUTO)
Mode pulumi.StringInput
// Unique identifier of the security policy
SecurityPolicyId pulumi.StringInput
}
func (AppSecWafModeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*appSecWafModeArgs)(nil)).Elem()
}
type AppSecWafModeInput interface {
pulumi.Input
ToAppSecWafModeOutput() AppSecWafModeOutput
ToAppSecWafModeOutputWithContext(ctx context.Context) AppSecWafModeOutput
}
func (*AppSecWafMode) ElementType() reflect.Type {
return reflect.TypeOf((**AppSecWafMode)(nil)).Elem()
}
func (i *AppSecWafMode) ToAppSecWafModeOutput() AppSecWafModeOutput {
return i.ToAppSecWafModeOutputWithContext(context.Background())
}
func (i *AppSecWafMode) ToAppSecWafModeOutputWithContext(ctx context.Context) AppSecWafModeOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecWafModeOutput)
}
// AppSecWafModeArrayInput is an input type that accepts AppSecWafModeArray and AppSecWafModeArrayOutput values.
// You can construct a concrete instance of `AppSecWafModeArrayInput` via:
//
// AppSecWafModeArray{ AppSecWafModeArgs{...} }
type AppSecWafModeArrayInput interface {
pulumi.Input
ToAppSecWafModeArrayOutput() AppSecWafModeArrayOutput
ToAppSecWafModeArrayOutputWithContext(context.Context) AppSecWafModeArrayOutput
}
type AppSecWafModeArray []AppSecWafModeInput
func (AppSecWafModeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AppSecWafMode)(nil)).Elem()
}
func (i AppSecWafModeArray) ToAppSecWafModeArrayOutput() AppSecWafModeArrayOutput {
return i.ToAppSecWafModeArrayOutputWithContext(context.Background())
}
func (i AppSecWafModeArray) ToAppSecWafModeArrayOutputWithContext(ctx context.Context) AppSecWafModeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecWafModeArrayOutput)
}
// AppSecWafModeMapInput is an input type that accepts AppSecWafModeMap and AppSecWafModeMapOutput values.
// You can construct a concrete instance of `AppSecWafModeMapInput` via:
//
// AppSecWafModeMap{ "key": AppSecWafModeArgs{...} }
type AppSecWafModeMapInput interface {
pulumi.Input
ToAppSecWafModeMapOutput() AppSecWafModeMapOutput
ToAppSecWafModeMapOutputWithContext(context.Context) AppSecWafModeMapOutput
}
type AppSecWafModeMap map[string]AppSecWafModeInput
func (AppSecWafModeMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AppSecWafMode)(nil)).Elem()
}
func (i AppSecWafModeMap) ToAppSecWafModeMapOutput() AppSecWafModeMapOutput {
return i.ToAppSecWafModeMapOutputWithContext(context.Background())
}
func (i AppSecWafModeMap) ToAppSecWafModeMapOutputWithContext(ctx context.Context) AppSecWafModeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecWafModeMapOutput)
}
type AppSecWafModeOutput struct{ *pulumi.OutputState }
func (AppSecWafModeOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AppSecWafMode)(nil)).Elem()
}
func (o AppSecWafModeOutput) ToAppSecWafModeOutput() AppSecWafModeOutput {
return o
}
func (o AppSecWafModeOutput) ToAppSecWafModeOutputWithContext(ctx context.Context) AppSecWafModeOutput {
return o
}
// Unique identifier of the security configuration
func (o AppSecWafModeOutput) ConfigId() pulumi.IntOutput {
return o.ApplyT(func(v *AppSecWafMode) pulumi.IntOutput { return v.ConfigId }).(pulumi.IntOutput)
}
// Versioning information for the current Kona Rule Set
func (o AppSecWafModeOutput) CurrentRuleset() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecWafMode) pulumi.StringOutput { return v.CurrentRuleset }).(pulumi.StringOutput)
}
// Date on which the evaluation period ends, if applicable
func (o AppSecWafModeOutput) EvalExpirationDate() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecWafMode) pulumi.StringOutput { return v.EvalExpirationDate }).(pulumi.StringOutput)
}
// Versioning information for the Kona Rule Set being evaluated, if applicable
func (o AppSecWafModeOutput) EvalRuleset() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecWafMode) pulumi.StringOutput { return v.EvalRuleset }).(pulumi.StringOutput)
}
// Whether an evaluation is currently in progress
func (o AppSecWafModeOutput) EvalStatus() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecWafMode) pulumi.StringOutput { return v.EvalStatus }).(pulumi.StringOutput)
}
// How Kona Rule Set rules should be upgraded (KRS, AAG, ASE_MANUAL or ASE_AUTO)
func (o AppSecWafModeOutput) Mode() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecWafMode) pulumi.StringOutput { return v.Mode }).(pulumi.StringOutput)
}
// Text representation
func (o AppSecWafModeOutput) OutputText() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecWafMode) pulumi.StringOutput { return v.OutputText }).(pulumi.StringOutput)
}
// Unique identifier of the security policy
func (o AppSecWafModeOutput) SecurityPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecWafMode) pulumi.StringOutput { return v.SecurityPolicyId }).(pulumi.StringOutput)
}
type AppSecWafModeArrayOutput struct{ *pulumi.OutputState }
func (AppSecWafModeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AppSecWafMode)(nil)).Elem()
}
func (o AppSecWafModeArrayOutput) ToAppSecWafModeArrayOutput() AppSecWafModeArrayOutput {
return o
}
func (o AppSecWafModeArrayOutput) ToAppSecWafModeArrayOutputWithContext(ctx context.Context) AppSecWafModeArrayOutput {
return o
}
func (o AppSecWafModeArrayOutput) Index(i pulumi.IntInput) AppSecWafModeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AppSecWafMode {
return vs[0].([]*AppSecWafMode)[vs[1].(int)]
}).(AppSecWafModeOutput)
}
type AppSecWafModeMapOutput struct{ *pulumi.OutputState }
func (AppSecWafModeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AppSecWafMode)(nil)).Elem()
}
func (o AppSecWafModeMapOutput) ToAppSecWafModeMapOutput() AppSecWafModeMapOutput {
return o
}
func (o AppSecWafModeMapOutput) ToAppSecWafModeMapOutputWithContext(ctx context.Context) AppSecWafModeMapOutput {
return o
}
func (o AppSecWafModeMapOutput) MapIndex(k pulumi.StringInput) AppSecWafModeOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AppSecWafMode {
return vs[0].(map[string]*AppSecWafMode)[vs[1].(string)]
}).(AppSecWafModeOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AppSecWafModeInput)(nil)).Elem(), &AppSecWafMode{})
pulumi.RegisterInputType(reflect.TypeOf((*AppSecWafModeArrayInput)(nil)).Elem(), AppSecWafModeArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AppSecWafModeMapInput)(nil)).Elem(), AppSecWafModeMap{})
pulumi.RegisterOutputType(AppSecWafModeOutput{})
pulumi.RegisterOutputType(AppSecWafModeArrayOutput{})
pulumi.RegisterOutputType(AppSecWafModeMapOutput{})
}