NetworkAttachment(String, VirtualMachineIPAllocationMethod) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of NetworkAttachment.
public NetworkAttachment (string attachedNetworkId, Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod ipAllocationMethod);
new Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment : string * Azure.ResourceManager.NetworkCloud.Models.VirtualMachineIPAllocationMethod -> Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment
Public Sub New (attachedNetworkId As String, ipAllocationMethod As VirtualMachineIPAllocationMethod)
Parameters
- attachedNetworkId
- String
The resource ID of the associated network attached to the virtual machine. It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources.
- ipAllocationMethod
- VirtualMachineIPAllocationMethod
The IP allocation mechanism for the virtual machine. Dynamic and Static are only valid for l3Network which may also specify Disabled. Otherwise, Disabled is the only permitted value.
Exceptions
attachedNetworkId
is null.
Applies to
Azure SDK for .NET