Freigeben über


New-AzNetworkCloudNetworkAttachmentObject

Erstellen Sie ein Speicherobjekt für NetworkAttachment.

Syntax

New-AzNetworkCloudNetworkAttachmentObject
   -AttachedNetworkId <String>
   -IPAllocationMethod <VirtualMachineIPAllocationMethod>
   [-DefaultGateway <DefaultGateway>]
   [-Ipv4Address <String>]
   [-Ipv6Address <String>]
   [-Name <String>]
   [<CommonParameters>]

Beschreibung

Erstellen Sie ein Speicherobjekt für NetworkAttachment.

Beispiele

Beispiel 1: Erstellen eines In-Memory-Objekts für NetworkAttachment.

New-AzNetworkCloudNetworkAttachmentObject -AttachedNetworkId "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName" -IPAllocationMethod "Dynamic" -DefaultGateway "True" -Ipv4Address "198.51.100.1" -Ipv6Address "2001:0db8:0000:0000:0000:0000:0000:0001" -Name "netAttachName01"

AttachedNetworkId                                                                                                        DefaultGateway IPAllocationMethod Ipv4Address  Ipv6Address
-----------------                                                                                                        -------------- ------------------ -----------  -----------                   
/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName True           Dynamic            198.51.100.1 2001:0db8:0000:0000:0000:0000…

Erstellen Sie ein Speicherobjekt für NetworkAttachment.

Parameter

-AttachedNetworkId

Die Ressourcen-ID des zugeordneten Netzwerks, das an den virtuellen Computer angefügt ist. Dabei kann es sich um eine der Ressourcen "cloudServicesNetwork", "l3Network", "l2Network" oder "trunkedNetwork" sein.

Typ:String
Position:Named
Standardwert:None
Erforderlich:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultGateway

Der Indikator, ob dies das Standardgateway ist. Nur eines der angefügten Netzwerke (einschließlich der CloudServicesNetwork-Anlage) für einen einzelnen Computer kann als True angegeben werden.

Typ:DefaultGateway
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-IPAllocationMethod

Der IP-Zuordnungsmechanismus für den virtuellen Computer. "Dynamic" und "Static" gelten nur für l3Network, das auch "Disabled" angeben kann. Andernfalls ist Disabled der einzige zulässige Wert.

Typ:VirtualMachineIPAllocationMethod
Position:Named
Standardwert:None
Erforderlich:True
Accept pipeline input:False
Accept wildcard characters:False

-Ipv4Address

Die IPv4-Adresse des virtuellen Computers.

    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.
Typ:String
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-Ipv6Address

Die IPv6-Adresse des virtuellen Computers.

    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.
Typ:String
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Der Schnittstellenname des zugeordneten Netzwerks. Wenn angegeben, hat der Name der Netzwerkanlage eine maximale Länge von 15 Zeichen und muss für diesen virtuellen Computer eindeutig sein. Wenn der Benutzer diesen Wert nicht angibt, wird der Standardschnittstellenname der Netzwerkressource verwendet. Bei einer CloudServicesNetwork-Ressource wird dieser Name ignoriert.

Typ:String
Position:Named
Standardwert:None
Erforderlich:False
Accept pipeline input:False
Accept wildcard characters:False

Ausgaben

NetworkAttachment