az datashare share-subscription

Note

This reference is part of the datashare extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az datashare share-subscription command. Learn more about extensions.

Manage share subscription with datashare.

Commands

az datashare share-subscription cancel-synchronization

Request to cancel a synchronization.

az datashare share-subscription create

Create a shareSubscription in an account.

az datashare share-subscription delete

Delete a shareSubscription in an account.

az datashare share-subscription list

List share subscriptions in an account.

az datashare share-subscription list-source-share-synchronization-setting

Get synchronization settings set on a share.

az datashare share-subscription list-synchronization

List synchronizations of a share subscription.

az datashare share-subscription list-synchronization-detail

List synchronization details.

az datashare share-subscription show

Get a shareSubscription in an account.

az datashare share-subscription synchronize

Initiate a copy.

az datashare share-subscription wait

Place the CLI in a waiting state until a condition of the datashare share-subscription is met.

az datashare share-subscription cancel-synchronization

Request to cancel a synchronization.

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

Examples

ShareSubscriptions_CancelSynchronization

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

Required Parameters

--account-name

The name of the share account.

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

The name of the shareSubscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--synchronization-id

Synchronization id.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

az datashare share-subscription create

Create a shareSubscription in an account.

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

Examples

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"

Required Parameters

--account-name

The name of the share account.

--invitation-id

The invitation id.

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

The name of the shareSubscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--source-share-location

Source share location.

Optional Parameters

--expiration-date

The expiration date of the share subscription.

az datashare share-subscription delete

Delete a shareSubscription in an account.

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

Examples

ShareSubscriptions_Delete

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

Required Parameters

--account-name

The name of the share account.

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

The name of the shareSubscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--yes -y

Do not prompt for confirmation.

az datashare share-subscription list

List share subscriptions in an account.

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

Examples

ShareSubscriptions_ListByAccount

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

Required Parameters

--account-name

The name of the share account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--filter

Filters the results using OData syntax.

--orderby

Sorts the results using OData syntax.

--skip-token

Continuation Token.

az datashare share-subscription list-source-share-synchronization-setting

Get synchronization settings set on a share.

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

Examples

ShareSubscriptions_ListSourceShareSynchronizationSettings

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

Required Parameters

--account-name

The name of the share account.

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

The name of the shareSubscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--skip-token

Continuation token.

az datashare share-subscription list-synchronization

List synchronizations of a share subscription.

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

Examples

ShareSubscriptions_ListSynchronizations

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

Required Parameters

--account-name

The name of the share account.

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

The name of the share subscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--filter

Filters the results using OData syntax.

--orderby

Sorts the results using OData syntax.

--skip-token

Continuation token.

az datashare share-subscription list-synchronization-detail

List synchronization details.

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

Examples

ShareSubscriptions_ListSynchronizationDetails

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

Required Parameters

--account-name

The name of the share account.

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

The name of the share subscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--synchronization-id

Synchronization id.

Optional Parameters

--filter

Filters the results using OData syntax.

--orderby

Sorts the results using OData syntax.

--skip-token

Continuation token.

az datashare share-subscription show

Get a shareSubscription in an account.

az datashare share-subscription show --account-name
                                     --name
                                     --resource-group

Examples

ShareSubscriptions_Get

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

Required Parameters

--account-name

The name of the share account.

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

The name of the shareSubscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az datashare share-subscription synchronize

Initiate a copy.

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

Examples

ShareSubscriptions_Synchronize

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

Required Parameters

--account-name

The name of the share account.

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

The name of share subscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

--synchronization-mode

Mode of synchronization used in triggers and snapshot sync. Incremental by default.

accepted values: FullSync, Incremental

az datashare share-subscription wait

Place the CLI in a waiting state until a condition of the datashare share-subscription is met.

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

Examples

Pause executing next line of CLI script until the datashare share-subscription is successfully deleted.

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

Pause executing next line of CLI script until the datashare share-subscription is successfully created.

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

Required Parameters

--account-name

The name of the share account.

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

The name of the shareSubscription.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.