/
internetservicedefinition.go
293 lines (242 loc) · 17 KB
/
internetservicedefinition.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
// 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"
)
// Internet Service definition.
//
// ## Import
//
// Firewall InternetServiceDefinition can be imported using any of these accepted formats:
//
// ```sh
// $ pulumi import fortios:firewall/internetservicedefinition:Internetservicedefinition labelname {{fosid}}
// ```
//
// If you do not want to import arguments of block:
//
// $ export "FORTIOS_IMPORT_TABLE"="false"
//
// ```sh
// $ pulumi import fortios:firewall/internetservicedefinition:Internetservicedefinition labelname {{fosid}}
// ```
//
// $ unset "FORTIOS_IMPORT_TABLE"
type Internetservicedefinition struct {
pulumi.CustomResourceState
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrOutput `pulumi:"dynamicSortSubtable"`
// Protocol and port information in an Internet Service entry. The structure of `entry` block is documented below.
Entries InternetservicedefinitionEntryArrayOutput `pulumi:"entries"`
// Internet Service application list ID.
Fosid pulumi.IntOutput `pulumi:"fosid"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables pulumi.StringPtrOutput `pulumi:"getAllTables"`
// 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"`
}
// NewInternetservicedefinition registers a new resource with the given unique name, arguments, and options.
func NewInternetservicedefinition(ctx *pulumi.Context,
name string, args *InternetservicedefinitionArgs, opts ...pulumi.ResourceOption) (*Internetservicedefinition, error) {
if args == nil {
args = &InternetservicedefinitionArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Internetservicedefinition
err := ctx.RegisterResource("fortios:firewall/internetservicedefinition:Internetservicedefinition", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInternetservicedefinition gets an existing Internetservicedefinition 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 GetInternetservicedefinition(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InternetservicedefinitionState, opts ...pulumi.ResourceOption) (*Internetservicedefinition, error) {
var resource Internetservicedefinition
err := ctx.ReadResource("fortios:firewall/internetservicedefinition:Internetservicedefinition", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Internetservicedefinition resources.
type internetservicedefinitionState struct {
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable *string `pulumi:"dynamicSortSubtable"`
// Protocol and port information in an Internet Service entry. The structure of `entry` block is documented below.
Entries []InternetservicedefinitionEntry `pulumi:"entries"`
// Internet Service application list ID.
Fosid *int `pulumi:"fosid"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables *string `pulumi:"getAllTables"`
// 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 InternetservicedefinitionState struct {
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrInput
// Protocol and port information in an Internet Service entry. The structure of `entry` block is documented below.
Entries InternetservicedefinitionEntryArrayInput
// Internet Service application list ID.
Fosid pulumi.IntPtrInput
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables 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 (InternetservicedefinitionState) ElementType() reflect.Type {
return reflect.TypeOf((*internetservicedefinitionState)(nil)).Elem()
}
type internetservicedefinitionArgs struct {
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable *string `pulumi:"dynamicSortSubtable"`
// Protocol and port information in an Internet Service entry. The structure of `entry` block is documented below.
Entries []InternetservicedefinitionEntry `pulumi:"entries"`
// Internet Service application list ID.
Fosid *int `pulumi:"fosid"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables *string `pulumi:"getAllTables"`
// 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 Internetservicedefinition resource.
type InternetservicedefinitionArgs struct {
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrInput
// Protocol and port information in an Internet Service entry. The structure of `entry` block is documented below.
Entries InternetservicedefinitionEntryArrayInput
// Internet Service application list ID.
Fosid pulumi.IntPtrInput
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables 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 (InternetservicedefinitionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*internetservicedefinitionArgs)(nil)).Elem()
}
type InternetservicedefinitionInput interface {
pulumi.Input
ToInternetservicedefinitionOutput() InternetservicedefinitionOutput
ToInternetservicedefinitionOutputWithContext(ctx context.Context) InternetservicedefinitionOutput
}
func (*Internetservicedefinition) ElementType() reflect.Type {
return reflect.TypeOf((**Internetservicedefinition)(nil)).Elem()
}
func (i *Internetservicedefinition) ToInternetservicedefinitionOutput() InternetservicedefinitionOutput {
return i.ToInternetservicedefinitionOutputWithContext(context.Background())
}
func (i *Internetservicedefinition) ToInternetservicedefinitionOutputWithContext(ctx context.Context) InternetservicedefinitionOutput {
return pulumi.ToOutputWithContext(ctx, i).(InternetservicedefinitionOutput)
}
// InternetservicedefinitionArrayInput is an input type that accepts InternetservicedefinitionArray and InternetservicedefinitionArrayOutput values.
// You can construct a concrete instance of `InternetservicedefinitionArrayInput` via:
//
// InternetservicedefinitionArray{ InternetservicedefinitionArgs{...} }
type InternetservicedefinitionArrayInput interface {
pulumi.Input
ToInternetservicedefinitionArrayOutput() InternetservicedefinitionArrayOutput
ToInternetservicedefinitionArrayOutputWithContext(context.Context) InternetservicedefinitionArrayOutput
}
type InternetservicedefinitionArray []InternetservicedefinitionInput
func (InternetservicedefinitionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Internetservicedefinition)(nil)).Elem()
}
func (i InternetservicedefinitionArray) ToInternetservicedefinitionArrayOutput() InternetservicedefinitionArrayOutput {
return i.ToInternetservicedefinitionArrayOutputWithContext(context.Background())
}
func (i InternetservicedefinitionArray) ToInternetservicedefinitionArrayOutputWithContext(ctx context.Context) InternetservicedefinitionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InternetservicedefinitionArrayOutput)
}
// InternetservicedefinitionMapInput is an input type that accepts InternetservicedefinitionMap and InternetservicedefinitionMapOutput values.
// You can construct a concrete instance of `InternetservicedefinitionMapInput` via:
//
// InternetservicedefinitionMap{ "key": InternetservicedefinitionArgs{...} }
type InternetservicedefinitionMapInput interface {
pulumi.Input
ToInternetservicedefinitionMapOutput() InternetservicedefinitionMapOutput
ToInternetservicedefinitionMapOutputWithContext(context.Context) InternetservicedefinitionMapOutput
}
type InternetservicedefinitionMap map[string]InternetservicedefinitionInput
func (InternetservicedefinitionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Internetservicedefinition)(nil)).Elem()
}
func (i InternetservicedefinitionMap) ToInternetservicedefinitionMapOutput() InternetservicedefinitionMapOutput {
return i.ToInternetservicedefinitionMapOutputWithContext(context.Background())
}
func (i InternetservicedefinitionMap) ToInternetservicedefinitionMapOutputWithContext(ctx context.Context) InternetservicedefinitionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InternetservicedefinitionMapOutput)
}
type InternetservicedefinitionOutput struct{ *pulumi.OutputState }
func (InternetservicedefinitionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Internetservicedefinition)(nil)).Elem()
}
func (o InternetservicedefinitionOutput) ToInternetservicedefinitionOutput() InternetservicedefinitionOutput {
return o
}
func (o InternetservicedefinitionOutput) ToInternetservicedefinitionOutputWithContext(ctx context.Context) InternetservicedefinitionOutput {
return o
}
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
func (o InternetservicedefinitionOutput) DynamicSortSubtable() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Internetservicedefinition) pulumi.StringPtrOutput { return v.DynamicSortSubtable }).(pulumi.StringPtrOutput)
}
// Protocol and port information in an Internet Service entry. The structure of `entry` block is documented below.
func (o InternetservicedefinitionOutput) Entries() InternetservicedefinitionEntryArrayOutput {
return o.ApplyT(func(v *Internetservicedefinition) InternetservicedefinitionEntryArrayOutput { return v.Entries }).(InternetservicedefinitionEntryArrayOutput)
}
// Internet Service application list ID.
func (o InternetservicedefinitionOutput) Fosid() pulumi.IntOutput {
return o.ApplyT(func(v *Internetservicedefinition) pulumi.IntOutput { return v.Fosid }).(pulumi.IntOutput)
}
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
func (o InternetservicedefinitionOutput) GetAllTables() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Internetservicedefinition) pulumi.StringPtrOutput { return v.GetAllTables }).(pulumi.StringPtrOutput)
}
// 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 InternetservicedefinitionOutput) Vdomparam() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Internetservicedefinition) pulumi.StringPtrOutput { return v.Vdomparam }).(pulumi.StringPtrOutput)
}
type InternetservicedefinitionArrayOutput struct{ *pulumi.OutputState }
func (InternetservicedefinitionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Internetservicedefinition)(nil)).Elem()
}
func (o InternetservicedefinitionArrayOutput) ToInternetservicedefinitionArrayOutput() InternetservicedefinitionArrayOutput {
return o
}
func (o InternetservicedefinitionArrayOutput) ToInternetservicedefinitionArrayOutputWithContext(ctx context.Context) InternetservicedefinitionArrayOutput {
return o
}
func (o InternetservicedefinitionArrayOutput) Index(i pulumi.IntInput) InternetservicedefinitionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Internetservicedefinition {
return vs[0].([]*Internetservicedefinition)[vs[1].(int)]
}).(InternetservicedefinitionOutput)
}
type InternetservicedefinitionMapOutput struct{ *pulumi.OutputState }
func (InternetservicedefinitionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Internetservicedefinition)(nil)).Elem()
}
func (o InternetservicedefinitionMapOutput) ToInternetservicedefinitionMapOutput() InternetservicedefinitionMapOutput {
return o
}
func (o InternetservicedefinitionMapOutput) ToInternetservicedefinitionMapOutputWithContext(ctx context.Context) InternetservicedefinitionMapOutput {
return o
}
func (o InternetservicedefinitionMapOutput) MapIndex(k pulumi.StringInput) InternetservicedefinitionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Internetservicedefinition {
return vs[0].(map[string]*Internetservicedefinition)[vs[1].(string)]
}).(InternetservicedefinitionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InternetservicedefinitionInput)(nil)).Elem(), &Internetservicedefinition{})
pulumi.RegisterInputType(reflect.TypeOf((*InternetservicedefinitionArrayInput)(nil)).Elem(), InternetservicedefinitionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InternetservicedefinitionMapInput)(nil)).Elem(), InternetservicedefinitionMap{})
pulumi.RegisterOutputType(InternetservicedefinitionOutput{})
pulumi.RegisterOutputType(InternetservicedefinitionArrayOutput{})
pulumi.RegisterOutputType(InternetservicedefinitionMapOutput{})
}