Skip to content

Commit 80df71a

Browse files
author
gitName
committed
simplify
1 parent be901fd commit 80df71a

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

articles/api-management/migrate-stv1-to-stv2-vnet.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For a VNet-inject instance, you have the following migration options:
2525

2626
* [**Option 2: Change to a new subnet**](#option-2-migrate-and-change-to-new-subnet) - Migrate your instance by specifying a different subnet in the same or a different VNet. After migration, optionally migrate back to the instance's original subnet. The migration process changes the VIP address(es) of the instance. After migration, you need to update any network dependencies including DNS, firewall rules, and VNets to use the new VIP address(es).
2727

28-
In certain, less frequent customer configurations, only migration Option 2 can be used, or Option 1 needs extra steps. For more information, see [Special conditions and scenarios](#special-conditions-and-scenarios).
28+
Under certain, less frequent conditions, migration in the same subnet may not be possible or behaves differently. For more information, see [Special conditions and scenarios](#special-conditions-and-scenarios).
2929

3030
If you need to migrate a *non-VNnet-injected* API Management hosted on the `stv1` platform, see [Migrate a non-VNet-injected API Management instance to the stv2 platform](migrate-stv1-to-stv2-no-vnet.md).
3131

@@ -221,26 +221,25 @@ After you update the VNet configuration, the status of your API Management insta
221221

222222
## Special conditions and scenarios
223223

224-
Certain, less frequent conditions in customer environments can impact [Option 1: Migrate and keep same subnet](#option-1-migrate-and-keep-same-subnet). When you use the portal for migration, these conditions are automatically detected and the migration options are adjusted. In these cases, you can still migrate using [Option 2: Change to a new subnet](#option-2-migrate-and-change-to-new-subnet). As noted below, in some scenarios you can take actions to use Option 1. If more than one of these conditions is present, you must use Option 2.
224+
Under certain conditions, [Option 1: Migrate and keep same subnet](#option-1-migrate-and-keep-same-subnet) may not be available or behaves differently. The portal detects these conditions and recommends the migration option(s). If you aren't able to use Option 1, or multiple conditions are present, use [Option 2: Change to a new subnet](#option-2-migrate-and-change-to-new-subnet).
225225

226-
* **Multiple stv1 instances in subnet** - A reduced number of IP addresses are available for a same-subnet migration. You can migrate using Option 2, or you may be able to migrate instances one by one using Option 1.
226+
* **Classic virtual network** - If your API Management instance is currently deployed in a classic VNet, Option 1 for same-subnet migration in the portal includes 1 hour of downtime. You can also use the following modified Azure CLI script for same-subnet migration with 1 hour of downtime:
227227

228-
* **Subnet delegation** - The subnet where API Management has been deployed is currently delegated to additional Azure services. You must migrate using Option 2.
228+
```azurecli
229+
APIM_NAME={name of your API Management instance}
230+
# In PowerShell, use the following syntax: $APIM_NAME={name of your API Management instance}
231+
RG_NAME={name of your resource group}
232+
# Get resource ID of API Management instance
233+
APIM_RESOURCE_ID=$(az apim show --name $APIM_NAME --resource-group $RG_NAME --query id --output tsv)
234+
# Call REST API to migrate to stv2 and preserve VIP address for special condition
235+
az rest --method post --uri "$APIM_RESOURCE_ID/migrateToStv2?api-version=2024-06-01-preview&migrateWithDowntime=true" --body '{"mode": "PreserveIP"}'
236+
```
229237

230-
* **Azure Key Vault blocked** - Access to Azure Key Vault is required during migration but is blocked through NSG rules. You can migrate using Option 2. Or, after you update the NSG rules, you may be able to migrate using Option 1.
238+
* **Multiple stv1 instances in subnet** - Sufficient free IP addresses may not be available for a same-subnet migration if you attempt to migrate the instances simultaneously. You may be able to migrate instances sequentially using Option 1.
231239

232-
* **Classic virtual network** - The API Management instance is currently deployed in a classic VNet. You can migrate using Option 2. Or, you have a new option in the portal for same-subnet migration with 1 hour of downtime. You can also use the following modified Azure CLI script for same-subnet migration:
240+
* **Subnet delegation** - If the subnet where API Management is deployed is currently delegated to other Azure services, you must migrate using Option 2.
233241

234-
235-
```azurecli
236-
APIM_NAME={name of your API Management instance}
237-
# In PowerShell, use the following syntax: $APIM_NAME={name of your API Management instance}
238-
RG_NAME={name of your resource group}
239-
# Get resource ID of API Management instance
240-
APIM_RESOURCE_ID=$(az apim show --name $APIM_NAME --resource-group $RG_NAME --query id --output tsv)
241-
# Call REST API to migrate to stv2 and preserve VIP address for special condition
242-
az rest --method post --uri "$APIM_RESOURCE_ID/migrateToStv2?api-version=2024-06-01-preview&migrateWithDowntime=true" --body '{"mode": "PreserveIP"}'
243-
```
242+
* **Azure Key Vault blocked** - If access to Azure Key Vault is currently blocked, you must migrate using Option 2, including setting up NSG rules in the new subnet for access to Azure Key Vault.
244243

245244
[!INCLUDE [api-management-migration-support](../../includes/api-management-migration-support.md)]
246245

0 commit comments

Comments
 (0)