azure.network.NetworkConnectionMonitor

Explore with Pulumi AI

Manages a Network Connection Monitor.

NOTE: Any Network Connection Monitor resource created with API versions 2019-06-01 or earlier (v1) are now incompatible with this provider, which now only supports v2.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleNetworkWatcher = new Azure.Network.NetworkWatcher("exampleNetworkWatcher", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
    });

    var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
    {
        AddressSpaces = new[]
        {
            "10.0.0.0/16",
        },
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
    });

    var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        VirtualNetworkName = exampleVirtualNetwork.Name,
        AddressPrefixes = new[]
        {
            "10.0.2.0/24",
        },
    });

    var exampleNetworkInterface = new Azure.Network.NetworkInterface("exampleNetworkInterface", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        IpConfigurations = new[]
        {
            new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
            {
                Name = "testconfiguration1",
                SubnetId = exampleSubnet.Id,
                PrivateIpAddressAllocation = "Dynamic",
            },
        },
    });

    var exampleVirtualMachine = new Azure.Compute.VirtualMachine("exampleVirtualMachine", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        NetworkInterfaceIds = new[]
        {
            exampleNetworkInterface.Id,
        },
        VmSize = "Standard_D2s_v3",
        StorageImageReference = new Azure.Compute.Inputs.VirtualMachineStorageImageReferenceArgs
        {
            Publisher = "Canonical",
            Offer = "UbuntuServer",
            Sku = "16.04-LTS",
            Version = "latest",
        },
        StorageOsDisk = new Azure.Compute.Inputs.VirtualMachineStorageOsDiskArgs
        {
            Name = "osdisk-example01",
            Caching = "ReadWrite",
            CreateOption = "FromImage",
            ManagedDiskType = "Standard_LRS",
        },
        OsProfile = new Azure.Compute.Inputs.VirtualMachineOsProfileArgs
        {
            ComputerName = "hostnametest01",
            AdminUsername = "testadmin",
            AdminPassword = "Password1234!",
        },
        OsProfileLinuxConfig = new Azure.Compute.Inputs.VirtualMachineOsProfileLinuxConfigArgs
        {
            DisablePasswordAuthentication = false,
        },
    });

    var exampleExtension = new Azure.Compute.Extension("exampleExtension", new()
    {
        VirtualMachineId = exampleVirtualMachine.Id,
        Publisher = "Microsoft.Azure.NetworkWatcher",
        Type = "NetworkWatcherAgentLinux",
        TypeHandlerVersion = "1.4",
        AutoUpgradeMinorVersion = true,
    });

    var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", new()
    {
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        Sku = "PerGB2018",
    });

    var exampleNetworkConnectionMonitor = new Azure.Network.NetworkConnectionMonitor("exampleNetworkConnectionMonitor", new()
    {
        NetworkWatcherId = exampleNetworkWatcher.Id,
        Location = exampleNetworkWatcher.Location,
        Endpoints = new[]
        {
            new Azure.Network.Inputs.NetworkConnectionMonitorEndpointArgs
            {
                Name = "source",
                TargetResourceId = exampleVirtualMachine.Id,
                Filter = new Azure.Network.Inputs.NetworkConnectionMonitorEndpointFilterArgs
                {
                    Items = new[]
                    {
                        new Azure.Network.Inputs.NetworkConnectionMonitorEndpointFilterItemArgs
                        {
                            Address = exampleVirtualMachine.Id,
                            Type = "AgentAddress",
                        },
                    },
                    Type = "Include",
                },
            },
            new Azure.Network.Inputs.NetworkConnectionMonitorEndpointArgs
            {
                Name = "destination",
                Address = "mycompany.io",
            },
        },
        TestConfigurations = new[]
        {
            new Azure.Network.Inputs.NetworkConnectionMonitorTestConfigurationArgs
            {
                Name = "tcpName",
                Protocol = "Tcp",
                TestFrequencyInSeconds = 60,
                TcpConfiguration = new Azure.Network.Inputs.NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs
                {
                    Port = 80,
                },
            },
        },
        TestGroups = new[]
        {
            new Azure.Network.Inputs.NetworkConnectionMonitorTestGroupArgs
            {
                Name = "exampletg",
                DestinationEndpoints = new[]
                {
                    "destination",
                },
                SourceEndpoints = new[]
                {
                    "source",
                },
                TestConfigurationNames = new[]
                {
                    "tcpName",
                },
            },
        },
        Notes = "examplenote",
        OutputWorkspaceResourceIds = new[]
        {
            exampleAnalyticsWorkspace.Id,
        },
    }, new CustomResourceOptions
    {
        DependsOn = new[]
        {
            exampleExtension,
        },
    });

});
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/operationalinsights"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleNetworkWatcher, err := network.NewNetworkWatcher(ctx, "exampleNetworkWatcher", &network.NetworkWatcherArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
		})
		if err != nil {
			return err
		}
		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
			AddressSpaces: pulumi.StringArray{
				pulumi.String("10.0.0.0/16"),
			},
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
		})
		if err != nil {
			return err
		}
		exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
			ResourceGroupName:  exampleResourceGroup.Name,
			VirtualNetworkName: exampleVirtualNetwork.Name,
			AddressPrefixes: pulumi.StringArray{
				pulumi.String("10.0.2.0/24"),
			},
		})
		if err != nil {
			return err
		}
		exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "exampleNetworkInterface", &network.NetworkInterfaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.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, "exampleVirtualMachine", &compute.VirtualMachineArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			NetworkInterfaceIds: pulumi.StringArray{
				exampleNetworkInterface.ID(),
			},
			VmSize: pulumi.String("Standard_D2s_v3"),
			StorageImageReference: &compute.VirtualMachineStorageImageReferenceArgs{
				Publisher: pulumi.String("Canonical"),
				Offer:     pulumi.String("UbuntuServer"),
				Sku:       pulumi.String("16.04-LTS"),
				Version:   pulumi.String("latest"),
			},
			StorageOsDisk: &compute.VirtualMachineStorageOsDiskArgs{
				Name:            pulumi.String("osdisk-example01"),
				Caching:         pulumi.String("ReadWrite"),
				CreateOption:    pulumi.String("FromImage"),
				ManagedDiskType: pulumi.String("Standard_LRS"),
			},
			OsProfile: &compute.VirtualMachineOsProfileArgs{
				ComputerName:  pulumi.String("hostnametest01"),
				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, "exampleExtension", &compute.ExtensionArgs{
			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
		}
		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "exampleAnalyticsWorkspace", &operationalinsights.AnalyticsWorkspaceArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Sku:               pulumi.String("PerGB2018"),
		})
		if err != nil {
			return err
		}
		_, err = network.NewNetworkConnectionMonitor(ctx, "exampleNetworkConnectionMonitor", &network.NetworkConnectionMonitorArgs{
			NetworkWatcherId: exampleNetworkWatcher.ID(),
			Location:         exampleNetworkWatcher.Location,
			Endpoints: network.NetworkConnectionMonitorEndpointArray{
				&network.NetworkConnectionMonitorEndpointArgs{
					Name:             pulumi.String("source"),
					TargetResourceId: exampleVirtualMachine.ID(),
					Filter: &network.NetworkConnectionMonitorEndpointFilterArgs{
						Items: network.NetworkConnectionMonitorEndpointFilterItemArray{
							&network.NetworkConnectionMonitorEndpointFilterItemArgs{
								Address: exampleVirtualMachine.ID(),
								Type:    pulumi.String("AgentAddress"),
							},
						},
						Type: pulumi.String("Include"),
					},
				},
				&network.NetworkConnectionMonitorEndpointArgs{
					Name:    pulumi.String("destination"),
					Address: pulumi.String("mycompany.io"),
				},
			},
			TestConfigurations: network.NetworkConnectionMonitorTestConfigurationArray{
				&network.NetworkConnectionMonitorTestConfigurationArgs{
					Name:                   pulumi.String("tcpName"),
					Protocol:               pulumi.String("Tcp"),
					TestFrequencyInSeconds: pulumi.Int(60),
					TcpConfiguration: &network.NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs{
						Port: pulumi.Int(80),
					},
				},
			},
			TestGroups: network.NetworkConnectionMonitorTestGroupArray{
				&network.NetworkConnectionMonitorTestGroupArgs{
					Name: pulumi.String("exampletg"),
					DestinationEndpoints: pulumi.StringArray{
						pulumi.String("destination"),
					},
					SourceEndpoints: pulumi.StringArray{
						pulumi.String("source"),
					},
					TestConfigurationNames: pulumi.StringArray{
						pulumi.String("tcpName"),
					},
				},
			},
			Notes: pulumi.String("examplenote"),
			OutputWorkspaceResourceIds: pulumi.StringArray{
				exampleAnalyticsWorkspace.ID(),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleExtension,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
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.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.network.NetworkConnectionMonitor;
import com.pulumi.azure.network.NetworkConnectionMonitorArgs;
import com.pulumi.azure.network.inputs.NetworkConnectionMonitorEndpointArgs;
import com.pulumi.azure.network.inputs.NetworkConnectionMonitorEndpointFilterArgs;
import com.pulumi.azure.network.inputs.NetworkConnectionMonitorTestConfigurationArgs;
import com.pulumi.azure.network.inputs.NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs;
import com.pulumi.azure.network.inputs.NetworkConnectionMonitorTestGroupArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleNetworkWatcher = new NetworkWatcher("exampleNetworkWatcher", NetworkWatcherArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .build());

        var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()        
            .addressSpaces("10.0.0.0/16")
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .build());

        var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .virtualNetworkName(exampleVirtualNetwork.name())
            .addressPrefixes("10.0.2.0/24")
            .build());

        var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
                .name("testconfiguration1")
                .subnetId(exampleSubnet.id())
                .privateIpAddressAllocation("Dynamic")
                .build())
            .build());

        var exampleVirtualMachine = new VirtualMachine("exampleVirtualMachine", VirtualMachineArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .networkInterfaceIds(exampleNetworkInterface.id())
            .vmSize("Standard_D2s_v3")
            .storageImageReference(VirtualMachineStorageImageReferenceArgs.builder()
                .publisher("Canonical")
                .offer("UbuntuServer")
                .sku("16.04-LTS")
                .version("latest")
                .build())
            .storageOsDisk(VirtualMachineStorageOsDiskArgs.builder()
                .name("osdisk-example01")
                .caching("ReadWrite")
                .createOption("FromImage")
                .managedDiskType("Standard_LRS")
                .build())
            .osProfile(VirtualMachineOsProfileArgs.builder()
                .computerName("hostnametest01")
                .adminUsername("testadmin")
                .adminPassword("Password1234!")
                .build())
            .osProfileLinuxConfig(VirtualMachineOsProfileLinuxConfigArgs.builder()
                .disablePasswordAuthentication(false)
                .build())
            .build());

        var exampleExtension = new Extension("exampleExtension", ExtensionArgs.builder()        
            .virtualMachineId(exampleVirtualMachine.id())
            .publisher("Microsoft.Azure.NetworkWatcher")
            .type("NetworkWatcherAgentLinux")
            .typeHandlerVersion("1.4")
            .autoUpgradeMinorVersion(true)
            .build());

        var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()        
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .sku("PerGB2018")
            .build());

        var exampleNetworkConnectionMonitor = new NetworkConnectionMonitor("exampleNetworkConnectionMonitor", NetworkConnectionMonitorArgs.builder()        
            .networkWatcherId(exampleNetworkWatcher.id())
            .location(exampleNetworkWatcher.location())
            .endpoints(            
                NetworkConnectionMonitorEndpointArgs.builder()
                    .name("source")
                    .targetResourceId(exampleVirtualMachine.id())
                    .filter(NetworkConnectionMonitorEndpointFilterArgs.builder()
                        .items(NetworkConnectionMonitorEndpointFilterItemArgs.builder()
                            .address(exampleVirtualMachine.id())
                            .type("AgentAddress")
                            .build())
                        .type("Include")
                        .build())
                    .build(),
                NetworkConnectionMonitorEndpointArgs.builder()
                    .name("destination")
                    .address("mycompany.io")
                    .build())
            .testConfigurations(NetworkConnectionMonitorTestConfigurationArgs.builder()
                .name("tcpName")
                .protocol("Tcp")
                .testFrequencyInSeconds(60)
                .tcpConfiguration(NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs.builder()
                    .port(80)
                    .build())
                .build())
            .testGroups(NetworkConnectionMonitorTestGroupArgs.builder()
                .name("exampletg")
                .destinationEndpoints("destination")
                .sourceEndpoints("source")
                .testConfigurationNames("tcpName")
                .build())
            .notes("examplenote")
            .outputWorkspaceResourceIds(exampleAnalyticsWorkspace.id())
            .build(), CustomResourceOptions.builder()
                .dependsOn(exampleExtension)
                .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_network_watcher = azure.network.NetworkWatcher("exampleNetworkWatcher",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name)
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
    address_spaces=["10.0.0.0/16"],
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name)
example_subnet = azure.network.Subnet("exampleSubnet",
    resource_group_name=example_resource_group.name,
    virtual_network_name=example_virtual_network.name,
    address_prefixes=["10.0.2.0/24"])
