Bearbeiten

Freigeben über


New-AzApiManagementRegion

Creates an instance of PsApiManagementRegion.

Syntax

New-AzApiManagementRegion
   -Location <String>
   [-Capacity <Int32>]
   [-VirtualNetwork <PsApiManagementVirtualNetwork>]
   [-Zone <String[]>]
   [-DisableGateway <Boolean>]
   [-PublicIpAddressId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Helper command to create an instance of PsApiManagementRegion. This command is to be used with New-AzApiManagement command.

Examples

Example 1

$apimRegion = New-AzApiManagementRegion -Location "Central US" 

$additionalRegions = @($apimRegion)

New-AzApiManagement -ResourceGroupName ContosoGroup -Location "West US" -Name ContosoApi -Organization Contoso -AdminEmail admin@contoso.com -AdditionalRegions $additionalRegions -Sku "Premium"

Example 2

$apimRegionVirtualNetwork = New-AzApiManagementVirtualNetwork -SubnetResourceId "/subscriptions/a8ff56dc-3bc7-4174-a1e8-3726ab15d0e2/resourceGroups/ContosoGroup/providers/Microsoft.Network/virtualNetworks/centralusvirtualNetwork/subnets/backendSubnet"

$apimRegion = New-AzApiManagementRegion -Location "Central US" -VirtualNetwork $apimRegionVirtualNetwork 

$additionalRegions = @($apimRegion)

$virtualNetwork = New-AzApiManagementVirtualNetwork -SubnetResourceId "/subscriptions/a8ff56dc-3bc2-4174-a1e8-3726ab15d0e2/resourceGroups/ContosoGroup/providers/Microsoft.Network/virtualNetworks/westUsVirtualNetwork/subnets/backendSubnet"

New-AzApiManagement -ResourceGroupName ContosoGroup -Location "West US" -Name ContosoApi -Organization Contoso -AdminEmail admin@contoso.com -AdditionalRegions $additionalRegions -VirtualNetwork $virtualNetwork -VpnType "External" -Sku "Premium"

Creates an ApiManagement service of External VpnType in West US Region, with an Additional Region in Central US.

Parameters

-Capacity

Sku capacity of the Azure API Management service additional region. Default value is 1.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableGateway

Flag only meant to be used for Premium SKU ApiManagement Service and Non Internal VNET deployments. This is useful in case we want to take a gateway region out of rotation. This can also be used to standup a new region in Passive mode, test it and then make it Live later. Default behavior is to make the region live immediately.

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Specifies the location of the new deployment region amongst the supported region for Api Management service. To obtain valid locations, use the cmdlet Get-AzResourceProvider -ProviderNamespace "Microsoft.ApiManagement" | where {$_.ResourceTypes[0].ResourceTypeName -eq "service"} | Select-Object Locations

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

-PublicIpAddressId

Standard SKU PublicIpAddress ResoureId for integration into stv2 Virtual Network Deployments.

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

-VirtualNetwork

Virtual Network Configuration of Azure API Management deployment region. Default value is $null.

Type:PsApiManagementVirtualNetwork
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Zone

A list of availability zones denoting where the api management service is deployed into.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PsApiManagementVirtualNetwork

Outputs

PsApiManagementRegion