Skip to content

Commit bd183ba

Browse files
Merge pull request #270319 from dlepow/patch-266
Update enable-api-analysis-linting.md
2 parents 1ffcce8 + 92e1da5 commit bd183ba

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

articles/api-center/enable-api-analysis-linting.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Perform API linting and analysis - Azure API Center
33
description: Configure linting of API definitions in your API center to analyze compliance of APIs with the organization's API style guide.
44
ms.service: api-center
55
ms.topic: how-to
6-
ms.date: 03/11/2024
6+
ms.date: 03/26/2024
77
ms.author: danlep
88
author: dlepow
99
ms.custom: devx-track-azurecli
@@ -85,20 +85,16 @@ Follow these steps to deploy the Azure Functions app that runs the linting funct
8585

8686
To enable the function app to access the API center, configure a managed identity for the function app. The following steps show how to enable and configure a system-assigned managed identity for the function app using the Azure portal or the Azure CLI.
8787

88-
> [!NOTE]
89-
> In preview, this scenario requires the Contributor role to be assigned to the function app's managed identity.
90-
91-
9288
#### [Portal](#tab/portal)
9389

9490
1. In the Azure portal, navigate to your function app and select **Identity** under the **Settings** section.
9591
1. On the **System assigned** tab, set the **Status** to **On** and then select **Save**.
9692

97-
Now that the managed identity is enabled, assign it the Contributor role to access the API center.
93+
Now that the managed identity is enabled, assign it the Azure API Center Compliance Manager role to access the API center.
9894

99-
1. In the Azure portal, navigate to your API center and select **Access control (IAM)**.
95+
1. In the [Azure portal](https://portal.azure.com), navigate to your API center and select **Access control (IAM)**.
10096
1. Select **+ Add > Add role assignment**.
101-
1. Select **Privileged administrator roles** and then select **Contributor**. Select **Next**.
97+
1. Select **Job function roles** and then select **Azure API Center Compliance Manager**. Select **Next**.
10298
1. On the **Members** page, in **Assign access to**, select **Managed identity > + Select members**.
10399
1. On the **Select managed identities** page, search for and select the managed identity of the function app. Click **Select** and then **Next**.
104100
1. Review the role assignment, and select **Review + assign**.
@@ -136,12 +132,12 @@ Now that the managed identity is enabled, assign it the Contributor role to acce
136132
--query "id" --output tsv)
137133
```
138134
139-
1. Assign the function app's managed identity the Contributor role in the API center using the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command.
135+
1. Assign the function app's managed identity the Azure API Center Compliance Manager role in the API center using the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command.
140136
141137
```azurecli
142138
#! /bin/bash
143139
az role assignment create \
144-
--role "Contributor" \
140+
--role "Azure API Center Compliance Manager" \
145141
--assignee-object-id $principalID \
146142
--assignee-principal-type ServicePrincipal \
147143
--scope $apicID
@@ -150,7 +146,7 @@ Now that the managed identity is enabled, assign it the Contributor role to acce
150146
```azurecli
151147
# PowerShell syntax
152148
az role assignment create `
153-
--role "Contributor" `
149+
--role "Azure API Center Compliance Manager" `
154150
--assignee-object-id $principalID `
155151
--assignee-principal-type ServicePrincipal `
156152
--scope $apicID
@@ -164,9 +160,8 @@ Now create an event subscription in your API center to trigger the function app
164160
165161
#### [Portal](#tab/portal)
166162
167-
1. Sign in to the Azure portal at [https://portal.azure.com/?Microsoft_Azure_ApiManagement=apicenterpreview](https://portal.azure.com/?Microsoft_Azure_ApiManagement=apicenterpreview). Currently for this scenario, you must access your API center in the portal at this feature flag.
168-
1. Navigate to your API center and select **Events**.
169-
1. Select **Azure Function**.
163+
1. In the [Azure portal](https://portal.azure.com), navigate to your API center and select **Events**.
164+
1. On the **Get started** tab, select **Azure Function**.
170165
1. On the **Create Event Subscription** page, do the following:
171166
1. Enter a descriptive **Name** for the event subscription, and select **Event Grid Schema**.
172167
1. In **Topic details**, enter a **System topic name** of your choice.
@@ -251,7 +246,6 @@ To test the event subscription, try uploading or updating an API definition file
251246
252247
To confirm that the event subscription was triggered:
253248
254-
1. Sign in to the Azure portal at [https://portal.azure.com/?Microsoft_Azure_ApiManagement=apicenterpreview](https://portal.azure.com/?Microsoft_Azure_ApiManagement=apicenterpreview).
255249
1. Navigate to your API center, and select **Events** in the left menu.
256250
1. Select the **Event Subscriptions** tab and select the event subscription for your function app.
257251
1. Review the metrics to confirm that the event subscription was triggered and that linting was invoked successfully.
@@ -273,8 +267,7 @@ In the portal, you can also view a summary of analysis reports for all API defin
273267
274268
To view the analysis report for an API definition in your API center:
275269
276-
1. Sign in to the Azure portal at [https://portal.azure.com/?Microsoft_Azure_ApiManagement=apicenterpreview](https://portal.azure.com/?Microsoft_Azure_ApiManagement=apicenterpreview).
277-
1. Navigate to the API version in your API center where you added or updated an API definition.
270+
1. In the portal, navigate to the API version in your API center where you added or updated an API definition.
278271
1. Select **Definitions**, and then select the API definition file that you uploaded or updated.
279272
1. Select the **Analysis** tab.
280273
:::image type="content" source="media/enable-api-analysis-linting/analyze-api-definition.png" alt-text="Screenshot of Analysis tab for API definition in the portal.":::
@@ -287,7 +280,7 @@ The **API Analysis Report** opens, and it displays the API definition and errors
287280
288281
To view a summary of analysis reports for all API definitions in your API center:
289282
290-
1. Sign in to the Azure portal at [https://portal.azure.com/?Microsoft_Azure_ApiManagement=apicenterpreview](https://portal.azure.com/?Microsoft_Azure_ApiManagement=apicenterpreview).
283+
1. In the portal, navigate to your API center.
291284
1. In the left-hand menu, under **Governance**, select **API Analysis**. The summary appears.
292285
293286
:::image type="content" source="media/enable-api-analysis-linting/api-analysis-summary.png" alt-text="Screenshot of the API analysis summary in the portal.":::

0 commit comments

Comments
 (0)