/
appSecCustomDeny.go
245 lines (196 loc) · 8.9 KB
/
appSecCustomDeny.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
// 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 AppSecCustomDeny struct {
pulumi.CustomResourceState
// Unique identifier of the security configuration
ConfigId pulumi.IntOutput `pulumi:"configId"`
// JSON-formatted information about the properties and property values for the custom deny
CustomDeny pulumi.StringOutput `pulumi:"customDeny"`
// custom_deny_id
CustomDenyId pulumi.StringOutput `pulumi:"customDenyId"`
}
// NewAppSecCustomDeny registers a new resource with the given unique name, arguments, and options.
func NewAppSecCustomDeny(ctx *pulumi.Context,
name string, args *AppSecCustomDenyArgs, opts ...pulumi.ResourceOption) (*AppSecCustomDeny, 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.CustomDeny == nil {
return nil, errors.New("invalid value for required argument 'CustomDeny'")
}
var resource AppSecCustomDeny
err := ctx.RegisterResource("akamai:index/appSecCustomDeny:AppSecCustomDeny", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAppSecCustomDeny gets an existing AppSecCustomDeny 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 GetAppSecCustomDeny(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AppSecCustomDenyState, opts ...pulumi.ResourceOption) (*AppSecCustomDeny, error) {
var resource AppSecCustomDeny
err := ctx.ReadResource("akamai:index/appSecCustomDeny:AppSecCustomDeny", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AppSecCustomDeny resources.
type appSecCustomDenyState struct {
// Unique identifier of the security configuration
ConfigId *int `pulumi:"configId"`
// JSON-formatted information about the properties and property values for the custom deny
CustomDeny *string `pulumi:"customDeny"`
// custom_deny_id
CustomDenyId *string `pulumi:"customDenyId"`
}
type AppSecCustomDenyState struct {
// Unique identifier of the security configuration
ConfigId pulumi.IntPtrInput
// JSON-formatted information about the properties and property values for the custom deny
CustomDeny pulumi.StringPtrInput
// custom_deny_id
CustomDenyId pulumi.StringPtrInput
}
func (AppSecCustomDenyState) ElementType() reflect.Type {
return reflect.TypeOf((*appSecCustomDenyState)(nil)).Elem()
}
type appSecCustomDenyArgs struct {
// Unique identifier of the security configuration
ConfigId int `pulumi:"configId"`
// JSON-formatted information about the properties and property values for the custom deny
CustomDeny string `pulumi:"customDeny"`
}
// The set of arguments for constructing a AppSecCustomDeny resource.
type AppSecCustomDenyArgs struct {
// Unique identifier of the security configuration
ConfigId pulumi.IntInput
// JSON-formatted information about the properties and property values for the custom deny
CustomDeny pulumi.StringInput
}
func (AppSecCustomDenyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*appSecCustomDenyArgs)(nil)).Elem()
}
type AppSecCustomDenyInput interface {
pulumi.Input
ToAppSecCustomDenyOutput() AppSecCustomDenyOutput
ToAppSecCustomDenyOutputWithContext(ctx context.Context) AppSecCustomDenyOutput
}
func (*AppSecCustomDeny) ElementType() reflect.Type {
return reflect.TypeOf((**AppSecCustomDeny)(nil)).Elem()
}
func (i *AppSecCustomDeny) ToAppSecCustomDenyOutput() AppSecCustomDenyOutput {
return i.ToAppSecCustomDenyOutputWithContext(context.Background())
}
func (i *AppSecCustomDeny) ToAppSecCustomDenyOutputWithContext(ctx context.Context) AppSecCustomDenyOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecCustomDenyOutput)
}
// AppSecCustomDenyArrayInput is an input type that accepts AppSecCustomDenyArray and AppSecCustomDenyArrayOutput values.
// You can construct a concrete instance of `AppSecCustomDenyArrayInput` via:
//
// AppSecCustomDenyArray{ AppSecCustomDenyArgs{...} }
type AppSecCustomDenyArrayInput interface {
pulumi.Input
ToAppSecCustomDenyArrayOutput() AppSecCustomDenyArrayOutput
ToAppSecCustomDenyArrayOutputWithContext(context.Context) AppSecCustomDenyArrayOutput
}
type AppSecCustomDenyArray []AppSecCustomDenyInput
func (AppSecCustomDenyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AppSecCustomDeny)(nil)).Elem()
}
func (i AppSecCustomDenyArray) ToAppSecCustomDenyArrayOutput() AppSecCustomDenyArrayOutput {
return i.ToAppSecCustomDenyArrayOutputWithContext(context.Background())
}
func (i AppSecCustomDenyArray) ToAppSecCustomDenyArrayOutputWithContext(ctx context.Context) AppSecCustomDenyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecCustomDenyArrayOutput)
}
// AppSecCustomDenyMapInput is an input type that accepts AppSecCustomDenyMap and AppSecCustomDenyMapOutput values.
// You can construct a concrete instance of `AppSecCustomDenyMapInput` via:
//
// AppSecCustomDenyMap{ "key": AppSecCustomDenyArgs{...} }
type AppSecCustomDenyMapInput interface {
pulumi.Input
ToAppSecCustomDenyMapOutput() AppSecCustomDenyMapOutput
ToAppSecCustomDenyMapOutputWithContext(context.Context) AppSecCustomDenyMapOutput
}
type AppSecCustomDenyMap map[string]AppSecCustomDenyInput
func (AppSecCustomDenyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AppSecCustomDeny)(nil)).Elem()
}
func (i AppSecCustomDenyMap) ToAppSecCustomDenyMapOutput() AppSecCustomDenyMapOutput {
return i.ToAppSecCustomDenyMapOutputWithContext(context.Background())
}
func (i AppSecCustomDenyMap) ToAppSecCustomDenyMapOutputWithContext(ctx context.Context) AppSecCustomDenyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AppSecCustomDenyMapOutput)
}
type AppSecCustomDenyOutput struct{ *pulumi.OutputState }
func (AppSecCustomDenyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AppSecCustomDeny)(nil)).Elem()
}
func (o AppSecCustomDenyOutput) ToAppSecCustomDenyOutput() AppSecCustomDenyOutput {
return o
}
func (o AppSecCustomDenyOutput) ToAppSecCustomDenyOutputWithContext(ctx context.Context) AppSecCustomDenyOutput {
return o
}
// Unique identifier of the security configuration
func (o AppSecCustomDenyOutput) ConfigId() pulumi.IntOutput {
return o.ApplyT(func(v *AppSecCustomDeny) pulumi.IntOutput { return v.ConfigId }).(pulumi.IntOutput)
}
// JSON-formatted information about the properties and property values for the custom deny
func (o AppSecCustomDenyOutput) CustomDeny() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecCustomDeny) pulumi.StringOutput { return v.CustomDeny }).(pulumi.StringOutput)
}
// custom_deny_id
func (o AppSecCustomDenyOutput) CustomDenyId() pulumi.StringOutput {
return o.ApplyT(func(v *AppSecCustomDeny) pulumi.StringOutput { return v.CustomDenyId }).(pulumi.StringOutput)
}
type AppSecCustomDenyArrayOutput struct{ *pulumi.OutputState }
func (AppSecCustomDenyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AppSecCustomDeny)(nil)).Elem()
}
func (o AppSecCustomDenyArrayOutput) ToAppSecCustomDenyArrayOutput() AppSecCustomDenyArrayOutput {
return o
}
func (o AppSecCustomDenyArrayOutput) ToAppSecCustomDenyArrayOutputWithContext(ctx context.Context) AppSecCustomDenyArrayOutput {
return o
}
func (o AppSecCustomDenyArrayOutput) Index(i pulumi.IntInput) AppSecCustomDenyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AppSecCustomDeny {
return vs[0].([]*AppSecCustomDeny)[vs[1].(int)]
}).(AppSecCustomDenyOutput)
}
type AppSecCustomDenyMapOutput struct{ *pulumi.OutputState }
func (AppSecCustomDenyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AppSecCustomDeny)(nil)).Elem()
}
func (o AppSecCustomDenyMapOutput) ToAppSecCustomDenyMapOutput() AppSecCustomDenyMapOutput {
return o
}
func (o AppSecCustomDenyMapOutput) ToAppSecCustomDenyMapOutputWithContext(ctx context.Context) AppSecCustomDenyMapOutput {
return o
}
func (o AppSecCustomDenyMapOutput) MapIndex(k pulumi.StringInput) AppSecCustomDenyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AppSecCustomDeny {
return vs[0].(map[string]*AppSecCustomDeny)[vs[1].(string)]
}).(AppSecCustomDenyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AppSecCustomDenyInput)(nil)).Elem(), &AppSecCustomDeny{})
pulumi.RegisterInputType(reflect.TypeOf((*AppSecCustomDenyArrayInput)(nil)).Elem(), AppSecCustomDenyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AppSecCustomDenyMapInput)(nil)).Elem(), AppSecCustomDenyMap{})
pulumi.RegisterOutputType(AppSecCustomDenyOutput{})
pulumi.RegisterOutputType(AppSecCustomDenyArrayOutput{})
pulumi.RegisterOutputType(AppSecCustomDenyMapOutput{})
}