Skip to content

Commit 2a0090c

Browse files
authored
Merge pull request #168954 from dlepow/apimmove
[APIM] Region move update
2 parents 752a768 + 72bf567 commit 2a0090c

File tree

3 files changed

+75
-61
lines changed

3 files changed

+75
-61
lines changed

articles/api-management/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
href: api-management-configuration-repository-git.md
312312
- name: Use role-based access control
313313
href: api-management-role-based-access-control.md
314-
- name: Migrate API Management instances
314+
- name: Move instances between regions
315315
href: api-management-howto-migrate.md
316316
- name: Use managed identities for Azure resources
317317
href: api-management-howto-use-managed-service-identity.md

articles/api-management/api-management-howto-disaster-recovery-backup-restore.md

Lines changed: 21 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@ title: Implement disaster recovery using backup and restore in API Management
33
titleSuffix: Azure API Management
44
description: Learn how to use backup and restore to perform disaster recovery in Azure API Management.
55
services: api-management
6-
documentationcenter: ''
76
author: mikebudzynski
8-
manager: erikre
9-
editor: ''
107

118
ms.service: api-management
12-
ms.workload: mobile
13-
ms.tgt_pltfrm: na
149
ms.topic: article
15-
ms.date: 12/05/2020
10+
ms.date: 08/20/2021
1611
ms.author: apimpm
1712
ms.custom: devx-track-azurepowershell
1813
---
@@ -53,40 +48,34 @@ All of the tasks that you do on resources using the Azure Resource Manager must
5348
### Create an Azure Active Directory application
5449

