az apim

Manage Azure API Management services.

Commands

az apim apply-network-updates Back up an API Management service to the configured storage account.
az apim backup Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.
az apim check-name Checks to see if a service name is available to use.
az apim create Create an API Management service instance.
az apim delete Deletes an API Management service.
az apim list List API Management service instances.
az apim show Show details of an API Management service instance.
az apim update Update an API Management service instance.

az apim apply-network-updates

Back up an API Management service to the configured storage account.

az apim apply-network-updates --name
--resource-group
[--location]
[--no-wait]
[--subscription]

Required Parameters

--name -n

The name of the api management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az apim backup

Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.

az apim backup --name
--resource-group
[--no-wait]
[--subscription]

Required Parameters

--name -n

The name of the api management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az apim check-name

Checks to see if a service name is available to use.

az apim check-name --name
[--subscription]

Required Parameters

--name -n

The name of the api management service instance.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az apim create

Create an API Management service instance.

az apim create --name
--publisher-email
--resource-group
[--enable-client-certificate {false, true}]
[--enable-managed-identity {false, true}]
[--location]
[--no-wait]
[--publisher-name]
[--sku-capacity]
[--sku-name {Basic, Consumption, Developer, Premium, Standard}]
[--subscription]
[--tags]
[--virtual-network {External, Internal, None}]

Examples

Create a Developer tier API Management service.

az apim create --name MyApim -g MyResourceGroup -l eastus --publisher-email email@mydomain.com --publisher-name Microsoft

Create a Consumption tier API Management service.

az apim create --name MyApim -g MyResourceGroup -l eastus --sku-name Consumption --enable-client-certificate \
    --publisher-email email@mydomain.com --publisher-name Microsoft

Required Parameters

--name -n

Unique name of the service instance to be created.

--publisher-email

The e-mail address to receive all system notifications.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--enable-client-certificate

Enforces a client certificate to be presented on each request to the gateway and also enables the ability to authenticate the certificate in the policy on the gateway.

accepted values: false, true
--enable-managed-identity

Create a managed identity for the API Management service to access other Azure resources.

accepted values: false, true
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--no-wait

Do not wait for the long-running operation to finish.

--publisher-name

The name of your organization for use in the developer portal and e-mail notifications.

--sku-capacity

The number of deployed units of the SKU.

default value: 1
--sku-name

The sku of the api management instance.

accepted values: Basic, Consumption, Developer, Premium, Standard
default value: Developer
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

--virtual-network -v

The virtual network type.

accepted values: External, Internal, None
default value: None

az apim delete

Deletes an API Management service.

az apim delete --name
--resource-group
[--no-wait]
[--subscription]
[--yes]

Examples

Delete an API Management service.

az apim delete -n MyApim -g MyResourceGroup

Required Parameters

--name -n

The name of the api management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az apim list

List API Management service instances.

az apim list [--resource-group]
[--subscription]

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az apim show

Show details of an API Management service instance.

az apim show --name
--resource-group
[--subscription]

Required Parameters

--name -n

The name of the api management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az apim update

Update an API Management service instance.

az apim update --name
--resource-group
[--add]
[--enable-client-certificate {false, true}]
[--enable-managed-identity {false, true}]
[--force-string]
[--no-wait]
[--publisher-email]
[--publisher-name]
[--remove]
[--set]
[--sku-capacity]
[--sku-name {Basic, Consumption, Developer, Premium, Standard}]
[--subscription]
[--tags]
[--virtual-network {External, Internal, None}]

Required Parameters

--name -n

The name of the api management service instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--enable-client-certificate

Enforces a client certificate to be presented on each request to the gateway and also enables the ability to authenticate the certificate in the policy on the gateway.

accepted values: false, true
--enable-managed-identity

Create a managed identity for the API Management service to access other Azure resources.

accepted values: false, true
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--no-wait

Do not wait for the long-running operation to finish.

--publisher-email

The e-mail address to receive all system notifications.

--publisher-name

The name of your organization for use in the developer portal and e-mail notifications.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--sku-capacity

The number of deployed units of the SKU.

--sku-name

The sku of the api management instance.

accepted values: Basic, Consumption, Developer, Premium, Standard
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

--virtual-network -v

The virtual network type.

accepted values: External, Internal, None