az apim

Manage Azure API Management services.

Commands

az apim api

Manage Azure API Management API's.

az apim api create

Create an API Management API.

az apim api delete

Delete an API Management API.

az apim api import

Import an API Management service instance.

az apim api list

List API Management API's.

az apim api operation

Manage Azure API Management API Operations.

az apim api operation create

Creates a new operation in the API.

az apim api operation delete

Deletes the specified operation in the API.

az apim api operation list

List a collection of the operations for the specified API.

az apim api operation show

Gets the details of the API Operation specified by its identifier.

az apim api operation update

Updates the details of the operation in the API specified by its identifier.

az apim api release

Manage Azure API Management API Release.

az apim api release create

Creates a new Release for the API.

az apim api release delete

Deletes the specified release in the API.

az apim api release list

Lists all releases of an API.

az apim api release show

Returns the details of an API release.

az apim api release update

Updates the details of the release of the API specified by its identifier.

az apim api revision

Manage Azure API Management API Revision.

az apim api revision create

Create API revision.

az apim api revision list

Lists all revisions of an API.

az apim api show

Show details of an API Management API.

az apim api update

Update an API Management API.

az apim api versionset

Manage Azure API Management API Version Set.

az apim api versionset create

Creates a Api Version Set.

az apim api versionset delete

Deletes specific Api Version Set.

az apim api versionset list

Lists a collection of API Version Sets in the specified service instance.

az apim api versionset show

Gets the details of the Api Version Set specified by its identifier.

az apim api versionset update

Updates the details of the Api VersionSet specified by its identifier.

az apim api wait

Place the CLI in a waiting state until a condition of an apim api is met.

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 nv

Manage Azure API Management Named Values.

az apim nv create

Create an API Management Named Value.

az apim nv delete

Delete an API Management Named Value.

az apim nv list

List API Management Named Values.

az apim nv show

Show details of an API Management Named Value.

az apim nv show-secret

Gets the secret of an API Management Named Value.

az apim nv update

Update an API Management Named Value.

az apim product

Manage Azure API Management Product's.

az apim product api

Manage Azure API Management Product's APIs.

az apim product api add

Add an API to the specified product.

az apim product api check

Checks that API entity specified by identifier is associated with the Product entity.

az apim product api delete

Deletes the specified API from the specified product.

az apim product api list

Lists a collection of the APIs associated with a product.

az apim product create

Creates a product.

az apim product delete

Delete product.

az apim product list

Lists a collection of products in the specified service instance.

az apim product show

Gets the details of the product specified by its identifier.

az apim product update

Update existing product details.

az apim show

Show details of an API Management service instance.

az apim update

Update an API Management service instance.

az apim wait

Place the CLI in a waiting state until a condition of an apim is met.

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 --backup-name
               --name
               --resource-group
               --storage-account-container
               --storage-account-key
               --storage-account-name
               [--no-wait]
               [--subscription]

Examples

Create a backup of the API Management service instance

az apim backup --name MyApim -g MyResourceGroup --backup-name myBackup              --storage-account-name mystorageaccount --storage-account-container backups              --storage-account-key Ay2ZbdxLnD4OJPT29F6jLPkB6KynOzx85YCObhrw==

Required Parameters

--backup-name

The name of the backup file to create.

--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>.

--storage-account-container

The name of the storage account container used to place the backup.

--storage-account-key

The access key of the storage account used to place the backup.

--storage-account-name

The name of the storage account used to place the backup.

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
               --publisher-name
               --resource-group
               [--enable-client-certificate {false, true}]
               [--enable-managed-identity {false, true}]
               [--location]
               [--no-wait]
               [--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.

--publisher-name

The name of your organization for use in the developer portal and e-mail 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.

--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: key[=value] [key[=value] ...]. 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 [--query-examples]
             [--resource-group]
             [--subscription]

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--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
             [--query-examples]
             [--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

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--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: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--virtual-network -v

The virtual network type.

accepted values: External, Internal, None

az apim wait

Place the CLI in a waiting state until a condition of an apim is met.

az apim wait --name
             --resource-group
             [--created]
             [--custom]
             [--deleted]
             [--exists]
             [--interval]
             [--subscription]
             [--timeout]
             [--updated]

Examples

Place the CLI in a waiting state until a condition of a apim is met. (autogenerated)

az apim wait --created --name MyApim --resource-group 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

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--subscription

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

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.