Skip to content

Commit cae0c92

Browse files
Merge pull request #190775 from mumian/0304-bicep-api-mgmt
add a Bicep quickstart
2 parents 909dc86 + e944d91 commit cae0c92

File tree

3 files changed

+118
-4
lines changed

3 files changed

+118
-4
lines changed

articles/api-management/TOC.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
href: powershell-create-service-instance.md
2121
- name: Create an instance - Visual Studio Code
2222
href: vscode-create-service-instance.md
23+
- name: Create an instance - Bicep
24+
displayName: Resource Manager, ARM, Bicep
25+
href: quickstart-bicep.md
2326
- name: Create an instance - ARM template
2427
displayName: Resource Manager
2528
href: quickstart-arm-template.md
@@ -218,8 +221,8 @@
218221
href: developer-portal-integrate-application-insights.md
219222
- name: Integrate Google Tag Manager
220223
href: developer-portal-integrate-google-tag-manager.md
221-
- name: Self-host developer portal
222-
items:
224+
- name: Self-host developer portal
225+
items:
223226
- name: Create self-hosted portal
224227
href: developer-portal-self-host.md
225228
- name: Alternative approaches to self-hosting
@@ -232,8 +235,8 @@
232235
href: developer-portal-use-community-widgets.md
233236
- name: Test self-hosted portal
234237
href: developer-portal-testing.md
235-
- name: Monetize APIs
236-
items:
238+
- name: Monetize APIs
239+
items:
237240
- name: Monetization with Azure API Management
238241
href: monetization-overview.md
239242
- name: How API Management supports monetization
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
---
2+
title: Quickstart - Create Azure API Management instance by using Bicep
3+
description: Learn how to create an Azure API Management instance in the Developer tier by using Bicep.
4+
services: azure-resource-manager
5+
author: mumian
6+
ms.service: api-management
7+
tags: azure-resource-manager, bicep
8+
ms.topic: quickstart
9+
ms.author: jgao
10+
ms.date: 03/10/2022
11+
---
12+
13+
# Quickstart: Create a new Azure API Management service instance using Bicep
14+
15+
This quickstart describes how to use a Bicep file to create an Azure API Management (APIM) service instance. APIM helps organizations publish APIs to external, partner, and internal developers to unlock the potential of their data and services. API Management provides the core competencies to ensure a successful API program through developer engagement, business insights, analytics, security, and protection. APIM enables you to create and manage modern API gateways for existing backend services hosted anywhere. For more information, see the [Overview](api-management-key-concepts.md).
16+
17+
[!INCLUDE [About Bicep](../../includes/resource-manager-quickstart-bicep-introduction.md)]
18+
19+
## Prerequisites
20+
21+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
22+
23+
## Review the Bicep file
24+
25+
The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/azure-api-management-create/).
26+
27+
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.apimanagement/azure-api-management-create/main.bicep":::
28+
29+
The following resource is defined in the Bicep file:
30+
31+
- **[Microsoft.ApiManagement/service](/azure/templates/microsoft.apimanagement/service)**
32+
33+
In this example, the Bicep file configures the API Management instance in the Developer tier, an economical option to evaluate Azure API Management. This tier isn't for production use.
34+
35+
More Azure API Management Bicep samples can be found in [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Apimanagement&pageNumber=1&sort=Popular).
36+
37+
## Deploy the Bicep file
38+
39+
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).
40+
41+
1. Save the Bicep file as **main.bicep** to your local computer.
42+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
43+
44+
# [CLI](#tab/CLI)
45+
46+
```azurecli
47+
az group create --name exampleRG --location eastus
48+
49+
az deployment group create --resource-group exampleRG --template-file main.bicep --parameters publisherEmail=<publisher-email> publishername=<publisher-name>
50+
```
51+
52+
# [PowerShell](#tab/PowerShell)
53+
54+
```azurepowershell
55+
New-AzResourceGroup -Name exampleRG -Location eastus
56+
57+
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -publisherEmail "<publisher-email>" -publisherName "<publisher-name>"
58+
```
59+
60+
---
61+
62+
Replace **\<publisher-name\>** and **\<publisher-email\>** with the name of the API publisher's organization and the email address to receive notifications.
63+
64+
When the deployment finishes, you should see a message indicating the deployment succeeded.
65+
66+
## Review deployed resources
67+
68+
Use the Azure portal, Azure CLI or Azure PowerShell to list the deployed App Configuration resource in the resource group.
69+
70+
# [CLI](#tab/CLI)
71+
72+
```azurecli-interactive
73+
az resource list --resource-group exampleRG
74+
```
75+
76+
# [PowerShell](#tab/PowerShell)
77+
78+
```azurepowershell-interactive
79+
Get-AzResource -ResourceGroupName exampleRG
80+
```
81+
82+
---
83+
84+
When your API Management service instance is online, you're ready to use it. Start with the tutorial to [import and publish](import-and-publish.md) your first API.
85+
86+
## Clean up resources
87+
88+
If you plan to continue working with subsequent tutorials, you might want to leave the API Management instance in place. When no longer needed, delete the resource group, which deletes the resources in the resource group.
89+
90+
# [CLI](#tab/CLI)
91+
92+
```azurecli-interactive
93+
az group delete --name exampleRG
94+
```
95+
96+
# [PowerShell](#tab/PowerShell)
97+
98+
```azurepowershell-interactive
99+
Remove-AzResourceGroup -Name exampleRG
100+
```
101+
102+
---
103+
104+
## Next steps
105+
106+
> [!div class="nextstepaction"]
107+
> [Tutorial: Import and publish your first API](import-and-publish.md)

articles/azure-resource-manager/bicep/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
items:
4444
- name: Analysis Services
4545
href: ../../analysis-services/analysis-services-create-bicep-file.md?toc=/azure/azure-resource-manager/bicep/toc.json
46+
- name: Web
47+
items:
48+
- name: API Management
49+
href: ../../api-management/quickstart-bicep.md?toc=/azure/azure-resource-manager/bicep/toc.json
4650
- name: Concepts
4751
expanded: true
4852
items:

0 commit comments

Comments
 (0)