Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 3.18 KB

set-up-api-center-bicep.md

File metadata and controls

75 lines (48 loc) · 3.18 KB
titledescriptionauthorms.servicems.customms.topicms.datems.author
Quickstart - Create your Azure API center - Bicep
In this quickstart, use Bicep to set up an API center for API discovery, reuse, and governance.
dlepow
azure-api-center
devx-track-azurepowershell, devx-track-bicep
quickstart
05/13/2024
danlep

Quickstart: Create your API center - Bicep

[!INCLUDE quickstart-intro]

[!INCLUDE resource-manager-quickstart-bicep-introduction]

[!INCLUDE quickstart-prerequisites]

Review the Bicep file

The Bicep file used in this quickstart is from Azure Quickstart Templates.

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.

:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.apicenter/azure-api-center-create/main.bicep":::

The following Azure resources are defined in the Bicep file:

Deploy the Bicep file

You can use Azure CLI or Azure PowerShell to deploy the Bicep file. For more information about deploying Bicep files, see Deploy.

  1. Save the Bicep file as main.bicep to your local computer.

  2. Deploy the Bicep file using either Azure CLI or Azure PowerShell.

    # Create a resource group in one of the supported regions for Azure API Center az group create --name exampleRG --location eastus az deployment group create --resource-group exampleRG --template-file main.bicep --parameters apiName="<api-name>" apiType="<api-type>" 
    # Create a resource group in one of the supported regions for Azure API Center New-AzResourceGroup -Name exampleRG -Location eastus New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -apiName "<api-name>" -apiType "<api-type>" 

Replace <api-name> and <api-type> with the name and type of an API that you want to register in your API center.

When the deployment finishes, you should see a message indicating the deployment succeeded.

[!INCLUDE quickstart-template-review-resources]

[!INCLUDE quickstart-next-steps]

close