az apim api operation
管理 Azure API 管理 API作。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
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 operation create
在 API 中创建一个新作。
az apim api operation create --api-id
--display-name
--method
--resource-group
--service-name
--url-template
[--description]
[--if-match]
[--operation-id]
[--params --template-parameters]
示例
使用多个参数在 API 中创建新作
az apim api operation create --resource-group MyResourceGroup --service-name MyServiceName --api-id MyApiId --url-template "/session/{param1}/{param2}" --method "GET" --display-name MyOperationName --description MyDescription --template-parameters name=param1 description=descriptionContent type=paramType required="true" --template-parameters name=param2 required="false" type="string"
必需参数
API 标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
Required. 作名称。
Required. 有效的 HTTP作方法。 典型的 Http 方法,如 GET、PUT、POST,但不仅限于它们。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
API 管理服务实例的名称。
标识此作的目标资源的相对 URL 模板。 可能包括参数。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
作的说明。 可能包括 HTML 格式标记。
实体的 ETag。
API 中的作标识符。 当前 API 管理服务实例中必须是唯一的。
URL 模板参数的集合。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 operation delete
删除 API 中的指定作。
az apim api operation delete --api-id
--operation-id
--resource-group
--service-name
[--if-match]
示例
删除 API 中的指定作。
az apim api operation delete --resource-group MyResourceGroup --service-name MyServiceName --api-id MyApiId --operation-id MyOperationId
必需参数
API 标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
API 中的作标识符。 当前 API 管理服务实例中必须是唯一的。
资源组的名称。 可以使用 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.
实体的 ETag。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 operation list
列出指定 API 的作的集合。
az apim api operation list --api-id
--resource-group
--service-name
示例
列出指定 API 的作的集合。
az apim api operation list --resource-group MyResourceGroup --service-name MyServiceName --api-id MyApiId
必需参数
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 operation show
获取由其标识符指定的 API作的详细信息。
az apim api operation show --api-id
--operation-id
--resource-group
--service-name
示例
获取由其标识符指定的 API作的详细信息。
az apim api operation show --resource-group MyResourceGroup --service-name MyServiceName --api-id MyApiId --operation-id MyOperationId
必需参数
API 标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
API 中的作标识符。 当前 API 管理服务实例中必须是唯一的。
资源组的名称。 可以使用 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 operation update
更新 API 中由其标识符指定的作的详细信息。
az apim api operation update --api-id
--operation-id
--resource-group
--service-name
[--add]
[--description]
[--display-name]
[--force-string]
[--if-match]
[--method]
[--remove]
[--set]
[--url-template]
示例
更新 API 中由其标识符指定的作的方法、显示名称、说明。
az apim api operation update --resource-group MyResourceGroup --service-name MyServiceName --api-id MyApiId --operation-id MyOperationId --method "PUT" --display-name NewDisplayName --description NewDescription
必需参数
API 标识符。 当前 API 管理服务实例中必须是唯一的。 非当前修订有;rev=n 作为后缀,其中 n 是修订号。
属性 | 值 |
---|---|
Parameter group: | API Arguments |
API 中的作标识符。 当前 API 管理服务实例中必须是唯一的。
资源组的名称。 可以使用 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 |
默认值: | [] |
作的说明。 可能包括 HTML 格式标记。
Required. 作名称。
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | False |
实体的 ETag。
Required. 有效的 HTTP作方法。 典型的 Http 方法,如 GET、PUT、POST,但不仅限于它们。
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
标识此作的目标资源的相对 URL 模板。 可能包括参数。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |