Share via


az datashare share-subscription

注意

此參考是 Azure CLI 的資料共用 延伸模組的一部分 (2.15.0 版或更高版本)。 擴充功能會在您第一次執行 az datashare share-subscription 命令時自動安裝。 深入了解擴充功能。

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

使用 datashare 管理共用訂閱。

命令

名稱 Description 類型 狀態
az datashare share-subscription cancel-synchronization

取消同步處理的要求。

擴充 實驗性
az datashare share-subscription create

在帳戶中建立 shareSubscription。

擴充 實驗性
az datashare share-subscription delete

刪除帳戶中的 shareSubscription。

擴充 實驗性
az datashare share-subscription list

列出帳戶中的共用訂閱。

擴充 實驗性
az datashare share-subscription list-source-share-synchronization-setting

取得共用上設定的同步處理設定。

擴充 實驗性
az datashare share-subscription list-synchronization

列出共用訂閱的同步處理。

擴充 實驗性
az datashare share-subscription list-synchronization-detail

列出同步處理詳細資料。

擴充 實驗性
az datashare share-subscription show

在帳戶中取得 shareSubscription。

擴充 實驗性
az datashare share-subscription synchronize

起始複本。

擴充 實驗性
az datashare share-subscription wait

將 CLI 置於等候狀態,直到符合 datashare 共用訂用帳戶的條件為止。

擴充 實驗性

az datashare share-subscription cancel-synchronization

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

取消同步處理的要求。

az datashare share-subscription cancel-synchronization --synchronization-id
                                                       [--account-name]
                                                       [--ids]
                                                       [--name]
                                                       [--no-wait]
                                                       [--resource-group]
                                                       [--subscription]

範例

ShareSubscriptions_CancelSynchronization

az datashare share-subscription cancel-synchronization --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSubscription1" --synchronization-id "7d0536a6-3fa5-43de-b152-3d07c4f6b2bb"

必要參數

--synchronization-id

同步處理識別碼。

選擇性參數

--account-name

共用帳戶的名稱。

--ids

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

--name --share-subscription-name -n

shareSubscription 的名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--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 datashare share-subscription create

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

在帳戶中建立 shareSubscription。

az datashare share-subscription create --account-name
                                       --invitation-id
                                       --name
                                       --resource-group
                                       --source-share-location
                                       [--expiration-date]

範例

ShareSubscriptions_Create

az datashare share-subscription create --account-name "Account1" --resource-group "SampleResourceGroup" --expiration-date "2020-08-26T22:33:24.5785265Z" --invitation-id "12345678-1234-1234-12345678abd" --source-share-location "eastus2" --name "ShareSubscription1"

必要參數

--account-name

共用帳戶的名稱。

--invitation-id

邀請識別碼。

--name --share-subscription-name -n

shareSubscription 的名稱。

--resource-group -g

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

--source-share-location

來源共用位置。

選擇性參數

--expiration-date

共用訂閱的到期日。

全域參數
--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 datashare share-subscription delete

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除帳戶中的 shareSubscription。

az datashare share-subscription delete [--account-name]
                                       [--ids]
                                       [--name]
                                       [--no-wait]
                                       [--resource-group]
                                       [--subscription]
                                       [--yes]

範例

ShareSubscriptions_Delete

az datashare share-subscription delete --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSubscription1"

選擇性參數

--account-name

共用帳戶的名稱。

--ids

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

--name --share-subscription-name -n

shareSubscription 的名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--resource-group -g

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

--subscription

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

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

--verbose

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

az datashare share-subscription list

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出帳戶中的共用訂閱。

az datashare share-subscription list --account-name
                                     --resource-group
                                     [--filter]
                                     [--orderby]
                                     [--skip-token]

範例

ShareSubscriptions_ListByAccount

az datashare share-subscription list --account-name "Account1" --resource-group "SampleResourceGroup"

必要參數

--account-name

共用帳戶的名稱。

--resource-group -g

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

選擇性參數

--filter

使用 OData 語法篩選結果。

--orderby

使用 OData 語法排序結果。

--skip-token

接續權杖。

全域參數
--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 datashare share-subscription list-source-share-synchronization-setting

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

取得共用上設定的同步處理設定。

az datashare share-subscription list-source-share-synchronization-setting --account-name
                                                                          --name
                                                                          --resource-group
                                                                          [--skip-token]

範例

ShareSubscriptions_ListSourceShareSynchronization設定

az datashare share-subscription list-source-share-synchronization-setting --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSub1"

必要參數

--account-name

共用帳戶的名稱。

--name --share-subscription-name -n

shareSubscription 的名稱。

--resource-group -g

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

選擇性參數

--skip-token

接續權杖。

全域參數
--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 datashare share-subscription list-synchronization

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出共用訂閱的同步處理。

az datashare share-subscription list-synchronization --account-name
                                                     --name
                                                     --resource-group
                                                     [--filter]
                                                     [--orderby]
                                                     [--skip-token]

範例

ShareSubscriptions_ListSynchronizations

az datashare share-subscription list-synchronization --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSub1"

必要參數

--account-name

共用帳戶的名稱。

--name --share-subscription-name -n

共用訂閱的名稱。

--resource-group -g

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

選擇性參數

--filter

使用 OData 語法篩選結果。

--orderby

使用 OData 語法排序結果。

--skip-token

接續權杖。

全域參數
--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 datashare share-subscription list-synchronization-detail

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出同步處理詳細資料。

az datashare share-subscription list-synchronization-detail --account-name
                                                            --name
                                                            --resource-group
                                                            --synchronization-id
                                                            [--filter]
                                                            [--orderby]
                                                            [--skip-token]

範例

ShareSubscriptions_ListSynchronizationDetails

az datashare share-subscription list-synchronization-detail --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSub1" --synchronization-id "7d0536a6-3fa5-43de-b152-3d07c4f6b2bb"

必要參數

--account-name

共用帳戶的名稱。

--name --share-subscription-name -n

共用訂閱的名稱。

--resource-group -g

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

--synchronization-id

同步處理識別碼。

選擇性參數

--filter

使用 OData 語法篩選結果。

--orderby

使用 OData 語法排序結果。

--skip-token

接續權杖。

全域參數
--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 datashare share-subscription show

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

在帳戶中取得 shareSubscription。

az datashare share-subscription show [--account-name]
                                     [--ids]
                                     [--name]
                                     [--resource-group]
                                     [--subscription]

範例

ShareSubscriptions_Get

az datashare share-subscription show --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSubscription1"

選擇性參數

--account-name

共用帳戶的名稱。

--ids

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

--name --share-subscription-name -n

shareSubscription 的名稱。

--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 datashare share-subscription synchronize

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

起始複本。

az datashare share-subscription synchronize [--account-name]
                                            [--ids]
                                            [--name]
                                            [--no-wait]
                                            [--resource-group]
                                            [--subscription]
                                            [--synchronization-mode {FullSync, Incremental}]

範例

ShareSubscriptions_Synchronize

az datashare share-subscription synchronize --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSubscription1" --synchronization-mode "Incremental"

選擇性參數

--account-name

共用帳戶的名稱。

--ids

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

--name --share-subscription-name -n

共用訂閱的名稱。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--resource-group -g

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

--subscription

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

--synchronization-mode

觸發程式和快照同步處理中使用的同步處理模式。依預設為累加。

接受的值: FullSync, Incremental
全域參數
--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 datashare share-subscription wait

實驗

命令群組 'datashare' 是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

將 CLI 置於等候狀態,直到符合 datashare 共用訂用帳戶的條件為止。

az datashare share-subscription wait [--account-name]
                                     [--created]
                                     [--custom]
                                     [--deleted]
                                     [--exists]
                                     [--ids]
                                     [--interval]
                                     [--name]
                                     [--resource-group]
                                     [--subscription]
                                     [--timeout]
                                     [--updated]

範例

暫停執行下一行 CLI 腳本,直到成功刪除 datashare 共用訂閱為止。

az datashare share-subscription wait --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSubscription1" --deleted

暫停執行下一行 CLI 腳本,直到成功建立 datashare 共用訂閱為止。

az datashare share-subscription wait --account-name "Account1" --resource-group "SampleResourceGroup" --name "ShareSubscription1" --created

選擇性參數

--account-name

共用帳戶的名稱。

--created

請等候在 'Succeeded' 使用 'provisioningState' 建立。

預設值: False
--custom

等到條件符合自訂 JMESPath 查詢為止。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。

--deleted

等到刪除為止。

預設值: False
--exists

等候資源存在。

預設值: False
--ids

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

--interval

輪詢間隔以秒為單位。

預設值: 30
--name --share-subscription-name -n

shareSubscription 的名稱。

--resource-group -g

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

--subscription

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

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

--verbose

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