1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. PacketCapture

We recommend using Azure Native.

Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi

azure.compute.PacketCapture

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi

    Configures Network Packet Capturing against a Virtual Machine using a Network Watcher.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleNetworkWatcher = new azure.network.NetworkWatcher("example", {
        name: "example-nw",
        location: example.location,
        resourceGroupName: example.name,
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "example-network",
        addressSpaces: ["10.0.0.0/16"],
        location: example.location,
        resourceGroupName: example.name,
    });
    const exampleSubnet = new azure.network.Subnet("example", {
        name: "internal",
        resourceGroupName: example.name,
        virtualNetworkName: exampleVirtualNetwork.name,
        addressPrefixes: ["10.0.2.0/24"],
    });
    const exampleNetworkInterface = new azure.network.NetworkInterface("example", {
        name: "example-nic",
        location: example.location,
        resourceGroupName: example.name,
        ipConfigurations: [{
            name: "testconfiguration1",
            subnetId: exampleSubnet.id,
            privateIpAddressAllocation: "Dynamic",
        }],
    });
    const exampleVirtualMachine = new azure.compute.VirtualMachine("example", {
        name: "example-vm",
        location: example.location,
        resourceGroupName: example.name,
        networkInterfaceIds: [exampleNetworkInterface.id],
        vmSize: "Standard_F2",
        storageImageReference: {
            publisher: "Canonical",
            offer: "0001-com-ubuntu-server-jammy",
            sku: "22_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("example", {
        name: "network-watcher",
        virtualMachineId: exampleVirtualMachine.id,
        publisher: "Microsoft.Azure.NetworkWatcher",
        type: "NetworkWatcherAgentLinux",
        typeHandlerVersion: "1.4",
        autoUpgradeMinorVersion: true,
    });
    const exampleAccount = new azure.storage.Account("example", {
        name: "examplesa",
        resourceGroupName: example.name,
        location: example.location,
        accountTier: "Standard",
        accountReplicationType: "LRS",
    });
    const examplePacketCapture = new azure.compute.PacketCapture("example", {
        name: "example-pc",
        networkWatcherId: exampleNetworkWatcher.id,
        virtualMachineId: exampleVirtualMachine.id,
        storageLocation: {
            storageAccountId: exampleAccount.id,
        },
    }, {
        dependsOn: [exampleExtension],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_network_watcher = azure.network.NetworkWatcher("example",
        name="example-nw",
        location=example.location,
        resource_group_name=example.name)
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="example-network",
        address_spaces=["10.0.0.0/16"],
        location=example.location,
        resource_group_name=example.name)
    example_subnet = azure.network.Subnet("example",
        name="internal",
        resource_group_name=example.name,
        virtual_network_name=example_virtual_network.name,
        address_prefixes=["10.0.2.0/24"])
    example_network_interface = azure.network.NetworkInterface("example",
        name="example-nic",
        location=example.location,
        resource_group_name=example.name,
        ip_configurations=[azure.network.NetworkInterfaceIpConfigurationArgs(
            name="testconfiguration1",
            subnet_id=example_subnet.id,
            private_ip_address_allocation="Dynamic",
        )])
    example_virtual_machine = azure.compute.VirtualMachine("example",
        name="example-vm",
        location=example.location,
        resource_group_name=example.name,
        network_interface_ids=[example_network_interface.id],
        vm_size="Standard_F2",
        storage_image_reference=azure.compute.VirtualMachineStorageImageReferenceArgs(
            publisher="Canonical",
            offer="0001-com-ubuntu-server-jammy",
            sku="22_04-lts",
            version="latest",
        ),
        storage_os_disk=azure.compute.VirtualMachineStorageOsDiskArgs(
            name="osdisk",
            caching="ReadWrite",
            create_option="FromImage",
            managed_disk_type="Standard_LRS",
        ),
        os_profile=azure.compute.VirtualMachineOsProfileArgs(
            computer_name="pctest-vm",
            admin_username="testadmin",
            admin_password="Password1234!",
        ),
        os_profile_linux_config=azure.compute.VirtualMachineOsProfileLinuxConfigArgs(
            disable_password_authentication=False,
        ))
    example_extension = azure.compute.Extension("example",
        name="network-watcher",
        virtual_machine_id=example_virtual_machine.id,
        publisher="Microsoft.Azure.NetworkWatcher",
        type="NetworkWatcherAgentLinux",
        type_handler_version="1.4",
        auto_upgrade_minor_version=True)
    example_account = azure.storage.Account("example",
        name="examplesa",
        resource_group_name=example.name,
        location=example.location,
        account_tier="Standard",
        account_replication_type="LRS")
    example_packet_capture = azure.compute.PacketCapture("example",
        name="example-pc",
        network_watcher_id=example_network_watcher.id,
        virtual_machine_id=example_virtual_machine.id,
        storage_location=azure.compute.PacketCaptureStorageLocationArgs(
            storage_account_id=example_account.id,
        ),
        opts=pulumi.ResourceOptions(depends_on=[example_extension]))
    
    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-azure/sdk/v5/go/azure/storage"
    	"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-network"),
    			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
    		}
    		exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{
    			Name:              pulumi.String("example-nic"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
    				&network.NetworkInterfaceIpConfigurationArgs{
    					Name:                       pulumi.String("testconfiguration1"),
    					SubnetId:                   exampleSubnet.ID(),
    					PrivateIpAddressAllocation: pulumi.String("Dynamic"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualMachine, err := compute.NewVirtualMachine(ctx, "example", &compute.VirtualMachineArgs{
    			Name:              pulumi.String("example-vm"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			NetworkInterfaceIds: pulumi.StringArray{
    				exampleNetworkInterface.ID(),
    			},
    			VmSize: pulumi.String("Standard_F2"),
    			StorageImageReference: &compute.VirtualMachineStorageImageReferenceArgs{
    				Publisher: pulumi.String("Canonical"),
    				Offer:     pulumi.String("0001-com-ubuntu-server-jammy"),
    				Sku:       pulumi.String("22_04-lts"),
    				Version:   pulumi.String("latest"),
    			},
    			StorageOsDisk: &compute.VirtualMachineStorageOsDiskArgs{
    				Name:            pulumi.String("osdisk"),
    				Caching:         pulumi.String("ReadWrite"),
    				CreateOption:    pulumi.String("FromImage"),
    				ManagedDiskType: pulumi.String("Standard_LRS"),
    			},
    			OsProfile: &compute.VirtualMachineOsProfileArgs{
    				ComputerName:  pulumi.String("pctest-vm"),
    				AdminUsername: pulumi.String("testadmin"),
    				AdminPassword: pulumi.String("Password1234!"),
    			},
    			OsProfileLinuxConfig: &compute.VirtualMachineOsProfileLinuxConfigArgs{
    				DisablePasswordAuthentication: pulumi.Bool(false),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleExtension, err := compute.NewExtension(ctx, "example", &compute.ExtensionArgs{
    			Name:                    pulumi.String("network-watcher"),
    			VirtualMachineId:        exampleVirtualMachine.ID(),
    			Publisher:               pulumi.String("Microsoft.Azure.NetworkWatcher"),
    			Type:                    pulumi.String("NetworkWatcherAgentLinux"),
    			TypeHandlerVersion:      pulumi.String("1.4"),
    			AutoUpgradeMinorVersion: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
    			Name:                   pulumi.String("examplesa"),
    			ResourceGroupName:      example.Name,
    			Location:               example.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("LRS"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewPacketCapture(ctx, "example", &compute.PacketCaptureArgs{
    			Name:             pulumi.String("example-pc"),
    			NetworkWatcherId: exampleNetworkWatcher.ID(),
    			VirtualMachineId: exampleVirtualMachine.ID(),
    			StorageLocation: &compute.PacketCaptureStorageLocationArgs{
    				StorageAccountId: exampleAccount.ID(),
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			exampleExtension,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleNetworkWatcher = new Azure.Network.NetworkWatcher("example", new()
        {
            Name = "example-nw",
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "example-network",
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            Location = example.Location,
            ResourceGroupName = example.Name,
        });
    
        var exampleSubnet = new Azure.Network.Subnet("example", new()
        {
            Name = "internal",
            ResourceGroupName = example.Name,
            VirtualNetworkName = exampleVirtualNetwork.Name,
            AddressPrefixes = new[]
            {
                "10.0.2.0/24",
            },
        });
    
        var exampleNetworkInterface = new Azure.Network.NetworkInterface("example", new()
        {
            Name = "example-nic",
            Location = example.Location,
            ResourceGroupName = example.Name,
            IpConfigurations = new[]
            {
                new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
                {
                    Name = "testconfiguration1",
                    SubnetId = exampleSubnet.Id,
                    PrivateIpAddressAllocation = "Dynamic",
                },
            },
        });
    
        var exampleVirtualMachine = new Azure.Compute.VirtualMachine("example", new()
        {
            Name = "example-vm",
            Location = example.Location,
            ResourceGroupName = example.Name,
            NetworkInterfaceIds = new[]
            {
                exampleNetworkInterface.Id,
            },
            VmSize = "Standard_F2",
            StorageImageReference = new Azure.Compute.Inputs.VirtualMachineStorageImageReferenceArgs
            {
                Publisher = "Canonical",
                Offer = "0001-com-ubuntu-server-jammy",
                Sku = "22_04-lts",
                Version = "latest",
            },
            StorageOsDisk = new Azure.Compute.Inputs.VirtualMachineStorageOsDiskArgs
            {
                Name = "osdisk",
                Caching = "ReadWrite",
                CreateOption = "FromImage",
                ManagedDiskType = "Standard_LRS",
            },
            OsProfile = new Azure.Compute.Inputs.VirtualMachineOsProfileArgs
            {
                ComputerName = "pctest-vm",
                AdminUsername = "testadmin",
                AdminPassword = "Password1234!",
            },
            OsProfileLinuxConfig = new Azure.Compute.Inputs.VirtualMachineOsProfileLinuxConfigArgs
            {
                DisablePasswordAuthentication = false,
            },
        });
    
        var exampleExtension = new Azure.Compute.Extension("example", new()
        {
            Name = "network-watcher",
            VirtualMachineId = exampleVirtualMachine.Id,
            Publisher = "Microsoft.Azure.NetworkWatcher",
            Type = "NetworkWatcherAgentLinux",
            TypeHandlerVersion = "1.4",
            AutoUpgradeMinorVersion = true,
        });
    
        var exampleAccount = new Azure.Storage.Account("example", new()
        {
            Name = "examplesa",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AccountTier = "Standard",
            AccountReplicationType = "LRS",
        });
    
        var examplePacketCapture = new Azure.Compute.PacketCapture("example", new()
        {
            Name = "example-pc",
            NetworkWatcherId = exampleNetworkWatcher.Id,
            VirtualMachineId = exampleVirtualMachine.Id,
            StorageLocation = new Azure.Compute.Inputs.PacketCaptureStorageLocationArgs
            {
                StorageAccountId = exampleAccount.Id,
            },
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                exampleExtension,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.NetworkWatcher;
    import com.pulumi.azure.network.NetworkWatcherArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.network.NetworkInterface;
    import com.pulumi.azure.network.NetworkInterfaceArgs;
    import com.pulumi.azure.network.inputs.NetworkInterfaceIpConfigurationArgs;
    import com.pulumi.azure.compute.VirtualMachine;
    import com.pulumi.azure.compute.VirtualMachineArgs;
    import com.pulumi.azure.compute.inputs.VirtualMachineStorageImageReferenceArgs;
    import com.pulumi.azure.compute.inputs.VirtualMachineStorageOsDiskArgs;
    import com.pulumi.azure.compute.inputs.VirtualMachineOsProfileArgs;
    import com.pulumi.azure.compute.inputs.VirtualMachineOsProfileLinuxConfigArgs;
    import com.pulumi.azure.compute.Extension;
    import com.pulumi.azure.compute.ExtensionArgs;
    import com.pulumi.azure.storage.Account;
    import com.pulumi.azure.storage.AccountArgs;
    import com.pulumi.azure.compute.PacketCapture;
    import com.pulumi.azure.compute.PacketCaptureArgs;
    import com.pulumi.azure.compute.inputs.PacketCaptureStorageLocationArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleNetworkWatcher = new NetworkWatcher("exampleNetworkWatcher", NetworkWatcherArgs.builder()
                .name("example-nw")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
                .name("example-network")
                .addressSpaces("10.0.0.0/16")
                .location(example.location())
                .resourceGroupName(example.name())
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
                .name("internal")
                .resourceGroupName(example.name())
                .virtualNetworkName(exampleVirtualNetwork.name())
                .addressPrefixes("10.0.2.0/24")
                .build());
    
            var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()
                .name("example-nic")
                .location(example.location())
                .resourceGroupName(example.name())
                .ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
                    .name("testconfiguration1")
                    .subnetId(exampleSubnet.id())
                    .privateIpAddressAllocation("Dynamic")
                    .build())
                .build());
    
            var exampleVirtualMachine = new VirtualMachine("exampleVirtualMachine", VirtualMachineArgs.builder()
                .name("example-vm")
                .location(example.location())
                .resourceGroupName(example.name())
                .networkInterfaceIds(exampleNetworkInterface.id())
                .vmSize("Standard_F2")
                .storageImageReference(VirtualMachineStorageImageReferenceArgs.builder()
                    .publisher("Canonical")
                    .offer("0001-com-ubuntu-server-jammy")
                    .sku("22_04-lts")
                    .version("latest")
                    .build())
                .storageOsDisk(VirtualMachineStorageOsDiskArgs.builder()
                    .name("osdisk")
                    .caching("ReadWrite")
                    .createOption("FromImage")
                    .managedDiskType("Standard_LRS")
                    .build())
                .osProfile(VirtualMachineOsProfileArgs.builder()
                    .computerName("pctest-vm")
                    .adminUsername("testadmin")
                    .adminPassword("Password1234!")
                    .build())
                .osProfileLinuxConfig(VirtualMachineOsProfileLinuxConfigArgs.builder()
                    .disablePasswordAuthentication(false)
                    .build())
                .build());
    
            var exampleExtension = new Extension("exampleExtension", ExtensionArgs.builder()
                .name("network-watcher")
                .virtualMachineId(exampleVirtualMachine.id())
                .publisher("Microsoft.Azure.NetworkWatcher")
                .type("NetworkWatcherAgentLinux")
                .typeHandlerVersion("1.4")
                .autoUpgradeMinorVersion(true)
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
                .name("examplesa")
                .resourceGroupName(example.name())
                .location(example.location())
                .accountTier("Standard")
                .accountReplicationType("LRS")
                .build());
    
            var examplePacketCapture = new PacketCapture("examplePacketCapture", PacketCaptureArgs.builder()
                .name("example-pc")
                .networkWatcherId(exampleNetworkWatcher.id())
                .virtualMachineId(exampleVirtualMachine.id())
                .storageLocation(PacketCaptureStorageLocationArgs.builder()
                    .storageAccountId(exampleAccount.id())
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(exampleExtension)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleNetworkWatcher:
        type: azure:network:NetworkWatcher
        name: example
        properties:
          name: example-nw
          location: ${example.location}
          resourceGroupName: ${example.name}
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: example-network
          addressSpaces:
            - 10.0.0.0/16
          location: ${example.location}
          resourceGroupName: ${example.name}
      exampleSubnet:
        type: azure:network:Subnet
        name: example
        properties:
          name: internal
          resourceGroupName: ${example.name}
          virtualNetworkName: ${exampleVirtualNetwork.name}
          addressPrefixes:
            - 10.0.2.0/24
      exampleNetworkInterface:
        type: azure:network:NetworkInterface
        name: example
        properties:
          name: example-nic
          location: ${example.location}
          resourceGroupName: ${example.name}
          ipConfigurations:
            - name: testconfiguration1
              subnetId: ${exampleSubnet.id}
              privateIpAddressAllocation: Dynamic
      exampleVirtualMachine:
        type: azure:compute:VirtualMachine
        name: example
        properties:
          name: example-vm
          location: ${example.location}
          resourceGroupName: ${example.name}
          networkInterfaceIds:
            - ${exampleNetworkInterface.id}
          vmSize: Standard_F2
          storageImageReference:
            publisher: Canonical
            offer: 0001-com-ubuntu-server-jammy
            sku: 22_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
      exampleExtension:
        type: azure:compute:Extension
        name: example
        properties:
          name: network-watcher
          virtualMachineId: ${exampleVirtualMachine.id}
          publisher: Microsoft.Azure.NetworkWatcher
          type: NetworkWatcherAgentLinux
          typeHandlerVersion: '1.4'
          autoUpgradeMinorVersion: true
      exampleAccount:
        type: azure:storage:Account
        name: example
        properties:
          name: examplesa
          resourceGroupName: ${example.name}
          location: ${example.location}
          accountTier: Standard
          accountReplicationType: LRS
      examplePacketCapture:
        type: azure:compute:PacketCapture
        name: example
        properties:
          name: example-pc
          networkWatcherId: ${exampleNetworkWatcher.id}
          virtualMachineId: ${exampleVirtualMachine.id}
          storageLocation:
            storageAccountId: ${exampleAccount.id}
        options:
          dependson:
            - ${exampleExtension}
    

    NOTE: This Resource requires that the Network Watcher Virtual Machine Extension is installed on the Virtual Machine before capturing can be enabled which can be installed via the azure.compute.Extension resource.

    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_id: Optional[str] = None,
                      storage_location: Optional[PacketCaptureStorageLocationArgs] = None,
                      virtual_machine_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_in_seconds: 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:compute: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.

    Example

    The following reference example uses placeholder values for all input properties.

    var packetCaptureResource = new Azure.Compute.PacketCapture("packetCaptureResource", new()
    {
        NetworkWatcherId = "string",
        StorageLocation = new Azure.Compute.Inputs.PacketCaptureStorageLocationArgs
        {
            FilePath = "string",
            StorageAccountId = "string",
            StoragePath = "string",
        },
        VirtualMachineId = "string",
        Filters = new[]
        {
            new Azure.Compute.Inputs.PacketCaptureFilterArgs
            {
                Protocol = "string",
                LocalIpAddress = "string",
                LocalPort = "string",
                RemoteIpAddress = "string",
                RemotePort = "string",
            },
        },
        MaximumBytesPerPacket = 0,
        MaximumBytesPerSession = 0,
        MaximumCaptureDurationInSeconds = 0,
        Name = "string",
    });
    
    example, err := compute.NewPacketCapture(ctx, "packetCaptureResource", &compute.PacketCaptureArgs{
    	NetworkWatcherId: pulumi.String("string"),
    	StorageLocation: &compute.PacketCaptureStorageLocationArgs{
    		FilePath:         pulumi.String("string"),
    		StorageAccountId: pulumi.String("string"),
    		StoragePath:      pulumi.String("string"),
    	},
    	VirtualMachineId: pulumi.String("string"),
    	Filters: compute.PacketCaptureFilterArray{
    		&compute.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),
    	MaximumCaptureDurationInSeconds: pulumi.Int(0),
    	Name:                            pulumi.String("string"),
    })
    
    var packetCaptureResource = new PacketCapture("packetCaptureResource", PacketCaptureArgs.builder()
        .networkWatcherId("string")
        .storageLocation(PacketCaptureStorageLocationArgs.builder()
            .filePath("string")
            .storageAccountId("string")
            .storagePath("string")
            .build())
        .virtualMachineId("string")
        .filters(PacketCaptureFilterArgs.builder()
            .protocol("string")
            .localIpAddress("string")
            .localPort("string")
            .remoteIpAddress("string")
            .remotePort("string")
            .build())
        .maximumBytesPerPacket(0)
        .maximumBytesPerSession(0)
        .maximumCaptureDurationInSeconds(0)
        .name("string")
        .build());
    
    packet_capture_resource = azure.compute.PacketCapture("packetCaptureResource",
        network_watcher_id="string",
        storage_location=azure.compute.PacketCaptureStorageLocationArgs(
            file_path="string",
            storage_account_id="string",
            storage_path="string",
        ),
        virtual_machine_id="string",
        filters=[azure.compute.PacketCaptureFilterArgs(
            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_in_seconds=0,
        name="string")
    
    const packetCaptureResource = new azure.compute.PacketCapture("packetCaptureResource", {
        networkWatcherId: "string",
        storageLocation: {
            filePath: "string",
            storageAccountId: "string",
            storagePath: "string",
        },
        virtualMachineId: "string",
        filters: [{
            protocol: "string",
            localIpAddress: "string",
            localPort: "string",
            remoteIpAddress: "string",
            remotePort: "string",
        }],
        maximumBytesPerPacket: 0,
        maximumBytesPerSession: 0,
        maximumCaptureDurationInSeconds: 0,
        name: "string",
    });
    
    type: azure:compute:PacketCapture
    properties:
        filters:
            - localIpAddress: string
              localPort: string
              protocol: string
              remoteIpAddress: string
              remotePort: string
        maximumBytesPerPacket: 0
        maximumBytesPerSession: 0
        maximumCaptureDurationInSeconds: 0
        name: string
        networkWatcherId: string
        storageLocation:
            filePath: string
            storageAccountId: string
            storagePath: string
        virtualMachineId: 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

    The PacketCapture resource accepts the following input properties:

    NetworkWatcherId string
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    StorageLocation PacketCaptureStorageLocation
    A storage_location block as defined below. Changing this forces a new resource to be created.
    VirtualMachineId string
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    Filters List<PacketCaptureFilter>
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    MaximumBytesPerPacket int
    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.
    MaximumBytesPerSession int
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    MaximumCaptureDurationInSeconds int
    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 Network Packet Capture. Changing this forces a new resource to be created.
    NetworkWatcherId string
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    StorageLocation PacketCaptureStorageLocationArgs
    A storage_location block as defined below. Changing this forces a new resource to be created.
    VirtualMachineId string
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    Filters []PacketCaptureFilterArgs
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    MaximumBytesPerPacket int
    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.
    MaximumBytesPerSession int
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    MaximumCaptureDurationInSeconds int
    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 Network Packet Capture. Changing this forces a new resource to be created.
    networkWatcherId String
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    storageLocation PacketCaptureStorageLocation
    A storage_location block as defined below. Changing this forces a new resource to be created.
    virtualMachineId String
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    filters List<PacketCaptureFilter>
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    maximumBytesPerPacket Integer
    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.
    maximumBytesPerSession Integer
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    maximumCaptureDurationInSeconds Integer
    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 Network Packet Capture. Changing this forces a new resource to be created.
    networkWatcherId string
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    storageLocation PacketCaptureStorageLocation
    A storage_location block as defined below. Changing this forces a new resource to be created.
    virtualMachineId string
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    filters PacketCaptureFilter[]
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    maximumBytesPerPacket number
    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.
    maximumBytesPerSession number
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    maximumCaptureDurationInSeconds number
    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 Network Packet Capture. Changing this forces a new resource to be created.
    network_watcher_id str
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    storage_location PacketCaptureStorageLocationArgs
    A storage_location block as defined below. Changing this forces a new resource to be created.
    virtual_machine_id str
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    filters Sequence[PacketCaptureFilterArgs]
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    maximum_bytes_per_packet int
    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_per_session int
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    maximum_capture_duration_in_seconds int
    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 Network Packet Capture. Changing this forces a new resource to be created.
    networkWatcherId String
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    storageLocation Property Map
    A storage_location block as defined below. Changing this forces a new resource to be created.
    virtualMachineId String
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    filters List<Property Map>
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    maximumBytesPerPacket Number
    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.
    maximumBytesPerSession Number
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    maximumCaptureDurationInSeconds Number
    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 Network 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_in_seconds: Optional[int] = None,
            name: Optional[str] = None,
            network_watcher_id: Optional[str] = None,
            storage_location: Optional[PacketCaptureStorageLocationArgs] = None,
            virtual_machine_id: Optional[str] = None) -> PacketCapture
    func 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Filters List<PacketCaptureFilter>
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    MaximumBytesPerPacket int
    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.
    MaximumBytesPerSession int
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    MaximumCaptureDurationInSeconds int
    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 Network Packet Capture. Changing this forces a new resource to be created.
    NetworkWatcherId string
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    StorageLocation PacketCaptureStorageLocation
    A storage_location block as defined below. Changing this forces a new resource to be created.
    VirtualMachineId string
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    Filters []PacketCaptureFilterArgs
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    MaximumBytesPerPacket int
    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.
    MaximumBytesPerSession int
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    MaximumCaptureDurationInSeconds int
    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 Network Packet Capture. Changing this forces a new resource to be created.
    NetworkWatcherId string
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    StorageLocation PacketCaptureStorageLocationArgs
    A storage_location block as defined below. Changing this forces a new resource to be created.
    VirtualMachineId string
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    filters List<PacketCaptureFilter>
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    maximumBytesPerPacket Integer
    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.
    maximumBytesPerSession Integer
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    maximumCaptureDurationInSeconds Integer
    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 Network Packet Capture. Changing this forces a new resource to be created.
    networkWatcherId String
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    storageLocation PacketCaptureStorageLocation
    A storage_location block as defined below. Changing this forces a new resource to be created.
    virtualMachineId String
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    filters PacketCaptureFilter[]
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    maximumBytesPerPacket number
    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.
    maximumBytesPerSession number
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    maximumCaptureDurationInSeconds number
    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 Network Packet Capture. Changing this forces a new resource to be created.
    networkWatcherId string
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    storageLocation PacketCaptureStorageLocation
    A storage_location block as defined below. Changing this forces a new resource to be created.
    virtualMachineId string
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    filters Sequence[PacketCaptureFilterArgs]
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    maximum_bytes_per_packet int
    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_per_session int
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    maximum_capture_duration_in_seconds int
    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 Network Packet Capture. Changing this forces a new resource to be created.
    network_watcher_id str
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    storage_location PacketCaptureStorageLocationArgs
    A storage_location block as defined below. Changing this forces a new resource to be created.
    virtual_machine_id str
    The resource ID of the target Virtual Machine to capture packets from. Changing this forces a new resource to be created.
    filters List<Property Map>
    One or more filter blocks as defined below. Changing this forces a new resource to be created.
    maximumBytesPerPacket Number
    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.
    maximumBytesPerSession Number
    Maximum size of the capture in Bytes. Defaults to 1073741824 (1GB). Changing this forces a new resource to be created.
    maximumCaptureDurationInSeconds Number
    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 Network Packet Capture. Changing this forces a new resource to be created.
    networkWatcherId String
    The resource ID of the Network Watcher. Changing this forces a new resource to be created.
    storageLocation Property Map
    A storage_location block as defined below. Changing this forces a new resource to be created.
    virtualMachineId String
    The resource ID of the target Virtual Machine 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, TCP and UDP. Changing this forces a new resource to be created.
    LocalIpAddress string
    The local IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    LocalPort string
    The local port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    RemoteIpAddress string
    The remote IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    RemotePort string
    The remote port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    Protocol string
    The Protocol to be filtered on. Possible values include Any, TCP and UDP. Changing this forces a new resource to be created.
    LocalIpAddress string
    The local IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    LocalPort string
    The local port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    RemoteIpAddress string
    The remote IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    RemotePort string
    The remote port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    protocol String
    The Protocol to be filtered on. Possible values include Any, TCP and UDP. Changing this forces a new resource to be created.
    localIpAddress String
    The local IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    localPort String
    The local port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    remoteIpAddress String
    The remote IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    remotePort String
    The remote port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    protocol string
    The Protocol to be filtered on. Possible values include Any, TCP and UDP. Changing this forces a new resource to be created.
    localIpAddress string
    The local IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    localPort string
    The local port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    remoteIpAddress string
    The remote IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    remotePort string
    The remote port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    protocol str
    The Protocol to be filtered on. Possible values include Any, TCP and UDP. Changing this forces a new resource to be created.
    local_ip_address str
    The local IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    local_port str
    The local port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    remote_ip_address str
    The remote IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    remote_port str
    The remote port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    protocol String
    The Protocol to be filtered on. Possible values include Any, TCP and UDP. Changing this forces a new resource to be created.
    localIpAddress String
    The local IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    localPort String
    The local port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    remoteIpAddress String
    The remote IP Address to be filtered on. Specify 127.0.0.1 for a single address entry, 127.0.0.1-127.0.0.255 for a range and 127.0.0.1;127.0.0.5 for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.
    remotePort String
    The remote port to be filtered on. Specify 80 for single port entry, 80-85 for a range and 80;443; for multiple entries. Multiple ranges and mixing ranges with multiple entries are currently not supported. Changing this forces a new resource to be created.

    PacketCaptureStorageLocation, PacketCaptureStorageLocationArgs

    FilePath string
    A valid local path on the target Virtual Machine. Must include the name of the capture file (*.cap). For Linux Virtual Machines it must start with /var/captures.
    StorageAccountId string

    The ID of the storage account where the packet capture sessions should be saved to.

    NOTE: At least one of file_path or storage_account_id must be specified.

    StoragePath string
    The URI of the storage path where the packet capture sessions are saved to.
    FilePath string
    A valid local path on the target Virtual Machine. Must include the name of the capture file (*.cap). For Linux Virtual Machines it must start with /var/captures.
    StorageAccountId string

    The ID of the storage account where the packet capture sessions should be saved to.

    NOTE: At least one of file_path or storage_account_id must be specified.

    StoragePath string
    The URI of the storage path where the packet capture sessions are saved to.
    filePath String
    A valid local path on the target Virtual Machine. Must include the name of the capture file (*.cap). For Linux Virtual Machines it must start with /var/captures.
    storageAccountId String

    The ID of the storage account where the packet capture sessions should be saved to.

    NOTE: At least one of file_path or storage_account_id must be specified.

    storagePath String
    The URI of the storage path where the packet capture sessions are saved to.
    filePath string
    A valid local path on the target Virtual Machine. Must include the name of the capture file (*.cap). For Linux Virtual Machines it must start with /var/captures.
    storageAccountId string

    The ID of the storage account where the packet capture sessions should be saved to.

    NOTE: At least one of file_path or storage_account_id must be specified.

    storagePath string
    The URI of the storage path where the packet capture sessions are saved to.
    file_path str
    A valid local path on the target Virtual Machine. Must include the name of the capture file (*.cap). For Linux Virtual Machines it must start with /var/captures.
    storage_account_id str

    The ID of the storage account where the packet capture sessions should be saved to.

    NOTE: At least one of file_path or storage_account_id must be specified.

    storage_path str
    The URI of the storage path where the packet capture sessions are saved to.
    filePath String
    A valid local path on the target Virtual Machine. Must include the name of the capture file (*.cap). For Linux Virtual Machines it must start with /var/captures.
    storageAccountId String

    The ID of the storage account where the packet capture sessions should be saved to.

    NOTE: At least one of file_path or storage_account_id must be specified.

    storagePath String
    The URI of the storage path where the packet capture sessions are saved to.

    Import

    Virtual Machine Packet Captures can be imported using the resource id, e.g.

    $ pulumi import azure:compute/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 azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi