/
global.go
248 lines (200 loc) · 8.81 KB
/
global.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
// 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 firewall
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/internal"
)
// Global firewall settings. Applies to FortiOS Version `>= 7.2.1`.
//
// ## Import
//
// Firewall Global can be imported using any of these accepted formats:
//
// ```sh
// $ pulumi import fortios:firewall/global:Global labelname FirewallGlobal
// ```
//
// If you do not want to import arguments of block:
//
// $ export "FORTIOS_IMPORT_TABLE"="false"
//
// ```sh
// $ pulumi import fortios:firewall/global:Global labelname FirewallGlobal
// ```
//
// $ unset "FORTIOS_IMPORT_TABLE"
type Global struct {
pulumi.CustomResourceState
// Persistency of banned IPs across power cycling. Valid values: `disabled`, `permanent-only`, `all`.
BannedIpPersistency pulumi.StringOutput `pulumi:"bannedIpPersistency"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrOutput `pulumi:"vdomparam"`
}
// NewGlobal registers a new resource with the given unique name, arguments, and options.
func NewGlobal(ctx *pulumi.Context,
name string, args *GlobalArgs, opts ...pulumi.ResourceOption) (*Global, error) {
if args == nil {
args = &GlobalArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Global
err := ctx.RegisterResource("fortios:firewall/global:Global", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGlobal gets an existing Global 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 GetGlobal(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GlobalState, opts ...pulumi.ResourceOption) (*Global, error) {
var resource Global
err := ctx.ReadResource("fortios:firewall/global:Global", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Global resources.
type globalState struct {
// Persistency of banned IPs across power cycling. Valid values: `disabled`, `permanent-only`, `all`.
BannedIpPersistency *string `pulumi:"bannedIpPersistency"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
}
type GlobalState struct {
// Persistency of banned IPs across power cycling. Valid values: `disabled`, `permanent-only`, `all`.
BannedIpPersistency pulumi.StringPtrInput
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput
}
func (GlobalState) ElementType() reflect.Type {
return reflect.TypeOf((*globalState)(nil)).Elem()
}
type globalArgs struct {
// Persistency of banned IPs across power cycling. Valid values: `disabled`, `permanent-only`, `all`.
BannedIpPersistency *string `pulumi:"bannedIpPersistency"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
}
// The set of arguments for constructing a Global resource.
type GlobalArgs struct {
// Persistency of banned IPs across power cycling. Valid values: `disabled`, `permanent-only`, `all`.
BannedIpPersistency pulumi.StringPtrInput
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput
}
func (GlobalArgs) ElementType() reflect.Type {
return reflect.TypeOf((*globalArgs)(nil)).Elem()
}
type GlobalInput interface {
pulumi.Input
ToGlobalOutput() GlobalOutput
ToGlobalOutputWithContext(ctx context.Context) GlobalOutput
}
func (*Global) ElementType() reflect.Type {
return reflect.TypeOf((**Global)(nil)).Elem()
}
func (i *Global) ToGlobalOutput() GlobalOutput {
return i.ToGlobalOutputWithContext(context.Background())
}
func (i *Global) ToGlobalOutputWithContext(ctx context.Context) GlobalOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalOutput)
}
// GlobalArrayInput is an input type that accepts GlobalArray and GlobalArrayOutput values.
// You can construct a concrete instance of `GlobalArrayInput` via:
//
// GlobalArray{ GlobalArgs{...} }
type GlobalArrayInput interface {
pulumi.Input
ToGlobalArrayOutput() GlobalArrayOutput
ToGlobalArrayOutputWithContext(context.Context) GlobalArrayOutput
}
type GlobalArray []GlobalInput
func (GlobalArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Global)(nil)).Elem()
}
func (i GlobalArray) ToGlobalArrayOutput() GlobalArrayOutput {
return i.ToGlobalArrayOutputWithContext(context.Background())
}
func (i GlobalArray) ToGlobalArrayOutputWithContext(ctx context.Context) GlobalArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalArrayOutput)
}
// GlobalMapInput is an input type that accepts GlobalMap and GlobalMapOutput values.
// You can construct a concrete instance of `GlobalMapInput` via:
//
// GlobalMap{ "key": GlobalArgs{...} }
type GlobalMapInput interface {
pulumi.Input
ToGlobalMapOutput() GlobalMapOutput
ToGlobalMapOutputWithContext(context.Context) GlobalMapOutput
}
type GlobalMap map[string]GlobalInput
func (GlobalMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Global)(nil)).Elem()
}
func (i GlobalMap) ToGlobalMapOutput() GlobalMapOutput {
return i.ToGlobalMapOutputWithContext(context.Background())
}
func (i GlobalMap) ToGlobalMapOutputWithContext(ctx context.Context) GlobalMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GlobalMapOutput)
}
type GlobalOutput struct{ *pulumi.OutputState }
func (GlobalOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Global)(nil)).Elem()
}
func (o GlobalOutput) ToGlobalOutput() GlobalOutput {
return o
}
func (o GlobalOutput) ToGlobalOutputWithContext(ctx context.Context) GlobalOutput {
return o
}
// Persistency of banned IPs across power cycling. Valid values: `disabled`, `permanent-only`, `all`.
func (o GlobalOutput) BannedIpPersistency() pulumi.StringOutput {
return o.ApplyT(func(v *Global) pulumi.StringOutput { return v.BannedIpPersistency }).(pulumi.StringOutput)
}
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
func (o GlobalOutput) Vdomparam() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Global) pulumi.StringPtrOutput { return v.Vdomparam }).(pulumi.StringPtrOutput)
}
type GlobalArrayOutput struct{ *pulumi.OutputState }
func (GlobalArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Global)(nil)).Elem()
}
func (o GlobalArrayOutput) ToGlobalArrayOutput() GlobalArrayOutput {
return o
}
func (o GlobalArrayOutput) ToGlobalArrayOutputWithContext(ctx context.Context) GlobalArrayOutput {
return o
}
func (o GlobalArrayOutput) Index(i pulumi.IntInput) GlobalOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Global {
return vs[0].([]*Global)[vs[1].(int)]
}).(GlobalOutput)
}
type GlobalMapOutput struct{ *pulumi.OutputState }
func (GlobalMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Global)(nil)).Elem()
}
func (o GlobalMapOutput) ToGlobalMapOutput() GlobalMapOutput {
return o
}
func (o GlobalMapOutput) ToGlobalMapOutputWithContext(ctx context.Context) GlobalMapOutput {
return o
}
func (o GlobalMapOutput) MapIndex(k pulumi.StringInput) GlobalOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Global {
return vs[0].(map[string]*Global)[vs[1].(string)]
}).(GlobalOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GlobalInput)(nil)).Elem(), &Global{})
pulumi.RegisterInputType(reflect.TypeOf((*GlobalArrayInput)(nil)).Elem(), GlobalArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GlobalMapInput)(nil)).Elem(), GlobalMap{})
pulumi.RegisterOutputType(GlobalOutput{})
pulumi.RegisterOutputType(GlobalArrayOutput{})
pulumi.RegisterOutputType(GlobalMapOutput{})
}