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

az cdn origin

列出或显示与 CDN 终结点相关的现有源。

命令

名称 说明 类型 Status
az cdn origin create

在指定的终结点内创建新源。

Core GA
az cdn origin delete

删除终结点中的现有源。

Core GA
az cdn origin list

列出终结点中的所有现有源。

Core GA
az cdn origin show

获取终结点中的现有源。

Core GA
az cdn origin update

更新指定终结点中的新源。

Core GA
az cdn origin wait

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

Core GA

az cdn origin create

在指定的终结点内创建新源。

az cdn origin create --endpoint-name
                     --name --origin-name
                     --profile-name
                     --resource-group
                     [--disabled {0, 1, f, false, n, no, t, true, y, yes}]
                     [--enabled {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-alias]
                     [--private-link-approval-message]
                     [--private-link-location]
                     [--private-link-resource-id]
                     [--weight]

示例

创建其他源

az cdn origin create -g group --host-name example.contoso.com --profile-name profile --endpoint-name endpoint -n origin --host-name example.contoso.com --origin-host-header example.contoso.com --http-port 80 --https-port 443

创建专用源

az cdn origin create -g group --host-name example.contoso.com --profile-name profile --endpoint-name endpoint -n origin --http-port 80 --https-port 443 --private-link-resource-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group/providers/Microsoft.Network/privateLinkServices/pls --private-link-location EastUS --private-link-approval-message 'Please approve this request'

必需参数

--endpoint-name

全局唯一的配置文件下的终结点的名称。

--name --origin-name -n

终结点中唯一的源的名称。

--profile-name

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

--resource-group -g

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--disabled

不要使用源进行负载均衡。

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

为负载均衡启用源。

属性
参数组: Properties Arguments
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--host-name

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

属性
参数组: Properties Arguments
--http-port

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

属性
参数组: Properties Arguments
--https-port

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

属性
参数组: Properties Arguments
--no-wait

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

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

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

属性
参数组: Properties Arguments
--priority

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

属性
参数组: Properties Arguments
--private-link-alias

专用链接资源的别名。 填充此可选字段表示此源为“Private”。

属性
参数组: Properties Arguments
--private-link-approval-message -m

要包含在审批请求中以连接到专用链接的自定义消息。

属性
参数组: Properties Arguments
--private-link-location -l

专用链接资源的位置。 仅当填充了“privateLinkResourceId”时才是必需的。

属性
参数组: Properties Arguments
--private-link-resource-id -p

专用链接资源的资源 ID。 填充此可选字段表示此后端为“专用”。

属性
参数组: Properties Arguments
--weight

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

属性
参数组: Properties Arguments
全局参数
--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 cdn origin delete

删除终结点中的现有源。

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--endpoint-name

全局唯一的配置文件下的终结点的名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--name --origin-name -n

终结点中唯一的源的名称。

属性
参数组: Resource Id Arguments
--no-wait

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

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

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

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: 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 cdn origin list

列出终结点中的所有现有源。

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

必需参数

--endpoint-name

全局唯一的配置文件下的终结点的名称。

--profile-name

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

--resource-group -g

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--max-items

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

属性
参数组: Pagination Arguments
--next-token

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

属性
参数组: Pagination Arguments
全局参数
--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 cdn origin show

获取终结点中的现有源。

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--endpoint-name

全局唯一的配置文件下的终结点的名称。

属性
参数组: Resource Id Arguments
--ids

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

属性
参数组: Resource Id Arguments
--name --origin-name -n

终结点中唯一的源的名称。

属性
参数组: Resource Id Arguments
--profile-name

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

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: 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 cdn origin update

更新指定终结点中的新源。

az cdn origin update [--add]
                     [--disabled {0, 1, f, false, n, no, t, true, y, yes}]
                     [--enabled {0, 1, f, false, n, no, t, true, y, yes}]
                     [--endpoint-name]
                     [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                     [--host-name]
                     [--http-port]
                     [--https-port]
                     [--ids]
                     [--name --origin-name]
                     [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                     [--origin-host-header]
                     [--priority]
                     [--private-link-alias]
                     [--private-link-approval-message]
                     [--private-link-location]
                     [--private-link-resource-id]
                     [--profile-name]
                     [--remove]
                     [--resource-group]
                     [--set]
                     [--subscription]
                     [--weight]

示例

更新源

az cdn origin update -g group --profile-name profile --endpoint-name endpoint -n origin --http-port 80 --https-port 443 --priority 3 --weight 500 --host-name example.contoso.com

禁用源

az cdn origin update -g group --profile-name profile --endpoint-name endpoint -n origin --disabled

将源连接到专用链接服务

az cdn origin update -g group --profile-name profile --endpoint-name endpoint -n origin --http-port 80 --https-port 443 --private-link-resource-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group/providers/Microsoft.Network/privateLinkServices/pls --private-link-location EastUS --private-link-approval-message 'Please approve this request'

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--add

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

属性
参数组: Generic Update Arguments
--disabled

不要使用源进行负载均衡。

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

为负载均衡启用源。

属性
参数组: Properties Arguments
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--endpoint-name

全局唯一的配置文件下的终结点的名称。

属性
参数组: Resource Id Arguments
--force-string

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

属性
参数组: Generic Update Arguments
接受的值: 0, 1, f, false, n, no, t, true, y, yes
--host-name

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

属性
参数组: Properties Arguments
--http-port

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

属性
参数组: Properties Arguments
--https-port

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

属性
参数组: Properties Arguments
--ids

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

属性
参数组: Resource Id Arguments
--name --origin-name -n

终结点中唯一的源的名称。

属性
参数组: Resource Id Arguments
--no-wait

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

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

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

属性
参数组: Properties Arguments
--priority

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

属性
参数组: Properties Arguments
--private-link-alias

专用链接资源的别名。 填充此可选字段表示此源为“Private”。

属性
参数组: Properties Arguments
--private-link-approval-message -m

要包含在审批请求中以连接到专用链接的自定义消息。

属性
参数组: Properties Arguments
--private-link-location -l

专用链接资源的位置。 仅当填充了“privateLinkResourceId”时才是必需的。

属性
参数组: Properties Arguments
--private-link-resource-id -p

专用链接资源的资源 ID。 填充此可选字段表示此后端为“专用”。

属性
参数组: Properties Arguments
--profile-name

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

属性
参数组: Resource Id Arguments
--remove

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

属性
参数组: Generic Update Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--set

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

属性
参数组: Generic Update Arguments
--subscription

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

属性
参数组: Resource Id Arguments
--weight

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

属性
参数组: Properties 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 cdn origin wait

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

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

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--created

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

属性
参数组: Wait Condition Arguments
默认值: False
--custom

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

属性
参数组: Wait Condition Arguments
--deleted

等到删除为止。

属性
参数组: Wait Condition Arguments
默认值: False
--endpoint-name

全局唯一的配置文件下的终结点的名称。

属性
参数组: Resource Id Arguments
--exists

等待资源存在。

属性
参数组: Wait Condition Arguments
默认值: False
--ids

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

属性
参数组: Resource Id Arguments
--interval

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

属性
参数组: Wait Condition Arguments
默认值: 30
--name --origin-name -n

终结点中唯一的源的名称。

属性
参数组: Resource Id Arguments
--profile-name

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

属性
参数组: Resource Id Arguments
--resource-group -g

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

属性
参数组: Resource Id Arguments
--subscription

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

属性
参数组: Resource Id Arguments
--timeout

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

属性
参数组: Wait Condition Arguments
默认值: 3600
--updated

等到 provisioningState 更新为“Succeeded”。

属性
参数组: Wait Condition Arguments
默认值: 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