az cdn endpoint rule action

命令群組 「cdn 端點規則」處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

管理端點的傳遞規則動作。

命令

名稱 Description 類型 狀態
az cdn endpoint rule action add

將動作新增至傳遞規則。

核心 預覽版
az cdn endpoint rule action remove

從傳遞規則移除動作。

核心 預覽版
az cdn endpoint rule action show

使用端點顯示傳遞規則。

核心 預覽版

az cdn endpoint rule action add

預覽

命令群組 「cdn 端點規則動作」處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

將動作新增至傳遞規則。

az cdn endpoint rule action add --action-name {CacheExpiration, CacheKeyQueryString, ModifyRequestHeader, ModifyResponseHeader, OriginGroupOverride, UrlRedirect, UrlRewrite}
                                --rule-name
                                [--cache-behavior {BypassCache, Override, SetIfMissing}]
                                [--cache-duration]
                                [--custom-fragment]
                                [--custom-hostname]
                                [--custom-path]
                                [--custom-querystring]
                                [--destination]
                                [--header-action {Append, Delete, Overwrite}]
                                [--header-name]
                                [--header-value]
                                [--ids]
                                [--name]
                                [--origin-group]
                                [--preserve-unmatched-path {false, true}]
                                [--profile-name]
                                [--query-parameters]
                                [--query-string-behavior {Exclude, ExcludeAll, Include, IncludeAll}]
                                [--redirect-protocol {Http, Https, MatchRequest}]
                                [--redirect-type {Found, Moved, PermanentRedirect, TemporaryRedirect}]
                                [--resource-group]
                                [--source-pattern]
                                [--subscription]

範例

新增重新導向動作。

az cdn endpoint rule action add -g group -n endpoint --profile-name profile --rule-name name --action-name "UrlRedirect" --redirect-protocol HTTPS --redirect-type Moved

新增快取到期動作

az cdn endpoint rule action add -g group -n endpoint --profile-name profile --rule-name name --action-name "CacheExpiration" --cache-behavior BypassCache

必要參數

--action-name

傳遞規則的動作名稱: https://docs.microsoft.com/en-us/azure/cdn/cdn-standard-rules-engine-actions

接受的值: CacheExpiration, CacheKeyQueryString, ModifyRequestHeader, ModifyResponseHeader, OriginGroupOverride, UrlRedirect, UrlRewrite
--rule-name

規則的名稱。

選擇性參數

--cache-behavior

要求的快取行為。

接受的值: BypassCache, Override, SetIfMissing
--cache-duration

需要快取內容的持續時間。 允許的格式為 [d.]hh:mm:ss。

--custom-fragment

要新增至重新導向 URL 的片段。

--custom-hostname

要重新導向的主機。 保留空白,以使用傳入主機作為目的地主機。

--custom-path

要重新導向的完整路徑。 路徑不可以是空的,而且必須以 /開頭。 保留空白,以使用傳入路徑作為目的地路徑。

--custom-querystring

要放在重新導向 URL 中的查詢字串集。 保留空白以保留傳入查詢字串。

--destination

要用於重寫的目的地路徑。

--header-action

要求的標頭動作。

接受的值: Append, Delete, Overwrite
--header-name

要修改的標頭名稱。

--header-value

標頭的值。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

CDN 端點的名稱。

--origin-group

會覆寫預設 OriginGroup 的 OriginGroup 名稱或識別碼。

--preserve-unmatched-path

如果為 True,來源模式之後的剩餘路徑將會附加至新的目的地路徑。

接受的值: false, true
--profile-name

資源群組內唯一的 CDN 設定檔名稱。

--query-parameters

查詢要包含或排除的參數(以逗號分隔)。

--query-string-behavior

要求的查詢字串行為。

接受的值: Exclude, ExcludeAll, Include, IncludeAll
--redirect-protocol

要用於重新導向的通訊協定。

接受的值: Http, Https, MatchRequest
--redirect-type

重新導向類型,規則會在重新導向流量時使用。

接受的值: Found, Moved, PermanentRedirect, TemporaryRedirect
--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--source-pattern

識別可能重寫之要求類型的要求 URI 模式。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az cdn endpoint rule action remove

預覽

命令群組 「cdn 端點規則動作」處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

從傳遞規則移除動作。

az cdn endpoint rule action remove --index
                                   --rule-name
                                   [--ids]
                                   [--name]
                                   [--profile-name]
                                   [--resource-group]
                                   [--subscription]

範例

移除第一個動作。

az cdn endpoint rule action remove -g group -n endpoint --profile-name profile --rule-name name --index 0

必要參數

--index

條件/動作的索引。

--rule-name

規則的名稱。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

CDN 端點的名稱。

--profile-name

資源群組內唯一的 CDN 設定檔名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az cdn endpoint rule action show

預覽

命令群組 「cdn 端點規則動作」處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

使用端點顯示傳遞規則。

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

範例

以端點顯示傳遞規則 asscociate。

az cdn endpoint rule action show -g group --profile-name profile-name -n endpoint

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

CDN 端點的名稱。

--profile-name

資源群組內唯一的 CDN 設定檔名稱。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 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

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。