Skip to content

Commit 0f4555a

Browse files
author
gitName
committed
[wip]
1 parent b3c9a60 commit 0f4555a

File tree

5 files changed

+283
-4
lines changed

5 files changed

+283
-4
lines changed

articles/api-center/TOC.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@
3838
href: manage-apis-azure-cli.md
3939
- name: Import APIs from API Management
4040
href: import-api-management-apis.md
41-
- name: Synchronize APIs from API Management
42-
href: synchronize-api-management-apis.md
41+
- name: Integrate API sources
42+
items:
43+
- name: Synchronize APIs from API Management
44+
href: synchronize-api-management-apis.md
45+
- name: Synchronize APIs from Amazon API Gateway
46+
href: synchronize-aws-gateway-apis.md
4347
- name: Build and register APIs - VS Code extension
4448
href: build-register-apis-vscode-extension.md
4549
- name: Register APIs - GitHub Actions
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Include file
3+
description: Include file
4+
services: api-center
5+
author: dlepow
6+
7+
ms.service: azure-api-center
8+
ms.topic: include
9+
ms.date: 12/20/2024
10+
ms.author: danlep
11+
ms.custom: Include file
12+
---
13+
14+
To allow import of APIs, assign your API center's managed identity the **Key Vault Secrets User** role in your Azure key vault. You can use the [portal](../../role-based-access-control/role-assignments-portal-managed-identity.yml) or the Azure CLI.
15+
16+
#### [Portal](#tab/portal)
17+
18+
1. In the [portal](https://azure.microsoft.com), navigate to your key vault.
19+
1. In the left menu, select **Access control (IAM)**.
20+
1. Select **+ Add role assignment**.
21+
1. On the **Add role assignment** page, set the values as follows:
22+
1. On the **Role** tab - Select **Key Vault Secrets User**.
23+
1. On the **Members** tab, in **Assign access to** - Select **Managed identity** > **+ Select members**.
24+
1. On the **Select managed identities** page - Select the system-assigned managed identity of your API center that you added in the previous section. Click **Select**.
25+
1. Select **Review + assign**.
26+
27+
#### [Azure CLI](#tab/cli)
28+
29+
1. Get the principal ID of the identity. For a system-assigned identity, use the [az apic show](/cli/azure/apic#az-apic-show) command.
30+
31+
```azurecli
32+
#! /bin/bash
33+
apicObjID=$(az apic show --name <api-center-name> \
34+
--resource-group <resource-group-name> \
35+
--query "identity.principalId" --output tsv)
36+
```
37+
38+
```azurecli
39+
# Formatted for PowerShell
40+
$apicObjID=$(az apic show --name <api-center-name> `
41+
--resource-group <resource-group-name> `
42+
--query "identity.principalId" --output tsv)
43+
```
44+
45+
1. Get the resource ID of your key vault using the [az apim show](/cli/azure/apim#az-apim-show) command. [UPDATE THIS COMMAND]
46+
47+
```azurecli
48+
#! /bin/bash
49+
kvID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query "id" --output tsv)
50+
```
51+
52+
```azurecli
53+
# Formatted for PowerShell
54+
$kvID=$(az apim show --name <apim-name> --resource-group <resource-group-name> --query "id" --output tsv)
55+
```
56+
57+
1. Assign the managed identity the **Key Vault Secrets User** role in your key vault the [az role assignment create](/cli/azure/role/assignment#az-role-assignment-create) command.
58+
59+
```azurecli
60+
#! /bin/bash
61+
scope="${kvID:1}"
62+
63+
az role assignment create \
64+
--role "Key Vault Secrets User \
65+
--assignee-object-id $apicObjID \
66+
--assignee-principal-type ServicePrincipal \
67+
--scope $scope
68+
```
69+
70+
```azurecli
71+
# Formatted for PowerShell
72+
$scope=$apimID.substring(1)
73+
74+
az role assignment create `
75+
--role "API Management Service Reader Role" `
76+
--assignee-object-id $apicObjID `
77+
--assignee-principal-type ServicePrincipal `
78+
--scope $scope
79+
---
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Include file
3+
description: Include file
4+
services: api-center
5+
author: dlepow
6+
7+
ms.service: azure-api-center
8+
ms.topic: include
9+
ms.date: 12/20/2024
10+
ms.author: danlep
11+
ms.custom: Include file
12+
---
13+
14+
## Delete an integration
15+
16+
While an API source is integrated, you can't delete synchronized APIs from your API center. If you need to, you can delete the integration. When you delete an integration:
17+
18+
* The synchronized APIs in your API center inventory are deleted
19+
* The environment and deployments associated with the API source are deleted
20+
21+
To delete an integration:
22+
23+
1. In the [portal](https://portal.azure.com), navigate to your API center.
24+
1. Under **Assets**, select **Environments** > **Integration (preview)**.
25+
1. Select the integration, and then select **Delete** (trash can icon).

articles/api-center/includes/enable-managed-identity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ author: dlepow
66

77
ms.service: azure-api-center
88
ms.topic: include
9-
ms.date: 10/18/2024
9+
ms.date: 12/20/2024
1010
ms.author: danlep
1111
ms.custom: Include file
1212
---
1313

14-
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. Depending on your needs, configure either a system-assigned or one or more user-assigned managed identities.
14+
For this scenario, your API center uses a [managed identity](/entra/identity/managed-identities-azure-resources/overview) to access Azure resources. Depending on your needs, configure either a system-assigned or one or more user-assigned managed identities.
1515

1616
The following examples show how to configure a system-assigned managed identity by using the Azure portal or the Azure CLI. At a high level, configuration steps are similar for a user-assigned managed identity.
1717

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
---
2+
title: Synchronize APIs from Amazon API Gateway - Azure API Center
3+
description: Integrate an Amazon API Gateway to Azure API Center for automatic synchronization of APIs to the inventory.
4+
author: dlepow
5+
ms.service: azure-api-center
6+
ms.topic: how-to
7+
ms.date: 12/20/2024
8+
ms.author: danlep
9+
ms.custom: devx-track-azurecli
10+
# Customer intent: As an API program manager, I want to integrate my Azure API Management instance with my API center and synchronize API Management APIs to my inventory.
11+
---
12+
13+
# Synchronize APIs from Amazon API Gateway to Azure API Center (preview)
14+
15+
This article shows how to integrate an Amazon API Gateway so that the gateway's APIs are continuously kept up to date in your [API center](overview.md) inventory.
16+
17+
## About integrating Amazon API Gateway
18+
19+
Integrating Amazon API Gateway as an API source for your API center enables continuous synchronization so that the API inventory stays up to date.
20+
21+
When you integrate an Amazon API Gateway as an API source, the following happens:
22+
23+
1. APIs, and optionally API definitions (specs), from the API Gateway are added to the API center inventory.
24+
1. You configure an [environment](key-concepts.md#environment) of type *Amazon API Gateway* in the API center.
25+
1. An associated [deployment](key-concepts.md#deployment) is created for each synchronized API definition.
26+
27+
Synchronization is one-way from Amazon API Gateway to your Azure API center, meaning API updates in the API center aren't synchronized back to the API Gateway.
28+
29+
> [!NOTE]
30+
> * There are [limits](../azure-resource-manager/management/azure-subscription-service-limits.md?toc=/azure/api-center/toc.json&bc=/azure/api-center/breadcrumb/toc.json#api-center-limits) for the number of integrated API sources.
31+
> * API updates in Amazon API Gateway synchronize to your API center every hour.
32+
33+
### Entities synchronized from Amazon API Gateway
34+
35+
You can add or update metadata properties and documentation in your API center to help stakeholders discover, understand, and consume the synchronized APIs. Learn more about Azure API Center's [built-in and custom metadata properties](add-metadata-properties.md).
36+
37+
The following table shows entity properties that can be modified in Azure API Center and properties that are determined based on their values in Amazon API Gateway. Also, entities' resource or system identifiers in Azure API Center are generated automatically and can't be modified.
38+
39+
| Entity | Properties configurable in API Center | Properties determined in API Gateway |
40+
|--------------|-----------------------------------------|-----------------|
41+
| API | summary<br/>lifecycleStage<br/>termsOfService<br/>license<br/>externalDocumentation<br/>customProperties | title<br/>description<br/>kind |
42+
| API version | lifecycleStage | title |
43+
| Environment | title<br/>description<br/>kind</br>server.managementPortalUri<br/>onboarding<br/>customProperties | server.type
44+
| Deployment | title<br/>description<br/>server<br/>state<br/>customProperties | server.runtimeUri |
45+
46+
For property details, see the [Azure API Center REST API reference](/rest/api/apicenter).
47+
48+
49+
## Prerequisites
50+
51+
* An API center in your Azure subscription. If you haven't created one, see [Quickstart: Create your API center](set-up-api-center.md).
52+
53+
* An Azure key vault. If you need to create one, see [Quickstart: Create a key vault using the Azure portal](/azure/key-vault/general/quick-create-portal).
54+
55+
* An [Amazon API Gateway](https://docs.aws.amazon.com/apigateway/).
56+
57+
* An AWS [IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) identity with the `AmazonAPIGatewayAdministrator` policy attached.
58+
59+
* For Azure CLI:
60+
[!INCLUDE [include](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
61+
62+
[!INCLUDE [install-apic-extension](includes/install-apic-extension.md)]
63+
64+
> [!NOTE]
65+
> 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.
66+
67+
## Add a managed identity in your API center
68+
69+
[!INCLUDE [enable-managed-identity](includes/enable-managed-identity.md)]
70+
71+
72+
## Create IAM user access keys
73+
74+
To authenticate your API center with Amazon API Gateway, you need access keys for an AWS IAM user.
75+
76+
To generate the required access key ID and secret key using the AWS Management Console, see [Create an access key for yourself](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-key-self-managed.html#Using_CreateAccessKey).
77+
78+
Save your access keys in a safe location. You'll store them in Azure Key Vault in the next steps.
79+
80+
> [!CAUTION]
81+
> Access keys are long-term credentials and you should manage them as securely as you would a password. Learn more about [securing access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/securing_access-keys.html)
82+
83+
## Store IAM user access keys in Azure Key Vault
84+
85+
Manually upload and securely store the two IAM user access keys in Azure Key Vault using the configuration in the following table. For more information, see [Quickstart: Set and retrieve a secret from Azure Key Vault using the Azure portal](/azure/key-vault/secrets/quick-create-portal).
86+
87+
| AWS secret | Upload options | Name | Secret value |
88+
89+
90+
Upload option
91+
92+
Manual
93+
94+
Name
95+
96+
aws-access-key
97+
98+
Secret value
99+
100+
Access key retrieved from AWS
101+
102+
One secret for secret access key:
103+
104+
Upload option
105+
106+
Manual
107+
108+
Name
109+
110+
aws-secret-access-key
111+
112+
Secret value
113+
114+
Secret access key retrieved from AWS
115+
116+
117+
118+
119+
120+
121+
122+
123+
## Add a managed identity in your API center
124+
125+
[!INCLUDE [enable-managed-identity](includes/enable-managed-identity.md)]
126+
127+
## Assign the managed identity the Key Vault Secrets User role
128+
129+
[!INCLUDE [configure-managed-identity-apim-reader](includes/configure-managed-identity-apim-reader.md)]
130+
131+
## Integrate an Amazon API Gateway
132+
133+
You can integrate an API Gateway using the portal.
134+
135+
1. In the [portal](https://portal.azure.com), navigate to your API center.
136+
1. Under **Assets**, select **Environments**.
137+
1. Select **Integrations (preview)** > **+ New integration**.
138+
1. In the **Link your Azure API Gateway** page:
139+
1. TBD...
140+
1. In **Environment details**, enter an **Environment title** (name), **Environment type**, and optional **Environment description**.
141+
1. In **API details**, select a **Lifecycle stage** for the synchronized APIs. (You can update this value for your APIs after they're added to your API center.) Also, select whether to synchronize API definitions.
142+
1. Select **Create**.
143+
144+
<!----
145+
:::image type="content" source="media/synchronize-api-management-apis/link-api-management-service.png" alt-text="Screenshot of linking an Azure API Management Service in the portal.":::
146+
147+
--->
148+
The environment is added in your API center. The API Management APIs are imported to the API center inventory.
149+
150+
<!--
151+
:::image type="content" source="media/synchronize-api-management-apis/environment-link-list.png" alt-text="Screenshot of environment list in the portal.":::
152+
-->
153+
154+
## Delete an integration
155+
156+
While an API source is integrated, you can't delete synchronized APIs from your API center. If you need to, you can delete the integration. When you delete an integration:
157+
158+
* The synchronized APIs in your API center inventory are deleted
159+
* The environment and deployments associated with the API source are deleted
160+
161+
To delete an integration:
162+
163+
1. In the [portal](https://portal.azure.com), navigate to your API center.
164+
1. Under **Assets**, select **Environments** > **Integration (preview)**.
165+
1. Select the integration, and then select **Delete** (trash can icon).
166+
167+
## Related content
168+
169+
* [Manage API inventory with Azure CLI commands](manage-apis-azure-cli.md)
170+
* [Import APIs from API Management to your Azure API center](import-api-management-apis.md)
171+
* [Azure API Management documentation](../api-management/index.yml)

0 commit comments

Comments
 (0)