-
Notifications
You must be signed in to change notification settings - Fork 51
/
scaleSetPacketCapture.go
483 lines (428 loc) · 24.3 KB
/
scaleSetPacketCapture.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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
// 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 compute
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Configures Network Packet Capturing against a Virtual Machine Scale Set using a Network Watcher.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNetworkWatcher, err := network.NewNetworkWatcher(ctx, "example", &network.NetworkWatcherArgs{
// Name: pulumi.String("example-nw"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vn"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("internal"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleLinuxVirtualMachineScaleSet, err := compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{
// Name: pulumi.String("example-vmss"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: pulumi.String("Standard_F2"),
// Instances: pulumi.Int(4),
// AdminUsername: pulumi.String("adminuser"),
// AdminPassword: pulumi.String("P@ssword1234!"),
// ComputerNamePrefix: pulumi.String("my-linux-computer-name-prefix"),
// UpgradeMode: pulumi.String("Automatic"),
// DisablePasswordAuthentication: pulumi.Bool(false),
// SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{
// Publisher: pulumi.String("Canonical"),
// Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
// Sku: pulumi.String("22_04-lts"),
// Version: pulumi.String("latest"),
// },
// OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{
// StorageAccountType: pulumi.String("Standard_LRS"),
// Caching: pulumi.String("ReadWrite"),
// },
// NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{
// &compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{
// Name: pulumi.String("example"),
// Primary: pulumi.Bool(true),
// IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{
// &compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{
// Name: pulumi.String("internal"),
// Primary: pulumi.Bool(true),
// SubnetId: exampleSubnet.ID(),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = compute.NewVirtualMachineScaleSetExtension(ctx, "example", &compute.VirtualMachineScaleSetExtensionArgs{
// Name: pulumi.String("network-watcher"),
// VirtualMachineScaleSetId: exampleLinuxVirtualMachineScaleSet.ID(),
// Publisher: pulumi.String("Microsoft.Azure.NetworkWatcher"),
// Type: pulumi.String("NetworkWatcherAgentLinux"),
// TypeHandlerVersion: pulumi.String("1.4"),
// AutoUpgradeMinorVersion: pulumi.Bool(true),
// AutomaticUpgradeEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = compute.NewScaleSetPacketCapture(ctx, "example", &compute.ScaleSetPacketCaptureArgs{
// Name: pulumi.String("example-pc"),
// NetworkWatcherId: exampleNetworkWatcher.ID(),
// VirtualMachineScaleSetId: exampleLinuxVirtualMachineScaleSet.ID(),
// StorageLocation: &compute.ScaleSetPacketCaptureStorageLocationArgs{
// FilePath: pulumi.String("/var/captures/packet.cap"),
// },
// MachineScope: &compute.ScaleSetPacketCaptureMachineScopeArgs{
// IncludeInstanceIds: pulumi.StringArray{
// pulumi.String("0"),
// },
// ExcludeInstanceIds: pulumi.StringArray{
// pulumi.String("1"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// > **NOTE:** This Resource requires that [the Network Watcher Extension](https://docs.microsoft.com/azure/network-watcher/network-watcher-packet-capture-manage-portal#before-you-begin) is installed on the Virtual Machine Scale Set before capturing can be enabled which can be installed via the `compute.VirtualMachineScaleSetExtension` resource.
//
// ## Import
//
// Virtual Machine Scale Set Packet Captures can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:compute/scaleSetPacketCapture:ScaleSetPacketCapture capture1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1/packetCaptures/capture1
// ```
type ScaleSetPacketCapture struct {
pulumi.CustomResourceState
// One or more `filter` blocks as defined below. Changing this forces a new resource to be created.
Filters ScaleSetPacketCaptureFilterArrayOutput `pulumi:"filters"`
// A `machineScope` block as defined below. Changing this forces a new resource to be created.
MachineScope ScaleSetPacketCaptureMachineScopePtrOutput `pulumi:"machineScope"`
// The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created.
MaximumBytesPerPacket pulumi.IntPtrOutput `pulumi:"maximumBytesPerPacket"`
// Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created.
MaximumBytesPerSession pulumi.IntPtrOutput `pulumi:"maximumBytesPerSession"`
// The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created.
MaximumCaptureDurationInSeconds pulumi.IntPtrOutput `pulumi:"maximumCaptureDurationInSeconds"`
// The name to use for this Network Packet Capture. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the Network Watcher. Changing this forces a new resource to be created.
NetworkWatcherId pulumi.StringOutput `pulumi:"networkWatcherId"`
// A `storageLocation` block as defined below. Changing this forces a new resource to be created.
StorageLocation ScaleSetPacketCaptureStorageLocationOutput `pulumi:"storageLocation"`
// The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created.
VirtualMachineScaleSetId pulumi.StringOutput `pulumi:"virtualMachineScaleSetId"`
}
// NewScaleSetPacketCapture registers a new resource with the given unique name, arguments, and options.
func NewScaleSetPacketCapture(ctx *pulumi.Context,
name string, args *ScaleSetPacketCaptureArgs, opts ...pulumi.ResourceOption) (*ScaleSetPacketCapture, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkWatcherId == nil {
return nil, errors.New("invalid value for required argument 'NetworkWatcherId'")
}
if args.StorageLocation == nil {
return nil, errors.New("invalid value for required argument 'StorageLocation'")
}
if args.VirtualMachineScaleSetId == nil {
return nil, errors.New("invalid value for required argument 'VirtualMachineScaleSetId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ScaleSetPacketCapture
err := ctx.RegisterResource("azure:compute/scaleSetPacketCapture:ScaleSetPacketCapture", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetScaleSetPacketCapture gets an existing ScaleSetPacketCapture 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 GetScaleSetPacketCapture(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ScaleSetPacketCaptureState, opts ...pulumi.ResourceOption) (*ScaleSetPacketCapture, error) {
var resource ScaleSetPacketCapture
err := ctx.ReadResource("azure:compute/scaleSetPacketCapture:ScaleSetPacketCapture", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ScaleSetPacketCapture resources.
type scaleSetPacketCaptureState struct {
// One or more `filter` blocks as defined below. Changing this forces a new resource to be created.
Filters []ScaleSetPacketCaptureFilter `pulumi:"filters"`
// A `machineScope` block as defined below. Changing this forces a new resource to be created.
MachineScope *ScaleSetPacketCaptureMachineScope `pulumi:"machineScope"`
// The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created.
MaximumBytesPerPacket *int `pulumi:"maximumBytesPerPacket"`
// Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created.
MaximumBytesPerSession *int `pulumi:"maximumBytesPerSession"`
// The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created.
MaximumCaptureDurationInSeconds *int `pulumi:"maximumCaptureDurationInSeconds"`
// The name to use for this Network Packet Capture. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The resource ID of the Network Watcher. Changing this forces a new resource to be created.
NetworkWatcherId *string `pulumi:"networkWatcherId"`
// A `storageLocation` block as defined below. Changing this forces a new resource to be created.
StorageLocation *ScaleSetPacketCaptureStorageLocation `pulumi:"storageLocation"`
// The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created.
VirtualMachineScaleSetId *string `pulumi:"virtualMachineScaleSetId"`
}
type ScaleSetPacketCaptureState struct {
// One or more `filter` blocks as defined below. Changing this forces a new resource to be created.
Filters ScaleSetPacketCaptureFilterArrayInput
// A `machineScope` block as defined below. Changing this forces a new resource to be created.
MachineScope ScaleSetPacketCaptureMachineScopePtrInput
// The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created.
MaximumBytesPerPacket pulumi.IntPtrInput
// Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created.
MaximumBytesPerSession pulumi.IntPtrInput
// The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created.
MaximumCaptureDurationInSeconds pulumi.IntPtrInput
// The name to use for this Network Packet Capture. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The resource ID of the Network Watcher. Changing this forces a new resource to be created.
NetworkWatcherId pulumi.StringPtrInput
// A `storageLocation` block as defined below. Changing this forces a new resource to be created.
StorageLocation ScaleSetPacketCaptureStorageLocationPtrInput
// The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created.
VirtualMachineScaleSetId pulumi.StringPtrInput
}
func (ScaleSetPacketCaptureState) ElementType() reflect.Type {
return reflect.TypeOf((*scaleSetPacketCaptureState)(nil)).Elem()
}
type scaleSetPacketCaptureArgs struct {
// One or more `filter` blocks as defined below. Changing this forces a new resource to be created.
Filters []ScaleSetPacketCaptureFilter `pulumi:"filters"`
// A `machineScope` block as defined below. Changing this forces a new resource to be created.
MachineScope *ScaleSetPacketCaptureMachineScope `pulumi:"machineScope"`
// The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created.
MaximumBytesPerPacket *int `pulumi:"maximumBytesPerPacket"`
// Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created.
MaximumBytesPerSession *int `pulumi:"maximumBytesPerSession"`
// The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created.
MaximumCaptureDurationInSeconds *int `pulumi:"maximumCaptureDurationInSeconds"`
// The name to use for this Network Packet Capture. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The resource ID of the Network Watcher. Changing this forces a new resource to be created.
NetworkWatcherId string `pulumi:"networkWatcherId"`
// A `storageLocation` block as defined below. Changing this forces a new resource to be created.
StorageLocation ScaleSetPacketCaptureStorageLocation `pulumi:"storageLocation"`
// The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created.
VirtualMachineScaleSetId string `pulumi:"virtualMachineScaleSetId"`
}
// The set of arguments for constructing a ScaleSetPacketCapture resource.
type ScaleSetPacketCaptureArgs struct {
// One or more `filter` blocks as defined below. Changing this forces a new resource to be created.
Filters ScaleSetPacketCaptureFilterArrayInput
// A `machineScope` block as defined below. Changing this forces a new resource to be created.
MachineScope ScaleSetPacketCaptureMachineScopePtrInput
// The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created.
MaximumBytesPerPacket pulumi.IntPtrInput
// Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created.
MaximumBytesPerSession pulumi.IntPtrInput
// The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created.
MaximumCaptureDurationInSeconds pulumi.IntPtrInput
// The name to use for this Network Packet Capture. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The resource ID of the Network Watcher. Changing this forces a new resource to be created.
NetworkWatcherId pulumi.StringInput
// A `storageLocation` block as defined below. Changing this forces a new resource to be created.
StorageLocation ScaleSetPacketCaptureStorageLocationInput
// The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created.
VirtualMachineScaleSetId pulumi.StringInput
}
func (ScaleSetPacketCaptureArgs) ElementType() reflect.Type {
return reflect.TypeOf((*scaleSetPacketCaptureArgs)(nil)).Elem()
}
type ScaleSetPacketCaptureInput interface {
pulumi.Input
ToScaleSetPacketCaptureOutput() ScaleSetPacketCaptureOutput
ToScaleSetPacketCaptureOutputWithContext(ctx context.Context) ScaleSetPacketCaptureOutput
}
func (*ScaleSetPacketCapture) ElementType() reflect.Type {
return reflect.TypeOf((**ScaleSetPacketCapture)(nil)).Elem()
}
func (i *ScaleSetPacketCapture) ToScaleSetPacketCaptureOutput() ScaleSetPacketCaptureOutput {
return i.ToScaleSetPacketCaptureOutputWithContext(context.Background())
}
func (i *ScaleSetPacketCapture) ToScaleSetPacketCaptureOutputWithContext(ctx context.Context) ScaleSetPacketCaptureOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScaleSetPacketCaptureOutput)
}
// ScaleSetPacketCaptureArrayInput is an input type that accepts ScaleSetPacketCaptureArray and ScaleSetPacketCaptureArrayOutput values.
// You can construct a concrete instance of `ScaleSetPacketCaptureArrayInput` via:
//
// ScaleSetPacketCaptureArray{ ScaleSetPacketCaptureArgs{...} }
type ScaleSetPacketCaptureArrayInput interface {
pulumi.Input
ToScaleSetPacketCaptureArrayOutput() ScaleSetPacketCaptureArrayOutput
ToScaleSetPacketCaptureArrayOutputWithContext(context.Context) ScaleSetPacketCaptureArrayOutput
}
type ScaleSetPacketCaptureArray []ScaleSetPacketCaptureInput
func (ScaleSetPacketCaptureArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ScaleSetPacketCapture)(nil)).Elem()
}
func (i ScaleSetPacketCaptureArray) ToScaleSetPacketCaptureArrayOutput() ScaleSetPacketCaptureArrayOutput {
return i.ToScaleSetPacketCaptureArrayOutputWithContext(context.Background())
}
func (i ScaleSetPacketCaptureArray) ToScaleSetPacketCaptureArrayOutputWithContext(ctx context.Context) ScaleSetPacketCaptureArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScaleSetPacketCaptureArrayOutput)
}
// ScaleSetPacketCaptureMapInput is an input type that accepts ScaleSetPacketCaptureMap and ScaleSetPacketCaptureMapOutput values.
// You can construct a concrete instance of `ScaleSetPacketCaptureMapInput` via:
//
// ScaleSetPacketCaptureMap{ "key": ScaleSetPacketCaptureArgs{...} }
type ScaleSetPacketCaptureMapInput interface {
pulumi.Input
ToScaleSetPacketCaptureMapOutput() ScaleSetPacketCaptureMapOutput
ToScaleSetPacketCaptureMapOutputWithContext(context.Context) ScaleSetPacketCaptureMapOutput
}
type ScaleSetPacketCaptureMap map[string]ScaleSetPacketCaptureInput
func (ScaleSetPacketCaptureMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ScaleSetPacketCapture)(nil)).Elem()
}
func (i ScaleSetPacketCaptureMap) ToScaleSetPacketCaptureMapOutput() ScaleSetPacketCaptureMapOutput {
return i.ToScaleSetPacketCaptureMapOutputWithContext(context.Background())
}
func (i ScaleSetPacketCaptureMap) ToScaleSetPacketCaptureMapOutputWithContext(ctx context.Context) ScaleSetPacketCaptureMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScaleSetPacketCaptureMapOutput)
}
type ScaleSetPacketCaptureOutput struct{ *pulumi.OutputState }
func (ScaleSetPacketCaptureOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ScaleSetPacketCapture)(nil)).Elem()
}
func (o ScaleSetPacketCaptureOutput) ToScaleSetPacketCaptureOutput() ScaleSetPacketCaptureOutput {
return o
}
func (o ScaleSetPacketCaptureOutput) ToScaleSetPacketCaptureOutputWithContext(ctx context.Context) ScaleSetPacketCaptureOutput {
return o
}
// One or more `filter` blocks as defined below. Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) Filters() ScaleSetPacketCaptureFilterArrayOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) ScaleSetPacketCaptureFilterArrayOutput { return v.Filters }).(ScaleSetPacketCaptureFilterArrayOutput)
}
// A `machineScope` block as defined below. Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) MachineScope() ScaleSetPacketCaptureMachineScopePtrOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) ScaleSetPacketCaptureMachineScopePtrOutput { return v.MachineScope }).(ScaleSetPacketCaptureMachineScopePtrOutput)
}
// The number of bytes captured per packet. The remaining bytes are truncated. Defaults to `0` (Entire Packet Captured). Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) MaximumBytesPerPacket() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.IntPtrOutput { return v.MaximumBytesPerPacket }).(pulumi.IntPtrOutput)
}
// Maximum size of the capture in Bytes. Defaults to `1073741824` (1GB). Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) MaximumBytesPerSession() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.IntPtrOutput { return v.MaximumBytesPerSession }).(pulumi.IntPtrOutput)
}
// The maximum duration of the capture session in seconds. Defaults to `18000` (5 hours). Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) MaximumCaptureDurationInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.IntPtrOutput { return v.MaximumCaptureDurationInSeconds }).(pulumi.IntPtrOutput)
}
// The name to use for this Network Packet Capture. Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource ID of the Network Watcher. Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) NetworkWatcherId() pulumi.StringOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.StringOutput { return v.NetworkWatcherId }).(pulumi.StringOutput)
}
// A `storageLocation` block as defined below. Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) StorageLocation() ScaleSetPacketCaptureStorageLocationOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) ScaleSetPacketCaptureStorageLocationOutput { return v.StorageLocation }).(ScaleSetPacketCaptureStorageLocationOutput)
}
// The resource ID of the Virtual Machine Scale Set to capture packets from. Changing this forces a new resource to be created.
func (o ScaleSetPacketCaptureOutput) VirtualMachineScaleSetId() pulumi.StringOutput {
return o.ApplyT(func(v *ScaleSetPacketCapture) pulumi.StringOutput { return v.VirtualMachineScaleSetId }).(pulumi.StringOutput)
}
type ScaleSetPacketCaptureArrayOutput struct{ *pulumi.OutputState }
func (ScaleSetPacketCaptureArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ScaleSetPacketCapture)(nil)).Elem()
}
func (o ScaleSetPacketCaptureArrayOutput) ToScaleSetPacketCaptureArrayOutput() ScaleSetPacketCaptureArrayOutput {
return o
}
func (o ScaleSetPacketCaptureArrayOutput) ToScaleSetPacketCaptureArrayOutputWithContext(ctx context.Context) ScaleSetPacketCaptureArrayOutput {
return o
}
func (o ScaleSetPacketCaptureArrayOutput) Index(i pulumi.IntInput) ScaleSetPacketCaptureOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ScaleSetPacketCapture {
return vs[0].([]*ScaleSetPacketCapture)[vs[1].(int)]
}).(ScaleSetPacketCaptureOutput)
}
type ScaleSetPacketCaptureMapOutput struct{ *pulumi.OutputState }
func (ScaleSetPacketCaptureMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ScaleSetPacketCapture)(nil)).Elem()
}
func (o ScaleSetPacketCaptureMapOutput) ToScaleSetPacketCaptureMapOutput() ScaleSetPacketCaptureMapOutput {
return o
}
func (o ScaleSetPacketCaptureMapOutput) ToScaleSetPacketCaptureMapOutputWithContext(ctx context.Context) ScaleSetPacketCaptureMapOutput {
return o
}
func (o ScaleSetPacketCaptureMapOutput) MapIndex(k pulumi.StringInput) ScaleSetPacketCaptureOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ScaleSetPacketCapture {
return vs[0].(map[string]*ScaleSetPacketCapture)[vs[1].(string)]
}).(ScaleSetPacketCaptureOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ScaleSetPacketCaptureInput)(nil)).Elem(), &ScaleSetPacketCapture{})
pulumi.RegisterInputType(reflect.TypeOf((*ScaleSetPacketCaptureArrayInput)(nil)).Elem(), ScaleSetPacketCaptureArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ScaleSetPacketCaptureMapInput)(nil)).Elem(), ScaleSetPacketCaptureMap{})
pulumi.RegisterOutputType(ScaleSetPacketCaptureOutput{})
pulumi.RegisterOutputType(ScaleSetPacketCaptureArrayOutput{})
pulumi.RegisterOutputType(ScaleSetPacketCaptureMapOutput{})
}