az functionapp deployment config
管理函数应用的部署配置。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az functionapp deployment config set |
更新现有函数应用的部署配置。 |
Core | GA |
| az functionapp deployment config show |
获取函数应用的部署配置的详细信息。 |
Core | GA |
az functionapp deployment config set
更新现有函数应用的部署配置。
对 Blob 容器使用 --deployment-storage-* 或 --deployment-image 及其弹性消耗上的容器映像的身份验证参数。 映像部署与 az functionapp config container. 对于现有映像部署,可以单独更新映像或身份验证。 部署较新的映像时,请使用新的标记或摘要。
az functionapp deployment config set [--acquire-policy-token]
[--change-reference]
[--deployment-image]
[--deployment-image-auth-type --diat {Anonymous, Basic, SystemAssignedIdentity, UserAssignedIdentity}]
[--deployment-image-identity --dii]
[--deployment-image-password-setting --dips]
[--deployment-image-username-setting --dius]
[--deployment-storage-auth-type --dsat {StorageAccountConnectionString, SystemAssignedIdentity, UserAssignedIdentity}]
[--deployment-storage-auth-value --dsav]
[--deployment-storage-container-name --dscn]
[--deployment-storage-name --dsn]
[--ids]
[--name]
[--resource-group]
[--subscription]
示例
设置函数应用的部署存储。
az functionapp deployment config set --name MyFunctionApp --resource-group MyResourceGroup --deployment-storage-name MyStorageAccount --deployment-storage-container-name MyStorageContainer
设置函数应用的部署存储身份验证方法。
az functionapp deployment config set --name MyFunctionApp --resource-group MyResourceGroup --deployment-storage-auth-type userAssignedIdentity --deployment-storage-auth-value myAssignedId
运行公共容器映像(匿名身份验证)。
az functionapp deployment config set --name MyFunctionApp --resource-group MyResourceGroup --deployment-image mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0 --deployment-image-auth-type Anonymous
使用应用的系统分配标识摘要拉取容器映像。
az functionapp deployment config set --name MyFunctionApp --resource-group MyResourceGroup --deployment-image myregistry.azurecr.io/myimage@sha256:<digest> --deployment-image-auth-type SystemAssignedIdentity
使用用户分配的标识拉取容器映像。
az functionapp deployment config set --name MyFunctionApp --resource-group MyResourceGroup --deployment-image myregistry.azurecr.io/myimage:v1 --deployment-image-auth-type UserAssignedIdentity --deployment-image-identity /subscriptions/<subscription-id>/resourceGroups/MyResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyIdentity
使用存储在应用设置中的用户名和密码拉取容器映像(基本身份验证)。
az functionapp deployment config set --name MyFunctionApp --resource-group MyResourceGroup --deployment-image myregistry.azurecr.io/myimage:v1 --deployment-image-auth-type Basic --deployment-image-username-setting REGISTRY_USERNAME --deployment-image-password-setting REGISTRY_PASSWORD
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
弹性消耗应用的容器映像,由标记或摘要指定,例如 myregistry.azurecr.io/myimage:v1 或 myregistry.azurecr.io/myimage@sha256:<digest>。
| 属性 | 值 |
|---|---|
| 参数组: | Flex Registry Deployment Arguments |
平台如何向注册表进行身份验证:匿名(公共映像)、SystemAssignedIdentity、UserAssignedIdentity(需要 --deployment-image-identity)或基本(需要 --deployment-image-username-setting 和 --deployment-image-password-setting)。 CLI 不分配标识或授予注册表访问权限。
| 属性 | 值 |
|---|---|
| 参数组: | Flex Registry Deployment Arguments |
| 接受的值: | Anonymous, Basic, SystemAssignedIdentity, UserAssignedIdentity |
用于拉取映像的用户分配托管标识的资源 ID。 仅对 UserAssignedIdentity 有效。 保存为提供;CLI 不会创建、查找或分配它。
| 属性 | 值 |
|---|---|
| 参数组: | Flex Registry Deployment Arguments |
存储注册表密码的应用设置的名称。 仅对 Basic 有效。 传递应用设置名称,而不是密码。
| 属性 | 值 |
|---|---|
| 参数组: | Flex Registry Deployment Arguments |
存储注册表用户名的应用设置的名称。 仅对 Basic 有效。
| 属性 | 值 |
|---|---|
| 参数组: | Flex Registry Deployment Arguments |
部署存储帐户身份验证类型。
| 属性 | 值 |
|---|---|
| 接受的值: | StorageAccountConnectionString, SystemAssignedIdentity, UserAssignedIdentity |
部署存储帐户身份验证值。 对于用户分配的托管标识身份验证类型,这应该是用户分配的标识资源 ID。对于存储帐户连接字符串身份验证类型,应是包含存储帐户连接字符串的应用设置的名称。 对于系统分配的托管标识身份验证类型,此参数不适用,应留空。
部署存储帐户容器名称。
部署存储帐户名称。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
函数应用的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az functionapp deployment config show
获取函数应用的部署配置的详细信息。
对于注册表部署存储,显示映像引用和身份验证类型,以及用户分配的标识资源 ID 或保存基本凭据的应用设置的名称。 不会检索或显示凭据值。
az functionapp deployment config show [--ids]
[--name]
[--resource-group]
[--subscription]
示例
获取函数应用的部署配置的详细信息。
az functionapp deployment config show --name MyFunctionApp --resource-group MyResourceGroup
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
函数应用的名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |