az-apim
Manage Azure API Management services
TLDR
List API Management services within a resource group
Create an API Management service instance
Delete an API Management service
Show details of an API Management service instance
Update an API Management service instance
SYNOPSIS
az apim command-group subcommand [parameters]
Common command patterns:
az apim create --name service-name --resource-group rg-name --location location --publisher-email email --publisher-name name --sku-name sku
az apim show --name service-name --resource-group rg-name
az apim api create --service-name service-name --resource-group rg-name --display-name name --path path --protocols protocols --url url
az apim api list --service-name service-name --resource-group rg-name
PARAMETERS
--help
Shows help message for the command or subcommand, detailing available options and usage examples.
--output <format>
Output format. Accepted values include: json, jsonc (colorized json), table, tsv (tab-separated values), yaml, none. The default is usually json.
--query <JMESPath>
JMESPath query string for filtering or transforming the command's output. Useful for extracting specific data.
--subscription <id>
Name or ID of the Azure subscription to operate within. This can be configured as a default.
--resource-group <name>
The name of the Azure resource group containing the API Management service. Often required for resource-specific operations.
--name <service-name>
The primary name identifier for the API Management service instance. Used in commands like create, show, delete.
--service-name <service-name>
Another common parameter, similar to --name, specifying the API Management service instance to target, particularly within nested subcommands (e.g., az apim api list --service-name ...).
--location <location>
The Azure region where the API Management service instance will be deployed (e.g., eastus, westeurope). Required for creation.
--sku-name <sku>
The pricing tier of the API Management service. Common values include Developer, Basic, Standard, Premium, Consumption.
DESCRIPTION
The az apim command group is part of the Azure Command-Line Interface (CLI), a cross-platform command-line tool for connecting to and managing Azure resources. While the query specified "az-apim", the standard Azure CLI command for API Management is az apim (without the hyphen).
Azure API Management (APIM) is a fully managed service that enables organizations to publish, secure, transform, maintain, and monitor APIs. The az apim command group provides a comprehensive set of commands for programmatic interaction with this service. Users can create, update, delete, and manage various APIM entities, including:
- APIM service instances
- APIs and API operations
- Products, subscriptions, and users
- Policies (inbound/outbound processing rules)
- Gateways and custom domains
CAVEATS
- Azure CLI Installation Required: The az apim command group is part of the Azure CLI. It must be installed on your system to be used.
- Authentication: Before executing commands, you must authenticate to Azure using az login.
- Internet Connectivity: Commands interact with Azure cloud services and require an active internet connection.
- Typographical Note: The prompt specified "az-apim"; however, the correct and commonly used command group in Azure CLI is az apim (without the hyphen).
- Extensive Parameters: Azure CLI commands, especially within complex service groups like APIM, can have a very large number of parameters. The list provided here covers common and global parameters; specific subcommands will have their own unique parameters. Refer to az apim
--help for detailed options.
AUTHENTICATION AND CONTEXT
To use az apim commands, first log in using az login. You can also set a default subscription (az account set -s
JSON OUTPUT AND SCRIPTING
The default JSON output format for az apim commands makes them highly suitable for scripting and automation. Tools like jq (a lightweight and flexible command-line JSON processor) can be used in conjunction with az apim to parse and manipulate the command output for advanced automation scenarios.
HISTORY
The Azure CLI, initially released in 2014, has evolved significantly as Microsoft's primary command-line tool for managing Azure resources. The az apim command group was introduced to support the growing capabilities of Azure API Management, providing a consistent and scriptable interface for cloud operations. Its development is closely tied to the lifecycle and feature enhancements of the Azure API Management service itself, enabling DevOps practices and automation for API infrastructure management.