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

az datashare share-subscription

注意

此参考是 Azure CLI(版本 2.15.0 或更高版本)的 Datashare 扩展的一部分。 该扩展会在首次运行 az datashare share-subscription 命令时自动安装。 详细了解扩展。

命令组“datashare”是实验性的,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

使用 datashare 管理共享订阅。

命令

名称 说明 类型 状态
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

同步 ID。

可选参数

--account-name

共享帐户的名称。

--ids

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

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

shareSubscription 的名称。

--no-wait

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

默认值: False
--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 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

邀请 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

订阅的名称或 ID。 可以使用 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

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

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

shareSubscription 的名称。

--no-wait

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

默认值: False
--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 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

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 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

同步 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

订阅的名称或 ID。 可以使用 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

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

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

shareSubscription 的名称。

--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 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

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

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

共享订阅的名称。

--no-wait

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

默认值: False
--resource-group -g

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

--subscription

订阅的名称或 ID。 可以使用 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

订阅的名称或 ID。 可以使用 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

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

--interval

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

默认值: 30
--name --share-subscription-name -n

shareSubscription 的名称。

--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 获取完整的调试日志。