Share via


az apim

Manage Azure API Management services.

Commands

Name Description Type Status
az apim api

Manage Azure API Management API's.

Core GA
az apim api create

Create an API Management API.

Core GA
az apim api delete

Delete an API Management API.

Core GA
az apim api export

Export an API Management API.

Core GA
az apim api import

Import an API Management API.

Core GA
az apim api list

List API Management API's.

Core GA
az apim api operation

Manage Azure API Management API Operations.

Core GA
az apim api operation create

Creates a new operation in the API.

Core GA
az apim api operation delete

Deletes the specified operation in the API.

Core GA
az apim api operation list

List a collection of the operations for the specified API.

Core GA
az apim api operation show

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

Core GA
az apim api operation update

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

Core GA
az apim api release

Manage Azure API Management API Release.

Core GA
az apim api release create

Creates a new Release for the API.

Core GA
az apim api release delete

Deletes the specified release in the API.

Core GA
az apim api release list

Lists all releases of an API.

Core GA
az apim api release show

Returns the details of an API release.

Core GA
az apim api release update

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

Core GA
az apim api revision

Manage Azure API Management API Revision.

Core GA
az apim api revision create

Create API revision.

Core GA
az apim api revision list

Lists all revisions of an API.

Core GA
az apim api schema

Manage Azure API Management API Schema's.

Core GA
az apim api schema create

Create an API Management API Schema.

Core GA
az apim api schema delete

Delete an API Management API Schema.

Core GA
az apim api schema get-etag

Get etag of an API Management API schema.

Core GA
az apim api schema list

List API Management API schema's.

Core GA
az apim api schema show

Show details of an API Management API Schema.

Core GA
az apim api schema wait

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

Core GA
az apim api show

Show details of an API Management API.

Core GA
az apim api update

Update an API Management API.

Core GA
az apim api versionset

Manage Azure API Management API Version Set.

Core GA
az apim api versionset create

Creates a Api Version Set.

Core GA
az apim api versionset delete

Deletes specific Api Version Set.

Core GA
az apim api versionset list

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

Core GA
az apim api versionset show

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

Core GA
az apim api versionset update

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

Core GA
az apim api wait

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

Core GA
az apim apply-network-updates

Update the API Management resource running in the virtual network to pick the updated network settings.

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

Core GA
az apim check-name

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

Core GA
az apim create

Create an API Management service instance.

Core GA
az apim delete

Deletes an API Management service.

Core GA
az apim deletedservice

Manage soft-deleted Azure API Management services.

Core GA
az apim deletedservice list

List all soft-deleted Api Management services instances available for undelete for the given subscription.

Core GA
az apim deletedservice purge

Purge soft-deleted Api Management service instance (deletes it with no option to undelete).

Core GA
az apim deletedservice show

Get soft-deleted Api Management service instances available for undelete by name.

Core GA
az apim graphql

Manage Azure API Management GraphQL API's.

Core GA
az apim graphql resolver

Manage Azure API Management GraphQL API's Resolvers.

Core GA
az apim graphql resolver create

Create a new resolver in the GraphQL API or updates an existing one.

Core GA
az apim graphql resolver delete

Delete the specified resolver in the GraphQL API.

Core GA
az apim graphql resolver list

List a collection of the resolvers for the specified GraphQL API.

Core GA
az apim graphql resolver policy

Manage Azure API Management GraphQL API's Resolvers Policies.

Core GA
az apim graphql resolver policy create

Create or updates policy configuration for the GraphQL API Resolver level.

Core GA
az apim graphql resolver policy delete

Delete the policy configuration at the GraphQL Api Resolver.

Core GA
az apim graphql resolver policy list

Get the list of policy configuration at the GraphQL API Resolver level.

Core GA
az apim graphql resolver policy show

Get the policy configuration at the GraphQL API Resolver level.

Core GA
az apim graphql resolver show

Get the details of the GraphQL API Resolver specified by its identifier.

Core GA
az apim list

List API Management service instances.

Core GA
az apim nv

Manage Azure API Management Named Values.

Core GA
az apim nv create

Create an API Management Named Value.

Core GA
az apim nv delete

Delete an API Management Named Value.

Core GA
az apim nv list

List API Management Named Values.

Core GA
az apim nv show

Show details of an API Management Named Value.

Core GA
az apim nv show-secret

Gets the secret of an API Management Named Value.

Core GA
az apim nv update

Update an API Management Named Value.

