Share via


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.

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage share subscription with datashare.

Commands

Name Description Type Status
az datashare share-subscription cancel-synchronization

Request to cancel a synchronization.

Extension Experimental
az datashare share-subscription create

Create a shareSubscription in an account.

Extension Experimental
az datashare share-subscription delete

Delete a shareSubscription in an account.

Extension Experimental
az datashare share-subscription list

List share subscriptions in an account.

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

Get synchronization settings set on a share.

Extension Experimental
az datashare share-subscription list-synchronization

List synchronizations of a share subscription.

Extension Experimental
az datashare share-subscription list-synchronization-detail

List synchronization details.

Extension Experimental
az datashare share-subscription show

Get a shareSubscription in an account.

Extension Experimental
az datashare share-subscription synchronize

Initiate a copy.

Extension Experimental
az datashare share-subscription wait

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

Extension Experimental

az datashare share-subscription cancel-synchronization

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Request to cancel a synchronization.

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

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

--synchronization-id

Synchronization id.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name

The name of the share account.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --share-subscription-name -n

The name of the shareSubscription.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Default value: False
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az datashare share-subscription create

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a shareSubscription in an account.

az datashare share-subscription create --account-name
                                       --invitation-id
                                       --name --share-subscription-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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--expiration-date

The expiration date of the share subscription.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az datashare share-subscription delete

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a shareSubscription in an account.

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

Examples

ShareSubscriptions_Delete

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name

The name of the share account.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --share-subscription-name -n

The name of the shareSubscription.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Default value: False
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az datashare share-subscription list

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--filter

Filters the results using OData syntax.

--orderby

Sorts the results using OData syntax.

--skip-token

Continuation Token.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get synchronization settings set on a share.

az datashare share-subscription list-source-share-synchronization-setting --account-name
                                                                          --name --share-subscription-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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--skip-token

Continuation token.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az datashare share-subscription list-synchronization

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List synchronizations of a share subscription.

az datashare share-subscription list-synchronization --account-name
                                                     --name --share-subscription-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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--filter

Filters the results using OData syntax.

--orderby

Sorts the results using OData syntax.

--skip-token

Continuation token.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az datashare share-subscription list-synchronization-detail

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List synchronization details.

az datashare share-subscription list-synchronization-detail --account-name
                                                            --name --share-subscription-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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--filter

Filters the results using OData syntax.

--orderby

Sorts the results using OData syntax.

--skip-token

Continuation token.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az datashare share-subscription show

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get a shareSubscription in an account.

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

Examples

ShareSubscriptions_Get

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name

The name of the share account.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --share-subscription-name -n

The name of the shareSubscription.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az datashare share-subscription synchronize

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Initiate a copy.

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

Examples

ShareSubscriptions_Synchronize

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name

The name of the share account.

Property Value
Parameter group: Resource Id Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name --share-subscription-name -n

The name of share subscription.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

Property Value
Default value: False
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--synchronization-mode

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

Property Value
Accepted values: FullSync, Incremental
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az datashare share-subscription wait

Experimental

Command group 'datashare' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

az datashare share-subscription wait [--account-name]
                                     [--created]
                                     [--custom]
                                     [--deleted]
                                     [--exists]
                                     [--ids]
                                     [--interval]
                                     [--name --share-subscription-name]
                                     [--resource-group]
                                     [--subscription]
                                     [--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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name

The name of the share account.

Property Value
Parameter group: Resource Id Arguments
--created

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

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

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

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--name --share-subscription-name -n

The name of the shareSubscription.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False