Skip to content

Commit e5494aa

Browse files
authored
Merge pull request #273438 from dlepow/templqs
[APIC] Bicep/ARM quickstart
2 parents d9e9d92 + e470dbb commit e5494aa

9 files changed

+204
-11
lines changed

articles/api-center/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
href: set-up-api-center.md
2121
- name: Create an API center - CLI
2222
href: set-up-api-center-azure-cli.md
23+
- name: Create an API center - Bicep
24+
href: set-up-api-center-bicep.md
25+
- name: Create an API center - ARM template
26+
href: set-up-api-center-arm-template.md
2327
- name: Tutorials
2428
items:
2529
- name: 1 - Define custom metadata

articles/api-center/includes/quickstart-intro-prerequisites.md renamed to articles/api-center/includes/quickstart-intro.md

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

77
ms.service: api-center
88
ms.topic: include
9-
ms.date: 04/19/2024
9+
ms.date: 05/02/2024
1010
ms.author: danlep
1111
ms.custom: Include file
1212
---
1313

1414
Create your [API center](../overview.md) to start an inventory of your organization's APIs. Azure API Center enables tracking APIs in a centralized location for discovery, reuse, and governance.
1515

16-
After creating your API center, follow the steps in the tutorials to add custom metadata, APIs, versions, definitions, and other information.
17-
18-
## Prerequisites
19-
20-
* If you don't have an Azure subscription, create an [Azure free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
21-
22-
* At least a Contributor role assignment or equivalent permissions in the Azure subscription.
16+
After creating your API center, follow the steps in the tutorials to add custom metadata, APIs, versions, definitions, and other information.

articles/api-center/includes/quickstart-next-steps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: dlepow
66

77
ms.service: api-center
88
ms.topic: include
9-
ms.date: 04/22/2024
9+
ms.date: 05/02/2024
1010
ms.author: danlep
1111
ms.custom: Include file
1212
---
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Include file
3+
description: Include file
4+
services: api-center
5+
author: dlepow
6+
7+
ms.service: api-center
8+
ms.topic: include
9+
ms.date: 04/19/2024
10+
ms.author: danlep
11+
ms.custom: Include file
12+
---
13+
14+
## Prerequisites
15+
16+
* If you don't have an Azure subscription, create an [Azure free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
17+
18+
* At least a Contributor role assignment or equivalent permissions in the Azure subscription.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Include file
3+
description: Include file
4+
services: api-center
5+
author: dlepow
6+
7+
ms.service: api-center
8+
ms.topic: include
9+
ms.date: 05/02/2024
10+
ms.author: danlep
11+
ms.custom: Include file
12+
---
13+
14+
## Review deployed resources
15+
16+
Use the Azure portal to check the deployed resources, or use tools such as the Azure CLI or Azure PowerShell to list the deployed resources.
17+
18+
1. In the [Azure portal](https://portal.azure.com), search for and select **API Centers**, and select the API center that you created.
19+
1. Review the properties of your service on the **Overview** page.
20+
1. In the left menu, under **Assets**, select **APIs** to see the API that you registered in the default workspace.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Quickstart - Create your Azure API center - ARM template
3+
description: In this quickstart, use an Azure Resource Manager template to set up an API center for API discovery, reuse, and governance.
4+
author: dlepow
5+
ms.service: api-center
6+
ms.topic: quickstart
7+
ms.date: 05/13/2024
8+
ms.author: danlep
9+
---
10+
11+
# Quickstart: Create your API center - ARM template
12+
13+
[!INCLUDE [quickstart-intro](includes/quickstart-intro.md)]
14+
15+
[!INCLUDE [resource-manager-quickstart-introduction](../../includes/resource-manager-quickstart-introduction.md)]
16+
17+
If your environment meets the prerequisites and you're familiar with using ARM templates, select the **Deploy to Azure** button. The template will open in the Azure portal.
18+
19+
:::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Screenshot of the Deploy to Azure button to deploy resources with a template." link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.apicenter%2Fazure-api-center-create%2Fazuredeploy.json":::
20+
21+
22+
[!INCLUDE [quickstart-prerequisites](includes/quickstart-prerequisites.md)]
23+
24+
* For Azure CLI:
25+
[!INCLUDE [include](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
26+
27+
* For Azure PowerShell:
28+
[!INCLUDE [azure-powershell-requirements-no-header.md](../../includes/azure-powershell-requirements-no-header.md)]
29+
30+
## Review the template
31+
32+
The template used in this quickstart is from [Azure Quickstart Templates](/samples/azure/azure-quickstart-templates/azure-api-center-create/).
33+
34+
In this example, the template creates an API center in the Free plan and registers a sample API in the default workspace. Currently, API Center supports a single, default workspace for all child resources.
35+
36+
37+
:::code language="json" source="~/quickstart-templates/quickstarts/microsoft.apicenter/azure-api-center-create/azuredeploy.json":::
38+
39+
The following Azure resources are defined in the template:
40+
41+
* [Microsoft.ApiCenter/services](/azure/templates/microsoft.apicenter/services)
42+
* [Microsoft.ApiCenter/services/workspaces](/azure/templates/microsoft.apicenter/services/workspaces)
43+
* [Microsoft.ApiCenter/services/workspaces/apis](/azure/templates/microsoft.apicenter/services/workspaces/apis)
44+
45+
## Deploy the template
46+
47+
Deploy the template using any standard method for [deploying an ARM template](../azure-resource-manager/templates/deploy-cli.md) such as the following examples using Azure CLI and PowerShell.
48+
49+
1. Save the template file as **azuredeploy.json** to your local computer.
50+
1. Deploy the template using either Azure CLI or Azure PowerShell.
51+
52+
# [CLI](#tab/CLI)
53+
54+
```azurecli
55+
# Create a resource group in one of the supported regions for Azure API Center
56+
57+
az group create --name exampleRG --location eastus
58+
59+
az deployment group create --resource-group exampleRG --template-file azuredeploy.json --parameters apiName="<api-name>" apiType="<api-type>"
60+
```
61+
62+
# [PowerShell](#tab/PowerShell)
63+
64+
```azurepowershell
65+
# Create a resource group in one of the supported regions for Azure API Center
66+
67+
New-AzResourceGroup -Name exampleRG -Location eastus
68+
69+
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./azuredeploy.json -apiName "<api-name>" -apiType "<api-type>"
70+
```
71+
---
72+
73+
Replace **\<api-name\>** and **\<api-type\>** with the name and type of an API that you want to register in your API center.
74+
75+
When the deployment finishes, you should see a message indicating the deployment succeeded.
76+
77+
[!INCLUDE [quickstart-template-review-resources](includes/quickstart-template-review-resources.md)]
78+
79+
[!INCLUDE [quickstart-next-steps](includes/quickstart-next-steps.md)]

articles/api-center/set-up-api-center-azure-cli.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ ms.author: danlep
1010

1111
# Quickstart: Create your API center - Azure CLI
1212

13-
[!INCLUDE [quickstart-intro-prerequisites](includes/quickstart-intro-prerequisites.md)]
13+
[!INCLUDE [quickstart-intro](includes/quickstart-intro.md)]
14+
15+
[!INCLUDE [quickstart-prerequisites](includes/quickstart-prerequisites.md)]
1416

1517
* For Azure CLI:
1618
[!INCLUDE [include](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Quickstart - Create your Azure API center - Bicep
3+
description: In this quickstart, use Bicep to set up an API center for API discovery, reuse, and governance.
4+
author: dlepow
5+
ms.service: api-center
6+
ms.topic: quickstart
7+
ms.date: 05/13/2024
8+
ms.author: danlep
9+
---
10+
11+
# Quickstart: Create your API center - Bicep
12+
13+
[!INCLUDE [quickstart-intro](includes/quickstart-intro.md)]
14+
15+
[!INCLUDE [resource-manager-quickstart-bicep-introduction](../../includes/resource-manager-quickstart-bicep-introduction.md)]
16+
17+
[!INCLUDE [quickstart-prerequisites](includes/quickstart-prerequisites.md)]
18+
19+
* For Azure CLI:
20+
[!INCLUDE [include](~/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
21+
22+
* For Azure PowerShell:
23+
[!INCLUDE [azure-powershell-requirements-no-header.md](../../includes/azure-powershell-requirements-no-header.md)]
24+
25+
## Review the Bicep file
26+
27+
The Bicep file used in this quickstart is from
28+
[Azure Quickstart Templates](/samples/azure/azure-quickstart-templates/azure-api-center-create/).
29+
30+
In this example, the Bicep file creates an API center in the Free plan and registers a sample API in the default workspace. Currently, API Center supports a single, default workspace for all child resources.
31+
32+
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.apicenter/azure-api-center-create/main.bicep":::
33+
34+
The following Azure resources are defined in the Bicep file:
35+
36+
* [Microsoft.ApiCenter/services](/azure/templates/microsoft.apicenter/services)
37+
* [Microsoft.ApiCenter/services/workspaces](/azure/templates/microsoft.apicenter/services/workspaces)
38+
* [Microsoft.ApiCenter/services/workspaces/apis](/azure/templates/microsoft.apicenter/services/workspaces/apis)
39+
40+
## Deploy the Bicep file
41+
42+
You can use Azure CLI or Azure PowerShell to deploy the Bicep file. For more information about deploying Bicep files, see [Deploy](../azure-resource-manager/bicep/deploy-cli.md).
43+
44+
1. Save the Bicep file as **main.bicep** to your local computer.
45+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
46+
47+
# [CLI](#tab/CLI)
48+
49+
```azurecli
50+
# Create a resource group in one of the supported regions for Azure API Center
51+
52+
az group create --name exampleRG --location eastus
53+
54+
az deployment group create --resource-group exampleRG --template-file main.bicep --parameters apiName="<api-name>" apiType="<api-type>"
55+
```
56+
57+
# [PowerShell](#tab/PowerShell)
58+
59+
```azurepowershell
60+
# Create a resource group in one of the supported regions for Azure API Center
61+
62+
New-AzResourceGroup -Name exampleRG -Location eastus
63+
64+
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -apiName "<api-name>" -apiType "<api-type>"
65+
```
66+
---
67+
68+
Replace **\<api-name\>** and **\<api-type\>** with the name and type of an API that you want to register in your API center.
69+
70+
When the deployment finishes, you should see a message indicating the deployment succeeded.
71+
72+
[!INCLUDE [quickstart-template-review-resources](includes/quickstart-template-review-resources.md)]
73+
74+
[!INCLUDE [quickstart-next-steps](includes/quickstart-next-steps.md)]

articles/api-center/set-up-api-center.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ ms.author: danlep
1010

1111
# Quickstart: Create your API center - portal
1212

13-
[!INCLUDE [quickstart-intro-prerequisites](includes/quickstart-intro-prerequisites.md)]
13+
[!INCLUDE [quickstart-intro](includes/quickstart-intro.md)]
14+
15+
[!INCLUDE [quickstart-prerequisites](includes/quickstart-prerequisites.md)]
1416

1517
## Register the Microsoft.ApiCenter provider
1618

0 commit comments

Comments
 (0)