Skip to content

Commit 06e9b44

Browse files
authored
Merge pull request #264445 from MicrosoftDocs/main
Publish to live, Sunday 4:00PM PST, 01/28
2 parents 2a4a282 + 1ce7523 commit 06e9b44

24 files changed

+431
-54
lines changed

articles/api-center/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
items:
2929
- name: Manage inventory - Azure CLI
3030
href: manage-apis-azure-cli.md
31+
- name: Import APIs from API Management
32+
href: import-api-management-apis.md
3133
#- name: API governance
3234
- name: API discovery and consumption
3335
items:
Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
---
2+
title: Import APIs from Azure API Management - Azure API Center
3+
description: Add APIs to your Azure API center inventory from your API Management instance.
4+
author: dlepow
5+
ms.service: api-center
6+
ms.topic: how-to
7+
ms.date: 01/25/2024
8+
ms.author: danlep
9+
ms.custom:
10+
# Customer intent: As an API program manager, I want to add APIs that are managed in my Azure API Management instance to my API center.
11+
---
12+
13+
# Import APIs to your API center from Azure API Management
14+
15+
This article shows how to import (add) APIs from an Azure API Management instance to your [API center](overview.md) using the Azure CLI. Adding APIs from API Management to your API inventory helps make them discoverable and accessible to developers, API program managers, and other stakeholders in your organization.
16+
17+
When you add an API from an API Management instance to your API center:
18+
19+
* The API's [versions](key-concepts.md#api-version), [definitions](key-concepts.md#api-definition), and [deployment](key-concepts.md#deployment) information are copied to your API center.
20+
* The API receives a system-generated API name in your API center. It retains its display name (title) from API Management.
21+
* The **Lifecycle stage** of the API is set to *Design*.
22+
* Azure API Management is added as an [environment](key-concepts.md#environment).
23+
24+
After adding an API from API Management, you can add metadata and documentation in your API center to help stakeholders discover, understand, and consume the API.
25+
26+
[!INCLUDE [api-center-preview-feedback](includes/api-center-preview-feedback.md)]
27+
28+
## Prerequisites
29+
30+
* An API center in your Azure subscription. If you haven't created one, see [Quickstart: Create your API center](set-up-api-center.md).
31+
32+
* One or more instances of Azure API Management, in the same or a different subscription in your directory. If you haven't created one, see [Create an Azure API Management instance](../api-management/get-started-create-service-instance.md).
33+
34+
* One or more APIs managed in your API Management instance that you want to add to your API center.
35+
36+
* For Azure CLI:
37+
[!INCLUDE [include](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
38+
39+
> [!NOTE]
40+
> `az apic` commands require the `apic-extension` Azure CLI extension. If you haven't used `az apic` commands, the extension is installed dynamically when you run your first `az apic` command. Learn more about [Azure CLI extensions](/cli/azure/azure-cli-extensions-overview).
41+
42+
> [!NOTE]
43+
> Azure CLI command examples in this article can run in PowerShell or a bash shell. Where needed because of different variable syntax, separate command examples are provided for the two shells.
44+
45+
46+
## Add a managed identity in your API center
47+
48+
For this scenario, your API center uses a [managed identity](/entra/identity/managed-identities-azure-resources/overview) to access APIs in your API Management instance. You can use either a system-assigned or user-assigned managed identity. If you haven't added a managed identity in your API center, you can add it in the Azure portal or by using the Azure CLI.
49+
50+
### Add a system-assigned identity
51+
52+
#### [Portal](#tab/portal)
53+
54+
1. In the [portal](https://azure.microsoft.com), navigate to your API center.
55+
1. In the left menu, select **Managed identities**.
56+
1. Select **System assigned**, and set the status to **On**.
57+
1. Select **Save**.
58+
59+
#### [Azure CLI](#tab/cli)
60+
61+
Set the system-assigned identity in your API center using the following [az apic service update](/cli/azure/apic/service#az-apic-service-update) command. Substitute the names of your API center and resource group:
62+
63+
```azurecli
64+
az apic service update --name <api-center-name> --resource-group <resource-group-name> --identity '{"type": "SystemAssigned"}'
65+
```
66+
---
67+
68+
### Add a user-assigned identity
69+
70+
To add a user-assigned identity, you need to create a user-assigned identity resource, and then add it to your API center.
71+
72+
#### [Portal](#tab/portal)
73+
74+
1. Create a user-assigned identity according to [these instructions](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities#create-a-user-assigned-managed-identity).
75+
1. In the [portal](https://azure.microsoft.com), navigate to your API center.
76+
1. In the left menu, select **Managed identities**.
77+
1. Select **User assigned** > **+ Add**.
78+
1. Search for the identity you created earlier, select it, and select **Add**.
79+
80+
#### [Azure CLI](#tab/cli)
81+
82+
1. Create a user-assigned identity.
83+
84+
```azurecli
85+
az identity create --resource-group <resource-group-name> --name <identity-name>
86+
```
87+
88+
In the command output, note the value of the identity's `id` property. The `id` property should look something like this:
89+
90+
```json
91+
{
92+
[...]
93+
"id": "/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<identity-name>"
94+
[...]
95+
}
96+
```
97+
98+
1. Create a JSON file with the following content, substituting the value of the `id` property from the previous step.
99+
100+
```json
101+
{
102+
"type": "UserAssigned",
103+
"userAssignedIdentities": {
104+
"<identity-id>": {}
105+
}
106+
}
107+
```
108+
109+
1. Add the user-assigned identity to your API center using the following [az apic service update](/cli/azure/apic/service#az-apic-service-update) command. Substitute the names of your API center and resource group, and pass the JSON file as the value of the `--identity` parameter. Here, the JSON file is named `identity.json`.
110+
111+
```azurecli
112+
az apic service update --name <api-center-name> --resource-group <resource-group-name> --identity "@identity.json"
113+
```
114+
---
115+
116+
## Assign the managed identity the API Management Service Reader role
117+
118+
To allow import of APIs, assign your API center's managed identity the **API Management Service Reader** role in your API Management instance. You can use the [portal](../role-based-access-control/role-assignments-portal-managed-identity.md) or the Azure CLI.
119+
120+
#### [Portal](#tab/portal)
121+
122+
1. In the [portal](https://azure.microsoft.com), navigate to your API Management instance.
123+
1. In the left menu, select **Access control (IAM)**.
124+
1. Select **+ Add role assignment**.
125+
1. On the **Add role assignment** page, set the values as follows:
126+
1. On the **Role** tab - Select **API Management Service Reader**.
127+
1. On the **Members** tab, in **Assign access to** - Select **Managed identity** > **+ Select members**.
128+
1. On the **Select managed identities** page - Select the system-assigned or user-assigned managed identity of your API center that you added in the previous section. Click **Select**.
129+
1. Select **Review + assign**.
130+
131+
#### [Azure CLI](#tab/cli)
132+
133+
1. Get the principal ID of the identity. If you're configuring a system-assigned identity, use the [az apic service show](/cli/azure/apic/service#az-apic-service-show) command. For a user-assigned identity, use [az identity show](/cli/azure/identity#az-identity-show).
134+
135+
**System-assigned identity**
136+
```azurecli
137+
#! /bin/bash
138+
apicObjID=$(az apic service show --name <api-center-name> \
139+
--resource-group <resource-group-name> \
140+
--query "identity.principalId" --output tsv)
141+
```
142+
143+
```azurecli
144+
# PowerShell syntax
145+
$apicObjID=$(az apic service show --name <api-center-name> `
146+
--resource-group <resource-group-name> `
147+
--query "identity.principalId" --output tsv)
148+
```
149+
150+
**User-assigned identity**
151+
```azurecli
152+
#! /bin/bash
153+
apicObjID=$(az identity show --name <identity-name> --resource-group <resource-group-name> --query "principalId" --output tsv)
154+
```
155+
156+
```azurecli
157+
# PowerShell syntax
158+
$apicObjID=$(az identity show --name <identity-name> --resource-group <resource-group-name> --query "principalId" --output tsv)
159+
```
160+
1. Get the resource ID of your API Management instance using the [az apim show](/cli/azure/apim#az-apim-show) command.
161+
162+
```azurecli
163+
#! /bin/bash
164+
apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query "id" --output tsv)
165+
```
166+
167+
```azurecli
168+
# PowerShell syntax
169+
$apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query "id" --output tsv)
170+
```
171+
172+
1. Assign the managed identity the **API Management Service Reader** role in your API Management instance using the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command.
173+
174+
```azurecli
175+
#! /bin/bash
176+
scope="${apimID:1}"
177+
178+
az role assignment create \
179+
--role "API Management Service Reader Role" \
180+
--assignee-object-id $apicObjID \
181+
--assignee-principal-type ServicePrincipal \
182+
--scope $scope
183+
```
184+
185+
```azurecli
186+
#! PowerShell syntax
187+
$scope=$apimID.substring(1)
188+
189+
az role assignment create `
190+
--role "API Management Service Reader Role" `
191+
--assignee-object-id $apicObjID `
192+
--assignee-principal-type ServicePrincipal `
193+
--scope $scope
194+
---
195+
196+
## Import APIs from your API Management instance
197+
198+
Use the [az apic service import-from-apim](/cli/azure/apic/service#az-apic-service-import-from-apim) command to import one or more APIs from your API Management instance to your API center.
199+
200+
> [!NOTE]
201+
> * This command depends on a managed identity configured in your API center that has read permissions to the API Management instance. If you haven't added or configured a managed identity, see [Add a managed identity in your API center](#add-a-managed-identity-in-your-api-center) earlier in this article.
202+
>
203+
> * If your API center has multiple managed identities, the command searches first for a system-assigned identity. If none is found, it picks the first user-assigned identity in the list.
204+
205+
### Import all APIs from an API Management instance
206+
207+
Use a wildcard (`*`) to specify all APIs from the API Management instance.
208+
209+
1. Get the resource ID of your API Management instance using the [az apim show](/cli/azure/apim#az-apim-show) command.
210+
211+
```azurecli
212+
#! /bin/bash
213+
apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query id --output tsv)
214+
```
215+
216+
```azurecli
217+
# PowerShell syntax
218+
$apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query id --output tsv)
219+
```
220+
221+
1. Use the `az apic service import-from-apim` command to import the APIs. Substitute the names of your API center and resource group, and use `*` to specify all APIs from the API Management instance.
222+
223+
```azurecli
224+
225+
#! /bin/bash
226+
apiIDs="$apimID/apis/*"
227+
228+
az apic service import-from-apim --service-name <api-center-name> --resource-group <resource-group-name> --source-resource-ids $apiIDs
229+
```
230+
231+
```azurecli
232+
# PowerShell syntax
233+
$apiIDs=$apimID + "/apis/*"
234+
235+
az apic service import-from-apim --service-name <api-center-name> --resource-group <resource-group-name> --source-resource-ids $apiIDs
236+
```
237+
238+
> [!NOTE]
239+
> If your API Management instance has a large number of APIs, import to your API center might take some time.
240+
241+
### Import a specific API from an API Management instance
242+
243+
Specify an API to import using its name from the API Management instance.
244+
245+
1. Get the resource ID of your API Management instance using the [az apim show](/cli/azure/apim#az-apim-show) command.
246+
247+
```azurecli
248+
#! /bin/bash
249+
apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query id --output tsv)
250+
```
251+
252+
```azurecli
253+
# PowerShell syntax
254+
$apimID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query id --output tsv)
255+
```
256+
257+
1. Use the `az apic service import-from-apim` command to import the API. Substitute the names of your API center and resource group, and specify an API name from the API Management instance.
258+
259+
```azurecli
260+
#! /bin/bash
261+
apiIDs="$apimID/apis/<api-name>"
262+
263+
az apic service import-from-apim --service-name <api-center-name> --resource-group <resource-group-name> --source-resource-ids $apiIDs
264+
```
265+
266+
```azurecli
267+
# PowerShell syntax
268+
$apiIDs=$apimID + "/apis/<api-name>"
269+
270+
az apic service import-from-apim --service-name <api-center-name> --resource-group <resource-group-name> --source-resource-ids $apiIDs
271+
```
272+
273+
> [!NOTE]
274+
> Specify `<api-name>` using the API resource name in the API Management instance, not the display name. Example: `petstore-api` instead of `Petstore API`.
275+
276+
After importing APIs from API Management, you can view and manage the imported APIs in your API center.
277+
278+
## Related content
279+
280+
* [Azure CLI reference for API Center](/cli/azure/apic)
281+
* [Manage API inventory with Azure CLI commands](manage-apis-azure-cli.md)
282+
* [Assign Azure roles to a managed identity](../role-based-access-control/role-assignments-portal-managed-identity.md)
283+
* [Azure API Management documentation](../api-management/index.yml)

articles/api-center/index.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ landingContent:
4545
links:
4646
- text: Manage inventory - Azure CLI
4747
url: manage-apis-azure-cli.md
48+
- text: Import APIs from API Management
49+
url: import-api-management-apis.md
4850
# Card
4951
- title: Discover APIs
5052
linkLists:
@@ -53,4 +55,4 @@ landingContent:
5355
- text: Use VS Code extension
5456
url: use-vscode-extension.md
5557
- text: Discover APIs with GitHub Copilot Chat
56-
url: use-vscode-extension-copilot.md
58+
url: use-vscode-extension-copilot.md

articles/api-center/manage-apis-azure-cli.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,5 @@ To delete individual API versions and definitions, use [az apic api version dele
137137

138138
## Related content
139139

140-
See the [Azure CLI reference for API Center](/cli/azure/apic) for a complete command list, including commands to manage [environments](/cli/azure/apic/environment), [deployments](/cli/azure/apic/api/deployment), [metadata schemas](/cli/azure/apic/metadata-schema), and [API Center services](/cli/azure/apic/service).
140+
* See the [Azure CLI reference for API Center](/cli/azure/apic) for a complete command list, including commands to manage [environments](/cli/azure/apic/environment), [deployments](/cli/azure/apic/api/deployment), [metadata schemas](/cli/azure/apic/metadata-schema), and [API Center services](/cli/azure/apic/service).
141+
* [Import APIs to your API center from API Management](import-api-management-apis.md)

articles/azure-monitor/agents/azure-monitor-agent-migration.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ ms.custom:
1414

1515
[Azure Monitor Agent (AMA)](./agents-overview.md) replaces the Log Analytics agent (also known as MMA and OMS) for Windows and Linux machines, in Azure and non-Azure environments, including on-premises and third-party clouds. The agent introduces a simplified, flexible method of configuring data collection using [data collection rules (DCRs)](../essentials/data-collection-rule-overview.md). This article provides guidance on how to implement a successful migration from the Log Analytics agent to Azure Monitor Agent.
1616

17-
> [!IMPORTANT]
18-
> The Log Analytics agent will be [retired on **August 31, 2024**](https://azure.microsoft.com/updates/were-retiring-the-log-analytics-agent-in-azure-monitor-on-31-august-2024/). After this date, Microsoft will no longer provide any support for the Log Analytics agent. If you're currently using the Log Analytics agent with Azure Monitor or [other supported features and services](#migrate-additional-services-and-features), start planning your migration to Azure Monitor Agent by using the information in this article. If you are using the Log Analytics Agent for SCOM you will need to [migrate to the SCOM Agent](../vm/scom-managed-instance-overview.md)
17+
If you're currently using the Log Analytics agent with Azure Monitor or [other supported features and services](#migrate-additional-services-and-features), start planning your migration to Azure Monitor Agent by using the information in this article. If you are using the Log Analytics Agent for SCOM you will need to [migrate to the SCOM Agent](../vm/scom-managed-instance-overview.md)
18+
19+
The Log Analytics agent will be [retired on **August 31, 2024**](https://azure.microsoft.com/updates/were-retiring-the-log-analytics-agent-in-azure-monitor-on-31-august-2024/). You can expect the following when you use the MMA or OMS agent after this date.
20+
> - **Data upload**: You can still upload data. At some point when major customer have finished migrating and data volumes significantly drop, upload will be suspended. You can expect this to take at least 6 to 9 months. You will not receive a breaking change notification of the suspension.
21+
> - **Install or reinstall**: You can still install and reinstall the legacy agents. You will not be able to get support for installing or reinstalling issues.
22+
> - **Customer Support**: You can expect support for MMA/OMS for security issues.
1923
2024
## Benefits
2125

articles/azure-monitor/alerts/resource-manager-action-groups.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: Resource Manager template samples for action groups
33
description: Sample Azure Resource Manager templates to deploy Azure Monitor action groups.
44
ms.topic: sample
55
ms.custom: devx-track-arm-template
6-
ms.date: 04/27/2022
7-
ms.reviewer: dukek
6+
ms.date: 01/28/2024
7+
ms.reviewer: jagummersall
88
---
99

1010
# Resource Manager template samples for action groups in Azure Monitor

articles/azure-monitor/alerts/test-action-group-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Test Notification Troubleshooting Guide
33
description: Detailed description of error codes and actions to take when troubleshooting the test action group feature.
44
ms.topic: conceptual
5-
ms.date: 11/15/2022
5+
ms.date: 01/28/2024
66
ms.reviewer: jagummersall
77

88
---

0 commit comments

Comments
 (0)