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

az afd origin

管理指定源组中的源。

命令

名称 说明 类型 状态
az afd origin create

在指定的源组中创建新源。

核心 GA
az afd origin delete

删除源组中的现有源。

核心 GA
az afd origin list

列出源组中的所有现有源。

核心 GA
az afd origin show

获取源组中的现有源。

核心 GA
az afd origin update

更新指定源组中的新源。

核心 GA
az afd origin wait

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

核心 GA

az afd origin create

在指定的源组中创建新源。

az afd origin create --name
                     --origin-group-name
                     --profile-name
                     --resource-group
                     [--enable-private-link {0, 1, f, false, n, no, t, true, y, yes}]
                     [--enabled-state {Disabled, Enabled}]
                     [--enforce-certificate-name-check {0, 1, f, false, n, no, t, true, y, yes}]
                     [--host-name]
                     [--http-port]
                     [--https-port]
                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                     [--origin-host-header]
                     [--priority]
                     [--private-link-location]
                     [--private-link-request-message]
                     [--private-link-resource]
                     [--private-link-sub-resource-type]
                     [--weight]

示例

创建常规源

az afd origin create -g group --host-name example.contoso.com --profile-name profile --origin-group-name originGroup --origin-name origin1 --origin-host-header example.contoso.com --priority 1 --weight 500 --enabled-state Enabled --http-port 80 --https-port 443 - name: Create a private link origin

创建专用链接源

az afd origin create -g group --host-name example.contoso.com --profile-name profile --origin-group-name originGroup --origin-name origin1 --origin-host-header example.contoso.com --priority 1 --weight 500 --enabled-state Enabled --http-port 80 --https-port 443 --private-link-resource /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group/providers/Microsoft.Storage/storageAccounts/plstest --private-link-location EastUS --private-link-request-message 'Please approve this request' --private-link-sub-resource-type table

必需参数

--name --origin-name -n

配置文件中唯一的源的名称。

--origin-group-name

在配置文件中唯一的源组的名称。

--profile-name

Azure Front Door Standard 或 Azure Front Door 高级版配置文件的名称,该配置文件在资源组中是唯一的。

--resource-group -g

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

可选参数

--enable-private-link

指示是否在该源上连接专用链接。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--enabled-state

是否允许针对在 backendPools 下定义的后端进行运行状况探测。 只有在单个启用的后端池中存在单个启用的后端时,才能禁用运行状况探测。

接受的值: Disabled, Enabled
--enforce-certificate-name-check

是否在源级别启用证书名称检查。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
默认值: True
--host-name

源的地址。 支持域名、IPv4 地址和 IPv6 地址。这应该在终结点中的所有源中是唯一的。

--http-port

HTTP 端口的值。 必须介于 1 和 65535 之间。

默认值: 80
--https-port

HTTPS 端口的值。 必须介于 1 和 65535 之间。

默认值: 443
--no-wait

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

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--origin-host-header

随每个请求发送到源的主机标头值。 如果将此项留空,则请求主机名将确定此值。 Azure Front Door 源(例如 Web 应用、Blob 存储 和 云服务)默认要求此主机标头值与源主机名匹配。 这会替代终结点上定义的主机标头。

--priority

给定源组中用于负载均衡的源优先级。 如果优先级较低的源正常,则不会使用更高的优先级进行负载均衡。必须介于 1 和 5 之间。

--private-link-location

将使用专用链接连接到的源位置。

--private-link-request-message

向专用链接请求的审批者显示的消息。

--private-link-resource

将使用专用链接连接到的源的资源 ID。

--private-link-sub-resource-type

将使用专用链接连接到的源的子资源类型。可以使用“az network private-link-resource list”获取支持的子资源类型。

--weight

给定源组中的源的权重,用于负载均衡。 必须介于 1 和 1000 之间。

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az afd origin delete

删除源组中的现有源。

az afd origin delete [--ids]
                     [--name]
                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                     [--origin-group-name]
                     [--profile-name]
                     [--resource-group]
                     [--subscription]
                     [--yes]

可选参数

--ids

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

--name --origin-name -n

在配置文件中唯一的源的名称。

--no-wait

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

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--origin-group-name

在配置文件中唯一的源组的名称。

--profile-name

Azure Front Door Standard 或 Azure Front Door 高级版配置文件的名称,该配置文件在资源组中是唯一的。

--resource-group -g

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

--subscription

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

--yes -y

不提示确认。

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

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az afd origin list

列出源组中的所有现有源。

az afd origin list --origin-group-name
                   --profile-name
                   --resource-group
                   [--max-items]
                   [--next-token]

必需参数

--origin-group-name

在配置文件中唯一的源组的名称。

--profile-name

Azure Front Door Standard 或 Azure Front Door 高级版配置文件的名称,该配置文件在资源组中是唯一的。

--resource-group -g

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

可选参数

--max-items

