Condividi tramite


NetworkAttachment Class

Definition

NetworkAttachment represents the single network attachment.

public class NetworkAttachment
public class NetworkAttachment : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.NetworkCloud.Models.NetworkAttachment>
type NetworkAttachment = class
type NetworkAttachment = class
    interface IJsonModel<NetworkAttachment>
    interface IPersistableModel<NetworkAttachment>
Public Class NetworkAttachment
Public Class NetworkAttachment
Implements IJsonModel(Of NetworkAttachment), IPersistableModel(Of NetworkAttachment)
Inheritance
NetworkAttachment
Implements

Constructors

NetworkAttachment(ResourceIdentifier, VirtualMachineIPAllocationMethod)

Initializes a new instance of NetworkAttachment.

NetworkAttachment(String, VirtualMachineIPAllocationMethod)

Initializes a new instance of NetworkAttachment.

Properties

AttachedNetworkArmId

The resource ID of the associated network attached to the virtual machine. It can be one of cloudServicesNetwork, l3Network, l2Network or trunkedNetwork resources.

DefaultGateway

The indicator of whether this is the default gateway. Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.

IPAllocationMethod

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.

IPv4Address

The IPv4 address of the virtual machine.

This field is used only if the attached network has IPAllocationType of IPV4 or DualStack.

If IPAllocationMethod is: Static - this field must contain a user specified IPv4 address from within the subnet specified in the attached network. Dynamic - this field is read-only, but will be populated with an address from within the subnet specified in the attached network. Disabled - this field will be empty.

IPv6Address

The IPv6 address of the virtual machine.

This field is used only if the attached network has IPAllocationType of IPV6 or DualStack.

If IPAllocationMethod is: Static - this field must contain an IPv6 address range from within the range specified in the attached network. Dynamic - this field is read-only, but will be populated with an range from within the subnet specified in the attached network. Disabled - this field will be empty.

MacAddress

The MAC address of the interface for the virtual machine that corresponds to this network attachment.

NetworkAttachmentName

The associated network's interface name. If specified, the network attachment name has a maximum length of 15 characters and must be unique to this virtual machine. If the user doesn’t specify this value, the default interface name of the network resource will be used. For a CloudServicesNetwork resource, this name will be ignored.

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

IJsonModel<NetworkAttachment>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<NetworkAttachment>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<NetworkAttachment>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<NetworkAttachment>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<NetworkAttachment>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to