Compartilhar via


New-AzNetworkCloudNetworkAttachmentObject

Crie um objeto na memória para NetworkAttachment.

Sintaxe

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

Description

Crie um objeto na memória para NetworkAttachment.

Exemplos

Exemplo 1: criar um objeto na memória para 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…

Crie um objeto na memória para NetworkAttachment.

Parâmetros

-AttachedNetworkId

A ID do recurso da rede associada anexada à máquina virtual. Pode ser um dos recursos cloudServicesNetwork, l3Network, l2Network ou trunkedNetwork.

Tipo:String
Cargo:Named
Valor padrão:None
Obrigatório:True
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-DefaultGateway

O indicador de se esse é o gateway padrão. Apenas uma das redes anexadas (incluindo o anexo CloudServicesNetwork) para um único computador pode ser especificada como True.

Tipo:DefaultGateway
Cargo:Named
Valor padrão:None
Obrigatório:False
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-IPAllocationMethod

O mecanismo de alocação de IP para a máquina virtual. Dinâmico e estático são válidos apenas para l3Network, que também pode especificar Desabilitado. Caso contrário, desabilitado é o único valor permitido.

Tipo:VirtualMachineIPAllocationMethod
Cargo:Named
Valor padrão:None
Obrigatório:True
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-Ipv4Address

O endereço IPv4 da máquina virtual.

    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.
Tipo:String
Cargo:Named
Valor padrão:None
Obrigatório:False
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-Ipv6Address

O endereço IPv6 da máquina virtual.

    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.
Tipo:String
Cargo:Named
Valor padrão:None
Obrigatório:False
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

-Name

O nome da interface da rede associada. Se especificado, o nome do anexo de rede tem um comprimento máximo de 15 caracteres e deve ser exclusivo para essa máquina virtual. Se o usuário não especificar esse valor, o nome da interface padrão do recurso de rede será usado. Para um recurso CloudServicesNetwork, esse nome será ignorado.

Tipo:String
Cargo:Named
Valor padrão:None
Obrigatório:False
Aceitar a entrada de pipeline:False
Aceitar caracteres curinga:False

Saídas