命令输出中要返回的项总数。 如果可用的项总数大于指定的值,则会在命令的输出中提供令牌。 若要恢复分页,请在后续命令的参数中 --next-token 提供令牌值。

--next-token

用于指定开始分页的位置的令牌。 这是先前截断的响应中的令牌值。

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az afd origin show

获取源组中的现有源。

az afd origin show [--ids]
                   [--name]
                   [--origin-group-name]
                   [--profile-name]
                   [--resource-group]
                   [--subscription]

可选参数

--ids

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

--name --origin-name -n

在配置文件中唯一的源的名称。

--origin-group-name

在配置文件中唯一的源组的名称。

--profile-name

Azure Front Door Standard 或 Azure Front Door 高级版配置文件的名称,该配置文件在资源组中是唯一的。

--resource-group -g

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

--subscription

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

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az afd origin update

更新指定源组中的新源。

az afd origin update [--add]
                     [--enable-private-link {0, 1, f, false, n, no, t, true, y, yes}]
                     [--enabled-state {Disabled, Enabled}]
                     [--enforce-certificate-name-check {0, 1, f, false, n, no, t, true, y, yes}]
                     [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                     [--host-name]
                     [--http-port]
                     [--https-port]
                     [--ids]
                     [--name]
                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                     [--origin-group-name]
                     [--origin-host-header]
                     [--priority]
                     [--private-link-location]
                     [--private-link-request-message]
                     [--private-link-resource]
                     [--private-link-sub-resource-type]
                     [--profile-name]
                     [--remove]
                     [--resource-group]
                     [--set]
                     [--subscription]
                     [--weight]

示例

更新指定源的主机标头和优先级。

az afd origin update -g group --host-name example.contoso.com --profile-name profile --origin-group-name originGroup --origin-name origin1 --origin-host-header example.contoso.com --priority 3

禁用源的专用链接。

az afd origin update -g group --host-name example.contoso.com --profile-name profile --origin-group-name originGroup --origin-name origin1 --enable-private-link False

可选参数

--add

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

--enable-private-link

指示是否在该源上连接专用链接。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--enabled-state

是否允许针对在 backendPools 下定义的后端进行运行状况探测。 只有在单个启用的后端池中存在单个启用的后端时,才能禁用运行状况探测。

接受的值: Disabled, Enabled
--enforce-certificate-name-check

是否在源级别启用证书名称检查。

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--force-string

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

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--host-name

源的地址。 支持域名、IPv4 地址和 IPv6 地址。这应该在终结点中的所有源中是唯一的。

--http-port

HTTP 端口的值。 必须介于 1 和 65535 之间。

--https-port

HTTPS 端口的值。 必须介于 1 和 65535 之间。

--ids

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

--name --origin-name -n

在配置文件中唯一的源的名称。

--no-wait

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

接受的值: 0, 1, f, false, n, no, t, true, y, yes
--origin-group-name

在配置文件中唯一的源组的名称。

--origin-host-header

随每个请求发送到源的主机标头值。 如果将此项留空,则请求主机名将确定此值。 Azure Front Door 源(例如 Web 应用、Blob 存储 和 云服务)默认要求此主机标头值与源主机名匹配。 这会替代终结点上定义的主机标头。

--priority

给定源组中用于负载均衡的源优先级。 如果优先级较低的源正常,则不会使用更高的优先级进行负载均衡。必须介于 1 和 5 之间。

--private-link-location

将使用专用链接连接到的源位置。

--private-link-request-message

向专用链接请求的审批者显示的消息。

--private-link-resource

将使用专用链接连接到的源的资源 ID。

--private-link-sub-resource-type

将使用专用链接连接到的源的子资源类型。可以使用“az network private-link-resource list”获取支持的子资源类型。

--profile-name

Azure Front Door Standard 或 Azure Front Door 高级版配置文件的名称,该配置文件在资源组中是唯一的。

--remove

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

--resource-group -g

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

--set

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

--subscription

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

--weight

给定源组中的源的权重,用于负载均衡。 必须介于 1 和 1000 之间。

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az afd origin wait

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

az afd origin wait [--created]
                   [--custom]
                   [--deleted]
                   [--exists]
                   [--ids]
                   [--interval]
                   [--name]
                   [--origin-group-name]
                   [--profile-name]
                   [--resource-group]
                   [--subscription]
                   [--timeout]
                   [--updated]

可选参数

--created

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

默认值: False
--custom

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

--deleted

等到删除为止。

默认值: False
--exists

等待资源存在。

默认值: False
--ids

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

--interval

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

默认值: 30
--name --origin-name -n

在配置文件中唯一的源的名称。

--origin-group-name

在配置文件中唯一的源组的名称。

--profile-name

Azure Front Door Standard 或 Azure Front Door 高级版配置文件的名称,该配置文件在资源组中是唯一的。

--resource-group -g

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

--subscription

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

--timeout

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

默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

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

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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