import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-Watcher-resources", * location: "West Europe", * }); * const exampleNetworkWatcher = new azure.network.NetworkWatcher("example", { * name: "example-Watcher", * location: example.location, * resourceGroupName: example.name, * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "example-Vnet", * addressSpaces: ["10.0.0.0/16"], * location: example.location, * resourceGroupName: example.name, * }); * const exampleSubnet = new azure.network.Subnet("example", { * name: "example-Subnet", * 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_D2s_v3", * storageImageReference: { * publisher: "Canonical", * offer: "0001-com-ubuntu-server-jammy", * sku: "22_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("example", { * name: "example-VMExtension", * virtualMachineId: exampleVirtualMachine.id, * publisher: "Microsoft.Azure.NetworkWatcher", * type: "NetworkWatcherAgentLinux", * typeHandlerVersion: "1.4", * autoUpgradeMinorVersion: true, * }); * const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", { * name: "example-Workspace", * location: example.location, * resourceGroupName: example.name, * sku: "PerGB2018", * }); * const exampleNetworkConnectionMonitor = new azure.network.NetworkConnectionMonitor("example", { * name: "example-Monitor", * 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], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Network` - 2025-01-01 * * ## Import * * Network Connection Monitors can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:network/networkConnectionMonitor:NetworkConnectionMonitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/networkWatchers/watcher1/connectionMonitors/connectionMonitor1 * ``` */ export declare class NetworkConnectionMonitor extends pulumi.CustomResource { /** * Get an existing NetworkConnectionMonitor resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: NetworkConnectionMonitorState, opts?: pulumi.CustomResourceOptions): NetworkConnectionMonitor; /** * Returns true if the given object is an instance of NetworkConnectionMonitor. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is NetworkConnectionMonitor; /** * A `endpoint` block as defined below. */ readonly endpoints: pulumi.Output; /** * The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The ID of the Network Watcher. Changing this forces a new resource to be created. */ readonly networkWatcherId: pulumi.Output; /** * The description of the Network Connection Monitor. */ readonly notes: pulumi.Output; /** * A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. */ readonly outputWorkspaceResourceIds: pulumi.Output; /** * A mapping of tags which should be assigned to the Network Connection Monitor. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A `testConfiguration` block as defined below. */ readonly testConfigurations: pulumi.Output; /** * A `testGroup` block as defined below. */ readonly testGroups: pulumi.Output; /** * Create a NetworkConnectionMonitor resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: NetworkConnectionMonitorArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NetworkConnectionMonitor resources. */ export interface NetworkConnectionMonitorState { /** * A `endpoint` block as defined below. */ endpoints?: pulumi.Input[]>; /** * The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The ID of the Network Watcher. Changing this forces a new resource to be created. */ networkWatcherId?: pulumi.Input; /** * The description of the Network Connection Monitor. */ notes?: pulumi.Input; /** * A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. */ outputWorkspaceResourceIds?: pulumi.Input[]>; /** * A mapping of tags which should be assigned to the Network Connection Monitor. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `testConfiguration` block as defined below. */ testConfigurations?: pulumi.Input[]>; /** * A `testGroup` block as defined below. */ testGroups?: pulumi.Input[]>; } /** * The set of arguments for constructing a NetworkConnectionMonitor resource. */ export interface NetworkConnectionMonitorArgs { /** * A `endpoint` block as defined below. */ endpoints: pulumi.Input[]>; /** * The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The ID of the Network Watcher. Changing this forces a new resource to be created. */ networkWatcherId: pulumi.Input; /** * The description of the Network Connection Monitor. */ notes?: pulumi.Input; /** * A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. */ outputWorkspaceResourceIds?: pulumi.Input[]>; /** * A mapping of tags which should be assigned to the Network Connection Monitor. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `testConfiguration` block as defined below. */ testConfigurations: pulumi.Input[]>; /** * A `testGroup` block as defined below. */ testGroups: pulumi.Input[]>; }