example_network_interface = azure.network.NetworkInterface("exampleNetworkInterface",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    ip_configurations=[azure.network.NetworkInterfaceIpConfigurationArgs(
        name="testconfiguration1",
        subnet_id=example_subnet.id,
        private_ip_address_allocation="Dynamic",
    )])
example_virtual_machine = azure.compute.VirtualMachine("exampleVirtualMachine",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    network_interface_ids=[example_network_interface.id],
    vm_size="Standard_D2s_v3",
    storage_image_reference=azure.compute.VirtualMachineStorageImageReferenceArgs(
        publisher="Canonical",
        offer="UbuntuServer",
        sku="16.04-LTS",
        version="latest",
    ),
    storage_os_disk=azure.compute.VirtualMachineStorageOsDiskArgs(
        name="osdisk-example01",
        caching="ReadWrite",
        create_option="FromImage",
        managed_disk_type="Standard_LRS",
    ),
    os_profile=azure.compute.VirtualMachineOsProfileArgs(
        computer_name="hostnametest01",
        admin_username="testadmin",
        admin_password="Password1234!",
    ),
    os_profile_linux_config=azure.compute.VirtualMachineOsProfileLinuxConfigArgs(
        disable_password_authentication=False,
    ))
example_extension = azure.compute.Extension("exampleExtension",
    virtual_machine_id=example_virtual_machine.id,
    publisher="Microsoft.Azure.NetworkWatcher",
    type="NetworkWatcherAgentLinux",
    type_handler_version="1.4",
    auto_upgrade_minor_version=True)
