generated from pulumi/pulumi-tf-provider-boilerplate
/
trafficMirrorFilterEgressRule.go
430 lines (373 loc) · 24 KB
/
trafficMirrorFilterEgressRule.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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
// 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 vpc
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a VPC Traffic Mirror Filter Egress Rule resource.
//
// For information about VPC Traffic Mirror Filter Egress Rule and how to use it, see [What is Traffic Mirror Filter Egress Rule](https://www.alibabacloud.com/help/doc-detail/261357.htm).
//
// > **NOTE:** Available in v1.140.0+.
//
// ## Example Usage
//
// # Basic Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/rhysmdnz/pulumi-alicloud/sdk/go/alicloud/vpc"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleTrafficMirrorFilter, err := vpc.NewTrafficMirrorFilter(ctx, "exampleTrafficMirrorFilter", &vpc.TrafficMirrorFilterArgs{
// TrafficMirrorFilterName: pulumi.String("example_value"),
// })
// if err != nil {
// return err
// }
// _, err = vpc.NewTrafficMirrorFilterEgressRule(ctx, "exampleTrafficMirrorFilterEgressRule", &vpc.TrafficMirrorFilterEgressRuleArgs{
// TrafficMirrorFilterId: exampleTrafficMirrorFilter.ID(),
// Priority: pulumi.Int(1),
// RuleAction: pulumi.String("accept"),
// Protocol: pulumi.String("UDP"),
// DestinationCidrBlock: pulumi.String("10.0.0.0/24"),
// SourceCidrBlock: pulumi.String("10.0.0.0/24"),
// DestinationPortRange: pulumi.String("1/120"),
// SourcePortRange: pulumi.String("1/120"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// VPC Traffic Mirror Filter Egress Rule can be imported using the id, e.g.
//
// ```sh
//
// $ pulumi import alicloud:vpc/trafficMirrorFilterEgressRule:TrafficMirrorFilterEgressRule example <traffic_mirror_filter_id>:<traffic_mirror_filter_egress_rule_id>
//
// ```
type TrafficMirrorFilterEgressRule struct {
pulumi.CustomResourceState
// The destination CIDR block of the outbound traffic.
DestinationCidrBlock pulumi.StringOutput `pulumi:"destinationCidrBlock"`
// The destination CIDR block of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
DestinationPortRange pulumi.StringOutput `pulumi:"destinationPortRange"`
// Whether to pre-check this request only. Default to: `false`
DryRun pulumi.BoolPtrOutput `pulumi:"dryRun"`
// The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is `10`, which indicates that you can configure at most 10 inbound rules for a filter.
Priority pulumi.IntOutput `pulumi:"priority"`
// The transport protocol used by outbound traffic that needs to be mirrored. Valid values: `ALL`, `ICMP`, `TCP`, `UDP`.
Protocol pulumi.StringOutput `pulumi:"protocol"`
// The collection policy of the inbound rule. Valid values: `accept` or `drop`. `accept`: collects network traffic. `drop`: does not collect network traffic.
RuleAction pulumi.StringOutput `pulumi:"ruleAction"`
// The source CIDR block of the outbound traffic.
SourceCidrBlock pulumi.StringOutput `pulumi:"sourceCidrBlock"`
// The source port range of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
SourcePortRange pulumi.StringOutput `pulumi:"sourcePortRange"`
// The state of the inbound rule. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`.
Status pulumi.StringOutput `pulumi:"status"`
// The ID of the outbound rule.
TrafficMirrorFilterEgressRuleId pulumi.StringOutput `pulumi:"trafficMirrorFilterEgressRuleId"`
// The ID of the filter.
TrafficMirrorFilterId pulumi.StringOutput `pulumi:"trafficMirrorFilterId"`
}
// NewTrafficMirrorFilterEgressRule registers a new resource with the given unique name, arguments, and options.
func NewTrafficMirrorFilterEgressRule(ctx *pulumi.Context,
name string, args *TrafficMirrorFilterEgressRuleArgs, opts ...pulumi.ResourceOption) (*TrafficMirrorFilterEgressRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DestinationCidrBlock == nil {
return nil, errors.New("invalid value for required argument 'DestinationCidrBlock'")
}
if args.Priority == nil {
return nil, errors.New("invalid value for required argument 'Priority'")
}
if args.Protocol == nil {
return nil, errors.New("invalid value for required argument 'Protocol'")
}
if args.RuleAction == nil {
return nil, errors.New("invalid value for required argument 'RuleAction'")
}
if args.SourceCidrBlock == nil {
return nil, errors.New("invalid value for required argument 'SourceCidrBlock'")
}
if args.TrafficMirrorFilterId == nil {
return nil, errors.New("invalid value for required argument 'TrafficMirrorFilterId'")
}
opts = pkgResourceDefaultOpts(opts)
var resource TrafficMirrorFilterEgressRule
err := ctx.RegisterResource("alicloud:vpc/trafficMirrorFilterEgressRule:TrafficMirrorFilterEgressRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTrafficMirrorFilterEgressRule gets an existing TrafficMirrorFilterEgressRule 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 GetTrafficMirrorFilterEgressRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TrafficMirrorFilterEgressRuleState, opts ...pulumi.ResourceOption) (*TrafficMirrorFilterEgressRule, error) {
var resource TrafficMirrorFilterEgressRule
err := ctx.ReadResource("alicloud:vpc/trafficMirrorFilterEgressRule:TrafficMirrorFilterEgressRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TrafficMirrorFilterEgressRule resources.
type trafficMirrorFilterEgressRuleState struct {
// The destination CIDR block of the outbound traffic.
DestinationCidrBlock *string `pulumi:"destinationCidrBlock"`
// The destination CIDR block of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
DestinationPortRange *string `pulumi:"destinationPortRange"`
// Whether to pre-check this request only. Default to: `false`
DryRun *bool `pulumi:"dryRun"`
// The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is `10`, which indicates that you can configure at most 10 inbound rules for a filter.
Priority *int `pulumi:"priority"`
// The transport protocol used by outbound traffic that needs to be mirrored. Valid values: `ALL`, `ICMP`, `TCP`, `UDP`.
Protocol *string `pulumi:"protocol"`
// The collection policy of the inbound rule. Valid values: `accept` or `drop`. `accept`: collects network traffic. `drop`: does not collect network traffic.
RuleAction *string `pulumi:"ruleAction"`
// The source CIDR block of the outbound traffic.
SourceCidrBlock *string `pulumi:"sourceCidrBlock"`
// The source port range of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
SourcePortRange *string `pulumi:"sourcePortRange"`
// The state of the inbound rule. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`.
Status *string `pulumi:"status"`
// The ID of the outbound rule.
TrafficMirrorFilterEgressRuleId *string `pulumi:"trafficMirrorFilterEgressRuleId"`
// The ID of the filter.
TrafficMirrorFilterId *string `pulumi:"trafficMirrorFilterId"`
}
type TrafficMirrorFilterEgressRuleState struct {
// The destination CIDR block of the outbound traffic.
DestinationCidrBlock pulumi.StringPtrInput
// The destination CIDR block of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
DestinationPortRange pulumi.StringPtrInput
// Whether to pre-check this request only. Default to: `false`
DryRun pulumi.BoolPtrInput
// The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is `10`, which indicates that you can configure at most 10 inbound rules for a filter.
Priority pulumi.IntPtrInput
// The transport protocol used by outbound traffic that needs to be mirrored. Valid values: `ALL`, `ICMP`, `TCP`, `UDP`.
Protocol pulumi.StringPtrInput
// The collection policy of the inbound rule. Valid values: `accept` or `drop`. `accept`: collects network traffic. `drop`: does not collect network traffic.
RuleAction pulumi.StringPtrInput
// The source CIDR block of the outbound traffic.
SourceCidrBlock pulumi.StringPtrInput
// The source port range of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
SourcePortRange pulumi.StringPtrInput
// The state of the inbound rule. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`.
Status pulumi.StringPtrInput
// The ID of the outbound rule.
TrafficMirrorFilterEgressRuleId pulumi.StringPtrInput
// The ID of the filter.
TrafficMirrorFilterId pulumi.StringPtrInput
}
func (TrafficMirrorFilterEgressRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*trafficMirrorFilterEgressRuleState)(nil)).Elem()
}
type trafficMirrorFilterEgressRuleArgs struct {
// The destination CIDR block of the outbound traffic.
DestinationCidrBlock string `pulumi:"destinationCidrBlock"`
// The destination CIDR block of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
DestinationPortRange *string `pulumi:"destinationPortRange"`
// Whether to pre-check this request only. Default to: `false`
DryRun *bool `pulumi:"dryRun"`
// The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is `10`, which indicates that you can configure at most 10 inbound rules for a filter.
Priority int `pulumi:"priority"`
// The transport protocol used by outbound traffic that needs to be mirrored. Valid values: `ALL`, `ICMP`, `TCP`, `UDP`.
Protocol string `pulumi:"protocol"`
// The collection policy of the inbound rule. Valid values: `accept` or `drop`. `accept`: collects network traffic. `drop`: does not collect network traffic.
RuleAction string `pulumi:"ruleAction"`
// The source CIDR block of the outbound traffic.
SourceCidrBlock string `pulumi:"sourceCidrBlock"`
// The source port range of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
SourcePortRange *string `pulumi:"sourcePortRange"`
// The ID of the filter.
TrafficMirrorFilterId string `pulumi:"trafficMirrorFilterId"`
}
// The set of arguments for constructing a TrafficMirrorFilterEgressRule resource.
type TrafficMirrorFilterEgressRuleArgs struct {
// The destination CIDR block of the outbound traffic.
DestinationCidrBlock pulumi.StringInput
// The destination CIDR block of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
DestinationPortRange pulumi.StringPtrInput
// Whether to pre-check this request only. Default to: `false`
DryRun pulumi.BoolPtrInput
// The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is `10`, which indicates that you can configure at most 10 inbound rules for a filter.
Priority pulumi.IntInput
// The transport protocol used by outbound traffic that needs to be mirrored. Valid values: `ALL`, `ICMP`, `TCP`, `UDP`.
Protocol pulumi.StringInput
// The collection policy of the inbound rule. Valid values: `accept` or `drop`. `accept`: collects network traffic. `drop`: does not collect network traffic.
RuleAction pulumi.StringInput
// The source CIDR block of the outbound traffic.
SourceCidrBlock pulumi.StringInput
// The source port range of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
SourcePortRange pulumi.StringPtrInput
// The ID of the filter.
TrafficMirrorFilterId pulumi.StringInput
}
func (TrafficMirrorFilterEgressRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*trafficMirrorFilterEgressRuleArgs)(nil)).Elem()
}
type TrafficMirrorFilterEgressRuleInput interface {
pulumi.Input
ToTrafficMirrorFilterEgressRuleOutput() TrafficMirrorFilterEgressRuleOutput
ToTrafficMirrorFilterEgressRuleOutputWithContext(ctx context.Context) TrafficMirrorFilterEgressRuleOutput
}
func (*TrafficMirrorFilterEgressRule) ElementType() reflect.Type {
return reflect.TypeOf((**TrafficMirrorFilterEgressRule)(nil)).Elem()
}
func (i *TrafficMirrorFilterEgressRule) ToTrafficMirrorFilterEgressRuleOutput() TrafficMirrorFilterEgressRuleOutput {
return i.ToTrafficMirrorFilterEgressRuleOutputWithContext(context.Background())
}
func (i *TrafficMirrorFilterEgressRule) ToTrafficMirrorFilterEgressRuleOutputWithContext(ctx context.Context) TrafficMirrorFilterEgressRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrafficMirrorFilterEgressRuleOutput)
}
// TrafficMirrorFilterEgressRuleArrayInput is an input type that accepts TrafficMirrorFilterEgressRuleArray and TrafficMirrorFilterEgressRuleArrayOutput values.
// You can construct a concrete instance of `TrafficMirrorFilterEgressRuleArrayInput` via:
//
// TrafficMirrorFilterEgressRuleArray{ TrafficMirrorFilterEgressRuleArgs{...} }
type TrafficMirrorFilterEgressRuleArrayInput interface {
pulumi.Input
ToTrafficMirrorFilterEgressRuleArrayOutput() TrafficMirrorFilterEgressRuleArrayOutput
ToTrafficMirrorFilterEgressRuleArrayOutputWithContext(context.Context) TrafficMirrorFilterEgressRuleArrayOutput
}
type TrafficMirrorFilterEgressRuleArray []TrafficMirrorFilterEgressRuleInput
func (TrafficMirrorFilterEgressRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TrafficMirrorFilterEgressRule)(nil)).Elem()
}
func (i TrafficMirrorFilterEgressRuleArray) ToTrafficMirrorFilterEgressRuleArrayOutput() TrafficMirrorFilterEgressRuleArrayOutput {
return i.ToTrafficMirrorFilterEgressRuleArrayOutputWithContext(context.Background())
}
func (i TrafficMirrorFilterEgressRuleArray) ToTrafficMirrorFilterEgressRuleArrayOutputWithContext(ctx context.Context) TrafficMirrorFilterEgressRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrafficMirrorFilterEgressRuleArrayOutput)
}
// TrafficMirrorFilterEgressRuleMapInput is an input type that accepts TrafficMirrorFilterEgressRuleMap and TrafficMirrorFilterEgressRuleMapOutput values.
// You can construct a concrete instance of `TrafficMirrorFilterEgressRuleMapInput` via:
//
// TrafficMirrorFilterEgressRuleMap{ "key": TrafficMirrorFilterEgressRuleArgs{...} }
type TrafficMirrorFilterEgressRuleMapInput interface {
pulumi.Input
ToTrafficMirrorFilterEgressRuleMapOutput() TrafficMirrorFilterEgressRuleMapOutput
ToTrafficMirrorFilterEgressRuleMapOutputWithContext(context.Context) TrafficMirrorFilterEgressRuleMapOutput
}
type TrafficMirrorFilterEgressRuleMap map[string]TrafficMirrorFilterEgressRuleInput
func (TrafficMirrorFilterEgressRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TrafficMirrorFilterEgressRule)(nil)).Elem()
}
func (i TrafficMirrorFilterEgressRuleMap) ToTrafficMirrorFilterEgressRuleMapOutput() TrafficMirrorFilterEgressRuleMapOutput {
return i.ToTrafficMirrorFilterEgressRuleMapOutputWithContext(context.Background())
}
func (i TrafficMirrorFilterEgressRuleMap) ToTrafficMirrorFilterEgressRuleMapOutputWithContext(ctx context.Context) TrafficMirrorFilterEgressRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrafficMirrorFilterEgressRuleMapOutput)
}
type TrafficMirrorFilterEgressRuleOutput struct{ *pulumi.OutputState }
func (TrafficMirrorFilterEgressRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TrafficMirrorFilterEgressRule)(nil)).Elem()
}
func (o TrafficMirrorFilterEgressRuleOutput) ToTrafficMirrorFilterEgressRuleOutput() TrafficMirrorFilterEgressRuleOutput {
return o
}
func (o TrafficMirrorFilterEgressRuleOutput) ToTrafficMirrorFilterEgressRuleOutputWithContext(ctx context.Context) TrafficMirrorFilterEgressRuleOutput {
return o
}
// The destination CIDR block of the outbound traffic.
func (o TrafficMirrorFilterEgressRuleOutput) DestinationCidrBlock() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.DestinationCidrBlock }).(pulumi.StringOutput)
}
// The destination CIDR block of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
func (o TrafficMirrorFilterEgressRuleOutput) DestinationPortRange() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.DestinationPortRange }).(pulumi.StringOutput)
}
// Whether to pre-check this request only. Default to: `false`
func (o TrafficMirrorFilterEgressRuleOutput) DryRun() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.BoolPtrOutput { return v.DryRun }).(pulumi.BoolPtrOutput)
}
// The priority of the inbound rule. A smaller value indicates a higher priority. The maximum value is `10`, which indicates that you can configure at most 10 inbound rules for a filter.
func (o TrafficMirrorFilterEgressRuleOutput) Priority() pulumi.IntOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput)
}
// The transport protocol used by outbound traffic that needs to be mirrored. Valid values: `ALL`, `ICMP`, `TCP`, `UDP`.
func (o TrafficMirrorFilterEgressRuleOutput) Protocol() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput)
}
// The collection policy of the inbound rule. Valid values: `accept` or `drop`. `accept`: collects network traffic. `drop`: does not collect network traffic.
func (o TrafficMirrorFilterEgressRuleOutput) RuleAction() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.RuleAction }).(pulumi.StringOutput)
}
// The source CIDR block of the outbound traffic.
func (o TrafficMirrorFilterEgressRuleOutput) SourceCidrBlock() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.SourceCidrBlock }).(pulumi.StringOutput)
}
// The source port range of the outbound traffic. Valid values: `1` to `65535`. Separate the first port and last port with a forward slash (/), for example, `1/200` or `80/80`. A value of `-1/-1` indicates that all ports are available. Therefore, do not set the value to `-1/-1`. **NOTE:** When `protocol` is `ICMP`, this parameter is invalid.
func (o TrafficMirrorFilterEgressRuleOutput) SourcePortRange() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.SourcePortRange }).(pulumi.StringOutput)
}
// The state of the inbound rule. Valid values:`Creating`, `Created`, `Modifying` and `Deleting`.
func (o TrafficMirrorFilterEgressRuleOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// The ID of the outbound rule.
func (o TrafficMirrorFilterEgressRuleOutput) TrafficMirrorFilterEgressRuleId() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.TrafficMirrorFilterEgressRuleId }).(pulumi.StringOutput)
}
// The ID of the filter.
func (o TrafficMirrorFilterEgressRuleOutput) TrafficMirrorFilterId() pulumi.StringOutput {
return o.ApplyT(func(v *TrafficMirrorFilterEgressRule) pulumi.StringOutput { return v.TrafficMirrorFilterId }).(pulumi.StringOutput)
}
type TrafficMirrorFilterEgressRuleArrayOutput struct{ *pulumi.OutputState }
func (TrafficMirrorFilterEgressRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TrafficMirrorFilterEgressRule)(nil)).Elem()
}
func (o TrafficMirrorFilterEgressRuleArrayOutput) ToTrafficMirrorFilterEgressRuleArrayOutput() TrafficMirrorFilterEgressRuleArrayOutput {
return o
}
func (o TrafficMirrorFilterEgressRuleArrayOutput) ToTrafficMirrorFilterEgressRuleArrayOutputWithContext(ctx context.Context) TrafficMirrorFilterEgressRuleArrayOutput {
return o
}
func (o TrafficMirrorFilterEgressRuleArrayOutput) Index(i pulumi.IntInput) TrafficMirrorFilterEgressRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrafficMirrorFilterEgressRule {
return vs[0].([]*TrafficMirrorFilterEgressRule)[vs[1].(int)]
}).(TrafficMirrorFilterEgressRuleOutput)
}
type TrafficMirrorFilterEgressRuleMapOutput struct{ *pulumi.OutputState }
func (TrafficMirrorFilterEgressRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TrafficMirrorFilterEgressRule)(nil)).Elem()
}
func (o TrafficMirrorFilterEgressRuleMapOutput) ToTrafficMirrorFilterEgressRuleMapOutput() TrafficMirrorFilterEgressRuleMapOutput {
return o
}
func (o TrafficMirrorFilterEgressRuleMapOutput) ToTrafficMirrorFilterEgressRuleMapOutputWithContext(ctx context.Context) TrafficMirrorFilterEgressRuleMapOutput {
return o
}
func (o TrafficMirrorFilterEgressRuleMapOutput) MapIndex(k pulumi.StringInput) TrafficMirrorFilterEgressRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrafficMirrorFilterEgressRule {
return vs[0].(map[string]*TrafficMirrorFilterEgressRule)[vs[1].(string)]
}).(TrafficMirrorFilterEgressRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TrafficMirrorFilterEgressRuleInput)(nil)).Elem(), &TrafficMirrorFilterEgressRule{})
pulumi.RegisterInputType(reflect.TypeOf((*TrafficMirrorFilterEgressRuleArrayInput)(nil)).Elem(), TrafficMirrorFilterEgressRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TrafficMirrorFilterEgressRuleMapInput)(nil)).Elem(), TrafficMirrorFilterEgressRuleMap{})
pulumi.RegisterOutputType(TrafficMirrorFilterEgressRuleOutput{})
pulumi.RegisterOutputType(TrafficMirrorFilterEgressRuleArrayOutput{})
pulumi.RegisterOutputType(TrafficMirrorFilterEgressRuleMapOutput{})
}