5550
1. Sign in to the [Azure portal](https://portal.azure.com).
56-
2. Using the subscription that contains your API Management service instance, navigate to the **App registrations** tab in **Azure Active Directory** (Azure Active Directory > Manage/App registrations).
57-
51+
1. Using the subscription that contains your API Management service instance, navigate to the [Azure portal - App registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) to register an app in Active Directory.
5852
> [!NOTE]
5953
> If the Azure Active Directory default directory isn't visible to your account, contact the administrator of the Azure subscription to grant the required permissions to your account.
54+
1. Select **+ New registration**.
55+
1. On the **Register an application** page, set the values as follows:
56+
57+
* Set **Name** to a meaningful name.
58+
* Set **Supported account types** to **Accounts in this organizational directory only**.
59+
* In **Redirect URI** enter a placeholder URL such as `https://resources`. It's a required field, but the value isn't used later.
60+
* Select **Register**.
6061

61-
3. Click **New application registration**.
62-
63-
The **Create** window appears on the right. That's where you enter the AAD app relevant information.
64-
65-
4. Enter a name for the application.
66-
5. For the application type, select **Native**.
67-
6. Enter a placeholder URL such as `http://resources` for the **Redirect URI**, as it's a required field, but the value isn't used later. Click the check box to save the application.
68-
7. Click **Create**.
62+
### Add permissions
6963

70-
### Add an application
71-
72-
1. Once the application is created, click **API permissions**.
73-
2. Click **+ Add a permission**.
74-
4. Press **Select Microsoft APIs**.
75-
5. Choose **Azure Service Management**.
76-
6. Press **Select**.
64+
1. Once the application is created, select **API permissions** > **+ Add a permission**.
65+
1. Select **Microsoft APIs**.
66+
1. Select **Azure Service Management**.
7767

7868
:::image type="content" source="./media/api-management-howto-disaster-recovery-backup-restore/add-app-permission.png" alt-text="Screenshot that shows how to add app permissions.":::
7969

80-
7. Click **Delegated Permissions** beside the newly added application, check the box for **Access Azure Service Management (preview)**.
70+
1. Click **Delegated Permissions** beside the newly added application, and check the box for **Access Azure Service Management as organization users (preview)**.
8171

8272
:::image type="content" source="./media/api-management-howto-disaster-recovery-backup-restore/delegated-app-permission.png" alt-text="Screenshot that shows adding delegated app permissions.":::
8373

84-
8. Press **Select**.
85-
9. Click **Add Permissions**.
74+
1. Select **Add permissions**.
8675

87-
### Configuring your app
76+
### Configure your app
8877

89-
Before calling the APIs that generate the backup and restore it, you need to get a token. The following example uses the [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package to retrieve the token.
78+
Before calling the APIs that generate the backup and restore, you need to get a token. The following example uses the [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package to retrieve the token.
9079

9180
```csharp
9281
using Microsoft.IdentityModel.Clients.ActiveDirectory;
@@ -133,6 +122,9 @@ Replace `{tenant id}`, `{application id}`, and `{redirect uri}` using the follow
133122

134123
The REST APIs are [Api Management Service - Backup](/rest/api/apimanagement/2020-12-01/api-management-service/backup) and [Api Management Service - Restore](/rest/api/apimanagement/2020-12-01/api-management-service/restore).
135124

125+
> [!NOTE]
126+
> Backup and restore operations can also be performed with PowerShell [_Backup-AzApiManagement_](/powershell/module/az.apimanagement/backup-azapimanagement) and [_Restore-AzApiManagement_](/powershell/module/az.apimanagement/restore-azapimanagement) commands respectively.
127+
136128
Before calling the "backup and restore" operations described in the following sections, set the authorization request header for your REST call.
137129

138130
```csharp
@@ -152,7 +144,7 @@ where:
152144
- `subscriptionId` - ID of the subscription that holds the API Management service you're trying to back up
153145
- `resourceGroupName` - name of the resource group of your Azure API Management service
154146
- `serviceName` - the name of the API Management service you're making a backup of specified at the time of its creation
155-
- `api-version` - replace with `2020-12-01`
147+
- `api-version` - replace with a supported REST API version such as `2020-12-01`
156148

157149
In the body of the request, specify the target Azure storage account name, access key, blob container name, and backup name:
158150

@@ -204,14 +196,8 @@ Restore is a long running operation that may take up to 30 or more minutes to co
204196
>
205197
> **Changes** made to the service configuration (for example, APIs, policies, developer portal appearance) while restore operation is in progress **could be overwritten**.
206198
207-
<!-- Dummy comment added to suppress markdown lint warning -->
208-
209-
> [!NOTE]
210-
> Backup and restore operations can also be performed with PowerShell [_Backup-AzApiManagement_](/powershell/module/az.apimanagement/backup-azapimanagement) and [_Restore-AzApiManagement_](/powershell/module/az.apimanagement/restore-azapimanagement) commands respectively.
211-
212199
## Constraints when making backup or restore request
213200

214-
- **Container** specified in the request body **must exist**.
215201
- While backup is in progress, **avoid management changes in the service** such as SKU upgrade or downgrade, change in domain name, and more.
216202
- Restore of a **backup is guaranteed only for 30 days** since the moment of its creation.
217203
- **Changes** made to the service configuration (for example, APIs, policies, and developer portal appearance) while backup operation is in process **might be excluded from the backup and will be lost**.
Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,74 @@
11
---
2-
title: How to migrate Azure API Management across regions
2+
title: How to migrate Azure API Management between regions
33
description: Learn how to migrate an API Management instance from one region to another.
44
services: api-management
5-
documentationcenter: ''
65
author: miaojiang
7-
manager: erikre
8-
editor: ''
96

107
ms.service: api-management
11-
ms.workload: mobile
12-
ms.tgt_pltfrm: na
13-
ms.topic: article
14-
ms.date: 08/26/2019
8+
ms.topic: how-to
9+
ms.date: 08/20/2021
1510
ms.author: apimpm
16-
11+
ms.custom: subject-moving-resources
12+
#cusomerintent: As an Azure service administrator, I want to move my service resources to another Azure region.
1713
---
18-
# How to migrate Azure API Management across regions
19-
To migrate API Management instances from one Azure region to another, you can use the [backup and restore](api-management-howto-disaster-recovery-backup-restore.md) feature. You should choose the same API Management pricing tier in the source and target regions.
14+
15+
# How to move Azure API Management across regions
16+
17+
This article describes how to move an API Management instance to a different Azure region. You might move your instance to another region for many reasons. For example:
18+
19+
* Locate your instance closer to your API consumers
20+
* Deploy features available in specific regions only
21+
* Meet internal policy and governance requirements
22+
23+
To move API Management instances from one Azure region to another, use the service's [backup and restore](api-management-howto-disaster-recovery-backup-restore.md) operations. You can use a different API Management instance name or the existing name.
2024

2125
> [!NOTE]
22-
> Backup and restore won't work while migrating between different cloud types. For that, you'll need to export the resource [as a template](../azure-resource-manager/management/manage-resource-groups-portal.md#export-resource-groups-to-templates). Then, adapt the exported template for the target Azure region and re-create the resource.
26+
> API Management also supports [multi-region deployment](api-management-howto-deploy-multi-region.md), which distributes a single Azure API management service across multiple Azure regions. Multi-region deployment helps reduce request latency perceived by geographically distributed API consumers and improves service availability if one region goes offline.
2327
24-
## Option 1: Use a different API Management instance name
28+
[!INCLUDE [premium-dev-standard-basic.md](../../includes/api-management-availability-premium-dev-standard-basic.md)]
2529

26-
1. In the target region, create a new API Management instance with the same pricing tier as the source API Management instance. The new instance should have a different name.
27-
1. Backup existing API Management instance to a storage account.
28-
1. Restore the backup created in Step 2 to the new API Management instance created in the new region in Step 1.
29-
1. If you have a custom domain pointing to the source region API Management instance, update the custom domain CNAME to point to the new API Management instance.
30+
## Considerations
3031

32+
* Choose the same API Management pricing tier in the source and target regions.
33+
* Backup and restore won't work when migrating between different cloud types. For that scenario, export the resource [as a template](../azure-resource-manager/management/manage-resource-groups-portal.md#export-resource-groups-to-templates). Then, adapt the exported template for the target Azure region and re-create the resource.
3134

32-
## Option 2: Use the same API Management instance name
35+
## Prerequisites
3336

34-
> [!NOTE]
35-
> This option will result in downtime during the migration.
37+
* Review requirements and limitations of the API Management [backup and restore](api-management-howto-disaster-recovery-backup-restore.md) operations.
38+
* See [What is not backed up](api-management-howto-disaster-recovery-backup-restore.md#what-is-not-backed-up). Record settings and data that you will need to recreate manually after moving the instance.
39+
* Create a [storage account](../storage/common/storage-account-create.md?tabs=azure-portal) in the source region. You will use this account to back up the source instance.
40+
41+
## Prepare and move
42+
43+
### Option 1: Use a different API Management instance name
3644

37-
1. Back up the API Management instance in the source region to a storage account.
38-
1. Delete the API Management in the source region.
45+
1. In the target region, create a new API Management instance with the same pricing tier as the source API Management instance. Use a different name for the new instance.
46+
1. [Back up](api-management-howto-disaster-recovery-backup-restore.md#-back-up-an-api-management-service) the existing API Management instance to the storage account.
47+
1. [Restore](api-management-howto-disaster-recovery-backup-restore.md#-restore-an-api-management-service) the source instance's backup to the new API Management instance.
48+
1. If you have a custom domain pointing to the source region API Management instance, update the custom domain CNAME to point to the new API Management instance.
49+
50+
### Option 2: Use the same API Management instance name
51+
52+
> [!WARNING]
53+
> This option deletes the original API Management instance and results in downtime during the migration. Ensure that you have a valid backup before deleting the source instance.
54+
55+
1. [Back up](api-management-howto-disaster-recovery-backup-restore.md#-back-up-an-api-management-service) the existing API Management instance to the storage account.
56+
1. Delete the API Management instance in the source region.
3957
1. Create a new API Management instance in the target region with the same name as the one in the source region.
40-
1. Restore the backup created in Step 1 to the new API Management instance in the target region.
58+
1. [Restore](api-management-howto-disaster-recovery-backup-restore.md#-restore-an-api-management-service) the source instance's backup to the new API Management instance in the target region.
59+
60+
## Verify
61+
62+
1. Ensure that the restore operation completes successfully before accessing your API Management instance in the target region.
63+
1. Configure settings that are not automatically moved during the restore operation. Examples: virtual network configuration, managed identities, developer portal content, and custom domain and custom CA certificates.
64+
1. Access your API Management endpoints in the target region. For example, test your APIs, or access the developer portal.
65+
66+
## Clean up source resources
67+
68+
If you moved the API Management instance using Option 1, after you successfully restore and configure the target instance, you may delete the source instance.
4169

70+
## Next steps
4271

43-
## <a name="next-steps"> </a>Next steps
4472
* For more information about the backup and restore feature, see [how to implement disaster recovery](api-management-howto-disaster-recovery-backup-restore.md).
45-
* For information on migration Azure resources, see [Azure cross-region migration guidance](https://github.com/Azure/Azure-Migration-Guidance).
73+
* For information on migrating Azure resources, see [Azure cross-region migration guidance](https://github.com/Azure/Azure-Migration-Guidance).
4674
* [Optimize and save on your cloud spending](../cost-management-billing/costs/quick-acm-cost-analysis.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn).

0 commit comments

Comments
 (0)