example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku="PerGB2018")
example_network_connection_monitor = azure.network.NetworkConnectionMonitor("exampleNetworkConnectionMonitor",
    network_watcher_id=example_network_watcher.id,
    location=example_network_watcher.location,
    endpoints=[
        azure.network.NetworkConnectionMonitorEndpointArgs(
            name="source",
            target_resource_id=example_virtual_machine.id,
            filter=azure.network.NetworkConnectionMonitorEndpointFilterArgs(
                items=[azure.network.NetworkConnectionMonitorEndpointFilterItemArgs(
                    address=example_virtual_machine.id,
                    type="AgentAddress",
                )],
                type="Include",
            ),
        ),
        azure.network.NetworkConnectionMonitorEndpointArgs(
            name="destination",
            address="mycompany.io",
        ),
    ],
    test_configurations=[azure.network.NetworkConnectionMonitorTestConfigurationArgs(
        name="tcpName",
        protocol="Tcp",
        test_frequency_in_seconds=60,
        tcp_configuration=azure.network.NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs(
            port=80,
        ),
    )],
    test_groups=[azure.network.NetworkConnectionMonitorTestGroupArgs(
        name="exampletg",
        destination_endpoints=["destination"],
        source_endpoints=["source"],
        test_configuration_names=["tcpName"],
    )],
    notes="examplenote",
    output_workspace_resource_ids=[example_analytics_workspace.id],
    opts=pulumi.ResourceOptions(depends_on=[example_extension]))
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_D2s_v3",
    storageImageReference: {
        publisher: "Canonical",
        offer: "UbuntuServer",
        sku: "16.04-LTS",
        version: "latest",
    },
    storageOsDisk: {
        name: "osdisk-example01",
        caching: "ReadWrite",
        createOption: "FromImage",
        managedDiskType: "Standard_LRS",
    },
    osProfile: {
        computerName: "hostnametest01",
        adminUsername: "testadmin",
        adminPassword: "Password1234!",
    },
    osProfileLinuxConfig: {
        disablePasswordAuthentication: false,
    },
});
const exampleExtension = new azure.compute.Extension("exampleExtension", {
    virtualMachineId: exampleVirtualMachine.id,
    publisher: "Microsoft.Azure.NetworkWatcher",
    type: "NetworkWatcherAgentLinux",
    typeHandlerVersion: "1.4",
    autoUpgradeMinorVersion: true,
});
const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("exampleAnalyticsWorkspace", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    sku: "PerGB2018",
});
const exampleNetworkConnectionMonitor = new azure.network.NetworkConnectionMonitor("exampleNetworkConnectionMonitor", {
    networkWatcherId: exampleNetworkWatcher.id,
    location: exampleNetworkWatcher.location,
    endpoints: [
        {
            name: "source",
            targetResourceId: exampleVirtualMachine.id,
            filter: {
                items: [{
                    address: exampleVirtualMachine.id,
                    type: "AgentAddress",
                }],
                type: "Include",
            },
        },
        {
            name: "destination",
            address: "mycompany.io",
        },
    ],
    testConfigurations: [{
        name: "tcpName",
        protocol: "Tcp",
        testFrequencyInSeconds: 60,
        tcpConfiguration: {
            port: 80,
        },
    }],
    testGroups: [{
        name: "exampletg",
        destinationEndpoints: ["destination"],
        sourceEndpoints: ["source"],
        testConfigurationNames: ["tcpName"],
    }],
    notes: "examplenote",
    outputWorkspaceResourceIds: [exampleAnalyticsWorkspace.id],
}, {
    dependsOn: [exampleExtension],
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleNetworkWatcher:
    type: azure:network:NetworkWatcher
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
  exampleVirtualNetwork:
    type: azure:network:VirtualNetwork
    properties:
      addressSpaces:
        - 10.0.0.0/16
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
  exampleSubnet:
    type: azure:network:Subnet
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      virtualNetworkName: ${exampleVirtualNetwork.name}
      addressPrefixes:
        - 10.0.2.0/24
  exampleNetworkInterface:
    type: azure:network:NetworkInterface
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      ipConfigurations:
        - name: testconfiguration1
          subnetId: ${exampleSubnet.id}
          privateIpAddressAllocation: Dynamic
  exampleVirtualMachine:
    type: azure:compute:VirtualMachine
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      networkInterfaceIds:
        - ${exampleNetworkInterface.id}
      vmSize: Standard_D2s_v3
      storageImageReference:
        publisher: Canonical
        offer: UbuntuServer
        sku: 16.04-LTS
        version: latest
      storageOsDisk:
        name: osdisk-example01
        caching: ReadWrite
        createOption: FromImage
        managedDiskType: Standard_LRS
      osProfile:
        computerName: hostnametest01
        adminUsername: testadmin
        adminPassword: Password1234!
      osProfileLinuxConfig:
        disablePasswordAuthentication: false
  exampleExtension:
    type: azure:compute:Extension
    properties:
      virtualMachineId: ${exampleVirtualMachine.id}
      publisher: Microsoft.Azure.NetworkWatcher
      type: NetworkWatcherAgentLinux
      typeHandlerVersion: '1.4'
      autoUpgradeMinorVersion: true
  exampleAnalyticsWorkspace:
    type: azure:operationalinsights:AnalyticsWorkspace
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      sku: PerGB2018
  exampleNetworkConnectionMonitor:
    type: azure:network:NetworkConnectionMonitor
    properties:
      networkWatcherId: ${exampleNetworkWatcher.id}
      location: ${exampleNetworkWatcher.location}
      endpoints:
        - name: source
          targetResourceId: ${exampleVirtualMachine.id}
          filter:
            items:
              - address: ${exampleVirtualMachine.id}
                type: AgentAddress
            type: Include
        - name: destination
          address: mycompany.io
      testConfigurations:
        - name: tcpName
          protocol: Tcp
          testFrequencyInSeconds: 60
          tcpConfiguration:
            port: 80
      testGroups:
        - name: exampletg
          destinationEndpoints:
            - destination
          sourceEndpoints:
            - source
          testConfigurationNames:
            - tcpName
      notes: examplenote
      outputWorkspaceResourceIds:
        - ${exampleAnalyticsWorkspace.id}
    options:
      dependson:
        - ${exampleExtension}

Create NetworkConnectionMonitor Resource

new NetworkConnectionMonitor(name: string, args: NetworkConnectionMonitorArgs, opts?: CustomResourceOptions);
@overload
def NetworkConnectionMonitor(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             endpoints: Optional[Sequence[NetworkConnectionMonitorEndpointArgs]] = None,
                             location: Optional[str] = None,
                             name: Optional[str] = None,
                             network_watcher_id: Optional[str] = None,
                             notes: Optional[str] = None,
                             output_workspace_resource_ids: Optional[Sequence[str]] = None,
                             tags: Optional[Mapping[str, str]] = None,
                             test_configurations: Optional[Sequence[NetworkConnectionMonitorTestConfigurationArgs]] = None,
                             test_groups: Optional[Sequence[NetworkConnectionMonitorTestGroupArgs]] = None)
@overload
def NetworkConnectionMonitor(resource_name: str,
                             args: NetworkConnectionMonitorArgs,
                             opts: Optional[ResourceOptions] = None)
func NewNetworkConnectionMonitor(ctx *Context, name string, args NetworkConnectionMonitorArgs, opts ...ResourceOption) (*NetworkConnectionMonitor, error)
public NetworkConnectionMonitor(string name, NetworkConnectionMonitorArgs args, CustomResourceOptions? opts = null)
public NetworkConnectionMonitor(String name, NetworkConnectionMonitorArgs args)
public NetworkConnectionMonitor(String name, NetworkConnectionMonitorArgs args, CustomResourceOptions options)
type: azure:network:NetworkConnectionMonitor
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args NetworkConnectionMonitorArgs
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 NetworkConnectionMonitorArgs
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 NetworkConnectionMonitorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args NetworkConnectionMonitorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args NetworkConnectionMonitorArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

NetworkConnectionMonitor 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 NetworkConnectionMonitor resource accepts the following input properties:

Endpoints List<NetworkConnectionMonitorEndpointArgs>

A endpoint block as defined below.

NetworkWatcherId string

The ID of the Network Watcher. Changing this forces a new resource to be created.

TestConfigurations List<NetworkConnectionMonitorTestConfigurationArgs>

A test_configuration block as defined below.

TestGroups List<NetworkConnectionMonitorTestGroupArgs>

A test_group block as defined below.

Location string

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

Name string

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

Notes string

The description of the Network Connection Monitor.

OutputWorkspaceResourceIds List<string>

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

Tags Dictionary<string, string>

A mapping of tags which should be assigned to the Network Connection Monitor.

Endpoints []NetworkConnectionMonitorEndpointArgs

A endpoint block as defined below.

NetworkWatcherId string

The ID of the Network Watcher. Changing this forces a new resource to be created.

TestConfigurations []NetworkConnectionMonitorTestConfigurationArgs

A test_configuration block as defined below.

TestGroups []NetworkConnectionMonitorTestGroupArgs

A test_group block as defined below.

Location string

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

Name string

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

Notes string

The description of the Network Connection Monitor.

OutputWorkspaceResourceIds []string

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

Tags map[string]string

A mapping of tags which should be assigned to the Network Connection Monitor.

endpoints List<NetworkConnectionMonitorEndpointArgs>

A endpoint block as defined below.

networkWatcherId String

The ID of the Network Watcher. Changing this forces a new resource to be created.

testConfigurations List<NetworkConnectionMonitorTestConfigurationArgs>

A test_configuration block as defined below.

testGroups List<NetworkConnectionMonitorTestGroupArgs>

A test_group block as defined below.

location String

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

name String

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

notes String

The description of the Network Connection Monitor.

outputWorkspaceResourceIds List<String>

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

tags Map<String,String>

A mapping of tags which should be assigned to the Network Connection Monitor.

endpoints NetworkConnectionMonitorEndpointArgs[]

A endpoint block as defined below.

networkWatcherId string

The ID of the Network Watcher. Changing this forces a new resource to be created.

testConfigurations NetworkConnectionMonitorTestConfigurationArgs[]

A test_configuration block as defined below.

testGroups NetworkConnectionMonitorTestGroupArgs[]

A test_group block as defined below.

location string

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

name string

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

notes string

The description of the Network Connection Monitor.

outputWorkspaceResourceIds string[]

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

tags {[key: string]: string}

A mapping of tags which should be assigned to the Network Connection Monitor.

endpoints Sequence[NetworkConnectionMonitorEndpointArgs]

A endpoint block as defined below.

network_watcher_id str

The ID of the Network Watcher. Changing this forces a new resource to be created.

test_configurations Sequence[NetworkConnectionMonitorTestConfigurationArgs]

A test_configuration block as defined below.

test_groups Sequence[NetworkConnectionMonitorTestGroupArgs]

A test_group block as defined below.

location str

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

name str

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

notes str

The description of the Network Connection Monitor.

output_workspace_resource_ids Sequence[str]

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

tags Mapping[str, str]

A mapping of tags which should be assigned to the Network Connection Monitor.

endpoints List<Property Map>

A endpoint block as defined below.

networkWatcherId String

The ID of the Network Watcher. Changing this forces a new resource to be created.

testConfigurations List<Property Map>

A test_configuration block as defined below.

testGroups List<Property Map>

A test_group block as defined below.

location String

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

name String

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

notes String

The description of the Network Connection Monitor.

outputWorkspaceResourceIds List<String>

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

tags Map<String>

A mapping of tags which should be assigned to the Network Connection Monitor.

Outputs

All input properties are implicitly available as output properties. Additionally, the NetworkConnectionMonitor 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 NetworkConnectionMonitor Resource

Get an existing NetworkConnectionMonitor 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?: NetworkConnectionMonitorState, opts?: CustomResourceOptions): NetworkConnectionMonitor
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        endpoints: Optional[Sequence[NetworkConnectionMonitorEndpointArgs]] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        network_watcher_id: Optional[str] = None,
        notes: Optional[str] = None,
        output_workspace_resource_ids: Optional[Sequence[str]] = None,
        tags: Optional[Mapping[str, str]] = None,
        test_configurations: Optional[Sequence[NetworkConnectionMonitorTestConfigurationArgs]] = None,
        test_groups: Optional[Sequence[NetworkConnectionMonitorTestGroupArgs]] = None) -> NetworkConnectionMonitor
