az apim api
管理 Azure API 管理 API。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
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 api create
创建 API 管理 API。
az apim api create --api-id
--display-name
--path
--resource-group
--service-name
[--api-type {graphql, http, soap, websocket}]
[--authorization-scope]
[--authorization-server-id]
[--bearer-token-sending-methods]
[--description]
[--no-wait]
[--open-id-provider-id]
[--protocols {http, https, ws, wss}]
[--service-url]
[--subscription-key-header-name]
[--subscription-key-query-param-name]
[--subscription-key-required]
[--subscription-required {false, true}]
示例
创建基本 API。
az apim api create --service-name MyApim -g MyResourceGroup --api-id MyApi --path '/myapi' --display-name 'My API'
必需参数
要创建的 API 的唯一名称。
API 修订标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
要创建的 API 的显示名称。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
API 的路径。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
API 管理服务实例的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
API 的类型。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
接受的值: | graphql, http, soap, websocket |
指定 OAuth作范围。
指定 OAuth 授权服务器 ID。
指定持有者令牌的发送方法。
API 的说明。 可能包括 HTML 格式标记。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
指定身份验证设置中的 openid。
描述可以调用此 API 中的作的协议。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
接受的值: | http, https, ws, wss |
实现此 API 的后端服务的绝对 URL。 长度不能超过 2000 个字符。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
指定订阅密钥标头名称。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
指定订阅密钥查询字符串参数名称。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
指定在调用此 API 期间是否需要订阅密钥,true - API 仅包含在关闭的产品中,false - API 仅包含在开放产品中,null - 产品混合使用。
如果为 true,则 API 需要请求的订阅密钥。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
默认值: | False |
接受的值: | false, true |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az apim api delete
删除 API 管理 API。
az apim api delete --api-id
--resource-group
--service-name
[--delete-revisions]
[--if-match]
[--no-wait]
[--yes]
必需参数
API 标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
API 管理服务实例的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
删除 Api 的所有修订。
实体的 ETag。
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az apim api export
导出 API 管理 API。
az apim api export --api-id
--ef --export-format {OpenApiJsonFile, OpenApiJsonUrl, OpenApiYamlFile, OpenApiYamlUrl, SwaggerFile, SwaggerUrl, WadlFile, WadlUrl, WsdlFile, WsdlUrl}
--resource-group
--service-name
[--file-path]
示例
将 API 管理 API 导出到文件或返回包含导出链接的响应。
az apim api export -g MyResourceGroup --service-name MyApim --api-id MyApi --export-format OpenApiJson --file-path path
必需参数
API 标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。 正则表达式模式: ^[^*#&+:<>?]+$.
属性 | 值 |
---|---|
Parameter group: | API Arguments |
指定导出 API 的格式。
属性 | 值 |
---|---|
接受的值: | OpenApiJsonFile, OpenApiJsonUrl, OpenApiYamlFile, OpenApiYamlUrl, SwaggerFile, SwaggerUrl, WadlFile, WadlUrl, WsdlFile, WsdlUrl |
资源组的名称。 名称不区分大小写。
API 管理服务实例的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指定要导出 API 的文件路径。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az apim api import
导入 API 管理 API。
az apim api import --path
--resource-group
--service-name
--specification-format {GraphQL, OpenApi, OpenApiJson, Swagger, Wadl, Wsdl}
[--api-id]
[--api-revision]
[--api-type {graphql, http, soap, websocket}]
[--api-version]
[--api-version-set-id]
[--description]
[--display-name]
[--no-wait]
[--protocols {http, https, ws, wss}]
[--service-url]
[--soap-api-type]
[--specification-path]
[--specification-url]
[--subscription-key-header-name]
[--subscription-key-query-param-name]
[--subscription-required {false, true}]
[--wsdl-endpoint-name]
[--wsdl-service-name]
示例
从文件或 URL 导入 API 管理 API
az apim api import -g MyResourceGroup --service-name MyApim --path MyApi --specification-url https://MySpecificationURL --specification-format OpenApiJson
必需参数
Required. 相对 URL 唯一标识此 API 及其所有资源路径在 API 管理服务实例中。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
API 管理服务实例的名称。
指定导入的 API 的格式。
属性 | 值 |
---|---|
接受的值: | GraphQL, OpenApi, OpenApiJson, Swagger, Wadl, Wsdl |
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
API 标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
描述 API 的修订。 如果未提供任何值,则会创建默认修订版 1。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
API 的类型。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
接受的值: | graphql, http, soap, websocket |
描述 Api 的版本。 如果将版本添加到非版本控制 API,则会自动创建原始版本,并在默认 URL 上做出响应。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
描述要用于 API 的版本集。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
API 的说明。 可能包括 HTML 格式标记。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
此 API 的显示名称。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
描述可以调用此 API 中的作的协议(一个或多个)。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
接受的值: | http, https, ws, wss |
实现此 API 的后端服务的绝对 URL。 长度不能超过 2000 个字符。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
文件格式为 WSDL 时 API 的类型。
指定用于导入 API 的文件路径。
指定用于导入 API 的 URL。
指定订阅密钥标头名称。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
指定订阅密钥查询字符串参数名称。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
如果为 true,则 API 需要请求的订阅密钥。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
接受的值: | false, true |
要导入的 WSDL 终结点(端口)的本地名称。
要导入的 WSDL 服务的本地名称。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az apim api list
列出 API 管理 API。
az apim api list --resource-group
--service-name
[--filter-display-name]
[--skip]
[--top]
必需参数
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
API 管理服务实例的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
按 displayName 筛选 API。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
要跳过的记录数。
要返回的记录数。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az apim api show
显示 API 管理 API 的详细信息。
az apim api show --api-id
--resource-group
--service-name
必需参数
API 标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
API 管理服务实例的名称。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az apim api update
更新 API 管理 API。
az apim api update --api-id
--resource-group
--service-name
[--add]
[--api-type {graphql, http, soap, websocket}]
[--description]
[--display-name]
[--force-string]
[--if-match]
[--no-wait]
[--path]
[--protocols {http, https, ws, wss}]
[--remove]
[--service-url]
[--set]
[--subscription-key-header-name]
[--subscription-key-query-param-name]
[--subscription-required {false, true}]
[--tags]
示例
创建基本 API。
az apim api update --service-name MyApim -g MyResourceGroup --api-id MyApi --description foo
必需参数
要创建的 API 的唯一名称。
API 修订标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
API 管理服务实例的名称。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
API 的类型。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
接受的值: | graphql, http, soap, websocket |
API 的说明。 可能包括 HTML 格式标记。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
API 名称。 长度必须为 1 到 300 个字符。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | False |
实体的 ETag。 创建实体时不需要,但在更新实体时是必需的。 默认值为无。
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
Required. 相对 URL 唯一标识此 API 及其所有资源路径在 API 管理服务实例中。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
描述可以调用此 API 中的作的协议。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
接受的值: | http, https, ws, wss |
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
实现此 API 的后端服务的绝对 URL。 长度不能超过 2000 个字符。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
指定订阅密钥标头名称。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
指定订阅密钥查询字符串参数名称。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
如果为 true,则 API 需要请求的订阅密钥。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
接受的值: | false, true |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az apim api wait
将 CLI 置于等待状态,直到满足 apim API 的条件。
az apim api wait --api-id
--name
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--timeout]
[--updated]
示例
将 CLI 置于等待状态,直到满足 apim API 的条件。 (autogenerated)
az apim api wait --created --api-id MyApi --name MyApim --resource-group MyResourceGroup
必需参数
API 修订标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。 Required.
API 管理服务实例的名称。
资源组的名称。 可以使用 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.
等待在“Succeeded”中使用“provisioningState”创建。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
等到删除为止。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
等待资源存在。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
轮询间隔(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 30 |
最大等待(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 3600 |
等到 provisioningState 更新为“Succeeded”。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |