你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az apim

管理 Azure API 管理服务。

命令

名称 说明 类型 Status
az apim api

管理 Azure API 管理 API。

Core GA
az apim api create

创建 API 管理 API。

Core GA
az apim api delete

删除 API 管理 API。

Core GA
az apim api export

导出 API 管理 API。

Core GA
az apim api import

导入 API 管理 API。

Core GA
az apim api list

列出 API 管理 API。

Core GA
az apim api operation

管理 Azure API 管理 API作。

Core GA
az apim api operation create

在 API 中创建一个新作。

Core GA
az apim api operation delete

删除 API 中的指定作。

Core GA
az apim api operation list

列出指定 API 的作的集合。

Core GA
az apim api operation show

获取由其标识符指定的 API作的详细信息。

Core GA
az apim api operation update

更新 API 中由其标识符指定的作的详细信息。

Core GA
az apim api release

管理 Azure API 管理 API 版本。

Core GA
az apim api release create

为 API 创建新版本。

Core GA
az apim api release delete

删除 API 中的指定版本。

Core GA
az apim api release list

列出 API 的所有版本。

Core GA
az apim api release show

返回 API 版本的详细信息。

Core GA
az apim api release update

更新由其标识符指定的 API 版本的详细信息。

Core GA
az apim api revision

管理 Azure API 管理 API 修订版。

Core GA
az apim api revision create

创建 API 修订。

Core GA
az apim api revision list

列出 API 的所有修订。

Core GA
az apim api schema

管理 Azure API 管理 API 架构。

Core GA
az apim api schema create

创建 API 管理 API 架构。

Core GA
az apim api schema delete

删除 API 管理 API 架构。

Core GA
az apim api schema get-etag

获取 API 管理 API 架构的 etag。

Core GA
az apim api schema list

列出 API 管理 API 架构。

Core GA
az apim api schema show

显示 API 管理 API 架构的详细信息。

Core GA
az apim api schema wait

将 CLI 置于等待状态,直到满足 apim API 架构的条件。

Core GA
az apim api show

显示 API 管理 API 的详细信息。

Core GA
az apim api update

更新 API 管理 API。

Core GA
az apim api versionset

管理 Azure API 管理 API 版本集。

Core GA
az apim api versionset create

创建 Api 版本集。

Core GA
az apim api versionset delete

删除特定的 API 版本集。

Core GA
az apim api versionset list

列出指定服务实例中的 API 版本集集合。

Core GA
az apim api versionset show

获取由标识符指定的 Api 版本集的详细信息。

Core GA
az apim api versionset update

更新由标识符指定的 Api VersionSet 的详细信息。

Core GA
az apim api wait

将 CLI 置于等待状态,直到满足 apim API 的条件。

Core GA
az apim apply-network-updates

更新虚拟网络中运行的 API 管理资源,以选取更新的网络设置。

Core GA
az apim backup

创建 API 管理服务到给定的 Azure 存储帐户的备份。 这是长时间运行的作,可能需要几分钟才能完成。

Core GA
az apim check-name

检查服务名称是否可供使用。

Core GA
az apim create

创建 API 管理服务实例。

Core GA
az apim delete

删除 API 管理服务。

Core GA
az apim deletedservice

管理软删除的 Azure API 管理服务。

Core GA
az apim deletedservice list

列出可用于取消删除给定订阅的所有软删除 Api 管理服务实例。

Core GA
az apim deletedservice purge

清除软删除的 Api 管理服务实例(删除它且没有取消删除的选项)。

Core GA
az apim deletedservice show

获取可用于按名称取消删除的软删除 Api 管理服务实例。

Core GA
az apim graphql

管理 Azure API 管理 GraphQL API。

Core GA
az apim graphql resolver

管理 Azure API 管理 GraphQL API 的解析程序。

Core GA
az apim graphql resolver create

在 GraphQL API 中创建新的解析程序或更新现有解析程序。

Core GA
az apim graphql resolver delete

在 GraphQL API 中删除指定的解析程序。

Core GA
az apim graphql resolver list

列出指定 GraphQL API 的解析程序集合。

Core GA
az apim graphql resolver policy

管理 Azure API 管理 GraphQL API 的解析程序策略。

Core GA
az apim graphql resolver policy create

为 GraphQL API 解析程序级别创建或更新策略配置。

Core GA
az apim graphql resolver policy delete

删除 GraphQL Api 解析程序上的策略配置。

Core GA
az apim graphql resolver policy list

获取 GraphQL API 解析程序级别的策略配置列表。

Core GA
az apim graphql resolver policy show

获取 GraphQL API 解析程序级别的策略配置。

Core GA
az apim graphql resolver show

获取由其标识符指定的 GraphQL API 解析程序的详细信息。

Core GA
az apim list

列出 API 管理服务实例。

Core GA
az apim nv

管理 Azure API 管理命名值。

Core GA
az apim nv create

创建 API 管理命名值。

Core GA
az apim nv delete

删除 API 管理命名值。

Core GA
az apim nv list

列出 API 管理命名值。

Core GA
az apim nv show

显示 API 管理命名值的详细信息。

Core GA
az apim nv show-secret

获取 API 管理命名值的机密。

Core GA
az apim nv update

更新 API 管理命名值。

Core GA
az apim nv wait

将 CLI 置于等待状态,直到满足 apim 命名值的条件。

Core GA
az apim product

管理 Azure API 管理产品。

Core GA
az apim product api

管理 Azure API 管理产品的 API。

Core GA
az apim product api add

将 API 添加到指定产品。

Core GA
az apim product api check

检查由标识符指定的 API 实体是否与 Product 实体相关联。

Core GA
az apim product api delete

从指定产品中删除指定的 API。

Core GA
az apim product api list

列出与产品关联的 API 的集合。

Core GA
az apim product create

创建产品。

Core GA
az apim product delete

Delete product.

Core GA
az apim product list

列出指定服务实例中的产品集合。

Core GA
az apim product show

获取由其标识符指定的产品的详细信息。

Core GA
az apim product update

更新现有产品详细信息。

Core GA
az apim product wait

将 CLI 置于等待状态,直到满足 apim 产品的条件。

Core GA
az apim restore

还原使用当前服务上的ApiManagementService_Backup作创建的 API 管理服务的备份。 这是长时间运行的作,可能需要几分钟才能完成。

Core GA
az apim show

显示 API 管理服务实例的详细信息。

Core GA
az apim update

更新 API 管理服务实例。

Core GA
az apim wait

将 CLI 置于等待状态,直到满足 apim 的条件。

Core GA

az apim apply-network-updates

更新虚拟网络中运行的 API 管理资源,以选取更新的网络设置。

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

示例

更新 API 管理服务实例的虚拟网络设置

az apim apply-network-updates --name MyApim -g MyResourceGroup

必需参数

--name -n

API 管理服务实例的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--location -l

Location. az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim backup

创建 API 管理服务到给定的 Azure 存储帐户的备份。 这是长时间运行的作,可能需要几分钟才能完成。

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

示例

创建 API 管理服务实例的备份

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

必需参数

--backup-name

要创建的备份文件的名称。

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

用于放置备份的存储帐户容器的名称。

--name -n

API 管理服务实例的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--storage-account-key

用于放置备份的存储帐户的访问密钥。

属性
Parameter group: Storage Arguments
--storage-account-name

用于放置备份的存储帐户的名称。

属性
Parameter group: Storage Arguments

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim check-name

检查服务名称是否可供使用。

az apim check-name --name

必需参数

--name -n

API 管理服务实例的名称。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim create

创建 API 管理服务实例。

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

示例

创建开发人员层 API 管理服务。

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

创建消耗层 API 管理服务。

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

必需参数

--name -n

要创建的服务实例的唯一名称。

该名称必须全局唯一,因为它将作为网关主机名包含,如“https://my-api-servicename.azure-api.net”。 See examples.

--publisher-email

要接收所有系统通知的电子邮件地址。

--publisher-name

组织的名称,用于开发人员门户和电子邮件通知。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--disable-gateway

禁用主区域中的网关。 仅适用于部署在多个位置的 Api 管理服务。

属性
接受的值: false, true
--enable-client-certificate

对网关的每个请求强制执行要显示的客户端证书,并使能够在网关上的策略中对证书进行身份验证。

属性
接受的值: false, true
--enable-managed-identity

为 API 管理服务创建托管标识以访问其他 Azure 资源。 仅用于消耗 SKU 服务。

属性
默认值: False
接受的值: false, true
--location -l

Location. az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--public-network-access

是否允许此 API 管理服务访问公共终结点。 如果设置为 true,则专用终结点是独占访问方法。

属性
接受的值: false, true
--sku-capacity

SKU 的已部署单位数。

属性
默认值: 1
--sku-name

API 管理实例的 SKU。

属性
默认值: Developer
接受的值: Basic, Consumption, Developer, Isolated, Premium, Standard
--tags

空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。

--virtual-network -v

虚拟网络类型。

属性
默认值: None
接受的值: External, Internal, None
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim delete

删除 API 管理服务。

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

示例

删除 API 管理服务。

az apim delete -n MyApim -g MyResourceGroup

必需参数

--name -n

API 管理服务实例的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--yes -y

不要提示确认。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim list

列出 API 管理服务实例。

az apim list [--resource-group]

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim restore

还原使用当前服务上的ApiManagementService_Backup作创建的 API 管理服务的备份。 这是长时间运行的作,可能需要几分钟才能完成。

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

示例

还原 API 管理服务实例的备份

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

必需参数

--backup-name

要还原的备份文件的名称。

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

用于从中检索备份的存储帐户容器的名称。

--name -n

API 管理服务实例的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--storage-account-key

用于从中检索备份的存储帐户的访问密钥。

属性
Parameter group: Storage Arguments
--storage-account-name

用于从中检索备份的存储帐户的名称。

属性
Parameter group: Storage Arguments

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim show

显示 API 管理服务实例的详细信息。

az apim show --name
             --resource-group

必需参数

--name -n

API 管理服务实例的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim update

更新 API 管理服务实例。

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

必需参数

--name -n

API 管理服务实例的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>

属性
Parameter group: Generic Update Arguments
默认值: []
--disable-gateway

禁用主区域中的网关。 仅适用于部署在多个位置的 Api 管理服务。

属性
接受的值: false, true
--enable-client-certificate

对网关的每个请求强制执行要显示的客户端证书,并使能够在网关上的策略中对证书进行身份验证。

属性
接受的值: false, true
--enable-managed-identity

为 API 管理服务创建托管标识以访问其他 Azure 资源。 仅用于消耗 SKU 服务。

属性
接受的值: false, true
--force-string

使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。

属性
Parameter group: Generic Update Arguments
默认值: False
--no-wait

不等待长时间运行的操作完成。

属性
默认值: False
--public-network-access

是否允许此 API 管理服务访问公共终结点。 如果设置为 true,则专用终结点是独占访问方法。

属性
接受的值: false, true
--publisher-email

要接收所有系统通知的电子邮件地址。

--publisher-name

组织的名称,用于开发人员门户和电子邮件通知。

--remove

从列表中删除属性或元素。 示例: --remove property.list <indexToRemove> OR --remove propertyToRemove.

属性
Parameter group: Generic Update Arguments
默认值: []
--set

通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>

属性
Parameter group: Generic Update Arguments
默认值: []
--sku-capacity

SKU 的已部署单位数。

--sku-name

API 管理实例的 SKU。

属性
接受的值: Basic, Consumption, Developer, Isolated, Premium, Standard
--tags

空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。

--virtual-network -v

虚拟网络类型。

属性
接受的值: External, Internal, None
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az apim wait

将 CLI 置于等待状态,直到满足 apim 的条件。

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

示例

将 CLI 置于等待状态,直到满足 apim 的条件。 (autogenerated)

az apim wait --created --name MyApim --resource-group MyResourceGroup

必需参数

--name -n

API 管理服务实例的名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

等待在“Succeeded”中使用“provisioningState”创建。

属性
Parameter group: Wait Condition Arguments
默认值: False
--custom

等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

属性
Parameter group: Wait Condition Arguments
--deleted

等到删除为止。

属性
Parameter group: Wait Condition Arguments
默认值: False
--exists

等待资源存在。

属性
Parameter group: Wait Condition Arguments
默认值: False
--interval

轮询间隔(以秒为单位)。

属性
Parameter group: Wait Condition Arguments
默认值: 30
--timeout

最大等待(以秒为单位)。

属性
Parameter group: Wait Condition Arguments
默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

属性
Parameter group: Wait Condition Arguments
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False