Core GA
az apim nv wait

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

Core GA
az apim product

Manage Azure API Management Product's.

Core GA
az apim product api

Manage Azure API Management Product's APIs.

Core GA
az apim product api add

Add an API to the specified product.

Core GA
az apim product api check

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

Core GA
az apim product api delete

Deletes the specified API from the specified product.

Core GA
az apim product api list

Lists a collection of the APIs associated with a product.

Core GA
az apim product create

Creates a product.

Core GA
az apim product delete

Delete product.

Core GA
az apim product list

Lists a collection of products in the specified service instance.

Core GA
az apim product show

Gets the details of the product specified by its identifier.

Core GA
az apim product update

Update existing product details.

Core GA
az apim product wait

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

Core GA
az apim restore

Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.

Core GA
az apim show

Show details of an API Management service instance.

Core GA
az apim update

Update an API Management service instance.

Core GA
az apim wait

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

Core GA

az apim apply-network-updates

Update the API Management resource running in the virtual network to pick the updated network settings.

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

Examples

Update the virtual network settings of the API Management service instance

az apim apply-network-updates --name 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

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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

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.

--container-name --storage-account-container

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

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az apim check-name

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

az apim check-name --name

Required Parameters

--name -n

The name of the api management service instance.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az apim create

Create an API Management service instance.

az apim create --name
               --publisher-email
               --publisher-name
               --resource-group
               [--disable-gateway {false, true}]
               [--enable-client-certificate {false, true}]
               [--enable-managed-identity {false, true}]
               [--location]
               [--no-wait]
               [--public-network-access {false, true}]
               [--sku-capacity]
               [--sku-name {Basic, Consumption, Developer, Isolated, Premium, Standard}]
               [--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.

The name must be globally unique since it will be included as the gateway hostname like' https://my-api-servicename.azure-api.net'. See examples.

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

--disable-gateway

Disable gateway in the master region. Only valid for an Api Management service deployed in multiple locations.

Accepted values: false, true
--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. Only meant to be used for Consumption SKU Service.

Accepted values: false, true
Default value: False
--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.

Default value: False
--public-network-access

Whether or not public endpoint access is allowed for this API Management service. If set to true, private endpoints are the exclusive access method.

Accepted values: false, true
--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, Isolated, Premium, Standard
Default value: Developer
--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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az apim delete

Deletes an API Management service.

az apim delete --name
               --resource-group
               [--no-wait]
               [--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.

Default value: False
--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az apim list

List API Management service instances.

az apim list [--resource-group]

Optional Parameters

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az apim restore

Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.

az apim restore --backup-name
                --container-name
                --name
                --resource-group
                --storage-account-key
                --storage-account-name
                [--no-wait]

Examples

Restores a backup of the API Management service instance

az apim restore --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 restore.

--container-name --storage-account-container

The name of the storage account container used to retrieve the backup from.

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

The access key of the storage account used to retrieve the backup from.

--storage-account-name

The name of the storage account used to retrieve the backup from.

Optional Parameters

--no-wait

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az apim show

Show details of an API Management service instance.

az apim show --name
             --resource-group

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az apim update

Update an API Management service instance.

az apim update --name
               --resource-group
               [--add]
               [--disable-gateway {false, true}]
               [--enable-client-certificate {false, true}]
               [--enable-managed-identity {false, true}]
               [--force-string]
               [--no-wait]
               [--public-network-access {false, true}]
               [--publisher-email]
               [--publisher-name]
               [--remove]
               [--set]
               [--sku-capacity]
               [--sku-name {Basic, Consumption, Developer, Isolated, Premium, Standard}]
               [--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>.

Default value: []
--disable-gateway

Disable gateway in the master region. Only valid for an Api Management service deployed in multiple locations.

Accepted values: false, true
--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. Only meant to be used for Consumption SKU Service.

Accepted values: false, true
--force-string

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

Default value: False
--no-wait

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

Default value: False
--public-network-access

Whether or not public endpoint access is allowed for this API Management service. If set to true, private endpoints are the exclusive access method.

Accepted values: false, true
--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 <indexToRemove> OR --remove propertyToRemove.

Default value: []
--set

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

Default value: []
--sku-capacity

The number of deployed units of the SKU.

--sku-name

The sku of the api management instance.

Accepted values: Basic, Consumption, Developer, Isolated, Premium, Standard
--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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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]
             [--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'.

Default value: False
--custom

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

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

Default value: 30
--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.