New-AzNetworkCloudNetworkAttachmentObject
建立 NetworkAttachment 的記憶體內部物件。
語法
New-AzNetworkCloudNetworkAttachmentObject
-AttachedNetworkId <String>
-IPAllocationMethod <VirtualMachineIPAllocationMethod>
[-DefaultGateway <DefaultGateway>]
[-Ipv4Address <String>]
[-Ipv6Address <String>]
[-Name <String>]
[<CommonParameters>]
Description
建立 NetworkAttachment 的記憶體內部物件。
範例
範例 1:建立 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…
建立 NetworkAttachment 的記憶體內部物件。
參數
-AttachedNetworkId
連結至虛擬機之相關聯網路的資源標識碼。 它可以是 cloudServicesNetwork、l3Network、l2Network 或主幹網路資源之一。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultGateway
這是否為預設閘道的指標。 單一計算機的其中一個連結網路(包括 CloudServicesNetwork 附件)只能指定為 True。
類型: | DefaultGateway |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-IPAllocationMethod
虛擬機的IP配置機制。 動態和靜態僅適用於 l3Network,也可能指定 [已停用]。 否則,Disabled 是唯一允許的值。
類型: | VirtualMachineIPAllocationMethod |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Ipv4Address
虛擬機的 IPv4 位址。
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.
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Ipv6Address
虛擬機的 IPv6 位址。
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.
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
相關聯的網路介面名稱。 如果指定,網路附件名稱的長度上限為 15 個字元,而且此虛擬機必須是唯一的。 如果使用者未指定此值,則會使用網路資源的預設介面名稱。 針對 CloudServicesNetwork 資源,將會忽略此名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |