We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Configures Packet Capturing against a Virtual Machine using a Network Watcher.
NOTE: This resource has been deprecated in favour of the
azure.network.NetworkConnectionMonitorresource and will be removed in the next major version of the AzureRM Provider. The new resource shares the same fields as this one, and information on migrating across can be found in this guide.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleNetworkWatcher = new azure.network.NetworkWatcher("exampleNetworkWatcher", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
addressSpaces: ["10.0.0.0/16"],
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
resourceGroupName: exampleResourceGroup.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10.0.2.0/24"],
});
const exampleNetworkInterface = new azure.network.NetworkInterface("exampleNetworkInterface", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
ipConfigurations: [{
name: "testconfiguration1",
subnetId: exampleSubnet.id,
privateIpAddressAllocation: "Dynamic",
}],
});
const exampleVirtualMachine = new azure.compute.VirtualMachine("exampleVirtualMachine", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
networkInterfaceIds: [exampleNetworkInterface.id],
vmSize: "Standard_F2",
storageImageReference: {
publisher: "Canonical",
offer: "UbuntuServer",
sku: "16.04-LTS",
version: "latest",
},
storageOsDisk: {
name: "osdisk",
caching: "ReadWrite",
createOption: "FromImage",
managedDiskType: "Standard_LRS",
},
osProfile: {
computerName: "pctest-vm",
adminUsername: "testadmin",
adminPassword: "Password1234!",
},
osProfileLinuxConfig: {
disablePasswordAuthentication: false,
},
});
const exampleExtension = new azure.compute.Extension("exampleExtension", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
virtualMachineName: exampleVirtualMachine.name,
publisher: "Microsoft.Azure.NetworkWatcher",
type: "NetworkWatcherAgentLinux",
typeHandlerVersion: "1.4",
autoUpgradeMinorVersion: true,
});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const examplePacketCapture = new azure.network.PacketCapture("examplePacketCapture", {
networkWatcherName: exampleNetworkWatcher.name,
resourceGroupName: exampleResourceGroup.name,
targetResourceId: exampleVirtualMachine.id,
storageLocation: {
storageAccountId: exampleAccount.id,
},
}, {
dependsOn: [exampleExtension],
});
Example coming soon!
Example coming soon!
Create PacketCapture Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PacketCapture(name: string, args: PacketCaptureArgs, opts?: CustomResourceOptions);@overload
def PacketCapture(resource_name: str,
args: PacketCaptureArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PacketCapture(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_watcher_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
storage_location: Optional[PacketCaptureStorageLocationArgs] = None,
target_resource_id: Optional[str] = None,
filters: Optional[Sequence[PacketCaptureFilterArgs]] = None,
maximum_bytes_per_packet: Optional[int] = None,
maximum_bytes_per_session: Optional[int] = None,
maximum_capture_duration: Optional[int] = None,
name: Optional[str] = None)func NewPacketCapture(ctx *Context, name string, args PacketCaptureArgs, opts ...ResourceOption) (*PacketCapture, error)public PacketCapture(string name, PacketCaptureArgs args, CustomResourceOptions? opts = null)
public PacketCapture(String name, PacketCaptureArgs args)
public PacketCapture(String name, PacketCaptureArgs args, CustomResourceOptions options)
type: azure:network:PacketCapture
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PacketCaptureArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PacketCaptureArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PacketCaptureArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PacketCaptureArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PacketCaptureArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var packetCaptureResource = new Azure.Network.PacketCapture("packetCaptureResource", new()
{
NetworkWatcherName = "string",
ResourceGroupName = "string",
StorageLocation = new Azure.Network.Inputs.PacketCaptureStorageLocationArgs
{
FilePath = "string",
StorageAccountId = "string",
StoragePath = "string",
},
TargetResourceId = "string",
Filters = new[]
{
new Azure.Network.Inputs.PacketCaptureFilterArgs
{
Protocol = "string",
LocalIpAddress = "string",
LocalPort = "string",
RemoteIpAddress = "string",
RemotePort = "string",
},
},
MaximumBytesPerPacket = 0,
MaximumBytesPerSession = 0,
MaximumCaptureDuration = 0,
Name = "string",
});
example, err := network.NewPacketCapture(ctx, "packetCaptureResource", &network.PacketCaptureArgs{
NetworkWatcherName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
StorageLocation: &network.PacketCaptureStorageLocationArgs{
FilePath: pulumi.String("string"),
StorageAccountId: pulumi.String("string"),
StoragePath: pulumi.String("string"),
},
TargetResourceId: pulumi.String("string"),
Filters: network.PacketCaptureFilterArray{
&network.PacketCaptureFilterArgs{
Protocol: pulumi.String("string"),
LocalIpAddress: pulumi.String("string"),
LocalPort: pulumi.String("string"),
RemoteIpAddress: pulumi.String("string"),
RemotePort: pulumi.String("string"),
},
},
MaximumBytesPerPacket: pulumi.Int(0),
MaximumBytesPerSession: pulumi.Int(0),
MaximumCaptureDuration: pulumi.Int(0),
Name: pulumi.String("string"),
})
var packetCaptureResource = new PacketCapture("packetCaptureResource", PacketCaptureArgs.builder()
.networkWatcherName("string")
.resourceGroupName("string")
.storageLocation(PacketCaptureStorageLocationArgs.builder()
.filePath("string")
.storageAccountId("string")
.storagePath("string")
.build())
.targetResourceId("string")
.filters(PacketCaptureFilterArgs.builder()
.protocol("string")
.localIpAddress("string")
.localPort("string")
.remoteIpAddress("string")
.remotePort("string")
.build())
.maximumBytesPerPacket(0)
.maximumBytesPerSession(0)
.maximumCaptureDuration(0)
.name("string")
.build());
packet_capture_resource = azure.network.PacketCapture("packetCaptureResource",
network_watcher_name="string",
resource_group_name="string",
storage_location={
"file_path": "string",
"storage_account_id": "string",
"storage_path": "string",
},
target_resource_id="string",
filters=[{
"protocol": "string",
"local_ip_address": "string",
"local_port": "string",
"remote_ip_address": "string",
"remote_port": "string",
}],
maximum_bytes_per_packet=0,
maximum_bytes_per_session=0,
maximum_capture_duration=0,
name="string")
const packetCaptureResource = new azure.network.PacketCapture("packetCaptureResource", {
networkWatcherName: "string",
resourceGroupName: "string",
storageLocation: {
filePath: "string",
storageAccountId: "string",
storagePath: "string",
},
targetResourceId: "string",
filters: [{
protocol: "string",
localIpAddress: "string",
localPort: "string",
remoteIpAddress: "string",
remotePort: "string",
}],
maximumBytesPerPacket: 0,
maximumBytesPerSession: 0,
maximumCaptureDuration: 0,
name: "string",
});
type: azure:network:PacketCapture
properties:
filters:
- localIpAddress: string
localPort: string
protocol: string
remoteIpAddress: string
remotePort: string
maximumBytesPerPacket: 0
maximumBytesPerSession: 0
maximumCaptureDuration: 0
name: string
networkWatcherName: string
resourceGroupName: string
storageLocation:
filePath: string
storageAccountId: string
storagePath: string
targetResourceId: string
PacketCapture Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PacketCapture resource accepts the following input properties:
- Network
Watcher stringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- Storage
Location PacketCapture Storage Location - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - Target
Resource stringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- Filters
List<Packet
Capture Filter> - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - Maximum
Bytes intPer Packet - 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. - Maximum
Bytes intPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - Maximum
Capture intDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - Name string
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- Network
Watcher stringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- Storage
Location PacketCapture Storage Location Args - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - Target
Resource stringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- Filters
[]Packet
Capture Filter Args - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - Maximum
Bytes intPer Packet - 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. - Maximum
Bytes intPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - Maximum
Capture intDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - Name string
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- network
Watcher StringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- storage
Location PacketCapture Storage Location - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - target
Resource StringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- filters
List<Packet
Capture Filter> - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - maximum
Bytes IntegerPer Packet - 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. - maximum
Bytes IntegerPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - maximum
Capture IntegerDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - name String
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- network
Watcher stringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- storage
Location PacketCapture Storage Location - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - target
Resource stringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- filters
Packet
Capture Filter[] - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - maximum
Bytes numberPer Packet - 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. - maximum
Bytes numberPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - maximum
Capture numberDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - name string
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- network_
watcher_ strname - The name of the Network Watcher. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- storage_
location PacketCapture Storage Location Args - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - target_
resource_ strid - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- filters
Sequence[Packet
Capture Filter Args] - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - maximum_
bytes_ intper_ packet - 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. - maximum_
bytes_ intper_ session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - maximum_
capture_ intduration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - name str
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- network
Watcher StringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- storage
Location Property Map - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - target
Resource StringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- filters List<Property Map>
- One or more
filterblocks as defined below. Changing this forces a new resource to be created. - maximum
Bytes NumberPer Packet - 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. - maximum
Bytes NumberPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - maximum
Capture NumberDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - name String
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the PacketCapture resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PacketCapture Resource
Get an existing PacketCapture resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PacketCaptureState, opts?: CustomResourceOptions): PacketCapture@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
filters: Optional[Sequence[PacketCaptureFilterArgs]] = None,
maximum_bytes_per_packet: Optional[int] = None,
maximum_bytes_per_session: Optional[int] = None,
maximum_capture_duration: Optional[int] = None,
name: Optional[str] = None,
network_watcher_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
storage_location: Optional[PacketCaptureStorageLocationArgs] = None,
target_resource_id: Optional[str] = None) -> PacketCapturefunc GetPacketCapture(ctx *Context, name string, id IDInput, state *PacketCaptureState, opts ...ResourceOption) (*PacketCapture, error)public static PacketCapture Get(string name, Input<string> id, PacketCaptureState? state, CustomResourceOptions? opts = null)public static PacketCapture get(String name, Output<String> id, PacketCaptureState state, CustomResourceOptions options)resources: _: type: azure:network:PacketCapture get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Filters
List<Packet
Capture Filter> - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - Maximum
Bytes intPer Packet - 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. - Maximum
Bytes intPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - Maximum
Capture intDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - Name string
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- Network
Watcher stringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- Storage
Location PacketCapture Storage Location - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - Target
Resource stringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- Filters
[]Packet
Capture Filter Args - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - Maximum
Bytes intPer Packet - 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. - Maximum
Bytes intPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - Maximum
Capture intDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - Name string
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- Network
Watcher stringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- Storage
Location PacketCapture Storage Location Args - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - Target
Resource stringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- filters
List<Packet
Capture Filter> - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - maximum
Bytes IntegerPer Packet - 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. - maximum
Bytes IntegerPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - maximum
Capture IntegerDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - name String
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- network
Watcher StringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- storage
Location PacketCapture Storage Location - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - target
Resource StringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- filters
Packet
Capture Filter[] - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - maximum
Bytes numberPer Packet - 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. - maximum
Bytes numberPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - maximum
Capture numberDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - name string
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- network
Watcher stringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- storage
Location PacketCapture Storage Location - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - target
Resource stringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- filters
Sequence[Packet
Capture Filter Args] - One or more
filterblocks as defined below. Changing this forces a new resource to be created. - maximum_
bytes_ intper_ packet - 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. - maximum_
bytes_ intper_ session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - maximum_
capture_ intduration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - name str
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- network_
watcher_ strname - The name of the Network Watcher. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- storage_
location PacketCapture Storage Location Args - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - target_
resource_ strid - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
- filters List<Property Map>
- One or more
filterblocks as defined below. Changing this forces a new resource to be created. - maximum
Bytes NumberPer Packet - 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. - maximum
Bytes NumberPer Session - Maximum size of the capture in Bytes. Defaults to
1073741824(1GB). Changing this forces a new resource to be created. - maximum
Capture NumberDuration - The maximum duration of the capture session in seconds. Defaults to
18000(5 hours). Changing this forces a new resource to be created. - name String
- The name to use for this Packet Capture. Changing this forces a new resource to be created.
- network
Watcher StringName - The name of the Network Watcher. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which the Network Watcher exists. Changing this forces a new resource to be created.
- storage
Location Property Map - A
storage_locationblock as defined below. Changing this forces a new resource to be created. - target
Resource StringId - The ID of the Resource to capture packets from. Changing this forces a new resource to be created.
Supporting Types
PacketCaptureFilter, PacketCaptureFilterArgs
- Protocol string
- The Protocol to be filtered on. Possible values include
Any,TCPandUDP. Changing this forces a new resource to be created. - Local
Ip stringAddress - The local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- Local
Port string - The local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- Remote
Ip stringAddress - The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created.
- Remote
Port string - The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- Protocol string
- The Protocol to be filtered on. Possible values include
Any,TCPandUDP. Changing this forces a new resource to be created. - Local
Ip stringAddress - The local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- Local
Port string - The local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- Remote
Ip stringAddress - The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created.
- Remote
Port string - The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- protocol String
- The Protocol to be filtered on. Possible values include
Any,TCPandUDP. Changing this forces a new resource to be created. - local
Ip StringAddress - The local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- local
Port String - The local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- remote
Ip StringAddress - The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created.
- remote
Port String - The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- protocol string
- The Protocol to be filtered on. Possible values include
Any,TCPandUDP. Changing this forces a new resource to be created. - local
Ip stringAddress - The local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- local
Port string - The local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- remote
Ip stringAddress - The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created.
- remote
Port string - The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- protocol str
- The Protocol to be filtered on. Possible values include
Any,TCPandUDP. Changing this forces a new resource to be created. - local_
ip_ straddress - The local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- local_
port str - The local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- remote_
ip_ straddress - The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created.
- remote_
port str - The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- protocol String
- The Protocol to be filtered on. Possible values include
Any,TCPandUDP. Changing this forces a new resource to be created. - local
Ip StringAddress - The local IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- local
Port String - The local port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
- remote
Ip StringAddress - The remote IP Address to be filtered on. Notation: "127.0.0.1" for single address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported.. Changing this forces a new resource to be created.
- remote
Port String - The remote port to be filtered on. Notation: "80" for single port entry."80-85" for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing ranges with multiple entries not currently supported. Changing this forces a new resource to be created.
PacketCaptureStorageLocation, PacketCaptureStorageLocationArgs
- File
Path string - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with
/var/captures. - Storage
Account stringId - The ID of the storage account to save the packet capture session
- Storage
Path string - The URI of the storage path to save the packet capture.
- File
Path string - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with
/var/captures. - Storage
Account stringId - The ID of the storage account to save the packet capture session
- Storage
Path string - The URI of the storage path to save the packet capture.
- file
Path String - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with
/var/captures. - storage
Account StringId - The ID of the storage account to save the packet capture session
- storage
Path String - The URI of the storage path to save the packet capture.
- file
Path string - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with
/var/captures. - storage
Account stringId - The ID of the storage account to save the packet capture session
- storage
Path string - The URI of the storage path to save the packet capture.
- file_
path str - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with
/var/captures. - storage_
account_ strid - The ID of the storage account to save the packet capture session
- storage_
path str - The URI of the storage path to save the packet capture.
- file
Path String - A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it must start with
/var/captures. - storage
Account StringId - The ID of the storage account to save the packet capture session
- storage
Path String - The URI of the storage path to save the packet capture.
Import
Packet Captures can be imported using the resource id, e.g.
$ pulumi import azure:network/packetCapture:PacketCapture capture1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1/packetCaptures/capture1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