func GetNetworkConnectionMonitor(ctx *Context, name string, id IDInput, state *NetworkConnectionMonitorState, opts ...ResourceOption) (*NetworkConnectionMonitor, error)
public static NetworkConnectionMonitor Get(string name, Input<string> id, NetworkConnectionMonitorState? state, CustomResourceOptions? opts = null)
public static NetworkConnectionMonitor get(String name, Output<String> id, NetworkConnectionMonitorState 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:
Endpoints List<NetworkConnectionMonitorEndpointArgs>

A endpoint block as defined below.

Location string

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

Name string

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

NetworkWatcherId string

The ID of the Network Watcher. Changing this forces a new resource to be created.

Notes string

The description of the Network Connection Monitor.

OutputWorkspaceResourceIds List<string>

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

Tags Dictionary<string, string>

A mapping of tags which should be assigned to the Network Connection Monitor.

TestConfigurations List<NetworkConnectionMonitorTestConfigurationArgs>

A test_configuration block as defined below.

TestGroups List<NetworkConnectionMonitorTestGroupArgs>

A test_group block as defined below.

Endpoints []NetworkConnectionMonitorEndpointArgs

A endpoint block as defined below.

Location string

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

Name string

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

NetworkWatcherId string

The ID of the Network Watcher. Changing this forces a new resource to be created.

Notes string

The description of the Network Connection Monitor.

OutputWorkspaceResourceIds []string

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

Tags map[string]string

A mapping of tags which should be assigned to the Network Connection Monitor.

TestConfigurations []NetworkConnectionMonitorTestConfigurationArgs

A test_configuration block as defined below.

TestGroups []NetworkConnectionMonitorTestGroupArgs

A test_group block as defined below.

endpoints List<NetworkConnectionMonitorEndpointArgs>

A endpoint block as defined below.

location String

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

name String

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

networkWatcherId String

The ID of the Network Watcher. Changing this forces a new resource to be created.

notes String

The description of the Network Connection Monitor.

outputWorkspaceResourceIds List<String>

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

tags Map<String,String>

A mapping of tags which should be assigned to the Network Connection Monitor.

testConfigurations List<NetworkConnectionMonitorTestConfigurationArgs>

A test_configuration block as defined below.

testGroups List<NetworkConnectionMonitorTestGroupArgs>

A test_group block as defined below.

endpoints NetworkConnectionMonitorEndpointArgs[]

A endpoint block as defined below.

location string

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

name string

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

networkWatcherId string

The ID of the Network Watcher. Changing this forces a new resource to be created.

notes string

The description of the Network Connection Monitor.

outputWorkspaceResourceIds string[]

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

tags {[key: string]: string}

A mapping of tags which should be assigned to the Network Connection Monitor.

testConfigurations NetworkConnectionMonitorTestConfigurationArgs[]

A test_configuration block as defined below.

testGroups NetworkConnectionMonitorTestGroupArgs[]

A test_group block as defined below.

endpoints Sequence[NetworkConnectionMonitorEndpointArgs]

A endpoint block as defined below.

location str

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

name str

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

network_watcher_id str

The ID of the Network Watcher. Changing this forces a new resource to be created.

notes str

The description of the Network Connection Monitor.

output_workspace_resource_ids Sequence[str]

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

tags Mapping[str, str]

A mapping of tags which should be assigned to the Network Connection Monitor.

test_configurations Sequence[NetworkConnectionMonitorTestConfigurationArgs]

A test_configuration block as defined below.

test_groups Sequence[NetworkConnectionMonitorTestGroupArgs]

A test_group block as defined below.

endpoints List<Property Map>

A endpoint block as defined below.

location String

The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created.

name String

The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created.

networkWatcherId String

The ID of the Network Watcher. Changing this forces a new resource to be created.

notes String

The description of the Network Connection Monitor.

outputWorkspaceResourceIds List<String>

A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor.

tags Map<String>

A mapping of tags which should be assigned to the Network Connection Monitor.

testConfigurations List<Property Map>

A test_configuration block as defined below.

testGroups List<Property Map>

A test_group block as defined below.

Supporting Types

NetworkConnectionMonitorEndpoint

Name string

The name of the endpoint for the Network Connection Monitor .

Address string

The IP address or domain name of the Network Connection Monitor endpoint.

CoverageLevel string

The test coverage for the Network Connection Monitor endpoint. Possible values are AboveAverage, Average, BelowAverage, Default, Full and Low.

ExcludedIpAddresses List<string>

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be excluded to the Network Connection Monitor endpoint.

Filter NetworkConnectionMonitorEndpointFilter

A filter block as defined below.

IncludedIpAddresses List<string>

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be included to the Network Connection Monitor endpoint.

TargetResourceId string

The resource ID which is used as the endpoint by the Network Connection Monitor.

TargetResourceType string

The endpoint type of the Network Connection Monitor. Possible values are AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine and MMAWorkspaceNetwork.

Name string

The name of the endpoint for the Network Connection Monitor .

Address string

The IP address or domain name of the Network Connection Monitor endpoint.

CoverageLevel string

The test coverage for the Network Connection Monitor endpoint. Possible values are AboveAverage, Average, BelowAverage, Default, Full and Low.

ExcludedIpAddresses []string

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be excluded to the Network Connection Monitor endpoint.

Filter NetworkConnectionMonitorEndpointFilter

A filter block as defined below.

IncludedIpAddresses []string

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be included to the Network Connection Monitor endpoint.

TargetResourceId string

The resource ID which is used as the endpoint by the Network Connection Monitor.

TargetResourceType string

The endpoint type of the Network Connection Monitor. Possible values are AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine and MMAWorkspaceNetwork.

name String

The name of the endpoint for the Network Connection Monitor .

address String

The IP address or domain name of the Network Connection Monitor endpoint.

coverageLevel String

The test coverage for the Network Connection Monitor endpoint. Possible values are AboveAverage, Average, BelowAverage, Default, Full and Low.

excludedIpAddresses List<String>

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be excluded to the Network Connection Monitor endpoint.

filter NetworkConnectionMonitorEndpointFilter

A filter block as defined below.

includedIpAddresses List<String>

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be included to the Network Connection Monitor endpoint.

targetResourceId String

The resource ID which is used as the endpoint by the Network Connection Monitor.

targetResourceType String

The endpoint type of the Network Connection Monitor. Possible values are AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine and MMAWorkspaceNetwork.

name string

The name of the endpoint for the Network Connection Monitor .

address string

The IP address or domain name of the Network Connection Monitor endpoint.

coverageLevel string

The test coverage for the Network Connection Monitor endpoint. Possible values are AboveAverage, Average, BelowAverage, Default, Full and Low.

excludedIpAddresses string[]

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be excluded to the Network Connection Monitor endpoint.

filter NetworkConnectionMonitorEndpointFilter

A filter block as defined below.

includedIpAddresses string[]

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be included to the Network Connection Monitor endpoint.

targetResourceId string

The resource ID which is used as the endpoint by the Network Connection Monitor.

targetResourceType string

The endpoint type of the Network Connection Monitor. Possible values are AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine and MMAWorkspaceNetwork.

name str

The name of the endpoint for the Network Connection Monitor .

address str

The IP address or domain name of the Network Connection Monitor endpoint.

coverage_level str

The test coverage for the Network Connection Monitor endpoint. Possible values are AboveAverage, Average, BelowAverage, Default, Full and Low.

excluded_ip_addresses Sequence[str]

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be excluded to the Network Connection Monitor endpoint.

filter NetworkConnectionMonitorEndpointFilter

A filter block as defined below.

included_ip_addresses Sequence[str]

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be included to the Network Connection Monitor endpoint.

target_resource_id str

The resource ID which is used as the endpoint by the Network Connection Monitor.

target_resource_type str

The endpoint type of the Network Connection Monitor. Possible values are AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine and MMAWorkspaceNetwork.

name String

The name of the endpoint for the Network Connection Monitor .

address String

The IP address or domain name of the Network Connection Monitor endpoint.

coverageLevel String

The test coverage for the Network Connection Monitor endpoint. Possible values are AboveAverage, Average, BelowAverage, Default, Full and Low.

excludedIpAddresses List<String>

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be excluded to the Network Connection Monitor endpoint.

filter Property Map

A filter block as defined below.

includedIpAddresses List<String>

A list of IPv4/IPv6 subnet masks or IPv4/IPv6 IP addresses to be included to the Network Connection Monitor endpoint.

targetResourceId String

The resource ID which is used as the endpoint by the Network Connection Monitor.

targetResourceType String

The endpoint type of the Network Connection Monitor. Possible values are AzureSubnet, AzureVM, AzureVNet, ExternalAddress, MMAWorkspaceMachine and MMAWorkspaceNetwork.

NetworkConnectionMonitorEndpointFilter

Items List<NetworkConnectionMonitorEndpointFilterItem>

A item block as defined below.

Type string

The behaviour type of this endpoint filter. Currently the only allowed value is Include. Defaults to Include.

Items []NetworkConnectionMonitorEndpointFilterItem

A item block as defined below.

Type string

The behaviour type of this endpoint filter. Currently the only allowed value is Include. Defaults to Include.

items List<NetworkConnectionMonitorEndpointFilterItem>

A item block as defined below.

type String

The behaviour type of this endpoint filter. Currently the only allowed value is Include. Defaults to Include.

items NetworkConnectionMonitorEndpointFilterItem[]

A item block as defined below.

type string

The behaviour type of this endpoint filter. Currently the only allowed value is Include. Defaults to Include.

items Sequence[NetworkConnectionMonitorEndpointFilterItem]

A item block as defined below.

type str

The behaviour type of this endpoint filter. Currently the only allowed value is Include. Defaults to Include.

items List<Property Map>

A item block as defined below.

type String

The behaviour type of this endpoint filter. Currently the only allowed value is Include. Defaults to Include.

NetworkConnectionMonitorEndpointFilterItem

Address string

The address of the filter item.

Type string

The type of items included in the filter. Possible values are AgentAddress. Defaults to AgentAddress.

Address string

The address of the filter item.

Type string

The type of items included in the filter. Possible values are AgentAddress. Defaults to AgentAddress.

address String

The address of the filter item.

type String

The type of items included in the filter. Possible values are AgentAddress. Defaults to AgentAddress.

address string

The address of the filter item.

type string

The type of items included in the filter. Possible values are AgentAddress. Defaults to AgentAddress.

address str

The address of the filter item.

type str

The type of items included in the filter. Possible values are AgentAddress. Defaults to AgentAddress.

address String

The address of the filter item.

type String

The type of items included in the filter. Possible values are AgentAddress. Defaults to AgentAddress.

NetworkConnectionMonitorTestConfiguration

Name string

The name of test configuration for the Network Connection Monitor.

Protocol string

The protocol used to evaluate tests. Possible values are Tcp, Http and Icmp.

HttpConfiguration NetworkConnectionMonitorTestConfigurationHttpConfiguration

A http_configuration block as defined below.

IcmpConfiguration NetworkConnectionMonitorTestConfigurationIcmpConfiguration

A icmp_configuration block as defined below.

PreferredIpVersion string

The preferred IP version which is used in the test evaluation. Possible values are IPv4 and IPv6.

SuccessThreshold NetworkConnectionMonitorTestConfigurationSuccessThreshold

A success_threshold block as defined below.

TcpConfiguration NetworkConnectionMonitorTestConfigurationTcpConfiguration

A tcp_configuration block as defined below.

TestFrequencyInSeconds int

The time interval in seconds at which the test evaluation will happen. Defaults to 60.

Name string

The name of test configuration for the Network Connection Monitor.

Protocol string

The protocol used to evaluate tests. Possible values are Tcp, Http and Icmp.

HttpConfiguration NetworkConnectionMonitorTestConfigurationHttpConfiguration

A http_configuration block as defined below.

IcmpConfiguration NetworkConnectionMonitorTestConfigurationIcmpConfiguration

A icmp_configuration block as defined below.

PreferredIpVersion string

The preferred IP version which is used in the test evaluation. Possible values are IPv4 and IPv6.

SuccessThreshold NetworkConnectionMonitorTestConfigurationSuccessThreshold

A success_threshold block as defined below.

TcpConfiguration NetworkConnectionMonitorTestConfigurationTcpConfiguration

A tcp_configuration block as defined below.

TestFrequencyInSeconds int

The time interval in seconds at which the test evaluation will happen. Defaults to 60.

name String

The name of test configuration for the Network Connection Monitor.

protocol String

The protocol used to evaluate tests. Possible values are Tcp, Http and Icmp.

httpConfiguration NetworkConnectionMonitorTestConfigurationHttpConfiguration

A http_configuration block as defined below.

icmpConfiguration NetworkConnectionMonitorTestConfigurationIcmpConfiguration

A icmp_configuration block as defined below.

preferredIpVersion String

The preferred IP version which is used in the test evaluation. Possible values are IPv4 and IPv6.

successThreshold NetworkConnectionMonitorTestConfigurationSuccessThreshold

A success_threshold block as defined below.

tcpConfiguration NetworkConnectionMonitorTestConfigurationTcpConfiguration

A tcp_configuration block as defined below.

testFrequencyInSeconds Integer

The time interval in seconds at which the test evaluation will happen. Defaults to 60.

name string

The name of test configuration for the Network Connection Monitor.

protocol string

The protocol used to evaluate tests. Possible values are Tcp, Http and Icmp.

httpConfiguration NetworkConnectionMonitorTestConfigurationHttpConfiguration

A http_configuration block as defined below.

icmpConfiguration NetworkConnectionMonitorTestConfigurationIcmpConfiguration

A icmp_configuration block as defined below.

preferredIpVersion string

The preferred IP version which is used in the test evaluation. Possible values are IPv4 and IPv6.

successThreshold NetworkConnectionMonitorTestConfigurationSuccessThreshold

A success_threshold block as defined below.

tcpConfiguration NetworkConnectionMonitorTestConfigurationTcpConfiguration

A tcp_configuration block as defined below.

testFrequencyInSeconds number

The time interval in seconds at which the test evaluation will happen. Defaults to 60.

name str

The name of test configuration for the Network Connection Monitor.

protocol str

The protocol used to evaluate tests. Possible values are Tcp, Http and Icmp.

http_configuration NetworkConnectionMonitorTestConfigurationHttpConfiguration

A http_configuration block as defined below.

icmp_configuration NetworkConnectionMonitorTestConfigurationIcmpConfiguration

A icmp_configuration block as defined below.

preferred_ip_version str

The preferred IP version which is used in the test evaluation. Possible values are IPv4 and IPv6.

success_threshold NetworkConnectionMonitorTestConfigurationSuccessThreshold

A success_threshold block as defined below.

tcp_configuration NetworkConnectionMonitorTestConfigurationTcpConfiguration

A tcp_configuration block as defined below.

test_frequency_in_seconds int

The time interval in seconds at which the test evaluation will happen. Defaults to 60.

name String

The name of test configuration for the Network Connection Monitor.

protocol String

The protocol used to evaluate tests. Possible values are Tcp, Http and Icmp.

httpConfiguration Property Map

A http_configuration block as defined below.

icmpConfiguration Property Map

A icmp_configuration block as defined below.

preferredIpVersion String

The preferred IP version which is used in the test evaluation. Possible values are IPv4 and IPv6.

successThreshold Property Map

A success_threshold block as defined below.

tcpConfiguration Property Map

A tcp_configuration block as defined below.

testFrequencyInSeconds Number

The time interval in seconds at which the test evaluation will happen. Defaults to 60.

NetworkConnectionMonitorTestConfigurationHttpConfiguration

Method string

The HTTP method for the HTTP request. Possible values are Get and Post. Defaults to Get.

Path string

The path component of the URI. It only accepts the absolute path.

Port int

The port for the HTTP connection.

PreferHttps bool

Should HTTPS be preferred over HTTP in cases where the choice is not explicit? Defaults to false.

RequestHeaders List<NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeader>

A request_header block as defined below.

ValidStatusCodeRanges List<string>

The HTTP status codes to consider successful. For instance, 2xx, 301-304 and 418.

Method string

The HTTP method for the HTTP request. Possible values are Get and Post. Defaults to Get.

Path string

The path component of the URI. It only accepts the absolute path.

Port int

The port for the HTTP connection.

PreferHttps bool

Should HTTPS be preferred over HTTP in cases where the choice is not explicit? Defaults to false.

RequestHeaders []NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeader

A request_header block as defined below.

ValidStatusCodeRanges []string

The HTTP status codes to consider successful. For instance, 2xx, 301-304 and 418.

method String

The HTTP method for the HTTP request. Possible values are Get and Post. Defaults to Get.

path String

The path component of the URI. It only accepts the absolute path.

port Integer

The port for the HTTP connection.

preferHttps Boolean

Should HTTPS be preferred over HTTP in cases where the choice is not explicit? Defaults to false.

requestHeaders List<NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeader>

A request_header block as defined below.

validStatusCodeRanges List<String>

The HTTP status codes to consider successful. For instance, 2xx, 301-304 and 418.

method string

The HTTP method for the HTTP request. Possible values are Get and Post. Defaults to Get.

path string

The path component of the URI. It only accepts the absolute path.

port number

The port for the HTTP connection.

preferHttps boolean

Should HTTPS be preferred over HTTP in cases where the choice is not explicit? Defaults to false.

requestHeaders NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeader[]

A request_header block as defined below.

validStatusCodeRanges string[]

The HTTP status codes to consider successful. For instance, 2xx, 301-304 and 418.

method str

The HTTP method for the HTTP request. Possible values are Get and Post. Defaults to Get.

path str

The path component of the URI. It only accepts the absolute path.

port int

The port for the HTTP connection.

prefer_https bool

Should HTTPS be preferred over HTTP in cases where the choice is not explicit? Defaults to false.

request_headers Sequence[NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeader]

A request_header block as defined below.

valid_status_code_ranges Sequence[str]

The HTTP status codes to consider successful. For instance, 2xx, 301-304 and 418.

method String

The HTTP method for the HTTP request. Possible values are Get and Post. Defaults to Get.

path String

The path component of the URI. It only accepts the absolute path.

port Number

The port for the HTTP connection.

preferHttps Boolean

Should HTTPS be preferred over HTTP in cases where the choice is not explicit? Defaults to false.

requestHeaders List<Property Map>

A request_header block as defined below.

validStatusCodeRanges List<String>

The HTTP status codes to consider successful. For instance, 2xx, 301-304 and 418.

NetworkConnectionMonitorTestConfigurationHttpConfigurationRequestHeader

Name string

The name of the HTTP header.

Value string

The value of the HTTP header.

Name string

The name of the HTTP header.

Value string

The value of the HTTP header.

name String

The name of the HTTP header.

value String

The value of the HTTP header.

name string

The name of the HTTP header.

value string

The value of the HTTP header.

name str

The name of the HTTP header.

value str

The value of the HTTP header.

name String

The name of the HTTP header.

value String

The value of the HTTP header.

NetworkConnectionMonitorTestConfigurationIcmpConfiguration

TraceRouteEnabled bool

Should path evaluation with trace route be enabled? Defaults to true.

TraceRouteEnabled bool

Should path evaluation with trace route be enabled? Defaults to true.

traceRouteEnabled Boolean

Should path evaluation with trace route be enabled? Defaults to true.

traceRouteEnabled boolean

Should path evaluation with trace route be enabled? Defaults to true.

trace_route_enabled bool

Should path evaluation with trace route be enabled? Defaults to true.

traceRouteEnabled Boolean

Should path evaluation with trace route be enabled? Defaults to true.

NetworkConnectionMonitorTestConfigurationSuccessThreshold

ChecksFailedPercent int

The maximum percentage of failed checks permitted for a test to be successful.

RoundTripTimeMs double

The maximum round-trip time in milliseconds permitted for a test to be successful.

ChecksFailedPercent int

The maximum percentage of failed checks permitted for a test to be successful.

RoundTripTimeMs float64

The maximum round-trip time in milliseconds permitted for a test to be successful.

checksFailedPercent Integer

The maximum percentage of failed checks permitted for a test to be successful.

roundTripTimeMs Double

The maximum round-trip time in milliseconds permitted for a test to be successful.

checksFailedPercent number

The maximum percentage of failed checks permitted for a test to be successful.

roundTripTimeMs number

The maximum round-trip time in milliseconds permitted for a test to be successful.

checks_failed_percent int

The maximum percentage of failed checks permitted for a test to be successful.

round_trip_time_ms float

The maximum round-trip time in milliseconds permitted for a test to be successful.

checksFailedPercent Number

The maximum percentage of failed checks permitted for a test to be successful.

roundTripTimeMs Number

The maximum round-trip time in milliseconds permitted for a test to be successful.

NetworkConnectionMonitorTestConfigurationTcpConfiguration

Port int

The port for the TCP connection.

DestinationPortBehavior string

The destination port behavior for the TCP connection. Possible values are None and ListenIfAvailable.

TraceRouteEnabled bool

Should path evaluation with trace route be enabled? Defaults to true.

Port int

The port for the TCP connection.

DestinationPortBehavior string

The destination port behavior for the TCP connection. Possible values are None and ListenIfAvailable.

TraceRouteEnabled bool

Should path evaluation with trace route be enabled? Defaults to true.

port Integer

The port for the TCP connection.

destinationPortBehavior String

The destination port behavior for the TCP connection. Possible values are None and ListenIfAvailable.

traceRouteEnabled Boolean

Should path evaluation with trace route be enabled? Defaults to true.

port number

The port for the TCP connection.

destinationPortBehavior string

The destination port behavior for the TCP connection. Possible values are None and ListenIfAvailable.

traceRouteEnabled boolean

Should path evaluation with trace route be enabled? Defaults to true.

port int

The port for the TCP connection.

destination_port_behavior str

The destination port behavior for the TCP connection. Possible values are None and ListenIfAvailable.

trace_route_enabled bool

Should path evaluation with trace route be enabled? Defaults to true.

port Number

The port for the TCP connection.

destinationPortBehavior String

The destination port behavior for the TCP connection. Possible values are None and ListenIfAvailable.

traceRouteEnabled Boolean

Should path evaluation with trace route be enabled? Defaults to true.

NetworkConnectionMonitorTestGroup

DestinationEndpoints List<string>

A list of destination endpoint names.

Name string

The name of the test group for the Network Connection Monitor.

SourceEndpoints List<string>

A list of source endpoint names.

TestConfigurationNames List<string>

A list of test configuration names.

Enabled bool

Should the test group be enabled? Defaults to true.

DestinationEndpoints []string

A list of destination endpoint names.

Name string

The name of the test group for the Network Connection Monitor.

SourceEndpoints []string

A list of source endpoint names.

TestConfigurationNames []string

A list of test configuration names.

Enabled bool

Should the test group be enabled? Defaults to true.

destinationEndpoints List<String>

A list of destination endpoint names.

name String

The name of the test group for the Network Connection Monitor.

sourceEndpoints List<String>

A list of source endpoint names.

testConfigurationNames List<String>

A list of test configuration names.

enabled Boolean

Should the test group be enabled? Defaults to true.

destinationEndpoints string[]

A list of destination endpoint names.

name string

The name of the test group for the Network Connection Monitor.

sourceEndpoints string[]

A list of source endpoint names.

testConfigurationNames string[]

A list of test configuration names.

enabled boolean

Should the test group be enabled? Defaults to true.

destination_endpoints Sequence[str]

A list of destination endpoint names.

name str

The name of the test group for the Network Connection Monitor.

source_endpoints Sequence[str]

A list of source endpoint names.

test_configuration_names Sequence[str]

A list of test configuration names.

enabled bool

Should the test group be enabled? Defaults to true.

destinationEndpoints List<String>

A list of destination endpoint names.

name String

The name of the test group for the Network Connection Monitor.

sourceEndpoints List<String>

A list of source endpoint names.

testConfigurationNames List<String>

A list of test configuration names.

enabled Boolean

Should the test group be enabled? Defaults to true.

Import

Network Connection Monitors can be imported using the resource id, e.g.

 $ pulumi import azure:network/networkConnectionMonitor:NetworkConnectionMonitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/networkWatchers/watcher1/connectionMonitors/connectionMonitor1

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.