Update-AzureRmApiManagementDeployment
Updates deployment of an API Management Service.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Update-AzureRmApiManagementDeployment
-ResourceGroupName <String>
-Name <String>
-Location <String>
-Sku <PsApiManagementSku>
-Capacity <Int32>
[-VirtualNetwork <PsApiManagementVirtualNetwork>]
[-VpnType <PsApiManagementVpnType>]
[-AdditionalRegions <System.Collections.Generic.IList`1[Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion]>]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Update-AzureRmApiManagementDeployment
-ApiManagement <PsApiManagement>
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Update-AzureRmApiManagementDeployment cmdlet updates current deployments of an API Management service.
Examples
Example 1: Update a deployment of an ApiManagement instance
PS C:\>Update-AzureRmApiManagementDeployment -ResourceGroupName "Contoso" -Name "ContosoApi" -Sku "Standard" -Capacity 3
This command updates deployment of an API Management instance to a three unit capacity standard.
Example 2: Get an ApiManagement instance and rescale it
PS C:\>$ApiManagement = Get-AzureRmApiManagement -ResourceGroupName "Contoso" -Name "ContosoApi"
PS C:\> $ApiManagement.Sku = "Premium"
PS C:\> $ApiManagement.Capacity = 5
PS C:\> $ApiManagement.AddRegion("Central US", "Premium", 3)
PS C:\> Update-AzureRmApiManagementDeployment -ApiManagement $ApiManagement
This example gets an Api Management instance, scales it to five premium units and then adds an additional three units to the premium region.
Example 3: Update deployment (external VNET)
PS C:\> $virtualNetwork = New-AzureRmApiManagementVirtualNetwork -Location "East US" -SubnetResourceId "/subscriptions/a8ff56dc-3bc7-4174-a1e8-3726ab15d0e2/resourceGroups/Api-Default-WestUS/providers/Microsoft.Network/virtualNetworks/dfVirtualNetwork/subnets/backendSubnet"
PS C:\> Update-AzureRmApiManagementDeployment -ResourceGroupName "ContosoGroup" -Name "ContosoApi" -VirtualNetwork $virtualNetwork -VpnType "External"
This command updates an existing API Management deployment and joins to an external VpnType.
Example 4: Update deployment (internal VNET)
PS C:\> $virtualNetwork = New-AzureRmApiManagementVirtualNetwork -Location "East US" -SubnetResourceId "/subscriptions/a8ff56dc-3bc7-4174-a1e8-3726ab15d0e2/resourceGroups/Api-Default-WestUS/providers/Microsoft.ClassicNetwork/virtualNetworks/dfVirtualNetwork/subnets/backendSubnet"
PS C:\> Update-AzureRmApiManagementDeployment -ResourceGroupName "ContosoGroup" -Name "ContosoApi" -VirtualNetwork $virtualNetwork -VpnType "Internal"
This command updates an existing API Management deployment and joins to an internal VpnType.
Parameters
-AdditionalRegions
Specifies additional deployment regions of Azure API Management.
Type: | IList<T>[PsApiManagementRegion] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ApiManagement
Specifies the PsApiManagement instance to get deployment configuration from. Use this parameter if the instance already has all the required changes.
Type: | PsApiManagement |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Capacity
Specifies the SKU capacity of the master Azure API Management deployment region.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Location
Specifies the location of the master API Management deployment region. To obtain valid locations, use the cmdlet Get-AzureRmResourceProvider -ProviderNamespace "Microsoft.ApiManagement" | where {$_.ResourceTypes[0].ResourceTypeName -eq "service"} | Select-Object Locations
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of API Management that this cmdlet updates.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of resource group under which API Management exists.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Sku
Specifies the tier of the master Azure API Management deployment region. The acceptable values for this parameter are:
- Developer
- Standard
- Premium
Type: | PsApiManagementSku |
Accepted values: | Developer, Standard, Premium, Basic |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VirtualNetwork
Specifies the Virtual Network configuration of the master Azure API Management deployment region.
Type: | PsApiManagementVirtualNetwork |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnType
Specifies the virtual network Type of the API Management deployment. The acceptable values for this parameter are:
- None. The API Management deployment is not part of any Virtual Network. This is the default value.
- External. The API Management deployment has an external facing virtual address.
- Internal. The API Management deployment has an intranet facing virtual address.
Type: | PsApiManagementVpnType |
Accepted values: | None, External, Internal |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Parameters: ApiManagement (ByValue)
IList<T>[[Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion, Microsoft.Azure.Commands.ApiManagement, Version=6.1.2.0, Culture=neutral, PublicKeyToken=null]]