New-​Azure​Rm​Api​Management​Virtual​Network

Creates an instance of PsApiManagementVirtualNetwork.

Syntax

New-AzureRmApiManagementVirtualNetwork
   -Location <String>
   -SubnetResourceId <String>
   [<CommonParameters>]

Description

The New-AzureRmApiManagementVirtualNetwork cmdlet is a helper command to create an instance of PsApiManagementVirtualNetwork. This command is used with Set-AzureRMApiManagementVirtualNetworks cmdlet.

Examples

Example 1: Create a virtual network

PS C:\>$VirtualNetworks = @()
PS C:\> $VirtualNetworks += New-AzureRmApiManagementVirtualNetwork -Location "East US" -SubtenName "ContosoNet" -VnetId "089D3F4D-B986-4DFD-9259-9112BA7A1F03"
PS C:\> Set-AzureRmApiManagementVirtualNetworks -ResourceGroupName "ContosoGroup" -Name "ContosoApi" -VirtualNetworks $VirtualNetworks

This example creates a virtual network and then calls the Set-AzureRmApiManagementVirtualNetworks cmdlet.

Required Parameters

-Location

Specifies the location of the virtual network in which this cmdlet creates the instance.

The acceptable values for this parameter are:

  • North Central US
  • South Central US
  • Central US
  • West Europe
  • North Europe
  • West US
  • East US
  • East US 2
  • Japan East
  • Japan West
  • Brazil South
  • Southeast Asia
  • East Asia
  • Australia East
  • Australia Southeast
Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SubnetResourceId

Specifies the subnet resource ID of the virtual network.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False