Skip to content

Commit 44a5e7e

Browse files
authored
Merge pull request #10023 from solankisamir/docfix
Update doc to remove deprecated cmdlet Update-AzApiManagementDeployment references
2 parents fcf9360 + 8a87ce9 commit 44a5e7e

File tree

5 files changed

+29
-29
lines changed

5 files changed

+29
-29
lines changed

src/ApiManagement/ApiManagement/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020
## Upcoming Release
2121
* Update `-Format` parameter description in `Set-AzApiManagementPolicy` reference documentation
22+
* Removed references of deprecated cmdlet `Update-AzApiManagementDeployment` from reference documentation. Use `Set-AzApiManagement` instead.
2223

2324
## Version 1.3.0
2425
* Fixed miscellaneous typos across module

src/ApiManagement/ApiManagement/help/Add-AzApiManagementRegion.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add-AzApiManagementRegion -ApiManagement <PsApiManagement> -Location <String> [-
2222
## DESCRIPTION
2323
The **Add-AzApiManagementRegion** cmdlet adds new instance of type **PsApiManagementRegion** to the collection of **AdditionalRegions** of provided instance of type **Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement**.
2424
This cmdlet does not deploy anything by itself but updates instance of **PsApiManagement** in-memory.
25-
To update a deployment of an API Management pass the modified **PsApiManagement** Instance to Update-AzApiManagementDeployment.
25+
To update a deployment of an API Management pass the modified **PsApiManagement** Instance to Set-AzApiManagement.
2626

2727
## EXAMPLES
2828

@@ -34,8 +34,10 @@ PS C:\>Add-AzApiManagementRegion -ApiManagement $ApiManagement -Location "East U
3434
This command adds two premium SKU units and the region named East US to the **PsApiManagement** instance.
3535

3636
### Example 2: Add new deployment regions to a PsApiManagement instance and then update deployment
37-
```
38-
PS C:\>Get-AzApiManagement -ResourceGroupName "Contoso" -Name "ContosoApi" | Add-AzApiManagementRegion -Location "East US" -Sku "Premium" -Capacity 2 | Update-AzApiManagementDeployment
37+
```powershell
38+
PS C:\>$service = Get-AzApiManagement -ResourceGroupName "Contoso" -Name "ContosoApi"
39+
PS C:\>$service = Add-AzApiManagementRegion -ApiManagement $service -Location $secondarylocation -VirtualNetwork $additionalRegionVirtualNetwork
40+
PS C:\>$service = Set-AzApiManagement -InputObject $service -PassThru
3941
```
4042

4143
This command gets a **PsApiManagement** object, adds two premium SKU units for the region named East US, and then updates deployment.
@@ -159,6 +161,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
159161
160162
[Update-AzApiManagementRegion](./Update-AzApiManagementRegion.md)
161163
162-
[Update-AzApiManagementDeployment](./Update-AzApiManagementDeployment.md)
164+
[Set-AzApiManagement](./Set-AzApiManagement.md)
163165
164166

src/ApiManagement/ApiManagement/help/New-AzApiManagementVirtualNetwork.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,28 @@ New-AzApiManagementVirtualNetwork -SubnetResourceId <String> [-DefaultProfile <I
2020

2121
## DESCRIPTION
2222
The **New-AzApiManagementVirtualNetwork** cmdlet is a helper command to create an instance of **PsApiManagementVirtualNetwork**.
23-
This command is used with **Update-AzApiManagementDeployment** cmdlet.
23+
This command is used with **Set-AzApiManagement** and **New-AzApiManagement** cmdlet.
2424

2525
## EXAMPLES
2626

27-
### Example 1: Create a virtual network
27+
### Example 1: Create a virtual network and Update an existing APIM service into the VNET
28+
```powershell
29+
PS C:\> $virtualNetwork = New-AzApiManagementVirtualNetwork -Location "East US" -SubnetResourceId "/subscriptions/a8ff56dc-3bc7-4174-a1e8-3726ab15d0e2/resourceGroups/Api-Default-WestUS/providers/Microsoft.Network/virtualNetworks/dfVirtualNetwork/subnets/backendSubnet"
30+
PS C:\> $apim = Get-AzApiManagement -ResourceGroupName "ContosoGroup" -Name "ContosoApi"
31+
PS C:\> $apim.VpnType = "External"
32+
PS C:\> $apim.VirtualNetwork = $virtualNetwork
33+
PS C:\> Set-AzApiManagement -InputObject $apim
2834
```
29-
PS C:\>$vnetName = "myvnet"
30-
PS C:\>$subnetName = "default"
31-
PS C:\>$subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.1.0/24
32-
PS C:\>$vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $resourceGroupName -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet
3335

34-
# Create a Virtual Network Object
35-
PS C:\>$virtualNetwork = New-AzApiManagementVirtualNetwork -Location $location -SubnetResourceId $vnet.Subnets[0].Id
36+
This example creates a virtual network and then calls the **Set-AzApiManagement** cmdlet.
3637

37-
# Get the service
38-
PS C:\>$service = Get-AzApiManagement -ResourceGroupName $resourceGroupName -Name $apiManagementName
39-
PS C:\>$service.VirtualNetwork = $virtualNetwork
40-
PS C:\>$service.VpnType = "External"
41-
42-
# Update the Deployment with Virtual Network
43-
PS C:\>Update-AzApiManagementDeployment -ApiManagement $service
38+
### Example 2: Create an API Management service for an external virtual network
39+
```powershell
40+
PS C:\> $virtualNetwork = New-AzApiManagementVirtualNetwork -Location "West US" -SubnetResourceId "/subscriptions/a8ff56dc-3bc7-4174-b1e8-3726ab15d0e2/resourceGroups/ContosoGroup/providers/Microsoft.Network/virtualNetworks/westUsVirtualNetwork/subnets/backendSubnet"
41+
PS C:\> New-AzApiManagement -ResourceGroupName "ContosoGroup" -Location "West US" -Name "ContosoApi" -Organization Contoso -AdminEmail [email protected] -VirtualNetwork $virtualNetwork -VpnType "External" -Sku "Premium"
4442
```
4543

46-
This example creates a virtual network and then calls the **Update-AzApiManagementDeployment** cmdlet.
44+
This example creates a new APIM service into a Virtual Network in `External` mode
4745

4846
## PARAMETERS
4947

@@ -92,5 +90,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
9290
9391
## RELATED LINKS
9492
95-
[Update-AzApiManagementDeployment](./Update-AzApiManagementDeployment.md)
93+
[Set-AzApiManagement](./Set-AzApiManagement.md)
94+
[New-AzApiManagement](./New-AzApiManagement.md)
9695

src/ApiManagement/ApiManagement/help/Remove-AzApiManagementRegion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Remove-AzApiManagementRegion -ApiManagement <PsApiManagement> -Location <String>
2121
## DESCRIPTION
2222
The **Remove-AzApiManagementRegion** cmdlet removes instance of type **Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion** from a collection of **AdditionalRegions** of provided the instance of type **Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement**.
2323
This cmdlet does not modify deployment by itself but updates the instance of **PsApiManagement** in-memory.
24-
To update a deployment of an API Management, pass the modified **PsApiManagementInstance** to **Update-AzApiManagement**.
24+
To update a deployment of an API Management, pass the modified **PsApiManagementInstance** to **Set-AzApiManagement**.
2525

2626
## EXAMPLES
2727

@@ -34,7 +34,7 @@ This command removes the region named East US from the **PsApiManagement** insta
3434

3535
### Example 2: Remove a region from a PsApiManagement instance using a series of commands
3636
```
37-
PS C:\>Get-AzApiManagement -ResourceGroupName "Contoso" -Name ContosoApi | Remove-AzApiManagementRegion -Location "East US" | Update-AzApiManagementDeployment
37+
PS C:\>Get-AzApiManagement -ResourceGroupName "Contoso" -Name ContosoApi | Remove-AzApiManagementRegion -Location "East US" | Set-AzApiManagement
3838
```
3939

4040
This first command gets an instance of **PsApiManagement** from the resource group named Contoso named ContosoApi.

src/ApiManagement/ApiManagement/help/Update-AzApiManagementRegion.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,18 @@ Update-AzApiManagementRegion -ApiManagement <PsApiManagement> -Location <String>
2222
## DESCRIPTION
2323
The **Update-AzApiManagementRegion** cmdlet updates an existing instance of type **Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagementRegion** in a collection of **AdditionalRegions** objects of a provided instance of type **Microsoft.Azure.Commands.ApiManagement.Models.PsApiManagement**.
2424
This cmdlet does not deploy anything but updates an instance of **PsApiManagement** in-memory.
25-
To update a deployment of an API Management use the modified **PsApiManagementInstance** to the Update-AzApiManagementDeployment cmdlet.
25+
To update a deployment of an API Management use the modified **PsApiManagementInstance** to the Set-AzApiManagement cmdlet.
2626

2727
## EXAMPLES
2828

2929
### Example 1: Increases capacity of Additional Region in a PsApiManagement instance
3030
```powershell
3131
PS C:\>$apimService = Get-AzApiManagement -ResourceGroupName $resourceGroupName -Name $apiManagementName
3232
PS C:\>$apimService = Update-AzApiManagementRegion -ApiManagement $apimService -Location "North Central US" -Capacity 2 -Sku Premium
33-
34-
# Set the ApiManagement service and Enable Msi idenity on the service
35-
PS C:\>$updatedService = Set-AzApiManagement -InputObject $apimService -PassThru
33+
PS C:\>$apimService = Set-AzApiManagement -InputObject $apimService -PassThru
3634
```
3735

38-
This command gets the API Management Premium SKU service, having regions in South Central US and North Central US. It then increases the Capacity of the North Central US region to 2 using the **Update-AzApiManagementRegion**. The next cmdlet Set-AzApiManagement applies the configuration change to the Api Management service.
36+
This command gets the API Management Premium SKU service, having regions in South Central US and North Central US. It then increases the Capacity of the North Central US region to 2 using the **Set-AzApiManagement**. The next cmdlet **Set-AzApiManagement** applies the configuration change to the Api Management service.
3937

4038
## PARAMETERS
4139

@@ -165,4 +163,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
165163
166164
[Remove-AzApiManagementRegion](./Remove-AzApiManagementRegion.md)
167165
168-
[Update-AzApiManagementDeployment](./Update-AzApiManagementDeployment.md)
166+
[Set-AzApiManagement](./Set-AzApiManagement.md)

0 commit comments

Comments
 (0)