az storage account blob-service-properties

管理記憶體帳戶 Blob 服務的屬性。

命令

名稱 Description 類型 狀態
az storage account blob-service-properties cors-rule

管理記憶體帳戶 Blob 服務屬性的跨原始來源資源分享 (CORS) 規則。

核心 GA
az storage account blob-service-properties cors-rule add

新增記憶體帳戶的 CORS 規則。

核心 GA
az storage account blob-service-properties cors-rule clear

清除記憶體帳戶的所有 CORS 規則。

核心 GA
az storage account blob-service-properties cors-rule list

列出記憶體帳戶 Blob 服務屬性的所有 CORS 規則。

核心 GA
az storage account blob-service-properties show

顯示記憶體帳戶 Blob 服務的屬性。

核心 GA
az storage account blob-service-properties update

更新記憶體帳戶 Blob 服務的屬性。

核心 GA

az storage account blob-service-properties show

顯示記憶體帳戶 Blob 服務的屬性。

顯示記憶體帳戶 Blob 服務的屬性,包括 儲存體分析 和 CORS(跨原始來源資源分享)規則的屬性。

az storage account blob-service-properties show --account-name
                                                [--resource-group]

範例

在資源群組 'MyResourceGroup' 中顯示記憶體帳戶 'mystorageaccount' 的屬性。

az storage account blob-service-properties show -n mystorageaccount -g MyResourceGroup

必要參數

--account-name -n

儲存體帳戶名稱。

選擇性參數

--resource-group -g

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

全域參數
--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 storage account blob-service-properties update

更新記憶體帳戶 Blob 服務的屬性。

更新記憶體帳戶 Blob 服務的屬性,包括 儲存體分析 和 CORS(跨原始來源資源分享)規則的屬性。

az storage account blob-service-properties update --account-name
                                                  [--add]
                                                  [--change-feed-days]
                                                  [--container-days]
                                                  [--container-retention {false, true}]
                                                  [--default-service-version]
                                                  [--delete-retention-days]
                                                  [--enable-change-feed {false, true}]
                                                  [--enable-delete-retention {false, true}]
                                                  [--enable-last-access-tracking {false, true}]
                                                  [--enable-restore-policy {false, true}]
                                                  [--enable-versioning {false, true}]
                                                  [--force-string]
                                                  [--remove]
                                                  [--resource-group]
                                                  [--restore-days]
                                                  [--set]

範例

啟用變更摘要,並將資源群組 'myresourcegroup' 中記憶體帳戶 'mystorageaccount' 的變更摘要保留天數設定為無限。

az storage account blob-service-properties update --enable-change-feed true -n mystorageaccount -g myresourcegroup

啟用變更摘要,並將資源群組 'myresourcegroup' 中記憶體帳戶 'mystorageaccount' 的變更摘要保留天數設定為 100。

az storage account blob-service-properties update --enable-change-feed --change-feed-days 100 -n mystorageaccount -g myresourcegroup

停用資源群組 'myresourcegroup' 中記憶體帳戶 'mystorageaccount' 的變更摘要。

az storage account blob-service-properties update --enable-change-feed false -n mystorageaccount -g myresourcegroup

啟用刪除保留原則,並將資源群組 'myresourcegroup' 中記憶體帳戶 'mystorageaccount' 的刪除保留天數設定為 100。

az storage account blob-service-properties update --enable-delete-retention true --delete-retention-days 100 -n mystorageaccount -g myresourcegroup

在資源群組 'myresourcegroup' 中啟用記憶體帳戶 'mystorageaccount' 的版本設定。

az storage account blob-service-properties update --enable-versioning -n mystorageaccount -g myresourcegroup

設定記憶體帳戶 'mystorageaccount' 傳入要求的預設版本。

az storage account blob-service-properties update --default-service-version 2020-04-08 -n mystorageaccount -g myresourcegroup

必要參數

--account-name -n

儲存體帳戶名稱。

選擇性參數

--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value, string or JSON string>

預設值: []
--change-feed-days --change-feed-retention-days
預覽

指出變更保留天數的持續時間。 最小值為 1 天,最大值為 146000 天(400 年)。 Null 值表示變更摘要的無限保留期。(使用 --enable-change-feed 不使用 --change-feed-days 來表示 null)。

--container-days --container-delete-retention-days

指出刪除的容器應保留的天數。 指定的最小值可以是 1,最大值可以是 365。

--container-retention --enable-container-delete-retention

將 設為 true 時,針對容器虛刪除啟用容器刪除保留原則。 當設定為 false 時,停用容器刪除保留原則。

接受的值: false, true
--default-service-version -d

如果未指定連入要求的版本,則表示要用於 Blob 服務要求的預設版本。

--delete-retention-days

指出刪除的 Blob 應該保留的天數。 值必須介於 [1,365] 範圍內。 當 為 true 時 --enable-delete-retention ,必須提供它。

--enable-change-feed

指出是否啟用變更摘要事件記錄。 如果為 true,您可以讓記憶體帳戶開始擷取變更。 預設值為 True。 您可以在 中看到更多詳細數據 https://docs.microsoft.com/azure/storage/blobs/storage-blob-change-feed?tabs=azure-portal#register-by-using-azure-cli

接受的值: false, true
--enable-delete-retention

指出是否為 Blob 服務啟用刪除保留原則。

接受的值: false, true
--enable-last-access-tracking -t

當設定為 true 時,會啟用以上次存取時間為基礎的追蹤原則。

接受的值: false, true
--enable-restore-policy

將 Blob 還原原則設定為 true 時,請啟用 Blob 還原原則。

接受的值: false, true
--enable-versioning

如果設定為 true,則會啟用版本設定。

接受的值: false, true
--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

預設值: False
--remove

從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>--remove propertyToRemove

預設值: []
--resource-group -g

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

--restore-days

可以還原 Blob 的天數。 它應該大於零,且小於刪除保留天數。

--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=<value>

預設值: []
全域參數
--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 來取得完整偵錯記錄。