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

az functionapp plan

管理 Azure 函数的应用服务计划。

命令

名称 说明 类型 Status
az functionapp plan create

为 Azure 函数创建应用服务计划。

Core GA
az functionapp plan delete

删除应用服务计划。

Core GA
az functionapp plan list

列出应用服务计划。

Core GA
az functionapp plan show

获取资源组或一组资源组的应用服务计划。

Core GA
az functionapp plan update

更新 Azure 函数的应用服务计划。

Core GA

az functionapp plan create

为 Azure 函数创建应用服务计划。

az functionapp plan create --name
                           --resource-group
                           --sku
                           [--is-linux {false, true}]
                           [--location]
                           [--max-burst]
                           [--min-instances --number-of-workers]
                           [--tags]
                           [--zone-redundant]

示例

创建一个弹性高级应用服务计划,其突发功能最多为 10 个实例。

az functionapp plan create -g MyResourceGroup -n MyPlan --min-instances 1 --max-burst 10 --sku EP1

创建基本应用服务计划。

az functionapp plan create -g MyResourceGroup -n MyPlan --sku B1

为 Azure 函数创建应用服务计划。 (autogenerated)

az functionapp plan create --location westus2 --name MyPlan --number-of-workers 1 --resource-group MyResourceGroup --sku B1

必需参数

--name -n

应用服务计划的名称。

--resource-group -g

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

--sku

应用服务计划的 SKU。 例如,F1(免费)、D1(共享)、B1(基本小型)、B2(基本中型)、B3(基本大型)、S1(标准小型)、P1V2(高级 V2 小型)、I1(独立小型)、I2(独立中型)、I3(独立大)、K1(Kubernetes)。

可选参数

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

--is-linux

Linux 辅助角色上的主机函数应用。

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

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

--max-burst

计划的最大弹性辅助角色数。

--min-instances --number-of-workers

应用服务计划的辅助角色数。

--tags

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

--zone-redundant -z

启用区域冗余以实现高可用性。 创建计划后无法更改。 最小实例计数为 3。

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

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

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

显示此帮助消息并退出。

--only-show-errors

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

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

输出格式。

属性
默认值: 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 functionapp plan delete

删除应用服务计划。

az functionapp plan delete [--ids]
                           [--name]
                           [--resource-group]
                           [--subscription]
                           [--yes]

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name -n

应用服务计划的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

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

属性
Parameter group: Resource Id Arguments
--subscription

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

属性
Parameter group: Resource Id Arguments
--yes -y

不要提示确认。

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

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

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

显示此帮助消息并退出。

--only-show-errors

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

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

输出格式。

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

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

--verbose

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

属性
默认值: False

az functionapp plan list

列出应用服务计划。

az functionapp plan list [--resource-group]

示例

列出所有弹性高级 1 层应用服务计划。

az functionapp plan list --query "[?sku.tier=='EP1']"

可选参数

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

输出格式。

属性
默认值: 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 functionapp plan show

获取资源组或一组资源组的应用服务计划。

az functionapp plan show [--ids]
                         [--name]
                         [--resource-group]
                         [--subscription]

示例

获取资源组或一组资源组的应用服务计划。 (autogenerated)

az functionapp plan show --name MyAppServicePlan --resource-group MyResourceGroup

可选参数

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

--ids

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--name -n

应用服务计划的名称。

属性
Parameter group: Resource Id Arguments
--resource-group -g

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

属性
Parameter group: Resource Id Arguments
--subscription

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

属性
Parameter group: Resource Id Arguments
全局参数
--debug

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

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

显示此帮助消息并退出。

--only-show-errors

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

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

输出格式。

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

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

--verbose

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

属性
默认值: False

az functionapp plan update

更新 Azure 函数的应用服务计划。

az functionapp plan update [--add]
                           [--force-string]
                           [--ids]
                           [--max-burst]
                           [--min-instances --number-of-workers]
                           [--name]
                           [--remove]
                           [--resource-group]
                           [--set]
                           [--sku]
                           [--subscription]

示例

将应用服务计划更新为具有 20 个最大辅助角色的 EP2 SKU。

az functionapp plan update -g MyResourceGroup -n MyPlan --max-burst 20 --sku EP2

可选参数

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
默认值: []
--force-string

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

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

一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。

属性
Parameter group: Resource Id Arguments
--max-burst

计划的最大弹性辅助角色数。

--min-instances --number-of-workers

应用服务计划的辅助角色数。

--name -n

应用服务计划的名称。

属性
Parameter group: Resource Id Arguments
--remove

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

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

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

属性
Parameter group: Resource Id Arguments
--set

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

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

应用服务计划的 SKU。

--subscription

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

属性
Parameter group: Resource Id Arguments
全局参数
--debug

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

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

显示此帮助消息并退出。

--only-show-errors

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

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

输出格式。

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

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

--verbose

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

属性
默认值: False