diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6949a9723c3..c1235b8a618 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -99,3 +99,5 @@ /src/hpc-cache/ @qianwens /src/account/ @zikalino + +/src/datashare/ @fengzhou-msft diff --git a/src/datashare/HISTORY.rst b/src/datashare/HISTORY.rst new file mode 100644 index 00000000000..27f152061e8 --- /dev/null +++ b/src/datashare/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. diff --git a/src/datashare/README.md b/src/datashare/README.md new file mode 100644 index 00000000000..9b8be0ab667 --- /dev/null +++ b/src/datashare/README.md @@ -0,0 +1,201 @@ +# Azure CLI datashare Extension # +This package is for the 'datashare' extension, i.e. 'az datashare'. More info on what is [Data Share](https://docs.microsoft.com/azure/data-share/). + +### How to use ### +Install this extension using the below CLI command +``` +az extension add --name datashare +``` + +Register DataShare Resource Provider for your default susbcription. +``` +az provider register -n "Microsoft.DataShare" +``` + +### Included Features +#### Datashare Account Management +*Examples:* + +##### Create a Datashare Account + +``` +az datashare account create \ +--location "West US 2" \ +--tags tag1=Red tag2=White \ +--name "cli_test_account" \ +--resource-group "datashare_provider_rg" +``` + +##### Wait for the Datashare Account to be provisioned +``` +az datashare account wait \ +--name "cli_test_account" \ +--resource-group "datashare_provider_rg" \ +--created +``` + +#### Datashare Resource Management for a Provider +*Examples:* + +##### Create a Datashare +``` +az datashare create \ +--account-name "cli_test_account" \ +--resource-group "datashare_provider_rg" \ +--description "share description" \ +--share-kind "CopyBased" \ +--terms "Confidential" \ +--name "cli_test_share" +``` + +##### Create a Data Set +``` +az datashare dataset create \ +--account-name "cli_test_account" \ +--name "cli_test_data_set" \ +--resource-group "datashare_provider_rg" \ +--share-name "cli_test_share" \ +--dataset "{\"container_name\":\"mycontainer\",\"storage_account_name\":\"mysa\",\"kind\":\"Container\"}" +``` + +Please make sure the datashare account has the right permission of the data source when creating a data set upon it. +For instance, you can use `az datashare account show` to get 'identity.principalId' of the account, then assign the right role to it. +``` +az role assignment create \ +--role "Storage Blob Data Reader" \ +--assignee-object-id {DatashareAccountPrincipalId} \ +--assignee-principal-type ServicePrincipal \ +--scope {StorageAccountId} +``` + +##### Create a Synchronization Setting +``` +az datashare synchronization-setting create \ +--account-name cli_test_account \ +--resource-group datashare_provider_rg \ +--share-name cli_test_share \ +--name cli_test_synchronization_setting \ +--recurrence-interval Day \ +--synchronization-time "2020-04-05 10:50:00 +00:00" \ +--kind ScheduleBased +``` + +##### List Synchronization History +``` +az datashare synchronization list \ +--account-name "cli_test_account" \ +--resource-group "datashare_provider_rg" \ +--share-name "cli_test_share" +``` + +##### Create a Datashare Invitation +``` +az datashare invitation create \ +--account-name "cli_test_account" \ +--target-email "myname@microsoft.com" \ +--name "cli_test_invitation" \ +--resource-group "datashare_provider_rg" \ +--share-name "cli_test_share" +``` + +##### List Share Subscriptions +``` +az datashare provider-share-subscription list \ +--account-name "cli_test_account" \ +--resource-group "datashare_provider_rg" \ +--share-name "cli_test_share" +``` +Share subscriptions are created by Datashare consumers when they accept invitations. + +##### Revoke Datashare for a Share Subscription +``` +az datashare provider-share-subscription revoke \ +--account-name "cli_test_account" \ +--share-subscription "{ProviderShareSubscriptionObjectId}" \ +--resource-group "datashare_provider_rg" \ +--share-name "cli_test_share" +``` + +##### Reinstate Datashare for a Share Subscription +``` +az datashare provider-share-subscription reinstate \ +--account-name "cli_test_account" \ +--share-subscription "{ProviderShareSubscriptionObjectId}" \ +--resource-group "datashare_provider_rg" \ +--share-name "cli_test_share" +``` + +#### Datashare Resource Management for a Consumer +*Examples:* + +##### List received Invitations +``` +az datashare consumer invitation list +``` + +##### Create a Share Subscription from an Invitation +``` +az datashare consumer share-subscription create \ +--account-name "cli_test_consumer_account" \ +--resource-group "datashare_consumer_rg" \ +--invitation-id "{InvitationId1}" \ +--source-share-location "sourceShareLocation" \ +--name "cli_test_share_subscription" +``` + +##### List Source Data Sets in the Share Subscription +``` +az datashare consumer share-subscription list-source-dataset \ +--account-name "cli_test_consumer_account" \ +--resource-group "datashare_consumer_rg" \ +--share-subscription-name "cli_test_share_subscription" +``` + +##### Create a Data Set Mapping of the Source Data Set +``` +az datashare consumer dataset-mapping create \ +--account-name "cli_test_consumer_account" \ +--name "cli_test_data_set_mapping" \ +--resource-group "datashare_consumer_rg" \ +--share-subscription-name "cli_test_share_subscription" \ +--mapping "{\"data_set_id\":\"2036a39f-add6-4347-9c82-a424dfaf4e8d\", \ +\"container_name\":\"newcontainer\", \"storage_account_name\":\"consumersa\", \ +\"kind\":\"BlobFolder\",\"prefix\":\"myprefix\"}" +``` +Please make sure the datashare consumer account has the right permission of the data target when creating a data set mapping on it. For instance, you can use `az datashare account show` to get 'identity.principalId' of the account, then assign the right role to it. +``` +az role assignment create \ +--role "Storage Blob Data Contributor" \ +--assignee-object-id "{ConsumerDatashareAccountPrincipalId}" \ +--assignee-principal-type ServicePrincipal \ +--scope "{ConsumerStorageAccountId}" +``` + +##### List the synchronization settings of the Source Datashare +``` +az datashare consumer share-subscription list-source-share-synchronization-setting \ +--account-name "cli_test_consumer_account" \ +--resource-group "datashare_consumer_rg" \ +--share-subscription-name "cli_test_share_subscription" +``` + +##### Create a trigger for the Share Subsciption +``` +az datashare consumer trigger create \ +--account-name "cli_test_consumer_account" \ +--resource-group "datashare_consumer_rg" \ +--share-subscription-name "cli_test_share_subscription" \ +--name "cli_test_trigger" \ +--recurrence-interval Day \ +--synchronization-time "2020-04-05 10:50:00 +00:00" \ +--kind ScheduleBased +``` + +##### Start a synchronization for the Share Subscription +``` +az datashare consumer share-subscription synchronization start \ +--account-name "cli_test_consumer_account" \ +--resource-group "datashare_consumer_rg" \ +--share-subscription-name "cli_test_share_subscription" \ +--synchronization-mode "Incremental" +``` diff --git a/src/datashare/azext_datashare/__init__.py b/src/datashare/azext_datashare/__init__.py new file mode 100644 index 00000000000..505737b668a --- /dev/null +++ b/src/datashare/azext_datashare/__init__.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=unused-argument +# pylint: disable=unused-import + +from azure.cli.core import AzCommandsLoader +from azext_datashare._help import helps + + +class DataShareManagementClientCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azext_datashare.generated._client_factory import cf_datashare + datashare_custom = CliCommandType( + operations_tmpl='azext_datashare.manual.custom#{}', # modified + client_factory=cf_datashare) + super(DataShareManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx, + custom_command_type=datashare_custom) + + def load_command_table(self, args): + try: + from azext_datashare.generated.commands import load_command_table + load_command_table(self, args) + except ImportError: + pass + try: + from azext_datashare.manual.commands import load_command_table as load_command_table_manual + load_command_table_manual(self, args) + except ImportError: + pass + return self.command_table + + def load_arguments(self, command): + try: + from azext_datashare.generated._params import load_arguments + load_arguments(self, command) + except ImportError: + pass + try: + from azext_datashare.manual._params import load_arguments as load_arguments_manual + load_arguments_manual(self, command) + except ImportError: + pass + + +COMMAND_LOADER_CLS = DataShareManagementClientCommandsLoader diff --git a/src/datashare/azext_datashare/_help.py b/src/datashare/azext_datashare/_help.py new file mode 100644 index 00000000000..c0b36e140d8 --- /dev/null +++ b/src/datashare/azext_datashare/_help.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +# try: +# from .generated._help import * # noqa: F403 +# except ImportError: +# pass + +try: + from .manual._help import * # noqa: F403 +except ImportError: + pass diff --git a/src/datashare/azext_datashare/_params.py b/src/datashare/azext_datashare/_params.py new file mode 100644 index 00000000000..d1283049baf --- /dev/null +++ b/src/datashare/azext_datashare/_params.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +try: + from .generated._params import * # noqa: F403 +except ImportError: + pass + +try: + from .manual._params import * # noqa: F403 +except ImportError: + pass diff --git a/src/datashare/azext_datashare/action.py b/src/datashare/azext_datashare/action.py new file mode 100644 index 00000000000..4ad472a8c52 --- /dev/null +++ b/src/datashare/azext_datashare/action.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=wildcard-import +# pylint: disable=unused-wildcard-import + +try: + from .generated.action import * # noqa: F403 +except ImportError: + pass + +try: + from .manual.action import * # noqa: F403 +except ImportError: + pass diff --git a/src/datashare/azext_datashare/azext_metadata.json b/src/datashare/azext_datashare/azext_metadata.json new file mode 100644 index 00000000000..7b56fb1e11a --- /dev/null +++ b/src/datashare/azext_datashare/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isExperimental": true, + "azext.minCliCoreVersion": "2.3.1" +} \ No newline at end of file diff --git a/src/datashare/azext_datashare/generated/__init__.py b/src/datashare/azext_datashare/generated/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/datashare/azext_datashare/generated/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datashare/azext_datashare/generated/_client_factory.py b/src/datashare/azext_datashare/generated/_client_factory.py new file mode 100644 index 00000000000..bba6d6bcfb5 --- /dev/null +++ b/src/datashare/azext_datashare/generated/_client_factory.py @@ -0,0 +1,54 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def cf_datashare(cli_ctx, *_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from ..vendored_sdks.datashare import DataShareManagementClient + return get_mgmt_service_client(cli_ctx, DataShareManagementClient) + + +def cf_account(cli_ctx, *_): + return cf_datashare(cli_ctx).account + + +def cf_consumer_invitation(cli_ctx, *_): + return cf_datashare(cli_ctx).consumer_invitation + + +def cf_data_set(cli_ctx, *_): + return cf_datashare(cli_ctx).data_set + + +def cf_data_set_mapping(cli_ctx, *_): + return cf_datashare(cli_ctx).data_set_mapping + + +def cf_invitation(cli_ctx, *_): + return cf_datashare(cli_ctx).invitation + + +def cf_share(cli_ctx, *_): + return cf_datashare(cli_ctx).share + + +def cf_provider_share_subscription(cli_ctx, *_): + return cf_datashare(cli_ctx).provider_share_subscription + + +def cf_share_subscription(cli_ctx, *_): + return cf_datashare(cli_ctx).share_subscription + + +def cf_consumer_source_data_set(cli_ctx, *_): + return cf_datashare(cli_ctx).consumer_source_data_set + + +def cf_synchronization_setting(cli_ctx, *_): + return cf_datashare(cli_ctx).synchronization_setting + + +def cf_trigger(cli_ctx, *_): + return cf_datashare(cli_ctx).trigger diff --git a/src/datashare/azext_datashare/manual/__init__.py b/src/datashare/azext_datashare/manual/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/datashare/azext_datashare/manual/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datashare/azext_datashare/manual/_help.py b/src/datashare/azext_datashare/manual/_help.py new file mode 100644 index 00000000000..e9d2ba56a72 --- /dev/null +++ b/src/datashare/azext_datashare/manual/_help.py @@ -0,0 +1,613 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps + + +helps['datashare consumer'] = """ + type: group + short-summary: Commands for consumers to manage datashare +""" + +helps['datashare account'] = """ + type: group + short-summary: Commands to manage datashare accounts +""" + +helps['datashare account list'] = """ + type: command + short-summary: List datashare accounts + examples: + - name: List accounts by resource group + text: |- + az datashare account list --resource-group MyResourceGroup +""" + +helps['datashare account show'] = """ + type: command + short-summary: Show an account + examples: + - name: Show account information + text: |- + az datashare account show --name MyAccount --resource-group MyResourceGroup +""" + +helps['datashare account create'] = """ + type: command + short-summary: Create an account + examples: + - name: Create an account + text: |- + az datashare account create --location "West US 2" --tags tag1=Red tag2=White --name MyAccount --resource-group MyResourceGroup +""" + +helps['datashare account update'] = """ + type: command + short-summary: Patch an account + examples: + - name: Update account tags + text: |- + az datashare account update --name MyAccount --tags tag1=Red tag2=White --resource-group MyResourceGroup +""" + +helps['datashare account delete'] = """ + type: command + short-summary: Delete an account + examples: + - name: Delete the account + text: |- + az datashare account delete --name MyAccount --resource-group MyResourceGroup +""" + +helps['datashare account wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datashare account is met. + examples: + - name: Pause executing next line of CLI script until the datashare account is successfully provisioned. + text: az datashare account wait --name MyAccount --resource-group MyResourceGroup --created +""" + +helps['datashare consumer invitation'] = """ + type: group + short-summary: Commands for consumers to manage datashare invitations +""" + +helps['datashare consumer invitation list'] = """ + type: command + short-summary: List received invitations + examples: + - name: List invitations + text: |- + az datashare consumer invitation list +""" + +helps['datashare consumer invitation show'] = """ + type: command + short-summary: Show a received invitation + examples: + - name: Show an invitation + text: |- + az datashare consumer invitation show --invitation-id 00000000-0000-0000-0000-000000000000 --location "East US 2" +""" + +helps['datashare consumer invitation reject'] = """ + type: command + short-summary: Reject an invitation + examples: + - name: Reject an invitation + text: |- + az datashare consumer invitation reject --invitation-id 00000000-0000-0000-0000-000000000000 --location "East US 2" +""" + +helps['datashare dataset'] = """ + type: group + short-summary: Commands for providers to manage datashare datasets +""" + +helps['datashare dataset list'] = """ + type: command + short-summary: List datasets in a share + examples: + - name: List datasets + text: |- + az datashare dataset list --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare dataset show'] = """ + type: command + short-summary: Show a dataset + examples: + - name: Show a dataset + text: |- + az datashare dataset show --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare dataset create'] = """ + type: command + short-summary: Create a dataset + examples: + - name: Create a Blob dataset + text: |- + az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare \ +--dataset "{\\"kind\\":\\"Blob\\",\\"properties\\":{\\"containerName\\":\\"C1\\",\\"filePath\\":\\"file21\\",\\"resourceGroup\\": \ +\\"SampleResourceGroup\\",\\"storageAccountName\\":\\"storage2\\",\\"subscriptionId\\":\\"00000000-0000-0000-0000-000000000000\\"}}" + - name: Create a KustoCluster dataset + text: |- + az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare \ +--dataset "{\\"kind\\":\\"KustoCluster\\",\\"properties\\":{\\"kustoClusterResourceId\\": \ +\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1\\"}}" + - name: Create a KustoDatabase dataset + text: |- + az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare \ +--dataset "{\\"kind\\":\\"KustoDatabase\\",\\"properties\\":{\\"kustoDatabaseResourceId\\": \ +\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Kusto/clusters/Cluster1/databases/Database1\\"}}" + - name: Create a SqlDBTable dataset + text: |- + az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare \ +--dataset "{\\"kind\\":\\"SqlDBTable\\",\\"properties\\":{\\"databaseName\\":\\"MySqlDB\\",\\"schemaName\\":\\"dbo\\", \ +\\"sqlServerResourceId\\":\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Sql/servers/Server1\\", \ +\\"tableName\\":\\"Table1\\"}}" + - name: Create a SqlDWTable dataset + text: |- + az datashare dataset create --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare \ +--dataset "{\\"kind\\":\\"SqlDWTable\\",\\"properties\\":{\\"dataWarehouseName\\":\\"MyDataWarehouse\\",\\"schemaName\\":\\"dbo\\", \ +\\"sqlServerResourceId\\":\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Sql/servers/MyServer\ +\\",\\"tableName\\":\\"MyTable\\"}}" +""" + +helps['datashare dataset delete'] = """ + type: command + short-summary: Delete a dataset in a share + examples: + - name: Delete a dataset + text: |- + az datashare dataset delete --account-name MyAccount --name MyDataset --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare dataset wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datashare dataset is met. + examples: + - name: Pause executing next line of CLI script until the datashare dataset is successfully provisioned. + text: az datashare dataset wait --account-name MyAccount --share-name MyShare --name MyDataset --resource-group MyResourceGroup --created +""" + +helps['datashare consumer dataset-mapping'] = """ + type: group + short-summary: Commands for consumers to manage datashare dataset mappings +""" + +helps['datashare consumer dataset-mapping list'] = """ + type: command + short-summary: List dataset mappings in a share subscription + examples: + - name: List dataset mappings + text: |- + az datashare consumer dataset-mapping list --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription +""" + +helps['datashare consumer dataset-mapping show'] = """ + type: command + short-summary: Show a dataset mapping in a share subscription + examples: + - name: Show a dataset mapping + text: |- + az datashare consumer dataset-mapping show --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription +""" + +helps['datashare consumer dataset-mapping create'] = """ + type: command + short-summary: Create a dataSet mapping + examples: + - name: Create a Blob dataset mapping + text: |- + az datashare consumer dataset-mapping create --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription \ +--mapping "{\\"kind\\":\\"Blob\\",\\"properties\\":{\\"containerName\\":\\"C1\\",\\"dataSetId\\":\\"00000000-0000-0000-0000-000000000000\\",\\"filePath\ +\\":\\"file21\\",\\"resourceGroup\\":\\"SampleResourceGroup\\",\\"storageAccountName\\":\\"storage2\\",\\"subscriptionId\\":\\"00000000-0000-0000-0000-000000000000\\"}}" + - name: Create a SqlDBTable dataset mapping + text: |- + az datashare consumer dataset-mapping create --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription \ +--mapping "{\\"kind\\":\\"SqlDBTable\\",\\"properties\\":{\\"dataSetId\\":\\"00000000-0000-0000-0000-000000000000\\",\\"databaseName\\":\\"Database1\\"\ +,\\"schemaName\\":\\"dbo\\",\\"sqlServerResourceId\\":\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Sql/servers/Server1\\",\\"tableName\\":\\"Table1\\"}}" + - name: Create a AdlsGen2File dataset mapping + text: |- + az datashare consumer dataset-mapping create --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription \ +--mapping "{\\"kind\\":\\"AdlsGen2File\\",\\"properties\\":{\\"dataSetId\\":\\"00000000-0000-0000-0000-000000000000\\",\\"filePath\\":\\"file21\\",\\"fileSystem\\": \ +\\"fileSystem\\",\\"outputType\\":\\"Csv\\",\\"resourceGroup\\":\\"SampleResourceGroup\\",\\"storageAccountName\\":\\"storage2\\",\\"subscriptionId\\":\\"00000000-0000-0000-0000-000000000000\\"}}" + - name: Create a SqlDWTable dataset mapping + text: |- + az datashare consumer dataset-mapping create --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription \ +--mapping "{\\"kind\\":\\"SqlDWTable\\",\\"properties\\":{\\"dataSetId\\":\\"00000000-0000-0000-0000-000000000000\\",\\"dataWarehouseName\\":\\"DataWarehouse1\\",\ +\\"schemaName\\":\\"dbo\\",\\"sqlServerResourceId\\":\\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SampleResourceGroup/providers/Microsoft.Sql/servers/Server1\\",\\"tableName\\":\\"Table1\\"}}" +""" + +helps['datashare consumer dataset-mapping delete'] = """ + type: command + short-summary: Delete a dataset mapping in a share subscription + examples: + - name: Delete a dataset mapping + text: |- + az datashare consumer dataset-mapping delete --account-name MyAccount --name MyDatasetMapping --resource-group MyResourceGroup --share-subscription-name MyShareSubscription +""" + +helps['datashare invitation'] = """ + type: group + short-summary: Commands for providers to manage datashare invitations +""" + +helps['datashare invitation list'] = """ + type: command + short-summary: List invitations in a share + examples: + - name: List invitations + text: |- + az datashare invitation list --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare invitation show'] = """ + type: command + short-summary: Show an invitation in a share + examples: + - name: Show an invitation + text: |- + az datashare invitation show --account-name MyAccount --name MyInvitation --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare invitation create'] = """ + type: command + short-summary: Create an invitation + examples: + - name: Create an invitation + text: |- + az datashare invitation create --account-name MyAccount --target-email "receiver@microsoft.com" --name MyInvitation --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare invitation delete'] = """ + type: command + short-summary: Delete an invitation in a share + examples: + - name: Delete an invitation + text: |- + az datashare invitation delete --account-name MyAccount --name MyInvitation --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare'] = """ + type: group + short-summary: Commands to manage datashare +""" + +helps['datashare list'] = """ + type: command + short-summary: List datashares in an account + examples: + - name: List datashares + text: |- + az datashare list --account-name MyAccount --resource-group MyResourceGroup +""" + +helps['datashare show'] = """ + type: command + short-summary: Show a datashare + examples: + - name: Show a datashare + text: |- + az datashare show --account-name MyAccount --resource-group MyResourceGroup --name MyShare +""" + +helps['datashare create'] = """ + type: command + short-summary: Create a datashare + examples: + - name: Create a datashare + text: |- + az datashare create --account-name MyAccount --resource-group MyResourceGroup --description "share description" --share-kind "CopyBased" --terms "Confidential" --name MyShare +""" + +helps['datashare delete'] = """ + type: command + short-summary: Delete a datashare + examples: + - name: Delete a datashare + text: |- + az datashare delete --account-name MyAccount --resource-group MyResourceGroup --name MyShare +""" + +helps['datashare synchronization'] = """ + type: group + short-summary: Commands to manage datashare synchronization +""" + +helps['datashare synchronization list-detail'] = """ + type: command + short-summary: List synchronization details + examples: + - name: List synchronization details + text: |- + az datashare synchronization list-detail --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare --synchronization-id 00000000-0000-0000-0000-000000000000 +""" + +helps['datashare synchronization list'] = """ + type: command + short-summary: List synchronizations of a datashare + examples: + - name: List synchronizations + text: |- + az datashare synchronization list --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datashare is met. + examples: + - name: Pause executing next line of CLI script until the datashare is successfully provisioned. + text: az datashare wait --account-name MyAccount --resource-group MyResourceGroup --name MyShare --created +""" + +helps['datashare provider-share-subscription'] = """ + type: group + short-summary: Commands for providers to manage datashare share subscriptions +""" + +helps['datashare provider-share-subscription list'] = """ + type: command + short-summary: List share subscriptions in a provider share + examples: + - name: List share subscriptions + text: |- + az datashare provider-share-subscription list --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare provider-share-subscription show'] = """ + type: command + short-summary: Show a share subscription in a provider share + examples: + - name: Show a share subscription + text: |- + az datashare provider-share-subscription show --account-name MyAccount --share-subscription 00000000-0000-0000-0000-000000000000 --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare provider-share-subscription revoke'] = """ + type: command + short-summary: Revoke a share subscription in a provider share + examples: + - name: Revoke a share subscription + text: |- + az datashare provider-share-subscription revoke --account-name MyAccount --share-subscription 00000000-0000-0000-0000-000000000000 --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare provider-share-subscription reinstate'] = """ + type: command + short-summary: Reinstate a share subscription in a provider share + examples: + - name: Reinstate a share subscription + text: |- + az datashare provider-share-subscription reinstate --account-name MyAccount --share-subscription 00000000-0000-0000-0000-000000000000 --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare provider-share-subscription wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datashare provider share subscription is met. + examples: + - name: Pause executing next line of CLI script until the datashare provider share subscription is successfully provisioned. + text: az datashare provider-share-subscription wait --account-name MyAccount --share-subscription 00000000-0000-0000-0000-000000000000 --resource-group MyResourceGroup --share-name MyShare --created +""" + +helps['datashare consumer share-subscription'] = """ + type: group + short-summary: Commands for consumers to manage datashare share subscriptions +""" + +helps['datashare consumer share-subscription list'] = """ + type: command + short-summary: List share subscriptions in an account + examples: + - name: List share subscriptions + text: |- + az datashare consumer share-subscription list --account-name MyAccount --resource-group MyResourceGroup +""" + +helps['datashare consumer share-subscription show'] = """ + type: command + short-summary: Show a share subscription in an account + examples: + - name: Show a share subscription + text: |- + az datashare consumer share-subscription show --account-name MyAccount --resource-group MyResourceGroup --name MyShareSubscription +""" + +helps['datashare consumer share-subscription create'] = """ + type: command + short-summary: Create a share subscription in an account + examples: + - name: Create a share subscription + text: |- + az datashare consumer share-subscription create --account-name MyAccount --resource-group MyResourceGroup --invitation-id 00000000-0000-0000-0000-000000000000 --source-share-location "eastus2" --name MyShareSubscription +""" + +helps['datashare consumer share-subscription delete'] = """ + type: command + short-summary: Delete a share subscription in an account + examples: + - name: Delete a share subscription + text: |- + az datashare consumer share-subscription delete --account-name MyAccount --resource-group MyResourceGroup --name MyShareSubscription +""" + +helps['datashare consumer share-subscription synchronization'] = """ + type: group + short-summary: Commands for consumers to manage datashare share subscription synchronizations +""" + +helps['datashare consumer share-subscription synchronization list-detail'] = """ + type: command + short-summary: List synchronization details + examples: + - name: List synchronization details + text: |- + az datashare consumer share-subscription synchronization list-detail --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSub --synchronization-id 00000000-0000-0000-0000-000000000000 +""" + +helps['datashare consumer share-subscription synchronization start'] = """ + type: command + short-summary: Initiate a dataset synchronization + examples: + - name: Initiate a dataset synchronization + text: |- + az datashare consumer share-subscription synchronization start --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --synchronization-mode "Incremental" +""" + +helps['datashare consumer share-subscription synchronization cancel'] = """ + type: command + short-summary: Request to cancel a synchronization. + examples: + - name: Request to cancel a synchronization + text: |- + az datashare consumer share-subscription synchronization cancel --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --synchronization-id 00000000-0000-0000-0000-000000000000 +""" + +helps['datashare consumer share-subscription synchronization wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datashare share subscription synchronization is met. + examples: + - name: Pause executing next line of CLI script until the datashare share subscription synchronization finishes successfully. + text: az datashare consumer share-subscription synchronization wait --custom "status=='Succeeded'" --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --synchronization-id 00000000-0000-0000-0000-000000000000 + - name: Pause executing next line of CLI script until the datashare share subscription synchronization is cancelled. + text: az datashare consumer share-subscription synchronization wait --custom "status=='Cancelled'" --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --synchronization-id 00000000-0000-0000-0000-000000000000 +""" + +helps['datashare consumer share-subscription list-source-share-synchronization-setting'] = """ + type: command + short-summary: List synchronization settings set on a share + examples: + - name: List synchronization settings + text: |- + az datashare consumer share-subscription list-source-share-synchronization-setting --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSub +""" + +helps['datashare consumer share-subscription synchronization list'] = """ + type: command + short-summary: List synchronizations of a share subscription + examples: + - name: List synchronizations + text: |- + az datashare consumer share-subscription synchronization list --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSub +""" + +helps['datashare consumer share-subscription wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datashare share subscription is met. + examples: + - name: Pause executing next line of CLI script until the datashare share subscription is successfully provisioned. + text: az datashare consumer share-subscription wait --account-name MyAccount --resource-group MyResourceGroup --name MyShareSubscription --created +""" + +helps['datashare consumer share-subscription list-source-dataset'] = """ + type: command + short-summary: List source datasets of a share subscription + examples: + - name: List source datasets + text: |- + az datashare consumer share-subscription list-source-dataset --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShare +""" + +helps['datashare synchronization-setting'] = """ + type: group + short-summary: Commands for providers to manage datashare synchronization settings +""" + +helps['datashare synchronization-setting list'] = """ + type: command + short-summary: List synchronization settings in a share + examples: + - name: List synchronization settings + text: |- + az datashare synchronization-setting list --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare +""" + +helps['datashare synchronization-setting show'] = """ + type: command + short-summary: Show a synchronization setting in a share + examples: + - name: Show a synchronization setting + text: |- + az datashare synchronization-setting show --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare --name MySyncrhonizationSetting +""" + +helps['datashare synchronization-setting create'] = """ + type: command + short-summary: Create a synchronization setting + examples: + - name: Create a synchronization setting + text: |- + az datashare synchronization-setting create --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare --name MyDataset --recurrence-interval Day --synchronization-time "2020-04-05 10:50:00 +00:00" --kind ScheduleBased +""" + +helps['datashare synchronization-setting delete'] = """ + type: command + short-summary: Delete a synchronization setting in a share + examples: + - name: Delete a synchronization setting + text: |- + az datashare synchronization-setting delete --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare --name MySyncrhonizationSetting +""" + +helps['datashare synchronization-setting wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datashare synchronization setting is met. + examples: + - name: Pause executing next line of CLI script until the datashare synchronization setting is successfully provisioned. + text: az datashare synchronization-setting wait --account-name MyAccount --resource-group MyResourceGroup --share-name MyShare --name MySyncrhonizationSetting --created +""" + +helps['datashare consumer trigger'] = """ + type: group + short-summary: Commands for consumers to manage datashare consumer triggers +""" + +helps['datashare consumer trigger list'] = """ + type: command + short-summary: List triggers in a share subscription + examples: + - name: List triggers + text: |- + az datashare consumer trigger list --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription +""" + +helps['datashare consumer trigger show'] = """ + type: command + short-summary: Show a trigger in a share subscription + examples: + - name: Show a trigger + text: |- + az datashare consumer trigger show --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --name MyTrigger +""" + +helps['datashare consumer trigger create'] = """ + type: command + short-summary: Create a trigger + examples: + - name: Create a trigger + text: |- + az datashare consumer trigger create --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --name MyTrigger --recurrence-interval Day --synchronization-time "2020-04-05 10:50:00 +00:00" --kind ScheduleBased +""" + +helps['datashare consumer trigger delete'] = """ + type: command + short-summary: Delete a trigger in a share subscription + examples: + - name: Delete a trigger + text: |- + az datashare consumer trigger delete --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --name MyTrigger +""" + +helps['datashare consumer trigger wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the datashare trigger is met. + examples: + - name: Pause executing next line of CLI script until the datashare trigger is successfully provisioned. + text: az datashare consumer trigger wait --account-name MyAccount --resource-group MyResourceGroup --share-subscription-name MyShareSubscription --name MyTrigger --created +""" diff --git a/src/datashare/azext_datashare/manual/_params.py b/src/datashare/azext_datashare/manual/_params.py new file mode 100644 index 00000000000..f7dbfbae2ac --- /dev/null +++ b/src/datashare/azext_datashare/manual/_params.py @@ -0,0 +1,333 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements +# pylint: disable=unused-import + +from knack.arguments import CLIArgumentType +from azure.cli.core.commands.parameters import ( + tags_type, + get_enum_type, + resource_group_name_type, + get_location_type, + get_datetime_type +) +from azure.cli.core.commands.validators import get_default_location_from_resource_group, validate_file_or_dict +from azext_datashare.vendored_sdks.datashare.models._data_share_management_client_enums import ShareKind, Kind, SynchronizationMode, SynchronizationKind, RecurrenceInterval +from azext_datashare.manual._validators import invitation_id_validator + + +def load_arguments(self, _): + + with self.argument_context('datashare account list') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + + with self.argument_context('datashare account show') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', options_list=['--name', '-n'], id_part='name', help='The name of the share account.') # modified + + with self.argument_context('datashare account create') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', options_list=['--name', '-n'], help='The name of the share account.') # modified + c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) # modified + c.argument('tags', tags_type) # modified + c.ignore('identity') # Only system assigned identity is supported, we can omit this option + + with self.argument_context('datashare account update') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', options_list=['--name', '-n'], id_part='name', help='The name of the share account.') # modified + c.argument('tags', tags_type) # modified + + with self.argument_context('datashare account delete') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', options_list=['--name', '-n'], id_part='name', help='The name of the share account.') + + with self.argument_context('datashare account wait') as c: + c.argument('account_name', options_list=['--name', '-n'], id_part='name', help='The name of the share account.') # modified + + with self.argument_context('datashare list') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + + with self.argument_context('datashare show') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', options_list=['--name', '-n'], id_part='child_name_1', help='The name of the share.') # modified + + with self.argument_context('datashare create') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_name', options_list=['--name', '-n'], help='The name of the share.') # modified + c.argument('description', help='Share description.') # modified + c.argument('share_kind', arg_type=get_enum_type(ShareKind), help='Share kind.') # modified + c.argument('terms', help='Share terms.') # modified + + with self.argument_context('datashare delete') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', options_list=['--name', '-n'], id_part='child_name_1', help='The name of the share.') # modified + + with self.argument_context('datashare wait') as c: + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', options_list=['--name', '-n'], id_part='child_name_1', help='The name of the share.') # modified + + with self.argument_context('datashare dataset list') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_name', help='The name of the share.') + + with self.argument_context('datashare dataset show') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('data_set_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the dataset.') # modified + + with self.argument_context('datashare dataset create') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_name', help='The name of the share.') + c.argument('data_set_name', options_list=['--name', '-n'], help='The name of the dataset.') # modified + c.argument('data_set', options_list=['--dataset'], type=validate_file_or_dict, help='Dataset parameters in JSON string or path to JSON file.') # modified + + with self.argument_context('datashare dataset delete') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('data_set_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the dataset.') # modified + + with self.argument_context('datashare dataset wait') as c: + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('data_set_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the dataset.') # modified + + with self.argument_context('datashare invitation list') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_name', help='The name of the share.') + + with self.argument_context('datashare invitation show') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('invitation_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the invitation.') # modified + + with self.argument_context('datashare invitation create') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_name', help='The name of the share.') + c.argument('invitation_name', options_list=['--name', '-n'], help='The name of the invitation.') # modified + c.argument('target_active_directory_id', help='The target Azure AD Id. Can\'t be combined with email.') # modified + c.argument('target_email', help='The email the invitation is directed to.') # modified + c.argument('target_object_id', help='The target user or application Id that invitation is being sent to. Must be specified along TargetActiveDirectoryId. This enables sending invitations to specific users or applications in an AD tenant.') # modified + + with self.argument_context('datashare invitation delete') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('invitation_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the invitation.') # modified + + with self.argument_context('datashare synchronization-setting list') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_name', help='The name of the share.') + + with self.argument_context('datashare synchronization-setting show') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('synchronization_setting_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the synchronizationSetting.') # modified + + with self.argument_context('datashare synchronization-setting create') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_name', help='The name of the share.') + c.argument('synchronization_setting_name', options_list=['--name', '-n'], help='The name of the synchronizationSetting.') # modified + c.argument('recurrence_interval', arg_type=get_enum_type(RecurrenceInterval), arg_group='Synchronization Setting', help='Synchronization Recurrence Interval.') + c.argument('synchronization_time', arg_group='Synchronization Setting', arg_type=get_datetime_type(help='Synchronization time.')) + c.argument('kind', arg_type=get_enum_type(SynchronizationKind), arg_group='Synchronization Setting', default='ScheduleBased', help='Kind of synchronization.') + + with self.argument_context('datashare synchronization-setting delete') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('synchronization_setting_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the synchronizationSetting.') # modified + + with self.argument_context('datashare synchronization-setting wait') as c: + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('synchronization_setting_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the synchronizationSetting.') # modified + + with self.argument_context('datashare synchronization list-detail') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') # modified + c.argument('share_name', help='The name of the share.') # modified + c.argument('synchronization_id', help='The synchronization GUID.') + + with self.argument_context('datashare synchronization list') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') # modified + c.argument('share_name', help='The name of the share.') # modified + + with self.argument_context('datashare provider-share-subscription list') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_name', help='The name of the share.') + + with self.argument_context('datashare provider-share-subscription show') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('provider_share_subscription_id', options_list=['--share-subscription'], id_part='child_name_2', help='To locate share subscription') # modified TODO validator + + with self.argument_context('datashare provider-share-subscription revoke') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('provider_share_subscription_id', options_list=['--share-subscription'], id_part='child_name_2', help='To locate share subscription') # modified + + with self.argument_context('datashare provider-share-subscription reinstate') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('provider_share_subscription_id', options_list=['--share-subscription'], id_part='child_name_2', help='To locate share subscription') # modified + + with self.argument_context('datashare provider-share-subscription wait') as c: + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_name', id_part='child_name_1', help='The name of the share.') # modified + c.argument('provider_share_subscription_id', options_list=['--share-subscription'], id_part='child_name_2', help='To locate share subscription') # modified + + with self.argument_context('datashare consumer invitation list') as c: + pass + + with self.argument_context('datashare consumer invitation show') as c: + c.argument('location', arg_type=get_location_type(self.cli_ctx)) # modified + c.argument('invitation_id', validator=invitation_id_validator, help='An invitation id') + + with self.argument_context('datashare consumer invitation reject') as c: + c.argument('location', arg_type=get_location_type(self.cli_ctx)) # modified + c.argument('invitation_id', validator=invitation_id_validator, help='An invitation id') # modified + + with self.argument_context('datashare consumer share-subscription list') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + + with self.argument_context('datashare consumer share-subscription show') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_subscription_name', options_list=['--name', '-n'], id_part='child_name_1', help='The name of the share subscription.') # modified + + with self.argument_context('datashare consumer share-subscription create') as c: + from azure.cli.core.commands.parameters import get_location_name_type, get_location_completion_list + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', options_list=['--name', '-n'], help='The name of the share subscription.') # modified + c.argument('invitation_id', validator=invitation_id_validator, help='The invitation id.') # modified + c.argument('source_share_location', type=get_location_name_type(self.cli_ctx), help='Source share location.', completer=get_location_completion_list) # modified + + with self.argument_context('datashare consumer share-subscription delete') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_subscription_name', options_list=['--name', '-n'], id_part='child_name_1', help='The name of the share subscription.') # modified + + with self.argument_context('datashare consumer share-subscription list-source-share-synchronization-setting') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + + with self.argument_context('datashare consumer share-subscription list-source-dataset') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + + with self.argument_context('datashare consumer share-subscription wait') as c: + c.argument('account_name', id_part='name', help='The name of the share account.') + c.argument('share_subscription_name', options_list=['--name', '-n'], id_part='child_name_1', help='The name of the share subscription.') # modified + + with self.argument_context('datashare consumer share-subscription synchronization start') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + c.argument('synchronization_mode', arg_type=get_enum_type(SynchronizationMode), help='Synchronization mode') # modified + + with self.argument_context('datashare consumer share-subscription synchronization cancel') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + c.argument('synchronization_id', help='The synchronization GUID') + + with self.argument_context('datashare consumer share-subscription synchronization wait') as c: + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + c.argument('synchronization_id', help='The synchronization GUID') + + with self.argument_context('datashare consumer share-subscription synchronization list') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + + with self.argument_context('datashare consumer share-subscription synchronization list-detail') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + c.argument('synchronization_id', help='Synchronization id') + + with self.argument_context('datashare consumer dataset-mapping list') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + + with self.argument_context('datashare consumer dataset-mapping show') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') + c.argument('share_subscription_name', id_part='child_name_1', help='The name of the share subscription.') + c.argument('data_set_mapping_name', id_part='child_name_2', options_list=['--name', '-n'], help='The name of the datasetMapping.') # modified + + with self.argument_context('datashare consumer dataset-mapping create') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + c.argument('data_set_mapping_name', options_list=['--name', '-n'], help='The name of the datasetMapping.') # modified + c.argument('data_set_mapping', options_list=['--mapping'], type=validate_file_or_dict, help='Dataset mapping in JSON string or path to JSON file.') # modified + + with self.argument_context('datashare consumer dataset-mapping delete') as c: # modified + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') + c.argument('share_subscription_name', id_part='child_name_1', help='The name of the share subscription.') + c.argument('data_set_mapping_name', id_part='child_name_2', options_list=['--name', '-n'], help='The name of the datasetMapping.') # modified + + with self.argument_context('datashare consumer dataset-mapping wait') as c: + c.argument('account_name', id_part='name', help='The name of the share account.') + c.argument('share_subscription_name', id_part='child_name_1', help='The name of the share subscription.') + c.argument('data_set_mapping_name', id_part='child_name_2', options_list=['--name', '-n'], help='The name of the datasetMapping.') # modified + + with self.argument_context('datashare consumer trigger list') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + + with self.argument_context('datashare consumer trigger show') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') + c.argument('share_subscription_name', id_part='child_name_1', help='The name of the share subscription.') + c.argument('trigger_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the trigger.') + + with self.argument_context('datashare consumer trigger create') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', help='The name of the share account.') + c.argument('share_subscription_name', help='The name of the share subscription.') + c.argument('trigger_name', options_list=['--name', '-n'], help='The name of the trigger.') # modified + c.argument('recurrence_interval', arg_type=get_enum_type(RecurrenceInterval), arg_group='Synchronization Setting', help='Synchronization Recurrence Interval.') + c.argument('synchronization_time', arg_group='Synchronization Setting', arg_type=get_datetime_type(help='Synchronization time.')) + c.argument('kind', arg_type=get_enum_type(SynchronizationKind), arg_group='Synchronization Setting', default='ScheduleBased', help='Kind of synchronization.') + + with self.argument_context('datashare consumer trigger delete') as c: + c.argument('resource_group_name', resource_group_name_type) # modified + c.argument('account_name', id_part='name', help='The name of the share account.') # modified + c.argument('share_subscription_name', id_part='child_name_1', help='The name of the share subscription.') # modified + c.argument('trigger_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the trigger.') # modified + + with self.argument_context('datashare consumer trigger wait') as c: + c.argument('trigger_name', options_list=['--name', '-n'], id_part='child_name_2', help='The name of the trigger.') # modified diff --git a/src/datashare/azext_datashare/manual/_validators.py b/src/datashare/azext_datashare/manual/_validators.py new file mode 100644 index 00000000000..26b40d74163 --- /dev/null +++ b/src/datashare/azext_datashare/manual/_validators.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=unused-argument + + +def invitation_id_validator(cmd, namespace): + if namespace.invitation_id: + if namespace.invitation_id.startswith("/providers"): + namespace.invitation_id = namespace.invitation_id.split("/")[-1] diff --git a/src/datashare/azext_datashare/manual/commands.py b/src/datashare/azext_datashare/manual/commands.py new file mode 100644 index 00000000000..7caeb1df48f --- /dev/null +++ b/src/datashare/azext_datashare/manual/commands.py @@ -0,0 +1,137 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long +# pylint: disable=too-many-statements + +from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): + + from azext_datashare.generated._client_factory import cf_account + datashare_account = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._account_operations#AccountOperations.{}', + client_factory=cf_account) + with self.command_group('datashare account', datashare_account, client_factory=cf_account) as g: + g.custom_command('list', 'datashare_account_list') + g.custom_show_command('show', 'datashare_account_show') + g.custom_command('create', 'datashare_account_create', supports_no_wait=True) + g.custom_command('update', 'datashare_account_update') + g.custom_command('delete', 'datashare_account_delete', supports_no_wait=True, confirmation=True) + g.wait_command('wait') + + from azext_datashare.generated._client_factory import cf_consumer_invitation + datashare_consumer_invitation = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._consumer_invitation_operations#ConsumerInvitationOperations.{}', + client_factory=cf_consumer_invitation) + with self.command_group('datashare consumer invitation', datashare_consumer_invitation, client_factory=cf_consumer_invitation) as g: + g.custom_command('list', 'datashare_consumer_invitation_list') + g.custom_show_command('show', 'datashare_consumer_invitation_show') + g.custom_command('reject', 'datashare_consumer_invitation_reject_invitation') + + from azext_datashare.generated._client_factory import cf_data_set + datashare_data_set = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._data_set_operations#DataSetOperations.{}', + client_factory=cf_data_set) + with self.command_group('datashare dataset', datashare_data_set, client_factory=cf_data_set) as g: # modified + g.custom_command('list', 'datashare_data_set_list') + g.custom_show_command('show', 'datashare_data_set_show') + g.custom_command('create', 'datashare_data_set_create') + g.custom_command('delete', 'datashare_data_set_delete', supports_no_wait=True, confirmation=True) + g.wait_command('wait') + + from azext_datashare.generated._client_factory import cf_data_set_mapping + datashare_data_set_mapping = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._data_set_mapping_operations#DataSetMappingOperations.{}', + client_factory=cf_data_set_mapping) + with self.command_group('datashare consumer dataset-mapping', datashare_data_set_mapping, client_factory=cf_data_set_mapping) as g: # modified + g.custom_command('list', 'datashare_data_set_mapping_list') + g.custom_show_command('show', 'datashare_data_set_mapping_show') + g.custom_command('create', 'datashare_data_set_mapping_create') + g.custom_command('delete', 'datashare_data_set_mapping_delete', confirmation=True) + + from azext_datashare.generated._client_factory import cf_invitation + datashare_invitation = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._invitation_operations#InvitationOperations.{}', + client_factory=cf_invitation) + with self.command_group('datashare invitation', datashare_invitation, client_factory=cf_invitation) as g: + g.custom_command('list', 'datashare_invitation_list') + g.custom_show_command('show', 'datashare_invitation_show') + g.custom_command('create', 'datashare_invitation_create') + g.custom_command('delete', 'datashare_invitation_delete', confirmation=True) + + from azext_datashare.generated._client_factory import cf_share + datashare_share = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._share_operations#ShareOperations.{}', + client_factory=cf_share) + with self.command_group('datashare', datashare_share, client_factory=cf_share, is_experimental=True) as g: # modified + g.custom_command('list', 'datashare_share_list') + g.custom_show_command('show', 'datashare_share_show') + g.custom_command('create', 'datashare_share_create') + g.custom_command('delete', 'datashare_share_delete', supports_no_wait=True, confirmation=True) + g.wait_command('wait') + + with self.command_group('datashare synchronization', datashare_share, client_factory=cf_share, is_experimental=True) as g: + g.custom_command('list-detail', 'datashare_share_list_synchronization_detail') + g.custom_command('list', 'datashare_share_list_synchronization') + + from azext_datashare.generated._client_factory import cf_provider_share_subscription + datashare_provider_share_subscription = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._provider_share_subscription_operations#ProviderShareSubscriptionOperations.{}', + client_factory=cf_provider_share_subscription) + with self.command_group('datashare provider-share-subscription', datashare_provider_share_subscription, client_factory=cf_provider_share_subscription) as g: + g.custom_command('list', 'datashare_provider_share_subscription_list') + g.custom_show_command('show', 'datashare_provider_share_subscription_show') + g.custom_command('revoke', 'datashare_provider_share_subscription_revoke', supports_no_wait=True) + g.custom_command('reinstate', 'datashare_provider_share_subscription_reinstate') + g.wait_command('wait', getter_name='get_by_share') + + from azext_datashare.generated._client_factory import cf_share_subscription + datashare_share_subscription = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._share_subscription_operations#ShareSubscriptionOperations.{}', + client_factory=cf_share_subscription) + with self.command_group('datashare consumer share-subscription', datashare_share_subscription, client_factory=cf_share_subscription) as g: + g.custom_command('list', 'datashare_share_subscription_list') + g.custom_show_command('show', 'datashare_share_subscription_show') + g.custom_command('create', 'datashare_share_subscription_create') + g.custom_command('delete', 'datashare_share_subscription_delete', supports_no_wait=True, confirmation=True) + g.custom_command('list-source-share-synchronization-setting', 'datashare_share_subscription_list_source_share_synchronization_setting') + g.wait_command('wait') + + with self.command_group('datashare consumer share-subscription synchronization', datashare_share_subscription, client_factory=cf_share_subscription) as g: + g.custom_command('list', 'datashare_share_subscription_list_synchronization') + g.custom_command('list-detail', 'datashare_share_subscription_list_synchronization_detail') + g.custom_command('start', 'datashare_share_subscription_synchronize', supports_no_wait=True) + g.custom_command('cancel', 'datashare_share_subscription_cancel_synchronization', supports_no_wait=True) + g.custom_wait_command('wait', '_datashare_share_subscription_get_synchronization') + + from azext_datashare.generated._client_factory import cf_consumer_source_data_set + datashare_consumer_source_data_set = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._consumer_source_data_set_operations#ConsumerSourceDataSetOperations.{}', + client_factory=cf_consumer_source_data_set) + with self.command_group('datashare consumer share-subscription', datashare_consumer_source_data_set, client_factory=cf_consumer_source_data_set) as g: + g.custom_command('list-source-dataset', 'datashare_consumer_source_data_set_list') + + from azext_datashare.generated._client_factory import cf_synchronization_setting + datashare_synchronization_setting = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._synchronization_setting_operations#SynchronizationSettingOperations.{}', + client_factory=cf_synchronization_setting) + with self.command_group('datashare synchronization-setting', datashare_synchronization_setting, client_factory=cf_synchronization_setting) as g: + g.custom_command('list', 'datashare_synchronization_setting_list') + g.custom_show_command('show', 'datashare_synchronization_setting_show') + g.custom_command('create', 'datashare_synchronization_setting_create') + g.custom_command('delete', 'datashare_synchronization_setting_delete', supports_no_wait=True, confirmation=True) + g.wait_command('wait') + + from azext_datashare.generated._client_factory import cf_trigger + datashare_trigger = CliCommandType( + operations_tmpl='azext_datashare.vendored_sdks.datashare.operations._trigger_operations#TriggerOperations.{}', + client_factory=cf_trigger) + with self.command_group('datashare consumer trigger', datashare_trigger, client_factory=cf_trigger) as g: + g.custom_command('list', 'datashare_trigger_list') + g.custom_show_command('show', 'datashare_trigger_show') + g.custom_command('create', 'datashare_trigger_create', supports_no_wait=True) + g.custom_command('delete', 'datashare_trigger_delete', supports_no_wait=True, confirmation=True) + g.wait_command('wait') diff --git a/src/datashare/azext_datashare/manual/custom.py b/src/datashare/azext_datashare/manual/custom.py new file mode 100644 index 00000000000..c75327b1b3f --- /dev/null +++ b/src/datashare/azext_datashare/manual/custom.py @@ -0,0 +1,520 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# pylint: disable=line-too-long +# pylint: disable=too-many-lines +# pylint: disable=unused-argument +from azure.cli.core.util import sdk_no_wait + + +def datashare_account_list(cmd, client, + resource_group_name=None): + if resource_group_name: + return client.list_by_resource_group(resource_group_name=resource_group_name) + return client.list_by_subscription() + + +def datashare_account_show(cmd, client, + resource_group_name, + account_name): + return client.get(resource_group_name=resource_group_name, account_name=account_name) + + +def datashare_account_create(cmd, client, + resource_group_name, + account_name, + identity=None, + location=None, + tags=None, + no_wait=False): + if identity is None: + identity = {'type': 'SystemAssigned'} + return sdk_no_wait(no_wait, + client.begin_create, + resource_group_name=resource_group_name, + account_name=account_name, + location=location, + tags=tags, + identity=identity) + + +def datashare_account_update(cmd, client, + resource_group_name, + account_name, + tags=None): + return client.update(resource_group_name=resource_group_name, account_name=account_name, tags=tags) + + +def datashare_account_delete(cmd, client, + resource_group_name, + account_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + account_name=account_name) + + +def datashare_consumer_invitation_list(cmd, client): + return client.list_invitation() + + +def datashare_consumer_invitation_show(cmd, client, + location, + invitation_id): + return client.get(location=location, invitation_id=invitation_id) + + +def datashare_consumer_invitation_reject_invitation(cmd, client, + location, + invitation_id): + return client.reject_invitation(location=location, invitation_id=invitation_id) + + +def datashare_data_set_list(cmd, client, + resource_group_name, + account_name, + share_name): + return client.list_by_share(resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name) + + +def datashare_data_set_show(cmd, client, + resource_group_name, + account_name, + share_name, + data_set_name): + return client.get(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, data_set_name=data_set_name) + + +def datashare_data_set_create(cmd, client, + resource_group_name, + account_name, + share_name, + data_set_name, + data_set): + from azure.cli.core.commands.client_factory import get_subscription_id + if 'resource_group' not in data_set: + data_set['resource_group'] = resource_group_name + if 'subscription_id' not in data_set: + data_set['subscription_id'] = get_subscription_id(cmd.cli_ctx) + return client.create(resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + data_set_name=data_set_name, + data_set=data_set) + + +def datashare_data_set_delete(cmd, client, + resource_group_name, + account_name, + share_name, + data_set_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + data_set_name=data_set_name) + + +def datashare_data_set_mapping_list(cmd, client, + resource_group_name, + account_name, + share_subscription_name): + return client.list_by_share_subscription(resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name) + + +def datashare_data_set_mapping_show(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + data_set_mapping_name): + return client.get(resource_group_name=resource_group_name, account_name=account_name, share_subscription_name=share_subscription_name, data_set_mapping_name=data_set_mapping_name) + + +def datashare_data_set_mapping_create(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + data_set_mapping_name, + data_set_mapping): + from azure.cli.core.commands.client_factory import get_subscription_id + if 'resource_group' not in data_set_mapping: + data_set_mapping['resource_group'] = resource_group_name + if 'subscription_id' not in data_set_mapping: + data_set_mapping['subscription_id'] = get_subscription_id(cmd.cli_ctx) + return client.create(resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + data_set_mapping_name=data_set_mapping_name, + data_set_mapping=data_set_mapping) + + +def datashare_data_set_mapping_delete(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + data_set_mapping_name): + return client.delete(resource_group_name=resource_group_name, account_name=account_name, share_subscription_name=share_subscription_name, data_set_mapping_name=data_set_mapping_name) + + +def datashare_invitation_list(cmd, client, + resource_group_name, + account_name, + share_name): + return client.list_by_share(resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name) + + +def datashare_invitation_show(cmd, client, + resource_group_name, + account_name, + share_name, + invitation_name): + return client.get(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, invitation_name=invitation_name) + + +def datashare_invitation_create(cmd, client, + resource_group_name, + account_name, + share_name, + invitation_name, + target_active_directory_id=None, + target_email=None, + target_object_id=None): + return client.create(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, invitation_name=invitation_name, target_active_directory_id=target_active_directory_id, target_email=target_email, target_object_id=target_object_id) + + +def datashare_invitation_delete(cmd, client, + resource_group_name, + account_name, + share_name, + invitation_name): + return client.delete(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, invitation_name=invitation_name) + + +def datashare_share_list(cmd, client, + resource_group_name, + account_name): + return client.list_by_account(resource_group_name=resource_group_name, account_name=account_name) + + +def datashare_share_show(cmd, client, + resource_group_name, + account_name, + share_name): + return client.get(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name) + + +def datashare_share_create(cmd, client, + resource_group_name, + account_name, + share_name, + description=None, + share_kind=None, + terms=None): + return client.create(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, description=description, share_kind=share_kind, terms=terms) + + +def datashare_share_delete(cmd, client, + resource_group_name, + account_name, + share_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name) + + +def datashare_share_list_synchronization_detail(cmd, client, + resource_group_name, + account_name, + share_name, + synchronization_id=None): + return client.list_synchronization_detail(resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + synchronization_id=synchronization_id) + + +def datashare_share_list_synchronization(cmd, client, + resource_group_name, + account_name, + share_name): + return client.list_synchronization(resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name) + + +def datashare_provider_share_subscription_list(cmd, client, + resource_group_name, + account_name, + share_name): + return client.list_by_share(resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name) + + +def datashare_provider_share_subscription_show(cmd, client, + resource_group_name, + account_name, + share_name, + provider_share_subscription_id): + return client.get_by_share(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, provider_share_subscription_id=provider_share_subscription_id) + + +def datashare_provider_share_subscription_revoke(cmd, client, + resource_group_name, + account_name, + share_name, + provider_share_subscription_id, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_revoke, + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + provider_share_subscription_id=provider_share_subscription_id) + + +def datashare_provider_share_subscription_reinstate(cmd, client, + resource_group_name, + account_name, + share_name, + provider_share_subscription_id): + return client.reinstate(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, provider_share_subscription_id=provider_share_subscription_id) + + +def datashare_share_subscription_list(cmd, client, + resource_group_name, + account_name): + return client.list_by_account(resource_group_name=resource_group_name, account_name=account_name) + + +def datashare_share_subscription_show(cmd, client, + resource_group_name, + account_name, + share_subscription_name): + return client.get(resource_group_name=resource_group_name, account_name=account_name, share_subscription_name=share_subscription_name) + + +def datashare_share_subscription_create(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + invitation_id, + source_share_location): + return client.create(resource_group_name=resource_group_name, account_name=account_name, share_subscription_name=share_subscription_name, invitation_id=invitation_id, source_share_location=source_share_location) + + +def datashare_share_subscription_delete(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name) + + +def datashare_share_subscription_list_synchronization_detail(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + synchronization_id): + return client.list_synchronization_detail(resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + synchronization_id=synchronization_id) + + +def datashare_share_subscription_synchronize(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + synchronization_mode=None, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_synchronize, + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + synchronization_mode=synchronization_mode) + + +def datashare_share_subscription_cancel_synchronization(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + synchronization_id, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_cancel_synchronization, + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + synchronization_id=synchronization_id) + + +def datashare_share_subscription_list_source_share_synchronization_setting(cmd, client, + resource_group_name, + account_name, + share_subscription_name): + return client.list_source_share_synchronization_setting(resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name) + + +def datashare_share_subscription_list_synchronization(cmd, client, + resource_group_name, + account_name, + share_subscription_name): + return client.list_synchronization(resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name) + + +def _datashare_share_subscription_get_synchronization(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + synchronization_id): + from knack.util import todict + from azure.cli.core.commands import AzCliCommandInvoker + result = client.list_synchronization(resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name) + result = todict(list(result), AzCliCommandInvoker.remove_additional_prop_layer) + return next((x for x in result if x['synchronizationId'] == synchronization_id), None) + + +def datashare_consumer_source_data_set_list(cmd, client, + resource_group_name, + account_name, + share_subscription_name): + return client.list_by_share_subscription(resource_group_name=resource_group_name, account_name=account_name, share_subscription_name=share_subscription_name) + + +def datashare_synchronization_setting_list(cmd, client, + resource_group_name, + account_name, + share_name): + return client.list_by_share(resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name) + + +def datashare_synchronization_setting_show(cmd, client, + resource_group_name, + account_name, + share_name, + synchronization_setting_name): + return client.get(resource_group_name=resource_group_name, account_name=account_name, share_name=share_name, synchronization_setting_name=synchronization_setting_name) + + +# def _format_datetime(date_string): +# from dateutil.parser import parse +# try: +# return parse(date_string).strftime("%Y-%m-%dT%H:%M:%SZ") +# except ValueError: +# # logger.debug("Unable to parse date_string '%s'", date_string) +# return date_string or ' ' + + +def datashare_synchronization_setting_create(cmd, client, + resource_group_name, + account_name, + share_name, + synchronization_setting_name, + recurrence_interval, + synchronization_time, + kind=None): + synchronization_setting = { + 'synchronizationTime': synchronization_time, + 'recurrenceInterval': recurrence_interval, + 'kind': kind + } + return client.create(resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + synchronization_setting_name=synchronization_setting_name, + synchronization_setting=synchronization_setting) + + +def datashare_synchronization_setting_delete(cmd, client, + resource_group_name, + account_name, + share_name, + synchronization_setting_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + synchronization_setting_name=synchronization_setting_name) + + +def datashare_trigger_list(cmd, client, + resource_group_name, + account_name, + share_subscription_name): + return client.list_by_share_subscription(resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name) + + +def datashare_trigger_show(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + trigger_name): + return client.get(resource_group_name=resource_group_name, account_name=account_name, share_subscription_name=share_subscription_name, trigger_name=trigger_name) + + +def datashare_trigger_create(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + trigger_name, + recurrence_interval, + synchronization_time, + kind=None, + no_wait=False): + synchronization_setting = { + 'synchronizationTime': synchronization_time, + 'recurrenceInterval': recurrence_interval, + 'kind': kind + } + return sdk_no_wait(no_wait, + client.begin_create, + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + trigger_name=trigger_name, + trigger=synchronization_setting) + + +def datashare_trigger_delete(cmd, client, + resource_group_name, + account_name, + share_subscription_name, + trigger_name, + no_wait=False): + return sdk_no_wait(no_wait, + client.begin_delete, + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + trigger_name=trigger_name) diff --git a/src/datashare/azext_datashare/tests/__init__.py b/src/datashare/azext_datashare/tests/__init__.py new file mode 100644 index 00000000000..c9cfdc73e77 --- /dev/null +++ b/src/datashare/azext_datashare/tests/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datashare/azext_datashare/tests/latest/__init__.py b/src/datashare/azext_datashare/tests/latest/__init__.py new file mode 100644 index 00000000000..ee0c4f36bd0 --- /dev/null +++ b/src/datashare/azext_datashare/tests/latest/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/src/datashare/azext_datashare/tests/latest/recordings/test_datashare.yaml b/src/datashare/azext_datashare/tests/latest/recordings/test_datashare.yaml new file mode 100644 index 00000000000..5896d5f4841 --- /dev/null +++ b/src/datashare/azext_datashare/tests/latest/recordings/test_datashare.yaml @@ -0,0 +1,3351 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - unknown + Connection: + - keep-alive + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3 + azure-mgmt-resource/8.0.1 Azure-SDK-For-Python AZURECLI/2.4.0 (MSI) + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia","name":"eastasia","displayName":"East + Asia","longitude":"114.188","latitude":"22.267"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia","name":"southeastasia","displayName":"Southeast + Asia","longitude":"103.833","latitude":"1.283"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus","name":"centralus","displayName":"Central + US","longitude":"-93.6208","latitude":"41.5908"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus","name":"eastus","displayName":"East + US","longitude":"-79.8164","latitude":"37.3719"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2","name":"eastus2","displayName":"East + US 2","longitude":"-78.3889","latitude":"36.6681"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus","name":"westus","displayName":"West + US","longitude":"-122.417","latitude":"37.783"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus","name":"northcentralus","displayName":"North + Central US","longitude":"-87.6278","latitude":"41.8819"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus","name":"southcentralus","displayName":"South + Central US","longitude":"-98.5","latitude":"29.4167"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope","name":"northeurope","displayName":"North + Europe","longitude":"-6.2597","latitude":"53.3478"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope","name":"westeurope","displayName":"West + Europe","longitude":"4.9","latitude":"52.3667"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest","name":"japanwest","displayName":"Japan + West","longitude":"135.5022","latitude":"34.6939"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast","name":"japaneast","displayName":"Japan + East","longitude":"139.77","latitude":"35.68"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth","name":"brazilsouth","displayName":"Brazil + South","longitude":"-46.633","latitude":"-23.55"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast","name":"australiaeast","displayName":"Australia + East","longitude":"151.2094","latitude":"-33.86"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast","name":"australiasoutheast","displayName":"Australia + Southeast","longitude":"144.9631","latitude":"-37.8136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia","name":"southindia","displayName":"South + India","longitude":"80.1636","latitude":"12.9822"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia","name":"centralindia","displayName":"Central + India","longitude":"73.9197","latitude":"18.5822"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westindia","name":"westindia","displayName":"West + India","longitude":"72.868","latitude":"19.088"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral","name":"canadacentral","displayName":"Canada + Central","longitude":"-79.383","latitude":"43.653"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast","name":"canadaeast","displayName":"Canada + East","longitude":"-71.217","latitude":"46.817"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth","name":"uksouth","displayName":"UK + South","longitude":"-0.799","latitude":"50.941"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest","name":"ukwest","displayName":"UK + West","longitude":"-3.084","latitude":"53.427"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus","name":"westcentralus","displayName":"West + Central US","longitude":"-110.234","latitude":"40.890"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2","name":"westus2","displayName":"West + US 2","longitude":"-119.852","latitude":"47.233"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral","name":"koreacentral","displayName":"Korea + Central","longitude":"126.9780","latitude":"37.5665"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth","name":"koreasouth","displayName":"Korea + South","longitude":"129.0756","latitude":"35.1796"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francecentral","name":"francecentral","displayName":"France + Central","longitude":"2.3730","latitude":"46.3772"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francesouth","name":"francesouth","displayName":"France + South","longitude":"2.1972","latitude":"43.8345"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral","name":"australiacentral","displayName":"Australia + Central","longitude":"149.1244","latitude":"-35.3075"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral2","name":"australiacentral2","displayName":"Australia + Central 2","longitude":"149.1244","latitude":"-35.3075"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaecentral","name":"uaecentral","displayName":"UAE + Central","longitude":"54.366669","latitude":"24.466667"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaenorth","name":"uaenorth","displayName":"UAE + North","longitude":"55.316666","latitude":"25.266666"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricanorth","name":"southafricanorth","displayName":"South + Africa North","longitude":"28.218370","latitude":"-25.731340"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricawest","name":"southafricawest","displayName":"South + Africa West","longitude":"18.843266","latitude":"-34.075691"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandnorth","name":"switzerlandnorth","displayName":"Switzerland + North","longitude":"8.564572","latitude":"47.451542"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandwest","name":"switzerlandwest","displayName":"Switzerland + West","longitude":"6.143158","latitude":"46.204391"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanynorth","name":"germanynorth","displayName":"Germany + North","longitude":"8.806422","latitude":"53.073635"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanywestcentral","name":"germanywestcentral","displayName":"Germany + West Central","longitude":"8.682127","latitude":"50.110924"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwaywest","name":"norwaywest","displayName":"Norway + West","longitude":"5.733107","latitude":"58.969975"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwayeast","name":"norwayeast","displayName":"Norway + East","longitude":"10.752245","latitude":"59.913868"}]}' + headers: + cache-control: + - no-cache + content-length: + - '7129' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:42:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "tags": {"tag1": "Red", "tag2": "White"}, "identity": + {"type": "SystemAssigned"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account create + Connection: + - keep-alive + Content-Length: + - '105' + Content-Type: + - application/json + ParameterSetName: + - --location --tags --name --resource-group + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Creating","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}' + headers: + cache-control: + - no-cache + content-length: + - '619' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:42:26 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-quota: + - '[{"currentUsed":4,"limit":50,"name":{"localizedValue":"Account resource quota","value":"Account + resource quota"},"target":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_datrywkgqr6mfnic2batum7zhzzekrutyfed7ajmopnqmg7bfkqdq2mavcabi7fdxo/providers/Microsoft.DataShare/accounts/cli_test_account"}]' + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Creating","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}' + headers: + cache-control: + - no-cache + content-length: + - '619' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:42:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Creating","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}' + headers: + cache-control: + - no-cache + content-length: + - '619' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:42:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Creating","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}' + headers: + cache-control: + - no-cache + content-length: + - '619' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:43:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Creating","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}' + headers: + cache-control: + - no-cache + content-length: + - '619' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:43:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Succeeded","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}' + headers: + cache-control: + - no-cache + content-length: + - '620' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account show + Connection: + - keep-alive + ParameterSetName: + - -n --resource-group + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Succeeded","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}' + headers: + cache-control: + - no-cache + content-length: + - '620' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Succeeded","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}' + headers: + cache-control: + - no-cache + content-length: + - '620' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:33 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts?api-version=2019-11-01 + response: + body: + string: '{"value":[{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Succeeded","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Red","tag2":"White"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '632' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"tags": {"tag1": "Green"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account update + Connection: + - keep-alive + Content-Length: + - '27' + Content-Type: + - application/json + ParameterSetName: + - --name --tags --resource-group + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PATCH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"},"properties":{"createdAt":"2020-04-23T13:42:23.9427652Z","provisioningState":"Succeeded","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account","name":"cli_test_account","type":"Microsoft.DataShare/accounts","location":"westus2","tags":{"tag1":"Green"}}' + headers: + cache-control: + - no-cache + content-length: + - '607' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:40 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"description": "share description", "shareKind": "CopyBased", + "terms": "Confidential"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare create + Connection: + - keep-alive + Content-Length: + - '103' + Content-Type: + - application/json + ParameterSetName: + - --account-name --resource-group --description --share-kind --terms --name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share?api-version=2019-11-01 + response: + body: + string: '{"properties":{"description":"share description","terms":"Confidential","shareKind":"CopyBased","provisioningState":"Succeeded","createdAt":"2020-04-23T13:44:43.0008884Z","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share","name":"cli_test_share","type":"Microsoft.DataShare/shares"}' + headers: + cache-control: + - no-cache + content-length: + - '521' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:43 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/cli_test_share + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-quota: + - '[{"currentUsed":1,"limit":100,"name":{"localizedValue":"Share resource quota","value":"Share + resource quota"},"target":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_datrywkgqr6mfnic2batum7zhzzekrutyfed7ajmopnqmg7bfkqdq2mavcabi7fdxo/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share"}]' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare show + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share?api-version=2019-11-01 + response: + body: + string: '{"properties":{"description":"share description","terms":"Confidential","shareKind":"CopyBased","provisioningState":"Succeeded","createdAt":"2020-04-23T13:44:43.0008884Z","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share","name":"cli_test_share","type":"Microsoft.DataShare/shares"}' + headers: + cache-control: + - no-cache + content-length: + - '521' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:44 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare show + Connection: + - keep-alive + ParameterSetName: + - --ids + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share?api-version=2019-11-01 + response: + body: + string: '{"properties":{"description":"share description","terms":"Confidential","shareKind":"CopyBased","provisioningState":"Succeeded","createdAt":"2020-04-23T13:44:43.0008884Z","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share","name":"cli_test_share","type":"Microsoft.DataShare/shares"}' + headers: + cache-control: + - no-cache + content-length: + - '521' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:46 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"description":"share description","terms":"Confidential","shareKind":"CopyBased","provisioningState":"Succeeded","createdAt":"2020-04-23T13:44:43.0008884Z","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share","name":"cli_test_share","type":"Microsoft.DataShare/shares"}]}' + headers: + cache-control: + - no-cache + content-length: + - '533' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage account show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3 + azure-mgmt-storage/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0 (MSI) + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.Storage/storageAccounts/clitestdatas000002?api-version=2019-06-01 + response: + body: + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.Storage/storageAccounts/clitestdatas000002","name":"clitestdatas000002","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"privateEndpointConnections":[],"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-23T13:41:53.6606746Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-23T13:41:53.6606746Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-04-23T13:41:53.5981225Z","primaryEndpoints":{"blob":"https://clitestdatas000002.blob.core.windows.net/","queue":"https://clitestdatas000002.queue.core.windows.net/","table":"https://clitestdatas000002.table.core.windows.net/","file":"https://clitestdatas000002.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}}' + headers: + cache-control: + - no-cache + content-length: + - '1263' + content-type: + - application/json + date: + - Thu, 23 Apr 2020 13:44:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1", + "principalId": "b5246a1a-9dff-43b3-bef8-4e1ae69234aa", "principalType": "ServicePrincipal"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '270' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --role --assignee-object-id --assignee-principal-type --scope + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3 + azure-mgmt-authorization/0.52.0 Azure-SDK-For-Python AZURECLI/2.4.0 (MSI) + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.Storage/storageAccounts/clitestdatas000002/providers/Microsoft.Authorization/roleAssignments/0276c401-3a81-4eb5-ac21-1d520c24c5e1?api-version=2018-09-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/2a2b9908-6ea1-4ae2-8e65-a410df84e7d1","principalId":"b5246a1a-9dff-43b3-bef8-4e1ae69234aa","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.Storage/storageAccounts/clitestdatas000002","createdOn":"2020-04-23T13:44:51.4815862Z","updatedOn":"2020-04-23T13:44:51.4815862Z","createdBy":null,"updatedBy":"31e600e0-d7ce-4e98-a927-19bb30042e44"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.Storage/storageAccounts/clitestdatas000002/providers/Microsoft.Authorization/roleAssignments/0276c401-3a81-4eb5-ac21-1d520c24c5e1","type":"Microsoft.Authorization/roleAssignments","name":"0276c401-3a81-4eb5-ac21-1d520c24c5e1"}' + headers: + cache-control: + - no-cache + content-length: + - '1041' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:44:58 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; SameSite=None; secure; HttpOnly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage container create + Connection: + - keep-alive + ParameterSetName: + - --account-name --name + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3 + azure-mgmt-storage/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0 (MSI) + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/storageAccounts?api-version=2019-06-01 + response: + body: + string: '{"value":[{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-core-poc/providers/Microsoft.Storage/storageAccounts/azurecorepoc","name":"azurecorepoc","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-12-26T02:38:58.8233588Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-12-26T02:38:58.8233588Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-12-26T02:38:58.7452329Z","primaryEndpoints":{"dfs":"https://azurecorepoc.dfs.core.windows.net/","web":"https://azurecorepoc.z13.web.core.windows.net/","blob":"https://azurecorepoc.blob.core.windows.net/","queue":"https://azurecorepoc.queue.core.windows.net/","table":"https://azurecorepoc.table.core.windows.net/","file":"https://azurecorepoc.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://azurecorepoc-secondary.dfs.core.windows.net/","web":"https://azurecorepoc-secondary.z13.web.core.windows.net/","blob":"https://azurecorepoc-secondary.blob.core.windows.net/","queue":"https://azurecorepoc-secondary.queue.core.windows.net/","table":"https://azurecorepoc-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.Storage/storageAccounts/fystac","name":"fystac","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-08T03:10:13.4426715Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-08T03:10:13.4426715Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-08T03:10:13.3645539Z","primaryEndpoints":{"dfs":"https://fystac.dfs.core.windows.net/","web":"https://fystac.z13.web.core.windows.net/","blob":"https://fystac.blob.core.windows.net/","queue":"https://fystac.queue.core.windows.net/","table":"https://fystac.table.core.windows.net/","file":"https://fystac.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://fystac-secondary.dfs.core.windows.net/","web":"https://fystac-secondary.z13.web.core.windows.net/","blob":"https://fystac-secondary.blob.core.windows.net/","queue":"https://fystac-secondary.queue.core.windows.net/","table":"https://fystac-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/harold/providers/Microsoft.Storage/storageAccounts/harold","name":"harold","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-29T13:11:16.4123336Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-29T13:11:16.4123336Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-29T13:11:16.3342268Z","primaryEndpoints":{"dfs":"https://harold.dfs.core.windows.net/","web":"https://harold.z13.web.core.windows.net/","blob":"https://harold.blob.core.windows.net/","queue":"https://harold.queue.core.windows.net/","table":"https://harold.table.core.windows.net/","file":"https://harold.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://harold-secondary.dfs.core.windows.net/","web":"https://harold-secondary.z13.web.core.windows.net/","blob":"https://harold-secondary.blob.core.windows.net/","queue":"https://harold-secondary.queue.core.windows.net/","table":"https://harold-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qianwens/providers/Microsoft.Storage/storageAccounts/qianwenadls","name":"qianwenadls","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"isHnsEnabled":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-01T10:11:06.0357634Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-01T10:11:06.0357634Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-01T10:11:05.9576622Z","primaryEndpoints":{"dfs":"https://qianwenadls.dfs.core.windows.net/","web":"https://qianwenadls.z13.web.core.windows.net/","blob":"https://qianwenadls.blob.core.windows.net/","queue":"https://qianwenadls.queue.core.windows.net/","table":"https://qianwenadls.table.core.windows.net/","file":"https://qianwenadls.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://qianwenadls-secondary.dfs.core.windows.net/","web":"https://qianwenadls-secondary.z13.web.core.windows.net/","blob":"https://qianwenadls-secondary.blob.core.windows.net/","queue":"https://qianwenadls-secondary.queue.core.windows.net/","table":"https://qianwenadls-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qianwens/providers/Microsoft.Storage/storageAccounts/qianwendev","name":"qianwendev","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qianwens/providers/Microsoft.Network/virtualNetworks/QIAN/subnets/default","action":"Allow","state":"Succeeded"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qianwens/providers/Microsoft.Network/virtualNetworks/qianwendev/subnets/default","action":"Allow","state":"Succeeded"}],"ipRules":[{"value":"23.45.1.0/24","action":"Allow"},{"value":"23.45.1.1/24","action":"Allow"}],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-12T03:29:28.0084761Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-12T03:29:28.0084761Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-02-12T03:29:27.9459854Z","primaryEndpoints":{"dfs":"https://qianwendev.dfs.core.windows.net/","web":"https://qianwendev.z13.web.core.windows.net/","blob":"https://qianwendev.blob.core.windows.net/","queue":"https://qianwendev.queue.core.windows.net/","table":"https://qianwendev.table.core.windows.net/","file":"https://qianwendev.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://qianwendev-secondary.dfs.core.windows.net/","web":"https://qianwendev-secondary.z13.web.core.windows.net/","blob":"https://qianwendev-secondary.blob.core.windows.net/","queue":"https://qianwendev-secondary.queue.core.windows.net/","table":"https://qianwendev-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qianwens/providers/Microsoft.Storage/storageAccounts/qianwenhpctarget","name":"qianwenhpctarget","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T07:09:20.3073299Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T07:09:20.3073299Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-06T07:09:20.2291899Z","primaryEndpoints":{"dfs":"https://qianwenhpctarget.dfs.core.windows.net/","web":"https://qianwenhpctarget.z13.web.core.windows.net/","blob":"https://qianwenhpctarget.blob.core.windows.net/","queue":"https://qianwenhpctarget.queue.core.windows.net/","table":"https://qianwenhpctarget.table.core.windows.net/","file":"https://qianwenhpctarget.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://qianwenhpctarget-secondary.dfs.core.windows.net/","web":"https://qianwenhpctarget-secondary.z13.web.core.windows.net/","blob":"https://qianwenhpctarget-secondary.blob.core.windows.net/","queue":"https://qianwenhpctarget-secondary.queue.core.windows.net/","table":"https://qianwenhpctarget-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/zhoxing","name":"zhoxing","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-15T08:53:45.4310180Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-15T08:53:45.4310180Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-15T08:53:45.3528671Z","primaryEndpoints":{"dfs":"https://zhoxing.dfs.core.windows.net/","web":"https://zhoxing.z13.web.core.windows.net/","blob":"https://zhoxing.blob.core.windows.net/","queue":"https://zhoxing.queue.core.windows.net/","table":"https://zhoxing.table.core.windows.net/","file":"https://zhoxing.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://zhoxing-secondary.dfs.core.windows.net/","web":"https://zhoxing-secondary.z13.web.core.windows.net/","blob":"https://zhoxing-secondary.blob.core.windows.net/","queue":"https://zhoxing-secondary.queue.core.windows.net/","table":"https://zhoxing-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jlrg1/providers/Microsoft.Storage/storageAccounts/jlst","name":"jlst","type":"Microsoft.Storage/storageAccounts","location":"eastus2","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-14T12:05:01.5230050Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-14T12:05:01.5230050Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-14T12:05:01.4448881Z","primaryEndpoints":{"dfs":"https://jlst.dfs.core.windows.net/","web":"https://jlst.z20.web.core.windows.net/","blob":"https://jlst.blob.core.windows.net/","queue":"https://jlst.queue.core.windows.net/","table":"https://jlst.table.core.windows.net/","file":"https://jlst.file.core.windows.net/"},"primaryLocation":"eastus2","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jlrg1/providers/Microsoft.Storage/storageAccounts/tsiext","name":"tsiext","type":"Microsoft.Storage/storageAccounts","location":"eastus2","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-16T04:42:27.8695098Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-16T04:42:27.8695098Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-16T04:42:27.8070104Z","primaryEndpoints":{"dfs":"https://tsiext.dfs.core.windows.net/","web":"https://tsiext.z20.web.core.windows.net/","blob":"https://tsiext.blob.core.windows.net/","queue":"https://tsiext.queue.core.windows.net/","table":"https://tsiext.table.core.windows.net/","file":"https://tsiext.file.core.windows.net/"},"primaryLocation":"eastus2","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/azhoxingtest9851","name":"azhoxingtest9851","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{"hidden-DevTestLabs-LabUId":"6e279161-d008-42b7-90a1-6801fc4bc4ca"},"properties":{"privateEndpointConnections":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/azhoxingtest9851/privateEndpointConnections/azhoxingtest9851.6911cd49-cfc1-4bcf-887b-6941ff2b8756","name":"azhoxingtest9851.6911cd49-cfc1-4bcf-887b-6941ff2b8756","type":"Microsoft.Storage/storageAccounts/privateEndpointConnections","properties":{"provisioningState":"Succeeded","privateEndpoint":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuhcentral/providers/Microsoft.Network/privateEndpoints/test"},"privateLinkServiceConnectionState":{"status":"Approved","description":"Auto-Approved","actionRequired":"None"}}}],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-21T05:43:15.2811036Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-21T05:43:15.2811036Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-02-21T05:43:15.2029670Z","primaryEndpoints":{"dfs":"https://azhoxingtest9851.dfs.core.windows.net/","web":"https://azhoxingtest9851.z22.web.core.windows.net/","blob":"https://azhoxingtest9851.blob.core.windows.net/","queue":"https://azhoxingtest9851.queue.core.windows.net/","table":"https://azhoxingtest9851.table.core.windows.net/","file":"https://azhoxingtest9851.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi/providers/Microsoft.Storage/storageAccounts/clitest6yrafi3cntx2cngw3","name":"clitest6yrafi3cntx2cngw3","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T14:00:05.4412024Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T14:00:05.4412024Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-06T14:00:05.3786989Z","primaryEndpoints":{"blob":"https://clitest6yrafi3cntx2cngw3.blob.core.windows.net/","queue":"https://clitest6yrafi3cntx2cngw3.queue.core.windows.net/","table":"https://clitest6yrafi3cntx2cngw3.table.core.windows.net/","file":"https://clitest6yrafi3cntx2cngw3.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxn5n2vkeyewiwob4e7e6nqiblkvvgc5qorevejhsntblvdlc2t373rrvy45p/providers/Microsoft.Storage/storageAccounts/clitest75g6r5uwkj7ker7wu","name":"clitest75g6r5uwkj7ker7wu","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T06:35:53.9029562Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T06:35:53.9029562Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T06:35:53.8248647Z","primaryEndpoints":{"blob":"https://clitest75g6r5uwkj7ker7wu.blob.core.windows.net/","queue":"https://clitest75g6r5uwkj7ker7wu.queue.core.windows.net/","table":"https://clitest75g6r5uwkj7ker7wu.table.core.windows.net/","file":"https://clitest75g6r5uwkj7ker7wu.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox5gpbe2knrizxsitmvje3fbdl44tf6cvpfqbpvsyicxmupsbyhmlcrg4wesk/providers/Microsoft.Storage/storageAccounts/clitest7b5n3o4aahl5rafju","name":"clitest7b5n3o4aahl5rafju","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T08:27:23.1140038Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T08:27:23.1140038Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T08:27:23.0514944Z","primaryEndpoints":{"blob":"https://clitest7b5n3o4aahl5rafju.blob.core.windows.net/","queue":"https://clitest7b5n3o4aahl5rafju.queue.core.windows.net/","table":"https://clitest7b5n3o4aahl5rafju.table.core.windows.net/","file":"https://clitest7b5n3o4aahl5rafju.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxlekg7y4dtg2pnsaueisdkyqi5mnvmlwxto2cpu3kv7snll4uc37q2rm4wme/providers/Microsoft.Storage/storageAccounts/clitestcu3wv45lektdc3whs","name":"clitestcu3wv45lektdc3whs","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T08:35:04.7531702Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T08:35:04.7531702Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T08:35:04.6750427Z","primaryEndpoints":{"blob":"https://clitestcu3wv45lektdc3whs.blob.core.windows.net/","queue":"https://clitestcu3wv45lektdc3whs.queue.core.windows.net/","table":"https://clitestcu3wv45lektdc3whs.table.core.windows.net/","file":"https://clitestcu3wv45lektdc3whs.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxeg3csudujzrh2zcvbjytg6gvlkp6sjfcozveffblaqhrzhsslvpr54lg7n2/providers/Microsoft.Storage/storageAccounts/clitestgdfhjpgc2wgbrddlq","name":"clitestgdfhjpgc2wgbrddlq","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T06:28:55.9105364Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T06:28:55.9105364Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T06:28:55.8480330Z","primaryEndpoints":{"blob":"https://clitestgdfhjpgc2wgbrddlq.blob.core.windows.net/","queue":"https://clitestgdfhjpgc2wgbrddlq.queue.core.windows.net/","table":"https://clitestgdfhjpgc2wgbrddlq.table.core.windows.net/","file":"https://clitestgdfhjpgc2wgbrddlq.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxoe2qtcqlnxonqpub522jgmpzgeegwhowl2qo6xqgfwtqcd3jzicz5yraawi/providers/Microsoft.Storage/storageAccounts/clitestl6h6fa53d2gbmohn3","name":"clitestl6h6fa53d2gbmohn3","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T13:59:30.5816034Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T13:59:30.5816034Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-06T13:59:30.5034613Z","primaryEndpoints":{"blob":"https://clitestl6h6fa53d2gbmohn3.blob.core.windows.net/","queue":"https://clitestl6h6fa53d2gbmohn3.queue.core.windows.net/","table":"https://clitestl6h6fa53d2gbmohn3.table.core.windows.net/","file":"https://clitestl6h6fa53d2gbmohn3.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxfgdxtb5b3moqarfyogd7fcognbrlsihjlj3acnscrixetycujoejzzalyi3/providers/Microsoft.Storage/storageAccounts/clitestldg5uo7ika27utek4","name":"clitestldg5uo7ika27utek4","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T08:59:48.7196866Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T08:59:48.7196866Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T08:59:48.6728325Z","primaryEndpoints":{"blob":"https://clitestldg5uo7ika27utek4.blob.core.windows.net/","queue":"https://clitestldg5uo7ika27utek4.queue.core.windows.net/","table":"https://clitestldg5uo7ika27utek4.table.core.windows.net/","file":"https://clitestldg5uo7ika27utek4.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn/providers/Microsoft.Storage/storageAccounts/clitestm7nikx6sld4npo42d","name":"clitestm7nikx6sld4npo42d","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T14:20:54.5597796Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T14:20:54.5597796Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-06T14:20:54.4972558Z","primaryEndpoints":{"blob":"https://clitestm7nikx6sld4npo42d.blob.core.windows.net/","queue":"https://clitestm7nikx6sld4npo42d.queue.core.windows.net/","table":"https://clitestm7nikx6sld4npo42d.table.core.windows.net/","file":"https://clitestm7nikx6sld4npo42d.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxrg2slunrj5vx5aydveu66wkj6rh3ildamkumi4zojpcf6f4vastgfp4v3rw/providers/Microsoft.Storage/storageAccounts/clitestmap7c2xyjf3gsd7yg","name":"clitestmap7c2xyjf3gsd7yg","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T09:10:56.7318732Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T09:10:56.7318732Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T09:10:56.6381622Z","primaryEndpoints":{"blob":"https://clitestmap7c2xyjf3gsd7yg.blob.core.windows.net/","queue":"https://clitestmap7c2xyjf3gsd7yg.queue.core.windows.net/","table":"https://clitestmap7c2xyjf3gsd7yg.table.core.windows.net/","file":"https://clitestmap7c2xyjf3gsd7yg.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxu7woflo47pjem4rfw2djuvafywtfnprfpduospdfotkqkudaylsua3ybqpa/providers/Microsoft.Storage/storageAccounts/clitestnxsheqf5s5rcht46h","name":"clitestnxsheqf5s5rcht46h","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T06:40:27.7931436Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T06:40:27.7931436Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T06:40:27.7305929Z","primaryEndpoints":{"blob":"https://clitestnxsheqf5s5rcht46h.blob.core.windows.net/","queue":"https://clitestnxsheqf5s5rcht46h.queue.core.windows.net/","table":"https://clitestnxsheqf5s5rcht46h.table.core.windows.net/","file":"https://clitestnxsheqf5s5rcht46h.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databox52yrfbe7molrqhwdubnr2jcijd22xsz3hgcg3btf3sza5boeklwgzzq5sfn/providers/Microsoft.Storage/storageAccounts/clitestqsel4b35pkfyubvyx","name":"clitestqsel4b35pkfyubvyx","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T14:20:08.8041709Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-06T14:20:08.8041709Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-06T14:20:08.7417121Z","primaryEndpoints":{"blob":"https://clitestqsel4b35pkfyubvyx.blob.core.windows.net/","queue":"https://clitestqsel4b35pkfyubvyx.queue.core.windows.net/","table":"https://clitestqsel4b35pkfyubvyx.table.core.windows.net/","file":"https://clitestqsel4b35pkfyubvyx.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databoxam64dpcskfsb23dkj6zbvxysimh24e3upfdsdmuxbdl2j25ckz2uz5lht5y/providers/Microsoft.Storage/storageAccounts/clitesty2xsxbbcego73beie","name":"clitesty2xsxbbcego73beie","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T05:23:45.1933083Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T05:23:45.1933083Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T05:23:45.1308322Z","primaryEndpoints":{"blob":"https://clitesty2xsxbbcego73beie.blob.core.windows.net/","queue":"https://clitesty2xsxbbcego73beie.queue.core.windows.net/","table":"https://clitesty2xsxbbcego73beie.table.core.windows.net/","file":"https://clitesty2xsxbbcego73beie.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"BlobStorage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/databricks-rg-test-ws-udvur1v2scpdh/providers/Microsoft.Storage/storageAccounts/dbstorageazqiaxnzp45c4","name":"dbstorageazqiaxnzp45c4","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{"application":"databricks","databricks-environment":"true"},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-13T03:47:02.5418099Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-13T03:47:02.5418099Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-13T03:47:02.4793343Z","primaryEndpoints":{"dfs":"https://dbstorageazqiaxnzp45c4.dfs.core.windows.net/","blob":"https://dbstorageazqiaxnzp45c4.blob.core.windows.net/","table":"https://dbstorageazqiaxnzp45c4.table.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available"}},{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"BlobStorage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/databricks-rg-test-ws-1-tkfkantu2y5cn/providers/Microsoft.Storage/storageAccounts/dbstorageucp43z6irid74","name":"dbstorageucp43z6irid74","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{"application":"databricks","databricks-environment":"true"},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-13T04:56:17.5656641Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-13T04:56:17.5656641Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-13T04:56:17.4874850Z","primaryEndpoints":{"dfs":"https://dbstorageucp43z6irid74.dfs.core.windows.net/","blob":"https://dbstorageucp43z6irid74.blob.core.windows.net/","table":"https://dbstorageucp43z6irid74.table.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available"}},{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"BlobStorage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/databricks-rg-test-ws-2-eh7zug4x1inzs/providers/Microsoft.Storage/storageAccounts/dbstoragezkqasazvxxgmu","name":"dbstoragezkqasazvxxgmu","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{"application":"databricks","databricks-environment":"true"},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-13T05:06:37.5070495Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-13T05:06:37.5070495Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-13T05:06:37.4288942Z","primaryEndpoints":{"dfs":"https://dbstoragezkqasazvxxgmu.dfs.core.windows.net/","blob":"https://dbstoragezkqasazvxxgmu.blob.core.windows.net/","table":"https://dbstoragezkqasazvxxgmu.table.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/yutestdbsawestus","name":"yutestdbsawestus","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-25T11:11:24.7554090Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-25T11:11:24.7554090Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-02-25T11:11:24.6772540Z","primaryEndpoints":{"dfs":"https://yutestdbsawestus.dfs.core.windows.net/","web":"https://yutestdbsawestus.z22.web.core.windows.net/","blob":"https://yutestdbsawestus.blob.core.windows.net/","queue":"https://yutestdbsawestus.queue.core.windows.net/","table":"https://yutestdbsawestus.table.core.windows.net/","file":"https://yutestdbsawestus.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://yutestdbsawestus-secondary.dfs.core.windows.net/","web":"https://yutestdbsawestus-secondary.z22.web.core.windows.net/","blob":"https://yutestdbsawestus-secondary.blob.core.windows.net/","queue":"https://yutestdbsawestus-secondary.queue.core.windows.net/","table":"https://yutestdbsawestus-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/yutestlro","name":"yutestlro","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-28T07:50:15.1386919Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-28T07:50:15.1386919Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-02-28T07:50:15.0762161Z","primaryEndpoints":{"blob":"https://yutestlro.blob.core.windows.net/","queue":"https://yutestlro.queue.core.windows.net/","table":"https://yutestlro.table.core.windows.net/","file":"https://yutestlro.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"blob":"https://yutestlro-secondary.blob.core.windows.net/","queue":"https://yutestlro-secondary.queue.core.windows.net/","table":"https://yutestlro-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"BlobStorage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/databricks-rg-my-standard-space-fez3hbt1bsvmr/providers/Microsoft.Storage/storageAccounts/dbstoragefez3hbt1bsvmr","name":"dbstoragefez3hbt1bsvmr","type":"Microsoft.Storage/storageAccounts","location":"eastasia","tags":{"application":"databricks","databricks-environment":"true"},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-16T03:14:00.7822307Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-16T03:14:00.7822307Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-16T03:14:00.7197710Z","primaryEndpoints":{"dfs":"https://dbstoragefez3hbt1bsvmr.dfs.core.windows.net/","blob":"https://dbstoragefez3hbt1bsvmr.blob.core.windows.net/","table":"https://dbstoragefez3hbt1bsvmr.table.core.windows.net/"},"primaryLocation":"eastasia","statusOfPrimary":"available","secondaryLocation":"southeastasia","statusOfSecondary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Storage/storageAccounts/fengws1storage296335f3c7","name":"fengws1storage296335f3c7","type":"Microsoft.Storage/storageAccounts","location":"eastasia","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-14T14:41:02.2224956Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-14T14:41:02.2224956Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-02-14T14:41:02.1600089Z","primaryEndpoints":{"dfs":"https://fengws1storage296335f3c7.dfs.core.windows.net/","web":"https://fengws1storage296335f3c7.z7.web.core.windows.net/","blob":"https://fengws1storage296335f3c7.blob.core.windows.net/","queue":"https://fengws1storage296335f3c7.queue.core.windows.net/","table":"https://fengws1storage296335f3c7.table.core.windows.net/","file":"https://fengws1storage296335f3c7.file.core.windows.net/"},"primaryLocation":"eastasia","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/xiaojianxu/providers/Microsoft.Storage/storageAccounts/xxjtest1","name":"xxjtest1","type":"Microsoft.Storage/storageAccounts","location":"eastasia","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-20T08:36:23.6918366Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-20T08:36:23.6918366Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-20T08:36:23.6293420Z","primaryEndpoints":{"dfs":"https://xxjtest1.dfs.core.windows.net/","web":"https://xxjtest1.z7.web.core.windows.net/","blob":"https://xxjtest1.blob.core.windows.net/","queue":"https://xxjtest1.queue.core.windows.net/","table":"https://xxjtest1.table.core.windows.net/","file":"https://xxjtest1.file.core.windows.net/"},"primaryLocation":"eastasia","statusOfPrimary":"available","secondaryLocation":"southeastasia","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://xxjtest1-secondary.dfs.core.windows.net/","web":"https://xxjtest1-secondary.z7.web.core.windows.net/","blob":"https://xxjtest1-secondary.blob.core.windows.net/","queue":"https://xxjtest1-secondary.queue.core.windows.net/","table":"https://xxjtest1-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6i4hl6iakg/providers/Microsoft.Storage/storageAccounts/clitestu3p7a7ib4n4y7gt4m","name":"clitestu3p7a7ib4n4y7gt4m","type":"Microsoft.Storage/storageAccounts","location":"southeastasia","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-12-30T01:51:53.0814418Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-12-30T01:51:53.0814418Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2019-12-30T01:51:53.0189478Z","primaryEndpoints":{"blob":"https://clitestu3p7a7ib4n4y7gt4m.blob.core.windows.net/","queue":"https://clitestu3p7a7ib4n4y7gt4m.queue.core.windows.net/","table":"https://clitestu3p7a7ib4n4y7gt4m.table.core.windows.net/","file":"https://clitestu3p7a7ib4n4y7gt4m.file.core.windows.net/"},"primaryLocation":"southeastasia","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jlrg1/providers/Microsoft.Storage/storageAccounts/jlcsst","name":"jlcsst","type":"Microsoft.Storage/storageAccounts","location":"southeastasia","tags":{"ms-resource-usage":"azure-cloud-shell"},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-02T07:15:45.8047726Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-02T07:15:45.8047726Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-02T07:15:45.7422455Z","primaryEndpoints":{"dfs":"https://jlcsst.dfs.core.windows.net/","web":"https://jlcsst.z23.web.core.windows.net/","blob":"https://jlcsst.blob.core.windows.net/","queue":"https://jlcsst.queue.core.windows.net/","table":"https://jlcsst.table.core.windows.net/","file":"https://jlcsst.file.core.windows.net/"},"primaryLocation":"southeastasia","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jlvm2rg/providers/Microsoft.Storage/storageAccounts/jlvm2rgdiag","name":"jlvm2rgdiag","type":"Microsoft.Storage/storageAccounts","location":"southeastasia","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T04:41:48.6974827Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T04:41:48.6974827Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-03T04:41:48.6505931Z","primaryEndpoints":{"blob":"https://jlvm2rgdiag.blob.core.windows.net/","queue":"https://jlvm2rgdiag.queue.core.windows.net/","table":"https://jlvm2rgdiag.table.core.windows.net/","file":"https://jlvm2rgdiag.file.core.windows.net/"},"primaryLocation":"southeastasia","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qianwens/providers/Microsoft.Storage/storageAccounts/qianwensdiag","name":"qianwensdiag","type":"Microsoft.Storage/storageAccounts","location":"southeastasia","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-04T07:17:09.1138103Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-04T07:17:09.1138103Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-02-04T07:17:09.0514178Z","primaryEndpoints":{"blob":"https://qianwensdiag.blob.core.windows.net/","queue":"https://qianwensdiag.queue.core.windows.net/","table":"https://qianwensdiag.table.core.windows.net/","file":"https://qianwensdiag.file.core.windows.net/"},"primaryLocation":"southeastasia","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yeming/providers/Microsoft.Storage/storageAccounts/yeming","name":"yeming","type":"Microsoft.Storage/storageAccounts","location":"southeastasia","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-12-04T06:41:07.4012554Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-12-04T06:41:07.4012554Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-12-04T06:41:07.3699884Z","primaryEndpoints":{"dfs":"https://yeming.dfs.core.windows.net/","web":"https://yeming.z23.web.core.windows.net/","blob":"https://yeming.blob.core.windows.net/","queue":"https://yeming.queue.core.windows.net/","table":"https://yeming.table.core.windows.net/","file":"https://yeming.file.core.windows.net/"},"primaryLocation":"southeastasia","statusOfPrimary":"available","secondaryLocation":"eastasia","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://yeming-secondary.dfs.core.windows.net/","web":"https://yeming-secondary.z23.web.core.windows.net/","blob":"https://yeming-secondary.blob.core.windows.net/","queue":"https://yeming-secondary.queue.core.windows.net/","table":"https://yeming-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bim-rg/providers/Microsoft.Storage/storageAccounts/bimrgdiag","name":"bimrgdiag","type":"Microsoft.Storage/storageAccounts","location":"japaneast","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-12T15:04:32.1018377Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-12T15:04:32.1018377Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-02-12T15:04:32.0706109Z","primaryEndpoints":{"blob":"https://bimrgdiag.blob.core.windows.net/","queue":"https://bimrgdiag.queue.core.windows.net/","table":"https://bimrgdiag.table.core.windows.net/","file":"https://bimrgdiag.file.core.windows.net/"},"primaryLocation":"japaneast","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Storage/storageAccounts/fengclirgdiag","name":"fengclirgdiag","type":"Microsoft.Storage/storageAccounts","location":"japaneast","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-01T07:10:20.0599535Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-01T07:10:20.0599535Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-01T07:10:19.9974827Z","primaryEndpoints":{"blob":"https://fengclirgdiag.blob.core.windows.net/","queue":"https://fengclirgdiag.queue.core.windows.net/","table":"https://fengclirgdiag.table.core.windows.net/","file":"https://fengclirgdiag.file.core.windows.net/"},"primaryLocation":"japaneast","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/store6472qnxl3vv5o","name":"store6472qnxl3vv5o","type":"Microsoft.Storage/storageAccounts","location":"southcentralus","tags":{"project":"Digital + Platform","env":"CI"},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-27T08:24:34.7235260Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-27T08:24:34.7235260Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-02-27T08:24:34.6453999Z","primaryEndpoints":{"blob":"https://store6472qnxl3vv5o.blob.core.windows.net/","queue":"https://store6472qnxl3vv5o.queue.core.windows.net/","table":"https://store6472qnxl3vv5o.table.core.windows.net/","file":"https://store6472qnxl3vv5o.file.core.windows.net/"},"primaryLocation":"southcentralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Storage/storageAccounts/extmigrate","name":"extmigrate","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-16T08:26:10.6796218Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-16T08:26:10.6796218Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-16T08:26:10.5858998Z","primaryEndpoints":{"blob":"https://extmigrate.blob.core.windows.net/","queue":"https://extmigrate.queue.core.windows.net/","table":"https://extmigrate.table.core.windows.net/","file":"https://extmigrate.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"blob":"https://extmigrate-secondary.blob.core.windows.net/","queue":"https://extmigrate-secondary.queue.core.windows.net/","table":"https://extmigrate-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Storage/storageAccounts/fengsa","name":"fengsa","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-01-06T04:33:22.9379802Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-01-06T04:33:22.9379802Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-01-06T04:33:22.8754625Z","primaryEndpoints":{"dfs":"https://fengsa.dfs.core.windows.net/","web":"https://fengsa.z19.web.core.windows.net/","blob":"https://fengsa.blob.core.windows.net/","queue":"https://fengsa.queue.core.windows.net/","table":"https://fengsa.table.core.windows.net/","file":"https://fengsa.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://fengsa-secondary.dfs.core.windows.net/","web":"https://fengsa-secondary.z19.web.core.windows.net/","blob":"https://fengsa-secondary.blob.core.windows.net/","queue":"https://fengsa-secondary.queue.core.windows.net/","table":"https://fengsa-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/idgdiag6472qnxl3vv5o","name":"idgdiag6472qnxl3vv5o","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-03T08:53:11.2645207Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-03T08:53:11.2645207Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-03T08:53:11.1707355Z","primaryEndpoints":{"dfs":"https://idgdiag6472qnxl3vv5o.dfs.core.windows.net/","web":"https://idgdiag6472qnxl3vv5o.z19.web.core.windows.net/","blob":"https://idgdiag6472qnxl3vv5o.blob.core.windows.net/","queue":"https://idgdiag6472qnxl3vv5o.queue.core.windows.net/","table":"https://idgdiag6472qnxl3vv5o.table.core.windows.net/","file":"https://idgdiag6472qnxl3vv5o.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/storageaccountzhoxib2a8","name":"storageaccountzhoxib2a8","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-25T06:54:03.9825980Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-25T06:54:03.9825980Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-02-25T06:54:03.9044955Z","primaryEndpoints":{"blob":"https://storageaccountzhoxib2a8.blob.core.windows.net/","queue":"https://storageaccountzhoxib2a8.queue.core.windows.net/","table":"https://storageaccountzhoxib2a8.table.core.windows.net/","file":"https://storageaccountzhoxib2a8.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro1","name":"storagesfrepro1","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:07:42.2058942Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:07:42.2058942Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:07:42.1277444Z","primaryEndpoints":{"dfs":"https://storagesfrepro1.dfs.core.windows.net/","web":"https://storagesfrepro1.z19.web.core.windows.net/","blob":"https://storagesfrepro1.blob.core.windows.net/","queue":"https://storagesfrepro1.queue.core.windows.net/","table":"https://storagesfrepro1.table.core.windows.net/","file":"https://storagesfrepro1.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro1-secondary.dfs.core.windows.net/","web":"https://storagesfrepro1-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro1-secondary.blob.core.windows.net/","queue":"https://storagesfrepro1-secondary.queue.core.windows.net/","table":"https://storagesfrepro1-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro10","name":"storagesfrepro10","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:14:00.8753334Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:14:00.8753334Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:14:00.7815921Z","primaryEndpoints":{"dfs":"https://storagesfrepro10.dfs.core.windows.net/","web":"https://storagesfrepro10.z19.web.core.windows.net/","blob":"https://storagesfrepro10.blob.core.windows.net/","queue":"https://storagesfrepro10.queue.core.windows.net/","table":"https://storagesfrepro10.table.core.windows.net/","file":"https://storagesfrepro10.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro10-secondary.dfs.core.windows.net/","web":"https://storagesfrepro10-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro10-secondary.blob.core.windows.net/","queue":"https://storagesfrepro10-secondary.queue.core.windows.net/","table":"https://storagesfrepro10-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro11","name":"storagesfrepro11","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:14:28.9859417Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:14:28.9859417Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:14:28.8609347Z","primaryEndpoints":{"dfs":"https://storagesfrepro11.dfs.core.windows.net/","web":"https://storagesfrepro11.z19.web.core.windows.net/","blob":"https://storagesfrepro11.blob.core.windows.net/","queue":"https://storagesfrepro11.queue.core.windows.net/","table":"https://storagesfrepro11.table.core.windows.net/","file":"https://storagesfrepro11.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro11-secondary.dfs.core.windows.net/","web":"https://storagesfrepro11-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro11-secondary.blob.core.windows.net/","queue":"https://storagesfrepro11-secondary.queue.core.windows.net/","table":"https://storagesfrepro11-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro12","name":"storagesfrepro12","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:15:15.6785362Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:15:15.6785362Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:15:15.5848345Z","primaryEndpoints":{"dfs":"https://storagesfrepro12.dfs.core.windows.net/","web":"https://storagesfrepro12.z19.web.core.windows.net/","blob":"https://storagesfrepro12.blob.core.windows.net/","queue":"https://storagesfrepro12.queue.core.windows.net/","table":"https://storagesfrepro12.table.core.windows.net/","file":"https://storagesfrepro12.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro12-secondary.dfs.core.windows.net/","web":"https://storagesfrepro12-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro12-secondary.blob.core.windows.net/","queue":"https://storagesfrepro12-secondary.queue.core.windows.net/","table":"https://storagesfrepro12-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro13","name":"storagesfrepro13","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:16:55.7609361Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:16:55.7609361Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:16:55.6671828Z","primaryEndpoints":{"dfs":"https://storagesfrepro13.dfs.core.windows.net/","web":"https://storagesfrepro13.z19.web.core.windows.net/","blob":"https://storagesfrepro13.blob.core.windows.net/","queue":"https://storagesfrepro13.queue.core.windows.net/","table":"https://storagesfrepro13.table.core.windows.net/","file":"https://storagesfrepro13.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro13-secondary.dfs.core.windows.net/","web":"https://storagesfrepro13-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro13-secondary.blob.core.windows.net/","queue":"https://storagesfrepro13-secondary.queue.core.windows.net/","table":"https://storagesfrepro13-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro14","name":"storagesfrepro14","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:17:40.7661469Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:17:40.7661469Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:17:40.6880204Z","primaryEndpoints":{"dfs":"https://storagesfrepro14.dfs.core.windows.net/","web":"https://storagesfrepro14.z19.web.core.windows.net/","blob":"https://storagesfrepro14.blob.core.windows.net/","queue":"https://storagesfrepro14.queue.core.windows.net/","table":"https://storagesfrepro14.table.core.windows.net/","file":"https://storagesfrepro14.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro14-secondary.dfs.core.windows.net/","web":"https://storagesfrepro14-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro14-secondary.blob.core.windows.net/","queue":"https://storagesfrepro14-secondary.queue.core.windows.net/","table":"https://storagesfrepro14-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro15","name":"storagesfrepro15","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:18:52.1812445Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:18:52.1812445Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:18:52.0718543Z","primaryEndpoints":{"dfs":"https://storagesfrepro15.dfs.core.windows.net/","web":"https://storagesfrepro15.z19.web.core.windows.net/","blob":"https://storagesfrepro15.blob.core.windows.net/","queue":"https://storagesfrepro15.queue.core.windows.net/","table":"https://storagesfrepro15.table.core.windows.net/","file":"https://storagesfrepro15.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro15-secondary.dfs.core.windows.net/","web":"https://storagesfrepro15-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro15-secondary.blob.core.windows.net/","queue":"https://storagesfrepro15-secondary.queue.core.windows.net/","table":"https://storagesfrepro15-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro16","name":"storagesfrepro16","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:19:33.1863807Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:19:33.1863807Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:19:33.0770034Z","primaryEndpoints":{"dfs":"https://storagesfrepro16.dfs.core.windows.net/","web":"https://storagesfrepro16.z19.web.core.windows.net/","blob":"https://storagesfrepro16.blob.core.windows.net/","queue":"https://storagesfrepro16.queue.core.windows.net/","table":"https://storagesfrepro16.table.core.windows.net/","file":"https://storagesfrepro16.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro16-secondary.dfs.core.windows.net/","web":"https://storagesfrepro16-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro16-secondary.blob.core.windows.net/","queue":"https://storagesfrepro16-secondary.queue.core.windows.net/","table":"https://storagesfrepro16-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro17","name":"storagesfrepro17","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:04:23.5553513Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:04:23.5553513Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:04:23.4771469Z","primaryEndpoints":{"dfs":"https://storagesfrepro17.dfs.core.windows.net/","web":"https://storagesfrepro17.z19.web.core.windows.net/","blob":"https://storagesfrepro17.blob.core.windows.net/","queue":"https://storagesfrepro17.queue.core.windows.net/","table":"https://storagesfrepro17.table.core.windows.net/","file":"https://storagesfrepro17.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro17-secondary.dfs.core.windows.net/","web":"https://storagesfrepro17-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro17-secondary.blob.core.windows.net/","queue":"https://storagesfrepro17-secondary.queue.core.windows.net/","table":"https://storagesfrepro17-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro18","name":"storagesfrepro18","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:04:53.8320772Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:04:53.8320772Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:04:53.7383176Z","primaryEndpoints":{"dfs":"https://storagesfrepro18.dfs.core.windows.net/","web":"https://storagesfrepro18.z19.web.core.windows.net/","blob":"https://storagesfrepro18.blob.core.windows.net/","queue":"https://storagesfrepro18.queue.core.windows.net/","table":"https://storagesfrepro18.table.core.windows.net/","file":"https://storagesfrepro18.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro18-secondary.dfs.core.windows.net/","web":"https://storagesfrepro18-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro18-secondary.blob.core.windows.net/","queue":"https://storagesfrepro18-secondary.queue.core.windows.net/","table":"https://storagesfrepro18-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro19","name":"storagesfrepro19","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:05:26.3650238Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:05:26.3650238Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:05:26.2556326Z","primaryEndpoints":{"dfs":"https://storagesfrepro19.dfs.core.windows.net/","web":"https://storagesfrepro19.z19.web.core.windows.net/","blob":"https://storagesfrepro19.blob.core.windows.net/","queue":"https://storagesfrepro19.queue.core.windows.net/","table":"https://storagesfrepro19.table.core.windows.net/","file":"https://storagesfrepro19.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro19-secondary.dfs.core.windows.net/","web":"https://storagesfrepro19-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro19-secondary.blob.core.windows.net/","queue":"https://storagesfrepro19-secondary.queue.core.windows.net/","table":"https://storagesfrepro19-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro2","name":"storagesfrepro2","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:08:45.8498203Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:08:45.8498203Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:08:45.7717196Z","primaryEndpoints":{"dfs":"https://storagesfrepro2.dfs.core.windows.net/","web":"https://storagesfrepro2.z19.web.core.windows.net/","blob":"https://storagesfrepro2.blob.core.windows.net/","queue":"https://storagesfrepro2.queue.core.windows.net/","table":"https://storagesfrepro2.table.core.windows.net/","file":"https://storagesfrepro2.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro2-secondary.dfs.core.windows.net/","web":"https://storagesfrepro2-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro2-secondary.blob.core.windows.net/","queue":"https://storagesfrepro2-secondary.queue.core.windows.net/","table":"https://storagesfrepro2-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro20","name":"storagesfrepro20","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:06:07.4295934Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:06:07.4295934Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:06:07.3358422Z","primaryEndpoints":{"dfs":"https://storagesfrepro20.dfs.core.windows.net/","web":"https://storagesfrepro20.z19.web.core.windows.net/","blob":"https://storagesfrepro20.blob.core.windows.net/","queue":"https://storagesfrepro20.queue.core.windows.net/","table":"https://storagesfrepro20.table.core.windows.net/","file":"https://storagesfrepro20.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro20-secondary.dfs.core.windows.net/","web":"https://storagesfrepro20-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro20-secondary.blob.core.windows.net/","queue":"https://storagesfrepro20-secondary.queue.core.windows.net/","table":"https://storagesfrepro20-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro21","name":"storagesfrepro21","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:06:37.4780251Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:06:37.4780251Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:06:37.3686460Z","primaryEndpoints":{"dfs":"https://storagesfrepro21.dfs.core.windows.net/","web":"https://storagesfrepro21.z19.web.core.windows.net/","blob":"https://storagesfrepro21.blob.core.windows.net/","queue":"https://storagesfrepro21.queue.core.windows.net/","table":"https://storagesfrepro21.table.core.windows.net/","file":"https://storagesfrepro21.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro21-secondary.dfs.core.windows.net/","web":"https://storagesfrepro21-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro21-secondary.blob.core.windows.net/","queue":"https://storagesfrepro21-secondary.queue.core.windows.net/","table":"https://storagesfrepro21-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro22","name":"storagesfrepro22","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:06:59.8295391Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:06:59.8295391Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:06:59.7201581Z","primaryEndpoints":{"dfs":"https://storagesfrepro22.dfs.core.windows.net/","web":"https://storagesfrepro22.z19.web.core.windows.net/","blob":"https://storagesfrepro22.blob.core.windows.net/","queue":"https://storagesfrepro22.queue.core.windows.net/","table":"https://storagesfrepro22.table.core.windows.net/","file":"https://storagesfrepro22.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro22-secondary.dfs.core.windows.net/","web":"https://storagesfrepro22-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro22-secondary.blob.core.windows.net/","queue":"https://storagesfrepro22-secondary.queue.core.windows.net/","table":"https://storagesfrepro22-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro23","name":"storagesfrepro23","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:07:29.0846619Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:07:29.0846619Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:07:29.0065050Z","primaryEndpoints":{"dfs":"https://storagesfrepro23.dfs.core.windows.net/","web":"https://storagesfrepro23.z19.web.core.windows.net/","blob":"https://storagesfrepro23.blob.core.windows.net/","queue":"https://storagesfrepro23.queue.core.windows.net/","table":"https://storagesfrepro23.table.core.windows.net/","file":"https://storagesfrepro23.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro23-secondary.dfs.core.windows.net/","web":"https://storagesfrepro23-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro23-secondary.blob.core.windows.net/","queue":"https://storagesfrepro23-secondary.queue.core.windows.net/","table":"https://storagesfrepro23-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro24","name":"storagesfrepro24","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:07:53.2658712Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:07:53.2658712Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:07:53.1565651Z","primaryEndpoints":{"dfs":"https://storagesfrepro24.dfs.core.windows.net/","web":"https://storagesfrepro24.z19.web.core.windows.net/","blob":"https://storagesfrepro24.blob.core.windows.net/","queue":"https://storagesfrepro24.queue.core.windows.net/","table":"https://storagesfrepro24.table.core.windows.net/","file":"https://storagesfrepro24.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro24-secondary.dfs.core.windows.net/","web":"https://storagesfrepro24-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro24-secondary.blob.core.windows.net/","queue":"https://storagesfrepro24-secondary.queue.core.windows.net/","table":"https://storagesfrepro24-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro25","name":"storagesfrepro25","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:08:18.7432319Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T05:08:18.7432319Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T05:08:18.6338258Z","primaryEndpoints":{"dfs":"https://storagesfrepro25.dfs.core.windows.net/","web":"https://storagesfrepro25.z19.web.core.windows.net/","blob":"https://storagesfrepro25.blob.core.windows.net/","queue":"https://storagesfrepro25.queue.core.windows.net/","table":"https://storagesfrepro25.table.core.windows.net/","file":"https://storagesfrepro25.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro25-secondary.dfs.core.windows.net/","web":"https://storagesfrepro25-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro25-secondary.blob.core.windows.net/","queue":"https://storagesfrepro25-secondary.queue.core.windows.net/","table":"https://storagesfrepro25-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro3","name":"storagesfrepro3","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:09:19.5698333Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:09:19.5698333Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:09:19.3510997Z","primaryEndpoints":{"dfs":"https://storagesfrepro3.dfs.core.windows.net/","web":"https://storagesfrepro3.z19.web.core.windows.net/","blob":"https://storagesfrepro3.blob.core.windows.net/","queue":"https://storagesfrepro3.queue.core.windows.net/","table":"https://storagesfrepro3.table.core.windows.net/","file":"https://storagesfrepro3.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro3-secondary.dfs.core.windows.net/","web":"https://storagesfrepro3-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro3-secondary.blob.core.windows.net/","queue":"https://storagesfrepro3-secondary.queue.core.windows.net/","table":"https://storagesfrepro3-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro4","name":"storagesfrepro4","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:09:54.9930953Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:09:54.9930953Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:09:54.8993063Z","primaryEndpoints":{"dfs":"https://storagesfrepro4.dfs.core.windows.net/","web":"https://storagesfrepro4.z19.web.core.windows.net/","blob":"https://storagesfrepro4.blob.core.windows.net/","queue":"https://storagesfrepro4.queue.core.windows.net/","table":"https://storagesfrepro4.table.core.windows.net/","file":"https://storagesfrepro4.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro4-secondary.dfs.core.windows.net/","web":"https://storagesfrepro4-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro4-secondary.blob.core.windows.net/","queue":"https://storagesfrepro4-secondary.queue.core.windows.net/","table":"https://storagesfrepro4-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro5","name":"storagesfrepro5","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:10:48.1114395Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:10:48.1114395Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:10:48.0177273Z","primaryEndpoints":{"dfs":"https://storagesfrepro5.dfs.core.windows.net/","web":"https://storagesfrepro5.z19.web.core.windows.net/","blob":"https://storagesfrepro5.blob.core.windows.net/","queue":"https://storagesfrepro5.queue.core.windows.net/","table":"https://storagesfrepro5.table.core.windows.net/","file":"https://storagesfrepro5.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro5-secondary.dfs.core.windows.net/","web":"https://storagesfrepro5-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro5-secondary.blob.core.windows.net/","queue":"https://storagesfrepro5-secondary.queue.core.windows.net/","table":"https://storagesfrepro5-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro6","name":"storagesfrepro6","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:11:28.0269117Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:11:28.0269117Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:11:27.9331594Z","primaryEndpoints":{"dfs":"https://storagesfrepro6.dfs.core.windows.net/","web":"https://storagesfrepro6.z19.web.core.windows.net/","blob":"https://storagesfrepro6.blob.core.windows.net/","queue":"https://storagesfrepro6.queue.core.windows.net/","table":"https://storagesfrepro6.table.core.windows.net/","file":"https://storagesfrepro6.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro6-secondary.dfs.core.windows.net/","web":"https://storagesfrepro6-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro6-secondary.blob.core.windows.net/","queue":"https://storagesfrepro6-secondary.queue.core.windows.net/","table":"https://storagesfrepro6-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro7","name":"storagesfrepro7","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:12:08.7761892Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:12:08.7761892Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:12:08.6824637Z","primaryEndpoints":{"dfs":"https://storagesfrepro7.dfs.core.windows.net/","web":"https://storagesfrepro7.z19.web.core.windows.net/","blob":"https://storagesfrepro7.blob.core.windows.net/","queue":"https://storagesfrepro7.queue.core.windows.net/","table":"https://storagesfrepro7.table.core.windows.net/","file":"https://storagesfrepro7.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro7-secondary.dfs.core.windows.net/","web":"https://storagesfrepro7-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro7-secondary.blob.core.windows.net/","queue":"https://storagesfrepro7-secondary.queue.core.windows.net/","table":"https://storagesfrepro7-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro8","name":"storagesfrepro8","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:12:39.5221164Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:12:39.5221164Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:12:39.4283923Z","primaryEndpoints":{"dfs":"https://storagesfrepro8.dfs.core.windows.net/","web":"https://storagesfrepro8.z19.web.core.windows.net/","blob":"https://storagesfrepro8.blob.core.windows.net/","queue":"https://storagesfrepro8.queue.core.windows.net/","table":"https://storagesfrepro8.table.core.windows.net/","file":"https://storagesfrepro8.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro8-secondary.dfs.core.windows.net/","web":"https://storagesfrepro8-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro8-secondary.blob.core.windows.net/","queue":"https://storagesfrepro8-secondary.queue.core.windows.net/","table":"https://storagesfrepro8-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/storage-v2rt-repro/providers/Microsoft.Storage/storageAccounts/storagesfrepro9","name":"storagesfrepro9","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:13:18.1628430Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2019-02-26T04:13:18.1628430Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2019-02-26T04:13:18.0691096Z","primaryEndpoints":{"dfs":"https://storagesfrepro9.dfs.core.windows.net/","web":"https://storagesfrepro9.z19.web.core.windows.net/","blob":"https://storagesfrepro9.blob.core.windows.net/","queue":"https://storagesfrepro9.queue.core.windows.net/","table":"https://storagesfrepro9.table.core.windows.net/","file":"https://storagesfrepro9.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagesfrepro9-secondary.dfs.core.windows.net/","web":"https://storagesfrepro9-secondary.z19.web.core.windows.net/","blob":"https://storagesfrepro9-secondary.blob.core.windows.net/","queue":"https://storagesfrepro9-secondary.queue.core.windows.net/","table":"https://storagesfrepro9-secondary.table.core.windows.net/"}}},{"sku":{"name":"Premium_LRS","tier":"Premium"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/zhoxing2","name":"zhoxing2","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-21T06:54:17.8037418Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-21T06:54:17.8037418Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-21T06:54:17.7099423Z","primaryEndpoints":{"dfs":"https://zhoxing2.dfs.core.windows.net/","web":"https://zhoxing2.z19.web.core.windows.net/","blob":"https://zhoxing2.blob.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/zhoxingtest","name":"zhoxingtest","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"isHnsEnabled":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-20T09:01:14.2087269Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-20T09:01:14.2087269Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-20T09:01:14.1462280Z","primaryEndpoints":{"dfs":"https://zhoxingtest.dfs.core.windows.net/","web":"https://zhoxingtest.z19.web.core.windows.net/","blob":"https://zhoxingtest.blob.core.windows.net/","queue":"https://zhoxingtest.queue.core.windows.net/","table":"https://zhoxingtest.table.core.windows.net/","file":"https://zhoxingtest.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://zhoxingtest-secondary.dfs.core.windows.net/","web":"https://zhoxingtest-secondary.z19.web.core.windows.net/","blob":"https://zhoxingtest-secondary.blob.core.windows.net/","queue":"https://zhoxingtest-secondary.queue.core.windows.net/","table":"https://zhoxingtest-secondary.table.core.windows.net/"}}},{"sku":{"name":"Premium_LRS","tier":"Premium"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zhoxing-test/providers/Microsoft.Storage/storageAccounts/zhoxingtest2","name":"zhoxingtest2","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-21T06:52:39.2007383Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-21T06:52:39.2007383Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-21T06:52:39.1039700Z","primaryEndpoints":{"dfs":"https://zhoxingtest2.dfs.core.windows.net/","web":"https://zhoxingtest2.z19.web.core.windows.net/","blob":"https://zhoxingtest2.blob.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuhcentral/providers/Microsoft.Storage/storageAccounts/zuhstorage","name":"zuhstorage","type":"Microsoft.Storage/storageAccounts","location":"centralus","tags":{"key":"val","key2":"val2"},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-02T06:04:55.7104787Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-02T06:04:55.7104787Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-02T06:04:55.6167450Z","primaryEndpoints":{"dfs":"https://zuhstorage.dfs.core.windows.net/","web":"https://zuhstorage.z19.web.core.windows.net/","blob":"https://zuhstorage.blob.core.windows.net/","queue":"https://zuhstorage.queue.core.windows.net/","table":"https://zuhstorage.table.core.windows.net/","file":"https://zuhstorage.file.core.windows.net/"},"primaryLocation":"centralus","statusOfPrimary":"available","secondaryLocation":"eastus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://zuhstorage-secondary.dfs.core.windows.net/","web":"https://zuhstorage-secondary.z19.web.core.windows.net/","blob":"https://zuhstorage-secondary.blob.core.windows.net/","queue":"https://zuhstorage-secondary.queue.core.windows.net/","table":"https://zuhstorage-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.Storage/storageAccounts/clitestdatas000002","name":"clitestdatas000002","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"privateEndpointConnections":[],"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-23T13:41:53.6606746Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-23T13:41:53.6606746Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-04-23T13:41:53.5981225Z","primaryEndpoints":{"blob":"https://clitestdatas000002.blob.core.windows.net/","queue":"https://clitestdatas000002.queue.core.windows.net/","table":"https://clitestdatas000002.table.core.windows.net/","file":"https://clitestdatas000002.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_datwup7nhvv2zbeog5cowmt74wcgwnrm6i5z2ss6dyqwfzen4jh3hjpyl2hwz5ynxy/providers/Microsoft.Storage/storageAccounts/clitestdatasmezc7dtd565a","name":"clitestdatasmezc7dtd565a","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"privateEndpointConnections":[],"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-23T13:14:14.9779346Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-23T13:14:14.9779346Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-04-23T13:14:14.8998336Z","primaryEndpoints":{"blob":"https://clitestdatasmezc7dtd565a.blob.core.windows.net/","queue":"https://clitestdatasmezc7dtd565a.queue.core.windows.net/","table":"https://clitestdatasmezc7dtd565a.table.core.windows.net/","file":"https://clitestdatasmezc7dtd565a.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Storage/storageAccounts/fengwsstorage28dfde17cb1","name":"fengwsstorage28dfde17cb1","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-07T04:11:42.2482670Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-07T04:11:42.2482670Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-02-07T04:11:42.1857797Z","primaryEndpoints":{"dfs":"https://fengwsstorage28dfde17cb1.dfs.core.windows.net/","web":"https://fengwsstorage28dfde17cb1.z5.web.core.windows.net/","blob":"https://fengwsstorage28dfde17cb1.blob.core.windows.net/","queue":"https://fengwsstorage28dfde17cb1.queue.core.windows.net/","table":"https://fengwsstorage28dfde17cb1.table.core.windows.net/","file":"https://fengwsstorage28dfde17cb1.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/xiaojianxu/providers/Microsoft.Storage/storageAccounts/xxjwetus2storage","name":"xxjwetus2storage","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-30T06:26:54.2163538Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-30T06:26:54.2163538Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-30T06:26:54.1538919Z","primaryEndpoints":{"dfs":"https://xxjwetus2storage.dfs.core.windows.net/","web":"https://xxjwetus2storage.z5.web.core.windows.net/","blob":"https://xxjwetus2storage.blob.core.windows.net/","queue":"https://xxjwetus2storage.queue.core.windows.net/","table":"https://xxjwetus2storage.table.core.windows.net/","file":"https://xxjwetus2storage.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available","secondaryLocation":"westcentralus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://xxjwetus2storage-secondary.dfs.core.windows.net/","web":"https://xxjwetus2storage-secondary.z5.web.core.windows.net/","blob":"https://xxjwetus2storage-secondary.blob.core.windows.net/","queue":"https://xxjwetus2storage-secondary.queue.core.windows.net/","table":"https://xxjwetus2storage-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bim-rg/providers/Microsoft.Storage/storageAccounts/bimstorageacc","name":"bimstorageacc","type":"Microsoft.Storage/storageAccounts","location":"westcentralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T07:20:55.2327590Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-03T07:20:55.2327590Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-03T07:20:55.1858389Z","primaryEndpoints":{"dfs":"https://bimstorageacc.dfs.core.windows.net/","web":"https://bimstorageacc.z4.web.core.windows.net/","blob":"https://bimstorageacc.blob.core.windows.net/","queue":"https://bimstorageacc.queue.core.windows.net/","table":"https://bimstorageacc.table.core.windows.net/","file":"https://bimstorageacc.file.core.windows.net/"},"primaryLocation":"westcentralus","statusOfPrimary":"available","secondaryLocation":"westus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://bimstorageacc-secondary.dfs.core.windows.net/","web":"https://bimstorageacc-secondary.z4.web.core.windows.net/","blob":"https://bimstorageacc-secondary.blob.core.windows.net/","queue":"https://bimstorageacc-secondary.queue.core.windows.net/","table":"https://bimstorageacc-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/sfsfsfsssf","name":"sfsfsfsssf","type":"Microsoft.Storage/storageAccounts","location":"westcentralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-05T07:16:53.7141799Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-05T07:16:53.7141799Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-03-05T07:16:53.6829148Z","primaryEndpoints":{"blob":"https://sfsfsfsssf.blob.core.windows.net/","queue":"https://sfsfsfsssf.queue.core.windows.net/","table":"https://sfsfsfsssf.table.core.windows.net/","file":"https://sfsfsfsssf.file.core.windows.net/"},"primaryLocation":"westcentralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/stststeset","name":"stststeset","type":"Microsoft.Storage/storageAccounts","location":"westcentralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-05T07:13:11.0482184Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-05T07:13:11.0482184Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-05T07:13:10.9856962Z","primaryEndpoints":{"dfs":"https://stststeset.dfs.core.windows.net/","web":"https://stststeset.z4.web.core.windows.net/","blob":"https://stststeset.blob.core.windows.net/","queue":"https://stststeset.queue.core.windows.net/","table":"https://stststeset.table.core.windows.net/","file":"https://stststeset.file.core.windows.net/"},"primaryLocation":"westcentralus","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yu-test-rg-westus/providers/Microsoft.Storage/storageAccounts/yusawcu","name":"yusawcu","type":"Microsoft.Storage/storageAccounts","location":"westcentralus","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-26T09:39:00.0292799Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-02-26T09:39:00.0292799Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-02-26T09:38:59.9667703Z","primaryEndpoints":{"dfs":"https://yusawcu.dfs.core.windows.net/","web":"https://yusawcu.z4.web.core.windows.net/","blob":"https://yusawcu.blob.core.windows.net/","queue":"https://yusawcu.queue.core.windows.net/","table":"https://yusawcu.table.core.windows.net/","file":"https://yusawcu.file.core.windows.net/"},"primaryLocation":"westcentralus","statusOfPrimary":"available","secondaryLocation":"westus2","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://yusawcu-secondary.dfs.core.windows.net/","web":"https://yusawcu-secondary.z4.web.core.windows.net/","blob":"https://yusawcu-secondary.blob.core.windows.net/","queue":"https://yusawcu-secondary.queue.core.windows.net/","table":"https://yusawcu-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Storage/storageAccounts/storageextension","name":"storageextension","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-30T08:44:19.2476281Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-30T08:44:19.2476281Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-30T08:44:19.2007782Z","primaryEndpoints":{"dfs":"https://storageextension.dfs.core.windows.net/","web":"https://storageextension.z3.web.core.windows.net/","blob":"https://storageextension.blob.core.windows.net/","queue":"https://storageextension.queue.core.windows.net/","table":"https://storageextension.table.core.windows.net/","file":"https://storageextension.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available","secondaryLocation":"centraluseuap","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storageextension-secondary.dfs.core.windows.net/","web":"https://storageextension-secondary.z3.web.core.windows.net/","blob":"https://storageextension-secondary.blob.core.windows.net/","queue":"https://storageextension-secondary.queue.core.windows.net/","table":"https://storageextension-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Storage/storageAccounts/storagetest22","name":"storagetest22","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-21T03:43:07.5284378Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-21T03:43:07.5284378Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-21T03:43:07.4503168Z","primaryEndpoints":{"dfs":"https://storagetest22.dfs.core.windows.net/","web":"https://storagetest22.z3.web.core.windows.net/","blob":"https://storagetest22.blob.core.windows.net/","queue":"https://storagetest22.queue.core.windows.net/","table":"https://storagetest22.table.core.windows.net/","file":"https://storagetest22.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available","secondaryLocation":"centraluseuap","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://storagetest22-secondary.dfs.core.windows.net/","web":"https://storagetest22-secondary.z3.web.core.windows.net/","blob":"https://storagetest22-secondary.blob.core.windows.net/","queue":"https://storagetest22-secondary.queue.core.windows.net/","table":"https://storagetest22-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Storage/storageAccounts/zuhadls","name":"zuhadls","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"privateEndpointConnections":[],"isHnsEnabled":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-20T03:10:14.5178215Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-20T03:10:14.5178215Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-20T03:10:14.4709025Z","primaryEndpoints":{"dfs":"https://zuhadls.dfs.core.windows.net/","web":"https://zuhadls.z3.web.core.windows.net/","blob":"https://zuhadls.blob.core.windows.net/","queue":"https://zuhadls.queue.core.windows.net/","table":"https://zuhadls.table.core.windows.net/","file":"https://zuhadls.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available","secondaryLocation":"centraluseuap","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://zuhadls-secondary.dfs.core.windows.net/","web":"https://zuhadls-secondary.z3.web.core.windows.net/","blob":"https://zuhadls-secondary.blob.core.windows.net/","queue":"https://zuhadls-secondary.queue.core.windows.net/","table":"https://zuhadls-secondary.table.core.windows.net/"}}},{"identity":{"principalId":"d2e83740-1d90-4aa7-901c-97c510d4f7ec","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"SystemAssigned"},"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Storage/storageAccounts/zuhdefault","name":"zuhdefault","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"keyvaultproperties":{"currentVersionedKeyIdentifier":"https://zuhkeyvault.vault.azure.net/keys/zuhkey/2780bea583714f33b8051ea24f90a246","lastKeyRotationTimestamp":"2020-04-09T06:46:21.5968704Z","currentVersionedKeyExpirationTimestamp":"1970-01-01T00:00:00.0000000Z","keyvaulturi":"https://zuhkeyvault.vault.azure.net/","keyname":"zuhkey","keyversion":"2780bea583714f33b8051ea24f90a246"},"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-30T03:16:26.4697374Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-30T03:16:26.4697374Z"}},"keySource":"Microsoft.Keyvault"},"provisioningState":"Succeeded","creationTime":"2020-03-30T03:16:26.4228869Z","primaryEndpoints":{"blob":"https://zuhdefault.blob.core.windows.net/","queue":"https://zuhdefault.queue.core.windows.net/","table":"https://zuhdefault.table.core.windows.net/","file":"https://zuhdefault.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available","secondaryLocation":"centraluseuap","statusOfSecondary":"available","secondaryEndpoints":{"blob":"https://zuhdefault-secondary.blob.core.windows.net/","queue":"https://zuhdefault-secondary.queue.core.windows.net/","table":"https://zuhdefault-secondary.table.core.windows.net/"}}},{"identity":{"principalId":"1b643393-f35b-408e-b50c-2fbef882d353","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a","type":"SystemAssigned"},"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Storage/storageAccounts/zuhlrs","name":"zuhlrs","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"keyvaultproperties":{"currentVersionedKeyIdentifier":"https://zuhkeyvault.vault.azure.net/keys/storagekey/04704263f43241dca0ff99c3794fd8c7","lastKeyRotationTimestamp":"2020-04-15T08:06:44.8059437Z","currentVersionedKeyExpirationTimestamp":"1970-01-01T00:00:00.0000000Z","keyvaulturi":"https://zuhkeyvault.vault.azure.net/","keyname":"storagekey","keyversion":""},"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-18T01:57:52.8994530Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-18T01:57:52.8994530Z"}},"keySource":"Microsoft.Keyvault"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-18T01:57:52.8369202Z","primaryEndpoints":{"dfs":"https://zuhlrs.dfs.core.windows.net/","web":"https://zuhlrs.z3.web.core.windows.net/","blob":"https://zuhlrs.blob.core.windows.net/","queue":"https://zuhlrs.queue.core.windows.net/","table":"https://zuhlrs.table.core.windows.net/","file":"https://zuhlrs.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available"}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Storage/storageAccounts/zuhors","name":"zuhors","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-30T05:15:21.5112485Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-03-30T05:15:21.5112485Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-03-30T05:15:21.4800200Z","primaryEndpoints":{"dfs":"https://zuhors.dfs.core.windows.net/","web":"https://zuhors.z3.web.core.windows.net/","blob":"https://zuhors.blob.core.windows.net/","queue":"https://zuhors.queue.core.windows.net/","table":"https://zuhors.table.core.windows.net/","file":"https://zuhors.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available","secondaryLocation":"centraluseuap","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://zuhors-secondary.dfs.core.windows.net/","web":"https://zuhors-secondary.z3.web.core.windows.net/","blob":"https://zuhors-secondary.blob.core.windows.net/","queue":"https://zuhors-secondary.queue.core.windows.net/","table":"https://zuhors-secondary.table.core.windows.net/"}}},{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/zuh/providers/Microsoft.Storage/storageAccounts/zuhstoragetest","name":"zuhstoragetest","type":"Microsoft.Storage/storageAccounts","location":"eastus2euap","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-20T07:16:48.8761196Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-20T07:16:48.8761196Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-20T07:16:48.8448300Z","primaryEndpoints":{"dfs":"https://zuhstoragetest.dfs.core.windows.net/","web":"https://zuhstoragetest.z3.web.core.windows.net/","blob":"https://zuhstoragetest.blob.core.windows.net/","queue":"https://zuhstoragetest.queue.core.windows.net/","table":"https://zuhstoragetest.table.core.windows.net/","file":"https://zuhstoragetest.file.core.windows.net/"},"primaryLocation":"eastus2euap","statusOfPrimary":"available","secondaryLocation":"centraluseuap","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://zuhstoragetest-secondary.dfs.core.windows.net/","web":"https://zuhstoragetest-secondary.z3.web.core.windows.net/","blob":"https://zuhstoragetest-secondary.blob.core.windows.net/","queue":"https://zuhstoragetest-secondary.queue.core.windows.net/","table":"https://zuhstoragetest-secondary.table.core.windows.net/"}}}]}' + headers: + cache-control: + - no-cache + content-length: + - '127895' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 1d135e07-2e6e-40be-a2b3-3b916a6e0da2 + - dee3f2c8-4ebe-4540-8407-ca7713724a9a + - c104a4ca-15f7-470c-bacd-faa81e9b4517 + - 2dfc2132-c363-4994-94b4-7a92972f8324 + - 4f634dd3-9a28-4a79-96a4-c226b692416f + - 714ebaf4-62c9-4b87-b9fe-f8f7cd8f4ecf + - c2bc88dc-82f1-4bbb-9066-9e0266f19444 + - 4d9514e9-6d2a-4501-846d-7cbf1bbb9c5b + - cb89a6d6-335f-451a-a1f8-86799ab6f621 + - 62943f3d-91c5-4359-8a8e-f594544946e5 + - 0720666c-126e-42db-80dd-f720caa725e0 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage container create + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --name + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3 + azure-mgmt-storage/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0 (MSI) + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.Storage/storageAccounts/clitestdatas000002/listKeys?api-version=2019-06-01 + response: + body: + string: '{"keys":[{"keyName":"key1","value":"veryFakedStorageAccountKey==","permissions":"FULL"},{"keyName":"key2","value":"veryFakedStorageAccountKey==","permissions":"FULL"}]}' + headers: + cache-control: + - no-cache + content-length: + - '288' + content-type: + - application/json + date: + - Thu, 23 Apr 2020 13:45:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '11998' + status: + code: 200 + message: OK +- request: + body: null + headers: + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - Azure-Storage/2.0.0-2.0.1 (Python CPython 3.8.2; Windows 10) AZURECLI/2.4.0 + (MSI) + x-ms-date: + - Thu, 23 Apr 2020 13:45:06 GMT + x-ms-version: + - '2018-11-09' + method: PUT + uri: https://clitestdatas000002.blob.core.windows.net/clitestcontainer?restype=container + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:45:07 GMT + etag: + - '"0x8D7E78C89BF1209"' + last-modified: + - Thu, 23 Apr 2020 13:45:08 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2018-11-09' + status: + code: 201 + message: Created +- request: + body: 'b''b\''{"kind": "Container", "properties": {"containerName": "clitestcontainer", + "resourceGroup": "cli_test_dat000001", "storageAccountName": "clitestdatas000002", + "subscriptionId": "0b1f6471-1bf0-4dda-aec3-cb9272f09590"}}\''''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare dataset create + Connection: + - keep-alive + Content-Length: + - '278' + Content-Type: + - application/json + ParameterSetName: + - --account-name --dataset --name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set?api-version=2019-11-01 + response: + body: + string: '{"properties":{"containerName":"clitestcontainer","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourceGroup":"cli_test_dat000001","storageAccountName":"clitestdatas000002","dataSetId":"031a78ef-0cfc-45b0-88a3-a20a58f3a87a"},"kind":"Container","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set","name":"cli_test_data_set","type":"Microsoft.DataShare/DataSets"}' + headers: + cache-control: + - no-cache + content-length: + - '639' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:11 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-quota: + - '[{"currentUsed":1,"limit":100,"name":{"localizedValue":"DataSet resource + quota","value":"DataSet resource quota"},"target":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_datrywkgqr6mfnic2batum7zhzzekrutyfed7ajmopnqmg7bfkqdq2mavcabi7fdxo/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set"}]' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare dataset show + Connection: + - keep-alive + ParameterSetName: + - --account-name --name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set?api-version=2019-11-01 + response: + body: + string: '{"properties":{"containerName":"clitestcontainer","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourceGroup":"cli_test_dat000001","storageAccountName":"clitestdatas000002","dataSetId":"031a78ef-0cfc-45b0-88a3-a20a58f3a87a"},"kind":"Container","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set","name":"cli_test_data_set","type":"Microsoft.DataShare/DataSets"}' + headers: + cache-control: + - no-cache + content-length: + - '639' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare dataset list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"containerName":"clitestcontainer","subscriptionId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","resourceGroup":"cli_test_dat000001","storageAccountName":"clitestdatas000002","dataSetId":"031a78ef-0cfc-45b0-88a3-a20a58f3a87a"},"kind":"Container","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set","name":"cli_test_data_set","type":"Microsoft.DataShare/DataSets"}]}' + headers: + cache-control: + - no-cache + content-length: + - '651' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"kind": "ScheduleBased", "properties": {"recurrenceInterval": "Day", "synchronizationTime": + "2020-04-05T10:50:00.000Z"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare synchronization-setting create + Connection: + - keep-alive + Content-Length: + - '121' + Content-Type: + - application/json + ParameterSetName: + - --account-name --resource-group --share-name --name --recurrence-interval + --synchronization-time + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/synchronizationSettings/cli_test_synchronization_setting?api-version=2019-11-01 + response: + body: + string: '{"properties":{"recurrenceInterval":"Day","synchronizationTime":"2020-04-05T10:50:00Z","createdAt":"2020-04-23T13:45:18.9184873Z","userName":"Feng + Zhou","provisioningState":"Succeeded"},"kind":"ScheduleBased","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/synchronizationSettings/cli_test_synchronization_setting","name":"cli_test_synchronization_setting","type":"Microsoft.DataShare/SynchronizationSettings"}' + headers: + cache-control: + - no-cache + content-length: + - '589' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:18 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/synchronizationSettings/cli_test_synchronization_setting + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare synchronization-setting show + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-name --name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/synchronizationSettings/cli_test_synchronization_setting?api-version=2019-11-01 + response: + body: + string: '{"properties":{"recurrenceInterval":"Day","synchronizationTime":"2020-04-05T10:50:00Z","createdAt":"2020-04-23T13:45:18.9184873Z","userName":"Feng + Zhou","provisioningState":"Succeeded"},"kind":"ScheduleBased","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/synchronizationSettings/cli_test_synchronization_setting","name":"cli_test_synchronization_setting","type":"Microsoft.DataShare/SynchronizationSettings"}' + headers: + cache-control: + - no-cache + content-length: + - '589' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare synchronization-setting list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/synchronizationSettings?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"recurrenceInterval":"Day","synchronizationTime":"2020-04-05T10:50:00Z","createdAt":"2020-04-23T13:45:18.9184873Z","userName":"Feng + Zhou","provisioningState":"Succeeded"},"kind":"ScheduleBased","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/synchronizationSettings/cli_test_synchronization_setting","name":"cli_test_synchronization_setting","type":"Microsoft.DataShare/SynchronizationSettings"}]}' + headers: + cache-control: + - no-cache + content-length: + - '601' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare synchronization list + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/listSynchronizations?api-version=2019-11-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:22 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"targetEmail": "consumer@microsoft.com"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare invitation create + Connection: + - keep-alive + Content-Length: + - '54' + Content-Type: + - application/json + ParameterSetName: + - --account-name --target-email --name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/invitations/cli_test_invitation?api-version=2019-11-01 + response: + body: + string: '{"properties":{"sentAt":"2020-04-23T13:45:26.3055269Z","targetEmail":"consumer@microsoft.com","invitationStatus":"Pending","invitationId":"8844a5ff-7016-4c96-9901-1a7d005fc0ec","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/invitations/cli_test_invitation","name":"cli_test_invitation","type":"Microsoft.DataShare/Invitations"}' + headers: + cache-control: + - no-cache + content-length: + - '566' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:26 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/invitations/cli_test_invitation/8844a5ff-7016-4c96-9901-1a7d005fc0ec + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1196' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare invitation list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/invitations?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"sentAt":"2020-04-23T13:45:26.3055269Z","targetEmail":"consumer@microsoft.com","invitationStatus":"Pending","invitationId":"8844a5ff-7016-4c96-9901-1a7d005fc0ec","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/invitations/cli_test_invitation","name":"cli_test_invitation","type":"Microsoft.DataShare/Invitations"}]}' + headers: + cache-control: + - no-cache + content-length: + - '578' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare invitation show + Connection: + - keep-alive + ParameterSetName: + - --account-name --name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/invitations/cli_test_invitation?api-version=2019-11-01 + response: + body: + string: '{"properties":{"sentAt":"2020-04-23T13:45:26.3055269Z","targetEmail":"consumer@microsoft.com","invitationStatus":"Pending","invitationId":"8844a5ff-7016-4c96-9901-1a7d005fc0ec","userName":"Feng + Zhou","userEmail":"provider@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/invitations/cli_test_invitation","name":"cli_test_invitation","type":"Microsoft.DataShare/Invitations"}' + headers: + cache-control: + - no-cache + content-length: + - '566' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare invitation show + Connection: + - keep-alive + ParameterSetName: + - --account-name --name --resource-group --share-name + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3 + azure-mgmt-resource/8.0.1 Azure-SDK-For-Python AZURECLI/2.4.0 (MSI) + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/locations?api-version=2019-06-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastasia","name":"eastasia","displayName":"East + Asia","longitude":"114.188","latitude":"22.267"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southeastasia","name":"southeastasia","displayName":"Southeast + Asia","longitude":"103.833","latitude":"1.283"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralus","name":"centralus","displayName":"Central + US","longitude":"-93.6208","latitude":"41.5908"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus","name":"eastus","displayName":"East + US","longitude":"-79.8164","latitude":"37.3719"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/eastus2","name":"eastus2","displayName":"East + US 2","longitude":"-78.3889","latitude":"36.6681"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus","name":"westus","displayName":"West + US","longitude":"-122.417","latitude":"37.783"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northcentralus","name":"northcentralus","displayName":"North + Central US","longitude":"-87.6278","latitude":"41.8819"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southcentralus","name":"southcentralus","displayName":"South + Central US","longitude":"-98.5","latitude":"29.4167"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/northeurope","name":"northeurope","displayName":"North + Europe","longitude":"-6.2597","latitude":"53.3478"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westeurope","name":"westeurope","displayName":"West + Europe","longitude":"4.9","latitude":"52.3667"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japanwest","name":"japanwest","displayName":"Japan + West","longitude":"135.5022","latitude":"34.6939"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/japaneast","name":"japaneast","displayName":"Japan + East","longitude":"139.77","latitude":"35.68"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/brazilsouth","name":"brazilsouth","displayName":"Brazil + South","longitude":"-46.633","latitude":"-23.55"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiaeast","name":"australiaeast","displayName":"Australia + East","longitude":"151.2094","latitude":"-33.86"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiasoutheast","name":"australiasoutheast","displayName":"Australia + Southeast","longitude":"144.9631","latitude":"-37.8136"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southindia","name":"southindia","displayName":"South + India","longitude":"80.1636","latitude":"12.9822"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/centralindia","name":"centralindia","displayName":"Central + India","longitude":"73.9197","latitude":"18.5822"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westindia","name":"westindia","displayName":"West + India","longitude":"72.868","latitude":"19.088"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadacentral","name":"canadacentral","displayName":"Canada + Central","longitude":"-79.383","latitude":"43.653"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/canadaeast","name":"canadaeast","displayName":"Canada + East","longitude":"-71.217","latitude":"46.817"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uksouth","name":"uksouth","displayName":"UK + South","longitude":"-0.799","latitude":"50.941"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/ukwest","name":"ukwest","displayName":"UK + West","longitude":"-3.084","latitude":"53.427"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westcentralus","name":"westcentralus","displayName":"West + Central US","longitude":"-110.234","latitude":"40.890"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/westus2","name":"westus2","displayName":"West + US 2","longitude":"-119.852","latitude":"47.233"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreacentral","name":"koreacentral","displayName":"Korea + Central","longitude":"126.9780","latitude":"37.5665"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/koreasouth","name":"koreasouth","displayName":"Korea + South","longitude":"129.0756","latitude":"35.1796"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francecentral","name":"francecentral","displayName":"France + Central","longitude":"2.3730","latitude":"46.3772"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/francesouth","name":"francesouth","displayName":"France + South","longitude":"2.1972","latitude":"43.8345"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral","name":"australiacentral","displayName":"Australia + Central","longitude":"149.1244","latitude":"-35.3075"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/australiacentral2","name":"australiacentral2","displayName":"Australia + Central 2","longitude":"149.1244","latitude":"-35.3075"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaecentral","name":"uaecentral","displayName":"UAE + Central","longitude":"54.366669","latitude":"24.466667"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/uaenorth","name":"uaenorth","displayName":"UAE + North","longitude":"55.316666","latitude":"25.266666"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricanorth","name":"southafricanorth","displayName":"South + Africa North","longitude":"28.218370","latitude":"-25.731340"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/southafricawest","name":"southafricawest","displayName":"South + Africa West","longitude":"18.843266","latitude":"-34.075691"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandnorth","name":"switzerlandnorth","displayName":"Switzerland + North","longitude":"8.564572","latitude":"47.451542"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/switzerlandwest","name":"switzerlandwest","displayName":"Switzerland + West","longitude":"6.143158","latitude":"46.204391"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanynorth","name":"germanynorth","displayName":"Germany + North","longitude":"8.806422","latitude":"53.073635"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/germanywestcentral","name":"germanywestcentral","displayName":"Germany + West Central","longitude":"8.682127","latitude":"50.110924"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwaywest","name":"norwaywest","displayName":"Norway + West","longitude":"5.733107","latitude":"58.969975"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/locations/norwayeast","name":"norwayeast","displayName":"Norway + East","longitude":"10.752245","latitude":"59.913868"}]}' + headers: + cache-control: + - no-cache + content-length: + - '7129' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus2", "identity": {"type": "SystemAssigned"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account create + Connection: + - keep-alive + Content-Length: + - '63' + Content-Type: + - application/json + ParameterSetName: + - --location --name --resource-group --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b6e0a818-ff37-4b75-95bd-1b2526538ea7","tenantId":"66d4b7e9-35f0-4be4-993b-31770b23fbae"},"properties":{"createdAt":"2020-04-23T13:45:41.6651537Z","provisioningState":"Creating","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account","name":"cli_test_consumer_account","type":"Microsoft.DataShare/accounts","location":"westus2"}' + headers: + cache-control: + - no-cache + content-length: + - '543' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:42 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-quota: + - '[{"currentUsed":1,"limit":50,"name":{"localizedValue":"Account resource quota","value":"Account + resource quota"},"target":"/subscriptions/9abff005-2afc-4de1-b39c-344b9de2cc9c/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account"}]' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer invitation list + Connection: + - keep-alive + ParameterSetName: + - --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.DataShare/ListInvitations?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"description":"share description","dataSetCount":1,"invitationId":"8844a5ff-7016-4c96-9901-1a7d005fc0ec","invitationStatus":"Pending","location":"westus2","shareName":"cli_test_share","sentAt":"2020-04-23T13:45:26.3055269Z","termsOfUse":"Confidential","providerName":"Feng + Zhou","providerEmail":"provider@microsoft.com","providerTenantName":"AzureSDKTeam","userName":null,"userEmail":null},"id":"/providers/Microsoft.DataShare/consumerInvitations/8844a5ff-7016-4c96-9901-1a7d005fc0ec","name":"cli_test_invitation","type":"Microsoft.DataShare/consumerInvitations"}]}' + headers: + cache-control: + - no-cache + content-length: + - '591' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + - '' + - '' + - '' + - '' + - '' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer invitation show + Connection: + - keep-alive + ParameterSetName: + - --invitation-id --subscription --location + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/providers/Microsoft.DataShare/locations/westus2/consumerInvitations/8844a5ff-7016-4c96-9901-1a7d005fc0ec?api-version=2019-11-01 + response: + body: + string: '{"properties":{"description":"share description","dataSetCount":1,"invitationId":"8844a5ff-7016-4c96-9901-1a7d005fc0ec","invitationStatus":"Pending","location":"westus2","shareName":"cli_test_share","sentAt":"2020-04-23T13:45:26.3055269Z","termsOfUse":"Confidential","providerName":"Feng + Zhou","providerEmail":"provider@microsoft.com","providerTenantName":"AzureSDKTeam","userName":null,"userEmail":null},"id":"/providers/Microsoft.DataShare/consumerInvitations/8844a5ff-7016-4c96-9901-1a7d005fc0ec","name":"cli_test_invitation","type":"Microsoft.DataShare/consumerInvitations"}' + headers: + cache-control: + - no-cache + content-length: + - '579' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:48 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b6e0a818-ff37-4b75-95bd-1b2526538ea7","tenantId":"66d4b7e9-35f0-4be4-993b-31770b23fbae"},"properties":{"createdAt":"2020-04-23T13:45:41.6651537Z","provisioningState":"Creating","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account","name":"cli_test_consumer_account","type":"Microsoft.DataShare/accounts","location":"westus2"}' + headers: + cache-control: + - no-cache + content-length: + - '543' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:45:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b6e0a818-ff37-4b75-95bd-1b2526538ea7","tenantId":"66d4b7e9-35f0-4be4-993b-31770b23fbae"},"properties":{"createdAt":"2020-04-23T13:45:41.6651537Z","provisioningState":"Creating","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account","name":"cli_test_consumer_account","type":"Microsoft.DataShare/accounts","location":"westus2"}' + headers: + cache-control: + - no-cache + content-length: + - '543' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:46:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b6e0a818-ff37-4b75-95bd-1b2526538ea7","tenantId":"66d4b7e9-35f0-4be4-993b-31770b23fbae"},"properties":{"createdAt":"2020-04-23T13:45:41.6651537Z","provisioningState":"Creating","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account","name":"cli_test_consumer_account","type":"Microsoft.DataShare/accounts","location":"westus2"}' + headers: + cache-control: + - no-cache + content-length: + - '543' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:46:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b6e0a818-ff37-4b75-95bd-1b2526538ea7","tenantId":"66d4b7e9-35f0-4be4-993b-31770b23fbae"},"properties":{"createdAt":"2020-04-23T13:45:41.6651537Z","provisioningState":"Creating","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account","name":"cli_test_consumer_account","type":"Microsoft.DataShare/accounts","location":"westus2"}' + headers: + cache-control: + - no-cache + content-length: + - '543' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:47:21 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account wait + Connection: + - keep-alive + ParameterSetName: + - --name --resource-group --created --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account?api-version=2019-11-01 + response: + body: + string: '{"identity":{"type":"SystemAssigned","principalId":"b6e0a818-ff37-4b75-95bd-1b2526538ea7","tenantId":"66d4b7e9-35f0-4be4-993b-31770b23fbae"},"properties":{"createdAt":"2020-04-23T13:45:41.6651537Z","provisioningState":"Succeeded","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account","name":"cli_test_consumer_account","type":"Microsoft.DataShare/accounts","location":"westus2"}' + headers: + cache-control: + - no-cache + content-length: + - '544' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:47:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"invitationId": "8844a5ff-7016-4c96-9901-1a7d005fc0ec", + "sourceShareLocation": "westus2"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer share-subscription create + Connection: + - keep-alive + Content-Length: + - '106' + Content-Type: + - application/json + ParameterSetName: + - --account-name --resource-group --invitation-id --source-share-location --name + --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription?api-version=2019-11-01 + response: + body: + string: '{"properties":{"createdAt":"2020-04-23T13:47:55.3598425Z","invitationId":"8844a5ff-7016-4c96-9901-1a7d005fc0ec","sourceShareLocation":"westus2","provisioningState":"Succeeded","shareDescription":"share + description","shareKind":"CopyBased","shareName":"cli_test_share","shareSubscriptionStatus":"Active","shareTerms":"Confidential","providerName":"Feng + Zhou","providerEmail":"provider@microsoft.com","providerTenantName":"AzureSDKTeam","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription","name":"cli_test_share_subscription","type":"Microsoft.DataShare/ShareSubscriptions"}' + headers: + cache-control: + - no-cache + content-length: + - '788' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:47:55 GMT + expires: + - '-1' + location: + - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/cli_test_share_subscription + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-quota: + - '[{"currentUsed":1,"limit":100,"name":{"localizedValue":"ShareSubscription + resource quota","value":"ShareSubscription resource quota"},"target":"/subscriptions/9abff005-2afc-4de1-b39c-344b9de2cc9c/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription"}]' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer share-subscription show + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --name --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription?api-version=2019-11-01 + response: + body: + string: '{"properties":{"createdAt":"2020-04-23T13:47:55.3598425Z","invitationId":"8844a5ff-7016-4c96-9901-1a7d005fc0ec","sourceShareLocation":"westus2","provisioningState":"Succeeded","shareDescription":"share + description","shareKind":"CopyBased","shareName":"cli_test_share","shareSubscriptionStatus":"Active","shareTerms":"Confidential","providerName":"Feng + Zhou","providerEmail":"provider@microsoft.com","providerTenantName":"AzureSDKTeam","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription","name":"cli_test_share_subscription","type":"Microsoft.DataShare/ShareSubscriptions"}' + headers: + cache-control: + - no-cache + content-length: + - '788' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:47:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer share-subscription list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"createdAt":"2020-04-23T13:47:55.3598425Z","invitationId":"8844a5ff-7016-4c96-9901-1a7d005fc0ec","sourceShareLocation":"westus2","provisioningState":"Succeeded","shareDescription":"share + description","shareKind":"CopyBased","shareName":"cli_test_share","shareSubscriptionStatus":"Active","shareTerms":"Confidential","providerName":"Feng + Zhou","providerEmail":"provider@microsoft.com","providerTenantName":"AzureSDKTeam","userName":"Allen + Zhou","userEmail":"consumer@microsoft.com"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription","name":"cli_test_share_subscription","type":"Microsoft.DataShare/ShareSubscriptions"}]}' + headers: + cache-control: + - no-cache + content-length: + - '800' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:47:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer share-subscription list-source-dataset + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-subscription-name --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/ConsumerSourceDataSets?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"dataSetName":"cli_test_data_set","dataSetPath":"clitestcontainer","dataSetId":"031a78ef-0cfc-45b0-88a3-a20a58f3a87a","dataSetLocation":null,"dataSetType":"Container"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/consumerSourceDataSets/cli_test_data_set","name":"cli_test_data_set","type":"Microsoft.DataShare/ConsumerSourceDataSet"}]}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - storage account show + Connection: + - keep-alive + ParameterSetName: + - -n -g --subscription + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3 + azure-mgmt-storage/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0 (MSI) + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.Storage/storageAccounts/datashareconsumersa?api-version=2019-06-01 + response: + body: + string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.Storage/storageAccounts/datashareconsumersa","name":"datashareconsumersa","type":"Microsoft.Storage/storageAccounts","location":"westus2","tags":{},"properties":{"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-07T02:47:00.7207527Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2020-04-07T02:47:00.7207527Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2020-04-07T02:47:00.6426060Z","primaryEndpoints":{"dfs":"https://datashareconsumersa.dfs.core.windows.net/","web":"https://datashareconsumersa.z5.web.core.windows.net/","blob":"https://datashareconsumersa.blob.core.windows.net/","queue":"https://datashareconsumersa.queue.core.windows.net/","table":"https://datashareconsumersa.table.core.windows.net/","file":"https://datashareconsumersa.file.core.windows.net/"},"primaryLocation":"westus2","statusOfPrimary":"available","secondaryLocation":"westcentralus","statusOfSecondary":"available","secondaryEndpoints":{"dfs":"https://datashareconsumersa-secondary.dfs.core.windows.net/","web":"https://datashareconsumersa-secondary.z5.web.core.windows.net/","blob":"https://datashareconsumersa-secondary.blob.core.windows.net/","queue":"https://datashareconsumersa-secondary.queue.core.windows.net/","table":"https://datashareconsumersa-secondary.table.core.windows.net/"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1744' + content-type: + - application/json + date: + - Thu, 23 Apr 2020 13:48:02 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe", + "principalId": "b6e0a818-ff37-4b75-95bd-1b2526538ea7", "principalType": "ServicePrincipal"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - role assignment create + Connection: + - keep-alive + Content-Length: + - '270' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - --role --assignee-object-id --assignee-principal-type --scope --subscription + User-Agent: + - python/3.8.2 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3 + azure-mgmt-authorization/0.52.0 Azure-SDK-For-Python AZURECLI/2.4.0 (MSI) + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.Storage/storageAccounts/datashareconsumersa/providers/Microsoft.Authorization/roleAssignments/3a1bf740-28a5-4a0d-bdb5-48fdb2c43922?api-version=2018-09-01-preview + response: + body: + string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/ba92f5b4-2d11-453d-a403-e96b0029c9fe","principalId":"b6e0a818-ff37-4b75-95bd-1b2526538ea7","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.Storage/storageAccounts/datashareconsumersa","createdOn":"2020-04-23T13:48:04.0784140Z","updatedOn":"2020-04-23T13:48:04.0784140Z","createdBy":null,"updatedBy":"97bce510-8fdd-4a59-9f13-f32a6179931e"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.Storage/storageAccounts/datashareconsumersa/providers/Microsoft.Authorization/roleAssignments/3a1bf740-28a5-4a0d-bdb5-48fdb2c43922","type":"Microsoft.Authorization/roleAssignments","name":"3a1bf740-28a5-4a0d-bdb5-48fdb2c43922"}' + headers: + cache-control: + - no-cache + content-length: + - '923' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:10 GMT + expires: + - '-1' + pragma: + - no-cache + set-cookie: + - x-ms-gateway-slice=Production; path=/; SameSite=None; secure; HttpOnly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: '{"kind": "BlobFolder", "properties": {"containerName": "clitestconsumercontainer", + "dataSetId": "031a78ef-0cfc-45b0-88a3-a20a58f3a87a", "prefix": "cli_test_data_set", + "resourceGroup": "datashare_consumer_rg", "storageAccountName": "datashareconsumersa", + "subscriptionId": "9abff005-2afc-4de1-b39c-344b9de2cc9c"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer dataset-mapping create + Connection: + - keep-alive + Content-Length: + - '312' + Content-Type: + - application/json + ParameterSetName: + - --account-name --name --resource-group --share-subscription-name --mapping + --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping?api-version=2019-11-01 + response: + body: + string: '{"properties":{"containerName":"clitestconsumercontainer","prefix":"cli_test_data_set","subscriptionId":"9abff005-2afc-4de1-b39c-344b9de2cc9c","resourceGroup":"datashare_consumer_rg","storageAccountName":"datashareconsumersa","dataSetId":"031a78ef-0cfc-45b0-88a3-a20a58f3a87a","dataSetMappingStatus":"Ok","provisioningState":"Succeeded"},"kind":"BlobFolder","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping","name":"cli_test_data_set_mapping","type":"Microsoft.DataShare/DataSetMappings"}' + headers: + cache-control: + - no-cache + content-length: + - '688' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:25 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-quota: + - '[{"currentUsed":1,"limit":100,"name":{"localizedValue":"DataSetMapping resource + quota","value":"DataSetMapping resource quota"},"target":"/subscriptions/9abff005-2afc-4de1-b39c-344b9de2cc9c/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping"}]' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created +- request: + body: '{"synchronizationMode": "Incremental"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer share-subscription synchronization start + Connection: + - keep-alive + Content-Length: + - '38' + Content-Type: + - application/json + ParameterSetName: + - --account-name --resource-group --share-subscription-name --synchronization-mode + --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/Synchronize?api-version=2019-11-01 + response: + body: + string: '{"status":"Queued","synchronizationId":"46da96f7-df55-4472-9d4a-90dabc0dc1c2","synchronizationMode":"Incremental"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/synchronizationOperationResults/46da96f7-df55-4472-9d4a-90dabc0dc1c2?api-version=2019-11-01 + cache-control: + - no-cache + content-length: + - '114' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:31 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/shareSubscriptionSynchronizations/46da96f7-df55-4472-9d4a-90dabc0dc1c2?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer dataset-mapping show + Connection: + - keep-alive + ParameterSetName: + - --account-name --name --resource-group --share-subscription-name --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping?api-version=2019-11-01 + response: + body: + string: '{"properties":{"containerName":"clitestconsumercontainer","prefix":"cli_test_data_set","subscriptionId":"9abff005-2afc-4de1-b39c-344b9de2cc9c","resourceGroup":"datashare_consumer_rg","storageAccountName":"datashareconsumersa","dataSetId":"031a78ef-0cfc-45b0-88a3-a20a58f3a87a","dataSetMappingStatus":"Ok","provisioningState":"Succeeded"},"kind":"BlobFolder","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping","name":"cli_test_data_set_mapping","type":"Microsoft.DataShare/DataSetMappings"}' + headers: + cache-control: + - no-cache + content-length: + - '688' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer dataset-mapping list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-subscription-name --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"containerName":"clitestconsumercontainer","prefix":"cli_test_data_set","subscriptionId":"9abff005-2afc-4de1-b39c-344b9de2cc9c","resourceGroup":"datashare_consumer_rg","storageAccountName":"datashareconsumersa","dataSetId":"031a78ef-0cfc-45b0-88a3-a20a58f3a87a","dataSetMappingStatus":"Ok","provisioningState":"Succeeded"},"kind":"BlobFolder","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping","name":"cli_test_data_set_mapping","type":"Microsoft.DataShare/DataSetMappings"}]}' + headers: + cache-control: + - no-cache + content-length: + - '700' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer share-subscription synchronization list + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --resource-group --share-subscription-name --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/listSynchronizations?api-version=2019-11-01 + response: + body: + string: '{"value":[{"startTime":"2020-04-23T13:48:32.353028Z","status":"Queued","synchronizationId":"46da96f7-df55-4472-9d4a-90dabc0dc1c2","synchronizationMode":"Incremental"}]}' + headers: + cache-control: + - no-cache + content-length: + - '168' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer share-subscription list-source-share-synchronization-setting + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --resource-group --share-subscription-name --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/listSourceShareSynchronizationSettings?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"recurrenceInterval":"Day","synchronizationTime":"2020-04-05T10:50:00Z"},"kind":"ScheduleBased"}]}' + headers: + cache-control: + - no-cache + content-length: + - '123' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:39 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: '{"kind": "ScheduleBased", "properties": {"recurrenceInterval": "Day", "synchronizationTime": + "2020-04-05T10:50:00.000Z"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer trigger create + Connection: + - keep-alive + Content-Length: + - '121' + Content-Type: + - application/json + ParameterSetName: + - --account-name --resource-group --share-subscription-name --name --recurrence-interval + --synchronization-time --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/triggers/cli_test_trigger?api-version=2019-11-01 + response: + body: + string: '{"properties":{"recurrenceInterval":"Day","synchronizationTime":"2020-04-05T10:50:00Z","createdAt":"2020-04-23T13:48:42.2978189Z","userName":"Allen + Zhou","provisioningState":"Creating","triggerStatus":"Inactive","synchronizationMode":"Incremental"},"kind":"ScheduleBased","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/triggers/cli_test_trigger","name":"cli_test_trigger","type":"Microsoft.DataShare/Triggers"}' + headers: + cache-control: + - no-cache + content-length: + - '570' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:42 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/triggers/cli_test_trigger?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer trigger show + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-subscription-name --name --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/triggers/cli_test_trigger?api-version=2019-11-01 + response: + body: + string: '{"properties":{"recurrenceInterval":"Day","synchronizationTime":"2020-04-05T10:50:00Z","createdAt":"2020-04-23T13:48:42.2978189Z","userName":"Allen + Zhou","provisioningState":"Creating","triggerStatus":"Inactive","synchronizationMode":"Incremental"},"kind":"ScheduleBased","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/triggers/cli_test_trigger","name":"cli_test_trigger","type":"Microsoft.DataShare/Triggers"}' + headers: + cache-control: + - no-cache + content-length: + - '570' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:43 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer trigger list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-subscription-name --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/triggers?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"recurrenceInterval":"Day","synchronizationTime":"2020-04-05T10:50:00Z","createdAt":"2020-04-23T13:48:42.2978189Z","userName":"Allen + Zhou","provisioningState":"Creating","triggerStatus":"Inactive","synchronizationMode":"Incremental"},"kind":"ScheduleBased","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/triggers/cli_test_trigger","name":"cli_test_trigger","type":"Microsoft.DataShare/Triggers"}]}' + headers: + cache-control: + - no-cache + content-length: + - '582' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:45 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare provider-share-subscription list + Connection: + - keep-alive + ParameterSetName: + - --account-name --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/providerShareSubscriptions?api-version=2019-11-01 + response: + body: + string: '{"value":[{"properties":{"shareSubscriptionObjectId":"cea4ae94-0b80-4306-9124-29e0f97e6604","consumerName":"Allen + Zhou","createdAt":"2020-04-23T13:47:55.3598425Z","sharedAt":"2020-04-23T13:45:26.3055269Z","consumerEmail":"consumer@microsoft.com","consumerTenantName":"Default + Directory","providerName":"Feng Zhou","providerEmail":"provider@microsoft.com","shareSubscriptionStatus":"Active"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/shareSubscriptions/cea4ae94-0b80-4306-9124-29e0f97e6604","name":"cli_test_share_subscription","type":"Microsoft.DataShare/ShareSubscriptions"}]}' + headers: + cache-control: + - no-cache + content-length: + - '760' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:47 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare provider-share-subscription show + Connection: + - keep-alive + ParameterSetName: + - --account-name --share-subscription --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/providerShareSubscriptions/cea4ae94-0b80-4306-9124-29e0f97e6604?api-version=2019-11-01 + response: + body: + string: '{"properties":{"shareSubscriptionObjectId":"cea4ae94-0b80-4306-9124-29e0f97e6604","consumerName":"Allen + Zhou","createdAt":"2020-04-23T13:47:55.3598425Z","sharedAt":"2020-04-23T13:45:26.3055269Z","consumerEmail":"consumer@microsoft.com","consumerTenantName":"Default + Directory","providerName":"Feng Zhou","providerEmail":"provider@microsoft.com","shareSubscriptionStatus":"Active"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/shareSubscriptions/cea4ae94-0b80-4306-9124-29e0f97e6604","name":"cli_test_share_subscription","type":"Microsoft.DataShare/ShareSubscriptions"}' + headers: + cache-control: + - no-cache + content-length: + - '748' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:49 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare provider-share-subscription revoke + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --share-subscription --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/providerShareSubscriptions/cea4ae94-0b80-4306-9124-29e0f97e6604/revoke?api-version=2019-11-01 + response: + body: + string: '{"properties":{"shareSubscriptionObjectId":"cea4ae94-0b80-4306-9124-29e0f97e6604","consumerName":"Allen + Zhou","createdAt":"2020-04-23T13:47:55.3598425Z","sharedAt":"2020-04-23T13:45:26.3055269Z","consumerEmail":"consumer@microsoft.com","consumerTenantName":"Default + Directory","providerName":"Feng Zhou","providerEmail":"provider@microsoft.com","shareSubscriptionStatus":"Revoking"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/shareSubscriptions/cea4ae94-0b80-4306-9124-29e0f97e6604","name":"cli_test_share_subscription","type":"Microsoft.DataShare/ShareSubscriptions"}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/operationResults/f9efc1e9-34af-4f77-87eb-5de189b8fe89?api-version=2019-11-01 + cache-control: + - no-cache + content-length: + - '750' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:52 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/providerShareSubscriptions/cea4ae94-0b80-4306-9124-29e0f97e6604?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare provider-share-subscription reinstate + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --share-subscription --resource-group --share-name + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/providerShareSubscriptions/cea4ae94-0b80-4306-9124-29e0f97e6604/reinstate?api-version=2019-11-01 + response: + body: + string: '{"properties":{"shareSubscriptionObjectId":"cea4ae94-0b80-4306-9124-29e0f97e6604","consumerName":"Allen + Zhou","createdAt":"2020-04-23T13:47:55.3598425Z","sharedAt":"2020-04-23T13:45:26.3055269Z","consumerEmail":"consumer@microsoft.com","consumerTenantName":"Default + Directory","providerName":"Feng Zhou","providerEmail":"provider@microsoft.com","shareSubscriptionStatus":"Active"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/shareSubscriptions/cea4ae94-0b80-4306-9124-29e0f97e6604","name":"cli_test_share_subscription","type":"Microsoft.DataShare/ShareSubscriptions"}' + headers: + cache-control: + - no-cache + content-length: + - '748' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 23 Apr 2020 13:48:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare synchronization-setting delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --resource-group --share-name --name --yes + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/synchronizationSettings/cli_test_synchronization_setting?api-version=2019-11-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:49:01 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataShare/locations/westus2/operationResults/d7892df8-eccd-42a3-8de4-be8600d80a4d?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare dataset delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --name --resource-group --share-name --yes + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set?api-version=2019-11-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:49:03 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-quota: + - '[{"currentUsed":0,"limit":100,"name":{"localizedValue":"DataSet resource + quota","value":"DataSet resource quota"},"target":"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/cli_test_datrywkgqr6mfnic2batum7zhzzekrutyfed7ajmopnqmg7bfkqdq2mavcabi7fdxo/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share/dataSets/cli_test_data_set"}]' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --resource-group --name --yes + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account/shares/cli_test_share?api-version=2019-11-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:49:04 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataShare/locations/westus2/operationResults/80548841-441e-4061-93b9-b6d0ce4c0249?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --resource-group --no-wait --yes + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_dat000001/providers/Microsoft.DataShare/accounts/cli_test_account?api-version=2019-11-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:49:06 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataShare/locations/westus2/operationResults/e331712b-17b0-48ba-8e62-592b4f5f284d?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer trigger delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --resource-group --share-subscription-name --name --yes --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/triggers/cli_test_trigger?api-version=2019-11-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:49:08 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataShare/locations/westus2/operationResults/e89ae980-17f5-4a9b-9e65-db922d490a7c?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer dataset-mapping delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --name --resource-group --share-subscription-name --yes --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping?api-version=2019-11-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:49:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-quota: + - '[{"currentUsed":0,"limit":100,"name":{"localizedValue":"DataSetMapping resource + quota","value":"DataSetMapping resource quota"},"target":"/subscriptions/9abff005-2afc-4de1-b39c-344b9de2cc9c/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription/dataSetMappings/cli_test_data_set_mapping"}]' + x-ms-ratelimit-remaining-subscription-deletes: + - '14997' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare consumer share-subscription delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --account-name --resource-group --name --yes --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account/shareSubscriptions/cli_test_share_subscription?api-version=2019-11-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:49:11 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataShare/locations/westus2/operationResults/bd7196da-c8a9-4b96-927e-000510684928?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - datashare account delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --name --resource-group --no-wait --yes --subscription + User-Agent: + - AZURECLI/2.4.0 (MSI) azsdk-python-datasharemanagementclient/unknown Python/3.8.2 + (Windows-10-10.0.18362-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/datashare_consumer_rg/providers/Microsoft.DataShare/accounts/cli_test_consumer_account?api-version=2019-11-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 23 Apr 2020 13:49:13 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DataShare/locations/westus2/operationResults/44b598b3-6268-4028-9d1f-3cdb8adb30c6?api-version=2019-11-01 + pragma: + - no-cache + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +version: 1 diff --git a/src/datashare/azext_datashare/tests/latest/test_datashare_scenario.py b/src/datashare/azext_datashare/tests/latest/test_datashare_scenario.py new file mode 100644 index 00000000000..43245c24f3e --- /dev/null +++ b/src/datashare/azext_datashare/tests/latest/test_datashare_scenario.py @@ -0,0 +1,599 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import unittest + +from azure_devtools.scenario_tests import AllowLargeResponse +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer) + +TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) + + +class DataShareManagementClientScenarioTest(ScenarioTest): + + @ResourceGroupPreparer(name_prefix='cli_test_datashare_provider_rg'[:12], location='westus2', key='ProviderResourceGroup') + @StorageAccountPreparer(name_prefix='clitestdatashareprovidersa'[:12], location='westus2', key='ProviderStorageAccount') + @AllowLargeResponse() + def test_datashare(self, resource_group, storage_account): + + self.kwargs.update({ + 'ConsumerSubscription': '00000000-0000-0000-0000-000000000000', # change this value in live test + 'ConsumerResourceGroup': 'datashare_consumer_rg', # this is a pre-existing reosurce group in consumer subscription + 'ConsumerStorageAccount': 'datashareconsumersa', # this is a pre-existing storage account in consumer subscription + 'ProviderEmail': 'provider@microsoft.com', # change this value in live test + 'ConsumerEmail': 'consumer@microsoft.com', # change this value in live test + 'ProviderAccount': 'cli_test_account', + 'ConsumerAccount': 'cli_test_consumer_account', + 'ProviderDataset': 'cli_test_data_set', + 'ConsumerDatasetMapping': 'cli_test_data_set_mapping', + 'ProviderInvitation': 'cli_test_invitation', + 'ProviderShare': 'cli_test_share', + 'ConsumerShareSubscription': 'cli_test_share_subscription', + 'ProviderSynchronizationSetting': 'cli_test_synchronization_setting', + 'ConsumerTrigger': 'cli_test_trigger', + 'ProviderContainer': 'clitestcontainer', + 'ConsumerContainer': 'clitestconsumercontainer', + }) + + # Provider commands + datashareAccount = self.cmd('az datashare account create ' + '--location "West US 2" ' + '--tags tag1=Red tag2=White ' + '--name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}"', + checks=[self.check('name', '{ProviderAccount}'), + self.check('location', 'westus2'), + self.check('resourceGroup', '{ProviderResourceGroup}'), + self.check('tags.tag1', 'Red'), + self.check('tags.tag2', 'White') + ]).get_output_in_json() + + self.cmd('az datashare account wait ' + '--name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--created', + checks=[]) + + accountId = datashareAccount['id'] + self.cmd('az datashare account show ' + '-n "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}"', + checks=[self.check('name', '{ProviderAccount}'), + self.check('location', 'westus2'), + self.check('provisioningState', 'Succeeded'), + self.check('resourceGroup', '{ProviderResourceGroup}'), + self.check('tags.tag1', 'Red'), + self.check('tags.tag2', 'White') + ]) + + self.cmd('az datashare account show ' + '--ids {}'.format(accountId), + checks=[self.check('name', '{ProviderAccount}'), + self.check('location', 'westus2'), + self.check('provisioningState', 'Succeeded'), + self.check('resourceGroup', '{ProviderResourceGroup}'), + self.check('tags.tag1', 'Red'), + self.check('tags.tag2', 'White') + ]) + + self.cmd('az datashare account list ' + '--resource-group "{ProviderResourceGroup}"', + checks=[self.check("[?id=='{}'].name | [0]".format(accountId), '{ProviderAccount}'), + self.check("[?id=='{}'].location | [0]".format(accountId), 'westus2'), + self.check("[?id=='{}'].resourceGroup | [0]".format(accountId), '{ProviderResourceGroup}'), + self.check("[?id=='{}'].tags | [0].tag1".format(accountId), 'Red'), + self.check("[?id=='{}'].tags | [0].tag2".format(accountId), 'White')]) + + self.cmd('az datashare account update ' + '--name "{ProviderAccount}" ' + '--tags tag1=Green ' + '--resource-group "{ProviderResourceGroup}"', + checks=[self.check('name', '{ProviderAccount}'), + self.check('location', 'westus2'), + self.check('provisioningState', 'Succeeded'), + self.check('resourceGroup', '{ProviderResourceGroup}'), + self.check('tags.tag1', 'Green')]) + + datashare = self.cmd('az datashare create ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--description "share description" ' + '--share-kind "CopyBased" ' + '--terms "Confidential" ' + '--name "{ProviderShare}"', + checks=[self.check('name', '{ProviderShare}'), + self.check('description', 'share description'), + self.check('shareKind', 'CopyBased'), + self.check('terms', 'Confidential')]).get_output_in_json() + + self.cmd('az datashare show ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--name "{ProviderShare}"', + checks=[self.check('name', '{ProviderShare}'), + self.check('description', 'share description'), + self.check('shareKind', 'CopyBased'), + self.check('terms', 'Confidential')]) + + datashareId = datashare['id'] + self.cmd('az datashare show ' + '--ids {}'.format(datashareId), + checks=[self.check('name', '{ProviderShare}'), + self.check('description', 'share description'), + self.check('shareKind', 'CopyBased'), + self.check('terms', 'Confidential')]) + + self.cmd('az datashare list ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}"', + checks=[self.check("[?id=='{}'].name | [0]".format(datashareId), '{ProviderShare}'), + self.check("[?id=='{}'].description | [0]".format(datashareId), 'share description'), + self.check("[?id=='{}'].shareKind | [0]".format(datashareId), 'CopyBased'), + self.check("[?id=='{}'].terms | [0]".format(datashareId), 'Confidential')]) + + storage_account_json = self.cmd('az storage account show ' + '-n {ProviderStorageAccount} ' + '-g {ProviderResourceGroup}').get_output_in_json() + + accountPrincipalId = datashareAccount['identity']['principalId'] + if self.is_live or self.in_recording: + import time + self.cmd('az role assignment create ' + '--role "2a2b9908-6ea1-4ae2-8e65-a410df84e7d1" ' # Storage Blob Data Reader + '--assignee-object-id {} ' + '--assignee-principal-type ServicePrincipal ' + '--scope {}'.format(accountPrincipalId, storage_account_json['id'])) + time.sleep(5) + + self.cmd('az storage container create ' + '--account-name {ProviderStorageAccount} ' + '--name {ProviderContainer}') + + datasetContent = {"container_name": "{}".format(self.kwargs.get('ProviderContainer', '')), "storage_account_name": "{}".format(storage_account), "kind": "Container"} + self.kwargs.update({ + 'ProviderDatasetContent': datasetContent + }) + self.cmd('az datashare dataset create ' + '--account-name "{ProviderAccount}" ' + '--dataset "{ProviderDatasetContent}" ' + '--name "{ProviderDataset}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('containerName', '{ProviderContainer}'), + self.check('storageAccountName', '{ProviderStorageAccount}'), + self.check('kind', 'Container'), + self.check('name', '{ProviderDataset}')]) + + self.cmd('az datashare dataset show ' + '--account-name "{ProviderAccount}" ' + '--name "{ProviderDataset}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('containerName', '{ProviderContainer}'), + self.check('storageAccountName', '{ProviderStorageAccount}'), + self.check('kind', 'Container'), + self.check('name', '{ProviderDataset}')]) + + self.cmd('az datashare dataset list ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('[0].containerName', '{ProviderContainer}'), + self.check('[0].storageAccountName', '{ProviderStorageAccount}'), + self.check('[0].kind', 'Container'), + self.check('[0].name', '{ProviderDataset}')]) + + self.cmd('az datashare synchronization-setting create ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}" ' + '--name "{ProviderSynchronizationSetting}" ' + '--recurrence-interval "Day" ' + '--synchronization-time "2020-04-05 10:50:00 +00:00"', + checks=[self.check('kind', 'ScheduleBased'), + self.check('name', '{ProviderSynchronizationSetting}'), + self.check('recurrenceInterval', 'Day'), + self.check('resourceGroup', '{ProviderResourceGroup}'), + self.check('synchronizationTime', '2020-04-05T10:50:00+00:00')]) + + self.cmd('az datashare synchronization-setting show ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}" ' + '--name "{ProviderSynchronizationSetting}"', + checks=[self.check('kind', 'ScheduleBased'), + self.check('name', '{ProviderSynchronizationSetting}'), + self.check('recurrenceInterval', 'Day'), + self.check('resourceGroup', '{ProviderResourceGroup}'), + self.check('synchronizationTime', '2020-04-05T10:50:00+00:00')]) + + self.cmd('az datashare synchronization-setting list ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('[0].kind', 'ScheduleBased'), + self.check('[0].name', '{ProviderSynchronizationSetting}'), + self.check('[0].recurrenceInterval', 'Day'), + self.check('[0].resourceGroup', '{ProviderResourceGroup}'), + self.check('[0].synchronizationTime', '2020-04-05T10:50:00+00:00')]) + + self.cmd('az datashare synchronization list ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[]) + + # self.cmd('az datashare synchronization list-detail ' + # '--account-name "{ProviderAccount}" ' + # '--resource-group "{ProviderResourceGroup}" ' + # '--share-name "{ProviderShare}" ' + # '--synchronization-id "7d0536a6-3fa5-43de-b152-3d07c4f6b2bb"', + # checks=[]) + + self.cmd('az datashare invitation create ' + '--account-name "{ProviderAccount}" ' + '--target-email "{ConsumerEmail}" ' + '--name "{ProviderInvitation}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('invitationStatus', 'Pending'), + self.check('name', '{ProviderInvitation}'), + self.check('resourceGroup', '{ProviderResourceGroup}'), + self.check('targetEmail', '{ConsumerEmail}')]) + + self.cmd('az datashare invitation list ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('[0].invitationStatus', 'Pending'), + self.check('[0].name', '{ProviderInvitation}'), + self.check('[0].resourceGroup', '{ProviderResourceGroup}'), + self.check('[0].targetEmail', '{ConsumerEmail}')]) + + self.cmd('az datashare invitation show ' + '--account-name "{ProviderAccount}" ' + '--name "{ProviderInvitation}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('invitationStatus', 'Pending'), + self.check('name', '{ProviderInvitation}'), + self.check('resourceGroup', '{ProviderResourceGroup}'), + self.check('targetEmail', '{ConsumerEmail}')]) + + # Consumer commands + datashareConsumerAccount = self.cmd('az datashare account create ' + '--location "West US 2" ' + '--name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('name', '{ConsumerAccount}'), + self.check('location', 'westus2'), + self.check('resourceGroup', '{ConsumerResourceGroup}')]).get_output_in_json() + + invitations = self.cmd('az datashare consumer invitation list ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('[0].invitationStatus', 'Pending'), + self.check('[0].name', '{ProviderInvitation}'), + self.check('[0].shareName', '{ProviderShare}'), + self.check('[0].providerEmail', '{ProviderEmail}')]).get_output_in_json() + + invitationId = invitations[0]['invitationId'] + sourceShareLocation = invitations[0]['location'] + self.kwargs.update({'InvitationId1': invitationId, + 'Location1': sourceShareLocation}) + + self.cmd('az datashare consumer invitation show ' + '--invitation-id "{InvitationId1}" ' + '--subscription "{ConsumerSubscription}" ' + '--location "{Location1}"', + checks=[self.check('invitationStatus', 'Pending'), + self.check('name', '{ProviderInvitation}'), + self.check('shareName', '{ProviderShare}'), + self.check('providerEmail', '{ProviderEmail}')]) + +# self.cmd('az datashare consumer invitation reject ' +# '--invitation-id 00000000-0000-0000-0000-000000000000 ' +# checks=[]) + + self.cmd('az datashare account wait ' + '--name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--created ' + '--subscription "{ConsumerSubscription}"', + checks=[]) + + self.cmd('az datashare consumer share-subscription create ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--invitation-id "{InvitationId1}" ' + '--source-share-location "{Location1}" ' + '--name "{ConsumerShareSubscription}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('invitationId', '{InvitationId1}'), + self.check('name', '{ConsumerShareSubscription}'), + self.check('resourceGroup', '{ConsumerResourceGroup}'), + self.check('shareName', '{ProviderShare}'), + self.check('shareKind', 'CopyBased'), + self.check('sourceShareLocation', '{Location1}')]) + + self.cmd('az datashare consumer share-subscription show ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--name "{ConsumerShareSubscription}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('invitationId', '{InvitationId1}'), + self.check('name', '{ConsumerShareSubscription}'), + self.check('resourceGroup', '{ConsumerResourceGroup}'), + self.check('shareName', '{ProviderShare}'), + self.check('shareKind', 'CopyBased'), + self.check('sourceShareLocation', '{Location1}')]) + + self.cmd('az datashare consumer share-subscription list ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('[0].invitationId', '{InvitationId1}'), + self.check('[0].name', '{ConsumerShareSubscription}'), + self.check('[0].resourceGroup', '{ConsumerResourceGroup}'), + self.check('[0].shareName', '{ProviderShare}'), + self.check('[0].shareKind', 'CopyBased'), + self.check('[0].sourceShareLocation', '{Location1}')]) + + sourceDatasets = self.cmd('az datashare consumer share-subscription list-source-dataset ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('[0].dataSetName', '{ProviderDataset}'), + self.check('[0].dataSetType', 'Container')]).get_output_in_json() + sourceDatasetId = sourceDatasets[0]['dataSetId'] + + storage_account2_json = self.cmd('az storage account show ' + '-n {ConsumerStorageAccount} ' + '-g {ConsumerResourceGroup} ' + '--subscription "{ConsumerSubscription}"').get_output_in_json() + + accountPrincipalId2 = datashareConsumerAccount['identity']['principalId'] + self.kwargs.update({ + "AccountPrincipalId2": accountPrincipalId2, + "StorageAccountId2": storage_account2_json['id']}) + + if self.is_live or self.in_recording: + import time + self.cmd('az role assignment create ' + '--role "ba92f5b4-2d11-453d-a403-e96b0029c9fe" ' # Storage Blob Data Contributor + '--assignee-object-id "{AccountPrincipalId2}" ' + '--assignee-principal-type ServicePrincipal ' + '--scope "{StorageAccountId2}" ' + '--subscription "{ConsumerSubscription}"') + time.sleep(5) + + datasetMappingContent = {"data_set_id": "{}".format(sourceDatasetId), + "container_name": "{}".format(self.kwargs.get('ConsumerContainer', '')), + "storage_account_name": "{}".format(self.kwargs.get('ConsumerStorageAccount', '')), + "kind": "BlobFolder", + "prefix": "{}".format(self.kwargs.get('ProviderDataset', ''))} + self.kwargs.update({ + 'ConsumerDatasetMappingContent': datasetMappingContent + }) + self.cmd('az datashare consumer dataset-mapping create ' + '--account-name "{ConsumerAccount}" ' + '--name "{ConsumerDatasetMapping}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--mapping "{ConsumerDatasetMappingContent}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('kind', 'BlobFolder'), + self.check('name', '{ConsumerDatasetMapping}'), + self.check('prefix', '{ProviderDataset}'), + self.check('storageAccountName', '{ConsumerStorageAccount}')]) + + self.cmd('az datashare consumer share-subscription synchronization start ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--synchronization-mode "Incremental" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('status', 'Queued'), + self.check('synchronizationMode', 'Incremental')]) + + self.cmd('az datashare consumer dataset-mapping show ' + '--account-name "{ConsumerAccount}" ' + '--name "{ConsumerDatasetMapping}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('kind', 'BlobFolder'), + self.check('name', '{ConsumerDatasetMapping}'), + self.check('prefix', '{ProviderDataset}'), + self.check('storageAccountName', '{ConsumerStorageAccount}')]) + + self.cmd('az datashare consumer dataset-mapping list ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('[0].kind', 'BlobFolder'), + self.check('[0].name', '{ConsumerDatasetMapping}'), + self.check('[0].prefix', '{ProviderDataset}'), + self.check('[0].storageAccountName', '{ConsumerStorageAccount}')]) + + self.cmd('az datashare consumer share-subscription synchronization list ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('[0].synchronizationMode', 'Incremental')]) + +# self.cmd('az datashare consumer share-subscription synchronization list-detail ' +# '--account-name "{ConsumerAccount}" ' +# '--resource-group "{ConsumerResourceGroup}" ' +# '--share-subscription-name "{ConsumerShareSubscription}" ' +# '--synchronization-id "7d0536a6-3fa5-43de-b152-3d07c4f6b2bb" ' +# '--subscription "{ConsumerSubscription}"', +# checks=[]) + +# self.cmd('az datashare consumer share-subscription synchronization cancel ' +# '--account-name "{ConsumerAccount}" ' +# '--resource-group "{ConsumerResourceGroup}" ' +# '--share-subscription-name "{ConsumerShareSubscription}" ' +# '--synchronization-id "7d0536a6-3fa5-43de-b152-3d07c4f6b2bb" ' +# '--subscription "{ConsumerSubscription}"', +# checks=[]) + + self.cmd('az datashare consumer share-subscription list-source-share-synchronization-setting ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('[0].recurrenceInterval', 'Day'), + self.check('[0].kind', 'ScheduleBased')]) + + self.cmd('az datashare consumer trigger create ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--name "{ConsumerTrigger}" ' + '--recurrence-interval "Day" ' + '--synchronization-time "2020-04-05 10:50:00 +00:00" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('properties.recurrenceInterval', 'Day'), # TODO properties is not removed in the response structure + self.check('properties.synchronizationMode', 'Incremental')]) + + self.cmd('az datashare consumer trigger show ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--name "{ConsumerTrigger}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('recurrenceInterval', 'Day'), + self.check('synchronizationMode', 'Incremental')]) + + self.cmd('az datashare consumer trigger list ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--subscription "{ConsumerSubscription}"', + checks=[self.check('[0].recurrenceInterval', 'Day'), + self.check('[0].synchronizationMode', 'Incremental')]) + + # Provider commands + providerShareSubscriptions = self.cmd('az datashare provider-share-subscription list ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('[0].consumerEmail', '{ConsumerEmail}'), + self.check('[0].providerEmail', '{ProviderEmail}'), + self.check('[0].shareSubscriptionStatus', 'Active'), + self.check('[0].name', '{ConsumerShareSubscription}')]).get_output_in_json() + shareSubscriptionObjectId = providerShareSubscriptions[0]['shareSubscriptionObjectId'] + self.kwargs.update({'ProviderShareSubscriptionObjectId': shareSubscriptionObjectId}) + + self.cmd('az datashare provider-share-subscription show ' + '--account-name "{ProviderAccount}" ' + '--share-subscription "{ProviderShareSubscriptionObjectId}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('consumerEmail', '{ConsumerEmail}'), + self.check('providerEmail', '{ProviderEmail}'), + self.check('shareSubscriptionStatus', 'Active'), + self.check('name', '{ConsumerShareSubscription}'), + self.check('shareSubscriptionObjectId', '{ProviderShareSubscriptionObjectId}')]) + + self.cmd('az datashare provider-share-subscription revoke ' + '--account-name "{ProviderAccount}" ' + '--share-subscription "{ProviderShareSubscriptionObjectId}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('consumerEmail', '{ConsumerEmail}'), + self.check('providerEmail', '{ProviderEmail}'), + self.check('shareSubscriptionStatus', 'Revoking'), + self.check('name', '{ConsumerShareSubscription}'), + self.check('shareSubscriptionObjectId', '{ProviderShareSubscriptionObjectId}')]) + + if self.is_live or self.in_recording: + import time + time.sleep(5) + + self.cmd('az datashare provider-share-subscription reinstate ' + '--account-name "{ProviderAccount}" ' + '--share-subscription "{ProviderShareSubscriptionObjectId}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}"', + checks=[self.check('consumerEmail', '{ConsumerEmail}'), + self.check('providerEmail', '{ProviderEmail}'), + self.check('shareSubscriptionStatus', 'Active'), + self.check('name', '{ConsumerShareSubscription}'), + self.check('shareSubscriptionObjectId', '{ProviderShareSubscriptionObjectId}')]) + + # Provider Clean up + self.cmd('az datashare synchronization-setting delete ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}" ' + '--name "{ProviderSynchronizationSetting}" ' + '--yes', + checks=[]) + + # self.cmd('az datashare invitation delete ' + # '--account-name "{ProviderAccount}" ' + # '--name "{ProviderInvitation}" ' + # '--resource-group "{ProviderResourceGroup}" ' + # '--share-name "{ProviderShare}"', + # checks=[]) + + self.cmd('az datashare dataset delete ' + '--account-name "{ProviderAccount}" ' + '--name "{ProviderDataset}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--share-name "{ProviderShare}" ' + '--yes', + checks=[]) + + self.cmd('az datashare delete ' + '--account-name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--name "{ProviderShare}" ' + '--yes', + checks=[]) + + self.cmd('az datashare account delete ' + '--name "{ProviderAccount}" ' + '--resource-group "{ProviderResourceGroup}" ' + '--no-wait ' + '--yes', + checks=[]) + + self.cmd('az datashare consumer trigger delete ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--name "{ConsumerTrigger}" ' + '--yes ' + '--subscription "{ConsumerSubscription}"', + checks=[]) + self.cmd('az datashare consumer dataset-mapping delete ' + '--account-name "{ConsumerAccount}" ' + '--name "{ConsumerDatasetMapping}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--share-subscription-name "{ConsumerShareSubscription}" ' + '--yes ' + '--subscription "{ConsumerSubscription}"', + checks=[]) + self.cmd('az datashare consumer share-subscription delete ' + '--account-name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--name "{ConsumerShareSubscription}" ' + '--yes ' + '--subscription "{ConsumerSubscription}"', + checks=[]) + self.cmd('az datashare account delete ' + '--name "{ConsumerAccount}" ' + '--resource-group "{ConsumerResourceGroup}" ' + '--no-wait ' + '--yes ' + '--subscription "{ConsumerSubscription}"', + checks=[]) diff --git a/src/datashare/azext_datashare/vendored_sdks/__init__.py b/src/datashare/azext_datashare/vendored_sdks/__init__.py new file mode 100644 index 00000000000..8d86d5a6be1 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/__init__.py @@ -0,0 +1,12 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/__init__.py b/src/datashare/azext_datashare/vendored_sdks/datashare/__init__.py new file mode 100644 index 00000000000..eb57d0ef34e --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_share_management_client import DataShareManagementClient +__all__ = ['DataShareManagementClient'] diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/_configuration.py b/src/datashare/azext_datashare/vendored_sdks/datashare/_configuration.py new file mode 100644 index 00000000000..88932a1125e --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/_configuration.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +VERSION = "unknown" + +class DataShareManagementClientConfiguration(Configuration): + """Configuration for DataShareManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: azure.core.credentials.TokenCredential + :param subscription_id: The subscription identifier. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataShareManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-11-01" + kwargs.setdefault('sdk_moniker', 'datasharemanagementclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, **kwargs) diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/_data_share_management_client.py b/src/datashare/azext_datashare/vendored_sdks/datashare/_data_share_management_client.py new file mode 100644 index 00000000000..c36cabec848 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/_data_share_management_client.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional + +from azure.core import PipelineClient +from msrest import Deserializer, Serializer + +from ._configuration import DataShareManagementClientConfiguration +from .operations import AccountOperations +from .operations import ConsumerInvitationOperations +from .operations import DataSetOperations +from .operations import DataSetMappingOperations +from .operations import InvitationOperations +from .operations import OperationOperations +from .operations import ShareOperations +from .operations import ProviderShareSubscriptionOperations +from .operations import ShareSubscriptionOperations +from .operations import ConsumerSourceDataSetOperations +from .operations import SynchronizationSettingOperations +from .operations import TriggerOperations +from . import models + + +class DataShareManagementClient(object): + """Creates a Microsoft.DataShare management client. + + :ivar account: AccountOperations operations + :vartype account: data_share_management_client.operations.AccountOperations + :ivar consumer_invitation: ConsumerInvitationOperations operations + :vartype consumer_invitation: data_share_management_client.operations.ConsumerInvitationOperations + :ivar data_set: DataSetOperations operations + :vartype data_set: data_share_management_client.operations.DataSetOperations + :ivar data_set_mapping: DataSetMappingOperations operations + :vartype data_set_mapping: data_share_management_client.operations.DataSetMappingOperations + :ivar invitation: InvitationOperations operations + :vartype invitation: data_share_management_client.operations.InvitationOperations + :ivar operation: OperationOperations operations + :vartype operation: data_share_management_client.operations.OperationOperations + :ivar share: ShareOperations operations + :vartype share: data_share_management_client.operations.ShareOperations + :ivar provider_share_subscription: ProviderShareSubscriptionOperations operations + :vartype provider_share_subscription: data_share_management_client.operations.ProviderShareSubscriptionOperations + :ivar share_subscription: ShareSubscriptionOperations operations + :vartype share_subscription: data_share_management_client.operations.ShareSubscriptionOperations + :ivar consumer_source_data_set: ConsumerSourceDataSetOperations operations + :vartype consumer_source_data_set: data_share_management_client.operations.ConsumerSourceDataSetOperations + :ivar synchronization_setting: SynchronizationSettingOperations operations + :vartype synchronization_setting: data_share_management_client.operations.SynchronizationSettingOperations + :ivar trigger: TriggerOperations operations + :vartype trigger: data_share_management_client.operations.TriggerOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: azure.core.credentials.TokenCredential + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataShareManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.account = AccountOperations( + self._client, self._config, self._serialize, self._deserialize) + self.consumer_invitation = ConsumerInvitationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_set = DataSetOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_set_mapping = DataSetMappingOperations( + self._client, self._config, self._serialize, self._deserialize) + self.invitation = InvitationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation = OperationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.share = ShareOperations( + self._client, self._config, self._serialize, self._deserialize) + self.provider_share_subscription = ProviderShareSubscriptionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.share_subscription = ShareSubscriptionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.consumer_source_data_set = ConsumerSourceDataSetOperations( + self._client, self._config, self._serialize, self._deserialize) + self.synchronization_setting = SynchronizationSettingOperations( + self._client, self._config, self._serialize, self._deserialize) + self.trigger = TriggerOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DataShareManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/__init__.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/__init__.py new file mode 100644 index 00000000000..e14f4db6b79 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_share_management_client_async import DataShareManagementClient +__all__ = ['DataShareManagementClient'] diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/_configuration_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/_configuration_async.py new file mode 100644 index 00000000000..a5c30f8ec3f --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/_configuration_async.py @@ -0,0 +1,59 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +VERSION = "unknown" + +class DataShareManagementClientConfiguration(Configuration): + """Configuration for DataShareManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: azure.core.credentials.TokenCredential + :param subscription_id: The subscription identifier. + :type subscription_id: str + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataShareManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2019-11-01" + kwargs.setdefault('sdk_moniker', 'datasharemanagementclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, **kwargs) diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/_data_share_management_client_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/_data_share_management_client_async.py new file mode 100644 index 00000000000..0609b8e2594 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/_data_share_management_client_async.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional + +from azure.core import AsyncPipelineClient +from msrest import Deserializer, Serializer + +from ._configuration_async import DataShareManagementClientConfiguration +from .operations_async import AccountOperations +from .operations_async import ConsumerInvitationOperations +from .operations_async import DataSetOperations +from .operations_async import DataSetMappingOperations +from .operations_async import InvitationOperations +from .operations_async import OperationOperations +from .operations_async import ShareOperations +from .operations_async import ProviderShareSubscriptionOperations +from .operations_async import ShareSubscriptionOperations +from .operations_async import ConsumerSourceDataSetOperations +from .operations_async import SynchronizationSettingOperations +from .operations_async import TriggerOperations +from .. import models + + +class DataShareManagementClient(object): + """Creates a Microsoft.DataShare management client. + + :ivar account: AccountOperations operations + :vartype account: data_share_management_client.aio.operations_async.AccountOperations + :ivar consumer_invitation: ConsumerInvitationOperations operations + :vartype consumer_invitation: data_share_management_client.aio.operations_async.ConsumerInvitationOperations + :ivar data_set: DataSetOperations operations + :vartype data_set: data_share_management_client.aio.operations_async.DataSetOperations + :ivar data_set_mapping: DataSetMappingOperations operations + :vartype data_set_mapping: data_share_management_client.aio.operations_async.DataSetMappingOperations + :ivar invitation: InvitationOperations operations + :vartype invitation: data_share_management_client.aio.operations_async.InvitationOperations + :ivar operation: OperationOperations operations + :vartype operation: data_share_management_client.aio.operations_async.OperationOperations + :ivar share: ShareOperations operations + :vartype share: data_share_management_client.aio.operations_async.ShareOperations + :ivar provider_share_subscription: ProviderShareSubscriptionOperations operations + :vartype provider_share_subscription: data_share_management_client.aio.operations_async.ProviderShareSubscriptionOperations + :ivar share_subscription: ShareSubscriptionOperations operations + :vartype share_subscription: data_share_management_client.aio.operations_async.ShareSubscriptionOperations + :ivar consumer_source_data_set: ConsumerSourceDataSetOperations operations + :vartype consumer_source_data_set: data_share_management_client.aio.operations_async.ConsumerSourceDataSetOperations + :ivar synchronization_setting: SynchronizationSettingOperations operations + :vartype synchronization_setting: data_share_management_client.aio.operations_async.SynchronizationSettingOperations + :ivar trigger: TriggerOperations operations + :vartype trigger: data_share_management_client.aio.operations_async.TriggerOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: azure.core.credentials.TokenCredential + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataShareManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.account = AccountOperations( + self._client, self._config, self._serialize, self._deserialize) + self.consumer_invitation = ConsumerInvitationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_set = DataSetOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_set_mapping = DataSetMappingOperations( + self._client, self._config, self._serialize, self._deserialize) + self.invitation = InvitationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation = OperationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.share = ShareOperations( + self._client, self._config, self._serialize, self._deserialize) + self.provider_share_subscription = ProviderShareSubscriptionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.share_subscription = ShareSubscriptionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.consumer_source_data_set = ConsumerSourceDataSetOperations( + self._client, self._config, self._serialize, self._deserialize) + self.synchronization_setting = SynchronizationSettingOperations( + self._client, self._config, self._serialize, self._deserialize) + self.trigger = TriggerOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DataShareManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/__init__.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/__init__.py new file mode 100644 index 00000000000..c50fe5e6a33 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/__init__.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._account_operations_async import AccountOperations +from ._consumer_invitation_operations_async import ConsumerInvitationOperations +from ._data_set_operations_async import DataSetOperations +from ._data_set_mapping_operations_async import DataSetMappingOperations +from ._invitation_operations_async import InvitationOperations +from ._operation_operations_async import OperationOperations +from ._share_operations_async import ShareOperations +from ._provider_share_subscription_operations_async import ProviderShareSubscriptionOperations +from ._share_subscription_operations_async import ShareSubscriptionOperations +from ._consumer_source_data_set_operations_async import ConsumerSourceDataSetOperations +from ._synchronization_setting_operations_async import SynchronizationSettingOperations +from ._trigger_operations_async import TriggerOperations + +__all__ = [ + 'AccountOperations', + 'ConsumerInvitationOperations', + 'DataSetOperations', + 'DataSetMappingOperations', + 'InvitationOperations', + 'OperationOperations', + 'ShareOperations', + 'ProviderShareSubscriptionOperations', + 'ShareSubscriptionOperations', + 'ConsumerSourceDataSetOperations', + 'SynchronizationSettingOperations', + 'TriggerOperations', +] diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_account_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_account_operations_async.py new file mode 100644 index 00000000000..5c293630594 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_account_operations_async.py @@ -0,0 +1,531 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AccountOperations: + """AccountOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + **kwargs + ) -> "models.Account": + """Get an account. + + Get an account under a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Account or the result of cls(response) + :rtype: ~data_share_management_client.models.Account + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Account"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Account', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + async def _create_initial( + self, + resource_group_name: str, + account_name: str, + identity: "models.Identity", + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ) -> "models.Account": + cls = kwargs.pop('cls', None) # type: ClsType["models.Account"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _account = models.Account(location=location, tags=tags, identity=identity) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._create_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_account, 'Account') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Account', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Account', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + async def create( + self, + resource_group_name: str, + account_name: str, + identity: "models.Identity", + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ) -> "models.Account": + """Create an account. + + Create an account in the given resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param identity: Identity Info on the Account. + :type identity: ~data_share_management_client.models.Identity + :param location: Location of the azure resource. + :type location: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns Account + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.Account] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.Account"] + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + identity=identity, + location=location, + tags=tags, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Account', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + **kwargs + ) -> "models.OperationResponse": + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + async def delete( + self, + resource_group_name: str, + account_name: str, + **kwargs + ) -> "models.OperationResponse": + """DeleteAccount. + + Delete an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + async def update( + self, + resource_group_name: str, + account_name: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ) -> "models.Account": + """Patch an account. + + Patch a given account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Account or the result of cls(response) + :rtype: ~data_share_management_client.models.Account + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Account"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _account_update_parameters = models.AccountUpdateParameters(tags=tags) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_account_update_parameters, 'AccountUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Account', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + def list_by_subscription( + self, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.AccountList": + """List Accounts in Subscription. + + List Accounts in a subscription. + + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccountList or the result of cls(response) + :rtype: ~data_share_management_client.models.AccountList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AccountList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AccountList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts'} + + def list_by_resource_group( + self, + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.AccountList": + """List Accounts in ResourceGroup. + + List Accounts in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccountList or the result of cls(response) + :rtype: ~data_share_management_client.models.AccountList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AccountList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AccountList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_consumer_invitation_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_consumer_invitation_operations_async.py new file mode 100644 index 00000000000..97d9f26ea32 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_consumer_invitation_operations_async.py @@ -0,0 +1,228 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConsumerInvitationOperations: + """ConsumerInvitationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def reject_invitation( + self, + location: str, + invitation_id: str, + **kwargs + ) -> "models.ConsumerInvitation": + """Reject an invitation. + + Rejects the invitation identified by invitationId. + + :param location: Location of the invitation. + :type location: str + :param invitation_id: Unique id of the invitation. + :type invitation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerInvitation or the result of cls(response) + :rtype: ~data_share_management_client.models.ConsumerInvitation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerInvitation"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _invitation = models.ConsumerInvitation(invitation_id=invitation_id) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.reject_invitation.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_invitation, 'ConsumerInvitation') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ConsumerInvitation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + reject_invitation.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/RejectInvitation'} + + async def get( + self, + location: str, + invitation_id: str, + **kwargs + ) -> "models.ConsumerInvitation": + """Get an invitation. + + Gets the invitation identified by invitationId. + + :param location: Location of the invitation. + :type location: str + :param invitation_id: An invitation id. + :type invitation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerInvitation or the result of cls(response) + :rtype: ~data_share_management_client.models.ConsumerInvitation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerInvitation"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'invitationId': self._serialize.url("invitation_id", invitation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ConsumerInvitation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/consumerInvitations/{invitationId}'} + + def list_invitation( + self, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.ConsumerInvitationList": + """Lists invitations. + + List the invitations. + + :param skip_token: The continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerInvitationList or the result of cls(response) + :rtype: ~data_share_management_client.models.ConsumerInvitationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerInvitationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_invitation.metadata['url'] + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ConsumerInvitationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_invitation.metadata = {'url': '/providers/Microsoft.DataShare/ListInvitations'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_consumer_source_data_set_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_consumer_source_data_set_operations_async.py new file mode 100644 index 00000000000..65443ffd30b --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_consumer_source_data_set_operations_async.py @@ -0,0 +1,123 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConsumerSourceDataSetOperations: + """ConsumerSourceDataSetOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_share_subscription( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.ConsumerSourceDataSetList": + """Get source dataSets of a shareSubscription. + + Get source dataSets of a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerSourceDataSetList or the result of cls(response) + :rtype: ~data_share_management_client.models.ConsumerSourceDataSetList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerSourceDataSetList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ConsumerSourceDataSetList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_share_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/ConsumerSourceDataSets'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_data_set_mapping_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_data_set_mapping_operations_async.py new file mode 100644 index 00000000000..acf0170149b --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_data_set_mapping_operations_async.py @@ -0,0 +1,333 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataSetMappingOperations: + """DataSetMappingOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + data_set_mapping_name: str, + **kwargs + ) -> "models.DataSetMapping": + """Get a DataSetMapping in a shareSubscription. + + Get DataSetMapping in a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param data_set_mapping_name: The name of the dataSetMapping. + :type data_set_mapping_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSetMapping or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSetMapping + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSetMapping"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'dataSetMappingName': self._serialize.url("data_set_mapping_name", data_set_mapping_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('DataSetMapping', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/dataSetMappings/{dataSetMappingName}'} + + async def create( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + data_set_mapping_name: str, + data_set_mapping: "models.DataSetMapping", + **kwargs + ) -> "models.DataSetMapping": + """Create a DataSetMapping. + + Maps a source data set in the source share to a sink data set in the share subscription. + Enables copying the data set from source to destination. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription which will hold the data set + sink. + :type share_subscription_name: str + :param data_set_mapping_name: The name of the data set mapping to be created. + :type data_set_mapping_name: str + :param data_set_mapping: Destination data set configuration details. + :type data_set_mapping: ~data_share_management_client.models.DataSetMapping + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSetMapping or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSetMapping or ~data_share_management_client.models.DataSetMapping + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSetMapping"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'dataSetMappingName': self._serialize.url("data_set_mapping_name", data_set_mapping_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(data_set_mapping, 'DataSetMapping') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataSetMapping', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataSetMapping', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/dataSetMappings/{dataSetMappingName}'} + + async def delete( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + data_set_mapping_name: str, + **kwargs + ) -> None: + """Delete a DataSetMapping in a shareSubscription. + + Delete DataSetMapping in a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param data_set_mapping_name: The name of the dataSetMapping. + :type data_set_mapping_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'dataSetMappingName': self._serialize.url("data_set_mapping_name", data_set_mapping_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/dataSetMappings/{dataSetMappingName}'} + + def list_by_share_subscription( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.DataSetMappingList": + """List DataSetMappings in a share subscription. + + List DataSetMappings in a share subscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSetMappingList or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSetMappingList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSetMappingList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataSetMappingList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_share_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/dataSetMappings'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_data_set_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_data_set_operations_async.py new file mode 100644 index 00000000000..077f29e0407 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_data_set_operations_async.py @@ -0,0 +1,369 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataSetOperations: + """DataSetOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + share_name: str, + data_set_name: str, + **kwargs + ) -> "models.DataSet": + """Get a DataSet in a share. + + Get DataSet in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param data_set_name: The name of the dataSet. + :type data_set_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSet or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSet"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'dataSetName': self._serialize.url("data_set_name", data_set_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('DataSet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} + + async def create( + self, + resource_group_name: str, + account_name: str, + share_name: str, + data_set_name: str, + data_set: "models.DataSet", + **kwargs + ) -> "models.DataSet": + """Create a DataSet. + + Adds a new data set to an existing share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share to add the data set to. + :type share_name: str + :param data_set_name: The name of the dataSet. + :type data_set_name: str + :param data_set: The new data set information. + :type data_set: ~data_share_management_client.models.DataSet + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSet or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSet or ~data_share_management_client.models.DataSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSet"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'dataSetName': self._serialize.url("data_set_name", data_set_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(data_set, 'DataSet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataSet', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataSet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + share_name: str, + data_set_name: str, + **kwargs + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'dataSetName': self._serialize.url("data_set_name", data_set_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} + + async def delete( + self, + resource_group_name: str, + account_name: str, + share_name: str, + data_set_name: str, + **kwargs + ) -> None: + """Delete a DataSet in a share. + + Delete DataSet in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param data_set_name: The name of the dataSet. + :type data_set_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + data_set_name=data_set_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} + + def list_by_share( + self, + resource_group_name: str, + account_name: str, + share_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.DataSetList": + """List DataSets in a share. + + List DataSets in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSetList or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSetList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSetList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataSetList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_invitation_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_invitation_operations_async.py new file mode 100644 index 00000000000..c53ea9c8e86 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_invitation_operations_async.py @@ -0,0 +1,341 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class InvitationOperations: + """InvitationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + share_name: str, + invitation_name: str, + **kwargs + ) -> "models.Invitation": + """Get an invitation in a share. + + Get Invitation in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param invitation_name: The name of the invitation. + :type invitation_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Invitation or the result of cls(response) + :rtype: ~data_share_management_client.models.Invitation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Invitation"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'invitationName': self._serialize.url("invitation_name", invitation_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Invitation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'} + + async def create( + self, + resource_group_name: str, + account_name: str, + share_name: str, + invitation_name: str, + target_active_directory_id: Optional[str] = None, + target_email: Optional[str] = None, + target_object_id: Optional[str] = None, + **kwargs + ) -> "models.Invitation": + """Create an invitation. + + Sends a new invitation to a recipient to access a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share to send the invitation for. + :type share_name: str + :param invitation_name: The name of the invitation. + :type invitation_name: str + :param target_active_directory_id: The target Azure AD Id. Can't be combined with email. + :type target_active_directory_id: str + :param target_email: The email the invitation is directed to. + :type target_email: str + :param target_object_id: The target user or application Id that invitation is being sent to. + Must be specified along TargetActiveDirectoryId. This enables sending + invitations to specific users or applications in an AD tenant. + :type target_object_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Invitation or the result of cls(response) + :rtype: ~data_share_management_client.models.Invitation or ~data_share_management_client.models.Invitation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Invitation"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _invitation = models.Invitation(target_active_directory_id=target_active_directory_id, target_email=target_email, target_object_id=target_object_id) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'invitationName': self._serialize.url("invitation_name", invitation_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_invitation, 'Invitation') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Invitation', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Invitation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'} + + async def delete( + self, + resource_group_name: str, + account_name: str, + share_name: str, + invitation_name: str, + **kwargs + ) -> None: + """Delete an invitation in a share. + + Delete Invitation in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param invitation_name: The name of the invitation. + :type invitation_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'invitationName': self._serialize.url("invitation_name", invitation_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'} + + def list_by_share( + self, + resource_group_name: str, + account_name: str, + share_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.InvitationList": + """List invitations in a share. + + List all Invitations in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: The continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: InvitationList or the result of cls(response) + :rtype: ~data_share_management_client.models.InvitationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.InvitationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('InvitationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_operation_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_operation_operations_async.py new file mode 100644 index 00000000000..397c94d67b8 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_operation_operations_async.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationOperations: + """OperationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs + ) -> "models.OperationList": + """List of available operations. + + Lists the available operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationList or the result of cls(response) + :rtype: ~data_share_management_client.models.OperationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataShare/operations'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_provider_share_subscription_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_provider_share_subscription_operations_async.py new file mode 100644 index 00000000000..e516dc2824a --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_provider_share_subscription_operations_async.py @@ -0,0 +1,367 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ProviderShareSubscriptionOperations: + """ProviderShareSubscriptionOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get_by_share( + self, + resource_group_name: str, + account_name: str, + share_name: str, + provider_share_subscription_id: str, + **kwargs + ) -> "models.ProviderShareSubscription": + """Get share subscription in a provider share. + + Get share subscription in a provider share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param provider_share_subscription_id: To locate shareSubscription. + :type provider_share_subscription_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProviderShareSubscription or the result of cls(response) + :rtype: ~data_share_management_client.models.ProviderShareSubscription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'providerShareSubscriptionId': self._serialize.url("provider_share_subscription_id", provider_share_subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}'} + + def list_by_share( + self, + resource_group_name: str, + account_name: str, + share_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.ProviderShareSubscriptionList": + """List share subscriptions in a provider share. + + List of available share subscriptions to a provider share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: Continuation Token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProviderShareSubscriptionList or the result of cls(response) + :rtype: ~data_share_management_client.models.ProviderShareSubscriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscriptionList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProviderShareSubscriptionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions'} + + async def _revoke_initial( + self, + resource_group_name: str, + account_name: str, + share_name: str, + provider_share_subscription_id: str, + **kwargs + ) -> "models.ProviderShareSubscription": + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._revoke_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'providerShareSubscriptionId': self._serialize.url("provider_share_subscription_id", provider_share_subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _revoke_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/revoke'} + + async def revoke( + self, + resource_group_name: str, + account_name: str, + share_name: str, + provider_share_subscription_id: str, + **kwargs + ) -> "models.ProviderShareSubscription": + """Revoke share subscription in a provider share. + + Revoke share subscription in a provider share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param provider_share_subscription_id: To locate shareSubscription. + :type provider_share_subscription_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns ProviderShareSubscription + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ProviderShareSubscription] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscription"] + raw_result = await self._revoke_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + provider_share_subscription_id=provider_share_subscription_id, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + revoke.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/revoke'} + + async def reinstate( + self, + resource_group_name: str, + account_name: str, + share_name: str, + provider_share_subscription_id: str, + **kwargs + ) -> "models.ProviderShareSubscription": + """Reinstate share subscription in a provider share. + + Reinstate share subscription in a provider share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param provider_share_subscription_id: To locate shareSubscription. + :type provider_share_subscription_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProviderShareSubscription or the result of cls(response) + :rtype: ~data_share_management_client.models.ProviderShareSubscription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.reinstate.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'providerShareSubscriptionId': self._serialize.url("provider_share_subscription_id", provider_share_subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + reinstate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_share_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_share_operations_async.py new file mode 100644 index 00000000000..0c7c5ef51f1 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_share_operations_async.py @@ -0,0 +1,567 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ShareOperations: + """ShareOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + share_name: str, + **kwargs + ) -> "models.Share": + """Get a share. + + Get a specified share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share to retrieve. + :type share_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Share or the result of cls(response) + :rtype: ~data_share_management_client.models.Share + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Share"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Share', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} + + async def create( + self, + resource_group_name: str, + account_name: str, + share_name: str, + description: Optional[str] = None, + share_kind: Optional[Union[str, "models.ShareKind"]] = None, + terms: Optional[str] = None, + **kwargs + ) -> "models.Share": + """Create a share. + + Create a share in the given account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param description: Share description. + :type description: str + :param share_kind: Share kind. + :type share_kind: str or ~data_share_management_client.models.ShareKind + :param terms: Share terms. + :type terms: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Share or the result of cls(response) + :rtype: ~data_share_management_client.models.Share or ~data_share_management_client.models.Share + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Share"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _share = models.Share(description=description, share_kind=share_kind, terms=terms) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share, 'Share') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Share', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Share', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + share_name: str, + **kwargs + ) -> "models.OperationResponse": + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} + + async def delete( + self, + resource_group_name: str, + account_name: str, + share_name: str, + **kwargs + ) -> "models.OperationResponse": + """Delete a share. + + Deletes a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} + + def list_by_account( + self, + resource_group_name: str, + account_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.ShareList": + """List shares in an account. + + List of available shares under an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param skip_token: Continuation Token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareList or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ShareList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares'} + + def list_synchronization( + self, + resource_group_name: str, + account_name: str, + share_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.ShareSynchronizationList": + """List synchronizations of a share. + + List Synchronizations in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSynchronizationList or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSynchronizationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSynchronizationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ShareSynchronizationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_synchronization.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizations'} + + def list_synchronization_detail( + self, + resource_group_name: str, + account_name: str, + share_name: str, + skip_token: Optional[str] = None, + consumer_email: Optional[str] = None, + consumer_name: Optional[str] = None, + consumer_tenant_name: Optional[str] = None, + duration_ms: Optional[int] = None, + end_time: Optional[datetime.datetime] = None, + message: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + status: Optional[str] = None, + synchronization_id: Optional[str] = None, + **kwargs + ) -> "models.SynchronizationDetailsList": + """List synchronization details. + + List data set level details for a share synchronization. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: Continuation token. + :type skip_token: str + :param consumer_email: Email of the user who created the synchronization. + :type consumer_email: str + :param consumer_name: Name of the user who created the synchronization. + :type consumer_name: str + :param consumer_tenant_name: Tenant name of the consumer who created the synchronization. + :type consumer_tenant_name: str + :param duration_ms: synchronization duration. + :type duration_ms: int + :param end_time: End time of synchronization. + :type end_time: ~datetime.datetime + :param message: message of synchronization. + :type message: str + :param start_time: start time of synchronization. + :type start_time: ~datetime.datetime + :param status: Raw Status. + :type status: str + :param synchronization_id: Synchronization id. + :type synchronization_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationDetailsList or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationDetailsList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationDetailsList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + _share_synchronization = models.ShareSynchronization(consumer_email=consumer_email, consumer_name=consumer_name, consumer_tenant_name=consumer_tenant_name, duration_ms=duration_ms, end_time=end_time, message=message, start_time=start_time, status=status, synchronization_id=synchronization_id) + api_version = "2019-11-01" + content_type = "application/json" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization_detail.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share_synchronization, 'ShareSynchronization') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SynchronizationDetailsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_synchronization_detail.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizationDetails'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_share_subscription_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_share_subscription_operations_async.py new file mode 100644 index 00000000000..4416c305e0e --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_share_subscription_operations_async.py @@ -0,0 +1,858 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ShareSubscriptionOperations: + """ShareSubscriptionOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + **kwargs + ) -> "models.ShareSubscription": + """Get a shareSubscription in an account. + + Get shareSubscription in an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSubscription or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSubscription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + async def create( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + invitation_id: str, + source_share_location: str, + **kwargs + ) -> "models.ShareSubscription": + """Create a shareSubscription in an account. + + Create shareSubscription in an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param invitation_id: The invitation id. + :type invitation_id: str + :param source_share_location: Source share location. + :type source_share_location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSubscription or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSubscription or ~data_share_management_client.models.ShareSubscription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _share_subscription = models.ShareSubscription(invitation_id=invitation_id, source_share_location=source_share_location) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share_subscription, 'ShareSubscription') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShareSubscription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + **kwargs + ) -> "models.OperationResponse": + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + async def delete( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + **kwargs + ) -> "models.OperationResponse": + """Delete a shareSubscription in an account. + + Delete shareSubscription in an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + def list_by_account( + self, + resource_group_name: str, + account_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.ShareSubscriptionList": + """List share subscriptions in an account. + + List of available share subscriptions under an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param skip_token: Continuation Token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSubscriptionList or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSubscriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ShareSubscriptionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions'} + + def list_source_share_synchronization_setting( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.SourceShareSynchronizationSettingList": + """Get synchronization settings set on a share. + + Get source share synchronization settings for a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SourceShareSynchronizationSettingList or the result of cls(response) + :rtype: ~data_share_management_client.models.SourceShareSynchronizationSettingList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SourceShareSynchronizationSettingList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_source_share_synchronization_setting.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SourceShareSynchronizationSettingList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_source_share_synchronization_setting.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings'} + + def list_synchronization( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.ShareSubscriptionSynchronizationList": + """List synchronizations of a share subscription. + + List Synchronizations in a share subscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSubscriptionSynchronizationList or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSubscriptionSynchronizationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronizationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ShareSubscriptionSynchronizationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_synchronization.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations'} + + def list_synchronization_detail( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + synchronization_id: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.SynchronizationDetailsList": + """List synchronization details. + + List data set level details for a share subscription synchronization. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription. + :type share_subscription_name: str + :param synchronization_id: Synchronization id. + :type synchronization_id: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationDetailsList or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationDetailsList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationDetailsList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + _share_subscription_synchronization = models.ShareSubscriptionSynchronization(synchronization_id=synchronization_id) + api_version = "2019-11-01" + content_type = "application/json" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization_detail.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share_subscription_synchronization, 'ShareSubscriptionSynchronization') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SynchronizationDetailsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_synchronization_detail.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails'} + + async def _synchronize_initial( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + synchronization_mode: Optional[Union[str, "models.SynchronizationMode"]] = None, + **kwargs + ) -> "models.ShareSubscriptionSynchronization": + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronization"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _synchronize = models.Synchronize(synchronization_mode=synchronization_mode) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._synchronize_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_synchronize, 'Synchronize') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _synchronize_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/Synchronize'} + + async def synchronize( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + synchronization_mode: Optional[Union[str, "models.SynchronizationMode"]] = None, + **kwargs + ) -> "models.ShareSubscriptionSynchronization": + """Initiate a copy. + + Initiate an asynchronous data share job. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of share subscription. + :type share_subscription_name: str + :param synchronization_mode: Mode of synchronization used in triggers and snapshot sync. + Incremental by default. + :type synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns ShareSubscriptionSynchronization + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ShareSubscriptionSynchronization] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronization"] + raw_result = await self._synchronize_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + synchronization_mode=synchronization_mode, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + synchronize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/Synchronize'} + + async def _cancel_synchronization_initial( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + synchronization_id: str, + **kwargs + ) -> "models.ShareSubscriptionSynchronization": + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronization"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _share_subscription_synchronization = models.ShareSubscriptionSynchronization(synchronization_id=synchronization_id) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cancel_synchronization_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share_subscription_synchronization, 'ShareSubscriptionSynchronization') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _cancel_synchronization_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization'} + + async def cancel_synchronization( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + synchronization_id: str, + **kwargs + ) -> "models.ShareSubscriptionSynchronization": + """Request to cancel a synchronization. + + Request cancellation of a data share snapshot. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param synchronization_id: Synchronization id. + :type synchronization_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns ShareSubscriptionSynchronization + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ShareSubscriptionSynchronization] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronization"] + raw_result = await self._cancel_synchronization_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + synchronization_id=synchronization_id, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + cancel_synchronization.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_synchronization_setting_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_synchronization_setting_operations_async.py new file mode 100644 index 00000000000..78a95bd6159 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_synchronization_setting_operations_async.py @@ -0,0 +1,378 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SynchronizationSettingOperations: + """SynchronizationSettingOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + share_name: str, + synchronization_setting_name: str, + **kwargs + ) -> "models.SynchronizationSetting": + """Get a synchronizationSetting in a share. + + Get synchronizationSetting in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param synchronization_setting_name: The name of the synchronizationSetting. + :type synchronization_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationSetting or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationSetting + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationSetting"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'synchronizationSettingName': self._serialize.url("synchronization_setting_name", synchronization_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('SynchronizationSetting', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings/{synchronizationSettingName}'} + + async def create( + self, + resource_group_name: str, + account_name: str, + share_name: str, + synchronization_setting_name: str, + synchronization_setting: "models.SynchronizationSetting", + **kwargs + ) -> "models.SynchronizationSetting": + """Create or update a synchronizationSetting. + + Adds a new synchronization setting to an existing share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share to add the synchronization setting to. + :type share_name: str + :param synchronization_setting_name: The name of the synchronizationSetting. + :type synchronization_setting_name: str + :param synchronization_setting: The new synchronization setting information. + :type synchronization_setting: ~data_share_management_client.models.SynchronizationSetting + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationSetting or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationSetting or ~data_share_management_client.models.SynchronizationSetting + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationSetting"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'synchronizationSettingName': self._serialize.url("synchronization_setting_name", synchronization_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(synchronization_setting, 'SynchronizationSetting') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SynchronizationSetting', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SynchronizationSetting', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings/{synchronizationSettingName}'} + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + share_name: str, + synchronization_setting_name: str, + **kwargs + ) -> "models.OperationResponse": + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'synchronizationSettingName': self._serialize.url("synchronization_setting_name", synchronization_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings/{synchronizationSettingName}'} + + async def delete( + self, + resource_group_name: str, + account_name: str, + share_name: str, + synchronization_setting_name: str, + **kwargs + ) -> "models.OperationResponse": + """Delete a synchronizationSetting in a share. + + Delete synchronizationSetting in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param synchronization_setting_name: The name of the synchronizationSetting . + :type synchronization_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + synchronization_setting_name=synchronization_setting_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings/{synchronizationSettingName}'} + + def list_by_share( + self, + resource_group_name: str, + account_name: str, + share_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.SynchronizationSettingList": + """List synchronizationSettings in a share. + + List synchronizationSettings in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationSettingList or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationSettingList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationSettingList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SynchronizationSettingList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_trigger_operations_async.py b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_trigger_operations_async.py new file mode 100644 index 00000000000..18598bf412e --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/aio/operations_async/_trigger_operations_async.py @@ -0,0 +1,421 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class TriggerOperations: + """TriggerOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + trigger_name: str, + **kwargs + ) -> "models.Trigger": + """Get a Trigger in a shareSubscription. + + Get Trigger in a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param trigger_name: The name of the trigger. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Trigger or the result of cls(response) + :rtype: ~data_share_management_client.models.Trigger + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Trigger"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Trigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + async def _create_initial( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + trigger_name: str, + trigger: "models.Trigger", + **kwargs + ) -> "models.Trigger": + cls = kwargs.pop('cls', None) # type: ClsType["models.Trigger"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._create_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(trigger, 'Trigger') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Trigger', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Trigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + async def create( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + trigger_name: str, + trigger: "models.Trigger", + **kwargs + ) -> "models.Trigger": + """Create a Trigger. + + This method creates a trigger for a share subscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription which will hold the data set + sink. + :type share_subscription_name: str + :param trigger_name: The name of the trigger. + :type trigger_name: str + :param trigger: Trigger details. + :type trigger: ~data_share_management_client.models.Trigger + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns Trigger + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.Trigger] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.Trigger"] + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + trigger_name=trigger_name, + trigger=trigger, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Trigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + trigger_name: str, + **kwargs + ) -> "models.OperationResponse": + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + async def delete( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + trigger_name: str, + **kwargs + ) -> "models.OperationResponse": + """Delete a Trigger in a shareSubscription. + + Delete Trigger in a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param trigger_name: The name of the trigger. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + trigger_name=trigger_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + return await async_poller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + def list_by_share_subscription( + self, + resource_group_name: str, + account_name: str, + share_subscription_name: str, + skip_token: Optional[str] = None, + **kwargs + ) -> "models.TriggerList": + """List Triggers in a share subscription. + + List Triggers in a share subscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggerList or the result of cls(response) + :rtype: ~data_share_management_client.models.TriggerList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TriggerList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TriggerList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_share_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/models/__init__.py b/src/datashare/azext_datashare/vendored_sdks/datashare/models/__init__.py new file mode 100644 index 00000000000..237bc58e2ae --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/models/__init__.py @@ -0,0 +1,250 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Account + from ._models_py3 import AccountList + from ._models_py3 import AccountUpdateParameters + from ._models_py3 import AdlsGen1FileDataSet + from ._models_py3 import AdlsGen1FolderDataSet + from ._models_py3 import AdlsGen2FileDataSet + from ._models_py3 import AdlsGen2FileDataSetMapping + from ._models_py3 import AdlsGen2FileSystemDataSet + from ._models_py3 import AdlsGen2FileSystemDataSetMapping + from ._models_py3 import AdlsGen2FolderDataSet + from ._models_py3 import AdlsGen2FolderDataSetMapping + from ._models_py3 import BlobContainerDataSet + from ._models_py3 import BlobContainerDataSetMapping + from ._models_py3 import BlobDataSet + from ._models_py3 import BlobDataSetMapping + from ._models_py3 import BlobFolderDataSet + from ._models_py3 import BlobFolderDataSetMapping + from ._models_py3 import ConsumerInvitation + from ._models_py3 import ConsumerInvitationList + from ._models_py3 import ConsumerSourceDataSet + from ._models_py3 import ConsumerSourceDataSetList + from ._models_py3 import DataSet + from ._models_py3 import DataSetList + from ._models_py3 import DataSetMapping + from ._models_py3 import DataSetMappingList + from ._models_py3 import DataShareError + from ._models_py3 import DataShareErrorInfo + from ._models_py3 import DefaultDto + from ._models_py3 import DimensionProperties + from ._models_py3 import Identity + from ._models_py3 import Invitation + from ._models_py3 import InvitationList + from ._models_py3 import KustoClusterDataSet + from ._models_py3 import KustoClusterDataSetMapping + from ._models_py3 import KustoDatabaseDataSet + from ._models_py3 import KustoDatabaseDataSetMapping + from ._models_py3 import OperationList + from ._models_py3 import OperationMetaLogSpecification + from ._models_py3 import OperationMetaMetricSpecification + from ._models_py3 import OperationMetaServiceSpecification + from ._models_py3 import OperationModel + from ._models_py3 import OperationModelProperties + from ._models_py3 import OperationResponse + from ._models_py3 import ProviderShareSubscription + from ._models_py3 import ProviderShareSubscriptionList + from ._models_py3 import ProxyDto + from ._models_py3 import ScheduledSourceSynchronizationSetting + from ._models_py3 import ScheduledSynchronizationSetting + from ._models_py3 import ScheduledTrigger + from ._models_py3 import Share + from ._models_py3 import ShareList + from ._models_py3 import ShareSubscription + from ._models_py3 import ShareSubscriptionList + from ._models_py3 import ShareSubscriptionSynchronization + from ._models_py3 import ShareSubscriptionSynchronizationList + from ._models_py3 import ShareSynchronization + from ._models_py3 import ShareSynchronizationList + from ._models_py3 import SourceShareSynchronizationSetting + from ._models_py3 import SourceShareSynchronizationSettingList + from ._models_py3 import SqlDBTableDataSet + from ._models_py3 import SqlDBTableDataSetMapping + from ._models_py3 import SqlDwTableDataSet + from ._models_py3 import SqlDwTableDataSetMapping + from ._models_py3 import SynchronizationDetails + from ._models_py3 import SynchronizationDetailsList + from ._models_py3 import SynchronizationSetting + from ._models_py3 import SynchronizationSettingList + from ._models_py3 import Synchronize + from ._models_py3 import Trigger + from ._models_py3 import TriggerList +except (SyntaxError, ImportError): + from ._models import Account # type: ignore + from ._models import AccountList # type: ignore + from ._models import AccountUpdateParameters # type: ignore + from ._models import AdlsGen1FileDataSet # type: ignore + from ._models import AdlsGen1FolderDataSet # type: ignore + from ._models import AdlsGen2FileDataSet # type: ignore + from ._models import AdlsGen2FileDataSetMapping # type: ignore + from ._models import AdlsGen2FileSystemDataSet # type: ignore + from ._models import AdlsGen2FileSystemDataSetMapping # type: ignore + from ._models import AdlsGen2FolderDataSet # type: ignore + from ._models import AdlsGen2FolderDataSetMapping # type: ignore + from ._models import BlobContainerDataSet # type: ignore + from ._models import BlobContainerDataSetMapping # type: ignore + from ._models import BlobDataSet # type: ignore + from ._models import BlobDataSetMapping # type: ignore + from ._models import BlobFolderDataSet # type: ignore + from ._models import BlobFolderDataSetMapping # type: ignore + from ._models import ConsumerInvitation # type: ignore + from ._models import ConsumerInvitationList # type: ignore + from ._models import ConsumerSourceDataSet # type: ignore + from ._models import ConsumerSourceDataSetList # type: ignore + from ._models import DataSet # type: ignore + from ._models import DataSetList # type: ignore + from ._models import DataSetMapping # type: ignore + from ._models import DataSetMappingList # type: ignore + from ._models import DataShareError # type: ignore + from ._models import DataShareErrorInfo # type: ignore + from ._models import DefaultDto # type: ignore + from ._models import DimensionProperties # type: ignore + from ._models import Identity # type: ignore + from ._models import Invitation # type: ignore + from ._models import InvitationList # type: ignore + from ._models import KustoClusterDataSet # type: ignore + from ._models import KustoClusterDataSetMapping # type: ignore + from ._models import KustoDatabaseDataSet # type: ignore + from ._models import KustoDatabaseDataSetMapping # type: ignore + from ._models import OperationList # type: ignore + from ._models import OperationMetaLogSpecification # type: ignore + from ._models import OperationMetaMetricSpecification # type: ignore + from ._models import OperationMetaServiceSpecification # type: ignore + from ._models import OperationModel # type: ignore + from ._models import OperationModelProperties # type: ignore + from ._models import OperationResponse # type: ignore + from ._models import ProviderShareSubscription # type: ignore + from ._models import ProviderShareSubscriptionList # type: ignore + from ._models import ProxyDto # type: ignore + from ._models import ScheduledSourceSynchronizationSetting # type: ignore + from ._models import ScheduledSynchronizationSetting # type: ignore + from ._models import ScheduledTrigger # type: ignore + from ._models import Share # type: ignore + from ._models import ShareList # type: ignore + from ._models import ShareSubscription # type: ignore + from ._models import ShareSubscriptionList # type: ignore + from ._models import ShareSubscriptionSynchronization # type: ignore + from ._models import ShareSubscriptionSynchronizationList # type: ignore + from ._models import ShareSynchronization # type: ignore + from ._models import ShareSynchronizationList # type: ignore + from ._models import SourceShareSynchronizationSetting # type: ignore + from ._models import SourceShareSynchronizationSettingList # type: ignore + from ._models import SqlDBTableDataSet # type: ignore + from ._models import SqlDBTableDataSetMapping # type: ignore + from ._models import SqlDwTableDataSet # type: ignore + from ._models import SqlDwTableDataSetMapping # type: ignore + from ._models import SynchronizationDetails # type: ignore + from ._models import SynchronizationDetailsList # type: ignore + from ._models import SynchronizationSetting # type: ignore + from ._models import SynchronizationSettingList # type: ignore + from ._models import Synchronize # type: ignore + from ._models import Trigger # type: ignore + from ._models import TriggerList # type: ignore + +from ._data_share_management_client_enums import ( + DataSetMappingStatus, + DataSetType, + InvitationStatus, + Kind, + OutputType, + ProvisioningState, + RecurrenceInterval, + ShareKind, + ShareSubscriptionStatus, + Status, + SynchronizationMode, + TriggerStatus, +) + +__all__ = [ + 'Account', + 'AccountList', + 'AccountUpdateParameters', + 'AdlsGen1FileDataSet', + 'AdlsGen1FolderDataSet', + 'AdlsGen2FileDataSet', + 'AdlsGen2FileDataSetMapping', + 'AdlsGen2FileSystemDataSet', + 'AdlsGen2FileSystemDataSetMapping', + 'AdlsGen2FolderDataSet', + 'AdlsGen2FolderDataSetMapping', + 'BlobContainerDataSet', + 'BlobContainerDataSetMapping', + 'BlobDataSet', + 'BlobDataSetMapping', + 'BlobFolderDataSet', + 'BlobFolderDataSetMapping', + 'ConsumerInvitation', + 'ConsumerInvitationList', + 'ConsumerSourceDataSet', + 'ConsumerSourceDataSetList', + 'DataSet', + 'DataSetList', + 'DataSetMapping', + 'DataSetMappingList', + 'DataShareError', + 'DataShareErrorInfo', + 'DefaultDto', + 'DimensionProperties', + 'Identity', + 'Invitation', + 'InvitationList', + 'KustoClusterDataSet', + 'KustoClusterDataSetMapping', + 'KustoDatabaseDataSet', + 'KustoDatabaseDataSetMapping', + 'OperationList', + 'OperationMetaLogSpecification', + 'OperationMetaMetricSpecification', + 'OperationMetaServiceSpecification', + 'OperationModel', + 'OperationModelProperties', + 'OperationResponse', + 'ProviderShareSubscription', + 'ProviderShareSubscriptionList', + 'ProxyDto', + 'ScheduledSourceSynchronizationSetting', + 'ScheduledSynchronizationSetting', + 'ScheduledTrigger', + 'Share', + 'ShareList', + 'ShareSubscription', + 'ShareSubscriptionList', + 'ShareSubscriptionSynchronization', + 'ShareSubscriptionSynchronizationList', + 'ShareSynchronization', + 'ShareSynchronizationList', + 'SourceShareSynchronizationSetting', + 'SourceShareSynchronizationSettingList', + 'SqlDBTableDataSet', + 'SqlDBTableDataSetMapping', + 'SqlDwTableDataSet', + 'SqlDwTableDataSetMapping', + 'SynchronizationDetails', + 'SynchronizationDetailsList', + 'SynchronizationSetting', + 'SynchronizationSettingList', + 'Synchronize', + 'Trigger', + 'TriggerList', + 'DataSetMappingStatus', + 'DataSetType', + 'InvitationStatus', + 'Kind', + 'OutputType', + 'ProvisioningState', + 'RecurrenceInterval', + 'ShareKind', + 'ShareSubscriptionStatus', + 'Status', + 'SynchronizationMode', + 'TriggerStatus', +] diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/models/_data_share_management_client_enums.py b/src/datashare/azext_datashare/vendored_sdks/datashare/models/_data_share_management_client_enums.py new file mode 100644 index 00000000000..a2a515c4266 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/models/_data_share_management_client_enums.py @@ -0,0 +1,128 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + +class ProvisioningState(str, Enum): + """Provisioning state of the Account + """ + + succeeded = "Succeeded" + creating = "Creating" + deleting = "Deleting" + moving = "Moving" + failed = "Failed" + +class InvitationStatus(str, Enum): + """The status of the invitation. + """ + + pending = "Pending" + accepted = "Accepted" + rejected = "Rejected" + withdrawn = "Withdrawn" + +class Kind(str, Enum): + """Kind of data set. + """ + + blob = "Blob" + container = "Container" + blob_folder = "BlobFolder" + adls_gen2_file_system = "AdlsGen2FileSystem" + adls_gen2_folder = "AdlsGen2Folder" + adls_gen2_file = "AdlsGen2File" + adls_gen1_folder = "AdlsGen1Folder" + adls_gen1_file = "AdlsGen1File" + kusto_cluster = "KustoCluster" + kusto_database = "KustoDatabase" + sql_db_table = "SqlDBTable" + sql_dw_table = "SqlDWTable" + +class SynchronizationKind(str, Enum): + schedule_based = "ScheduleBased" + +class ShareKind(str, Enum): + """Share kind. + """ + + copy_based = "CopyBased" + in_place = "InPlace" + +class SynchronizationMode(str, Enum): + """Synchronization mode + """ + + incremental = "Incremental" + full_sync = "FullSync" + +class DataSetType(str, Enum): + """Type of the data set + """ + + blob = "Blob" + container = "Container" + blob_folder = "BlobFolder" + adls_gen2_file_system = "AdlsGen2FileSystem" + adls_gen2_folder = "AdlsGen2Folder" + adls_gen2_file = "AdlsGen2File" + adls_gen1_folder = "AdlsGen1Folder" + adls_gen1_file = "AdlsGen1File" + kusto_cluster = "KustoCluster" + kusto_database = "KustoDatabase" + sql_db_table = "SqlDBTable" + sql_dw_table = "SqlDWTable" + +class ShareSubscriptionStatus(str, Enum): + """Gets the status of share subscription + """ + + active = "Active" + revoked = "Revoked" + source_deleted = "SourceDeleted" + revoking = "Revoking" + +class Status(str, Enum): + """Operation state of the long running operation. + """ + + accepted = "Accepted" + in_progress = "InProgress" + transient_failure = "TransientFailure" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + +class RecurrenceInterval(str, Enum): + """Recurrence Interval + """ + + hour = "Hour" + day = "Day" + +class TriggerStatus(str, Enum): + """Gets the trigger state + """ + + active = "Active" + inactive = "Inactive" + source_synchronization_setting_deleted = "SourceSynchronizationSettingDeleted" + +class DataSetMappingStatus(str, Enum): + """Gets the status of the data set mapping. + """ + + ok = "Ok" + broken = "Broken" + +class OutputType(str, Enum): + """File output type + """ + + csv = "Csv" + parquet = "Parquet" diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/models/_models.py b/src/datashare/azext_datashare/vendored_sdks/datashare/models/_models.py new file mode 100644 index 00000000000..bee5d5e4df6 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/models/_models.py @@ -0,0 +1,3738 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class DefaultDto(msrest.serialization.Model): + """Base data transfer object implementation for default resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :param location: Location of the azure resource. + :type location: str + :ivar name: Name of the azure resource. + :vartype name: str + :param tags: A set of tags. Tags on the azure resource. + :type tags: dict[str, str] + :ivar type: Type of the azure resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultDto, self).__init__(**kwargs) + self.id = None + self.location = kwargs.get('location', None) + self.name = None + self.tags = kwargs.get('tags', None) + self.type = None + + +class Account(DefaultDto): + """An account data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :param location: Location of the azure resource. + :type location: str + :ivar name: Name of the azure resource. + :vartype name: str + :param tags: A set of tags. Tags on the azure resource. + :type tags: dict[str, str] + :ivar type: Type of the azure resource. + :vartype type: str + :param identity: Required. Identity Info on the Account. + :type identity: ~data_share_management_client.models.Identity + :ivar created_at: Time at which the account was created. + :vartype created_at: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the Account. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'identity': {'required': True}, + 'created_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Account, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.created_at = None + self.provisioning_state = None + self.user_email = None + self.user_name = None + + +class AccountList(msrest.serialization.Model): + """List response for get Accounts. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.Account] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Account]'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class AccountUpdateParameters(msrest.serialization.Model): + """Update parameters for accounts. + + :param tags: A set of tags. Tags on the azure resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(AccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class ProxyDto(msrest.serialization.Model): + """Base data transfer object implementation for proxy resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyDto, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DataSet(ProxyDto): + """A DataSet data transfer object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdlsGen1FileDataSet, AdlsGen1FolderDataSet, AdlsGen2FileDataSet, AdlsGen2FileSystemDataSet, AdlsGen2FolderDataSet, BlobDataSet, BlobFolderDataSet, BlobContainerDataSet, KustoClusterDataSet, KustoDatabaseDataSet, SqlDBTableDataSet, SqlDwTableDataSet. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AdlsGen1File': 'AdlsGen1FileDataSet', 'AdlsGen1Folder': 'AdlsGen1FolderDataSet', 'AdlsGen2File': 'AdlsGen2FileDataSet', 'AdlsGen2FileSystem': 'AdlsGen2FileSystemDataSet', 'AdlsGen2Folder': 'AdlsGen2FolderDataSet', 'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'Container': 'BlobContainerDataSet', 'KustoCluster': 'KustoClusterDataSet', 'KustoDatabase': 'KustoDatabaseDataSet', 'SqlDBTable': 'SqlDBTableDataSet', 'SqlDWTable': 'SqlDwTableDataSet'} + } + + def __init__( + self, + **kwargs + ): + super(DataSet, self).__init__(**kwargs) + self.kind = 'DataSet' + + +class AdlsGen1FileDataSet(DataSet): + """An ADLS Gen 1 file data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param account_name: Required. The ADLS account name. + :type account_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_name: Required. The file name in the ADLS account. + :type file_name: str + :param folder_path: Required. The folder path within the ADLS account. + :type folder_path: str + :param resource_group: Required. Resource group of ADLS account. + :type resource_group: str + :param subscription_id: Required. Subscription id of ADLS account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'account_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_name': {'required': True}, + 'folder_path': {'required': True}, + 'resource_group': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdlsGen1FileDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen1File' + self.account_name = kwargs.get('account_name', None) + self.data_set_id = None + self.file_name = kwargs.get('file_name', None) + self.folder_path = kwargs.get('folder_path', None) + self.resource_group = kwargs.get('resource_group', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class AdlsGen1FolderDataSet(DataSet): + """An ADLS Gen 1 folder data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param account_name: Required. The ADLS account name. + :type account_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param folder_path: Required. The folder path within the ADLS account. + :type folder_path: str + :param resource_group: Required. Resource group of ADLS account. + :type resource_group: str + :param subscription_id: Required. Subscription id of ADLS account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'account_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'folder_path': {'required': True}, + 'resource_group': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdlsGen1FolderDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen1Folder' + self.account_name = kwargs.get('account_name', None) + self.data_set_id = None + self.folder_path = kwargs.get('folder_path', None) + self.resource_group = kwargs.get('resource_group', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class AdlsGen2FileDataSet(DataSet): + """An ADLS Gen 2 file data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_path: Required. File path within the file system. + :type file_path: str + :param file_system: Required. File system to which the file belongs. + :type file_system: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_path': {'required': True}, + 'file_system': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdlsGen2FileDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen2File' + self.data_set_id = None + self.file_path = kwargs.get('file_path', None) + self.file_system = kwargs.get('file_system', None) + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class DataSetMapping(ProxyDto): + """A data set mapping data transfer object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdlsGen2FileDataSetMapping, AdlsGen2FileSystemDataSetMapping, AdlsGen2FolderDataSetMapping, BlobDataSetMapping, BlobFolderDataSetMapping, BlobContainerDataSetMapping, KustoClusterDataSetMapping, KustoDatabaseDataSetMapping, SqlDBTableDataSetMapping, SqlDwTableDataSetMapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AdlsGen2File': 'AdlsGen2FileDataSetMapping', 'AdlsGen2FileSystem': 'AdlsGen2FileSystemDataSetMapping', 'AdlsGen2Folder': 'AdlsGen2FolderDataSetMapping', 'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'KustoCluster': 'KustoClusterDataSetMapping', 'KustoDatabase': 'KustoDatabaseDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping', 'SqlDWTable': 'SqlDwTableDataSetMapping'} + } + + def __init__( + self, + **kwargs + ): + super(DataSetMapping, self).__init__(**kwargs) + self.kind = 'DataSetMapping' + + +class AdlsGen2FileDataSetMapping(DataSetMapping): + """An ADLS Gen2 file data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param file_path: Required. File path within the file system. + :type file_path: str + :param file_system: Required. File system to which the file belongs. + :type file_system: str + :param output_type: Type of output file. Possible values include: 'Csv', 'Parquet'. + :type output_type: str or ~data_share_management_client.models.OutputType + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'file_path': {'required': True}, + 'file_system': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'output_type': {'key': 'properties.outputType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdlsGen2FileDataSetMapping, self).__init__(**kwargs) + self.kind = 'AdlsGen2File' + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.file_path = kwargs.get('file_path', None) + self.file_system = kwargs.get('file_system', None) + self.output_type = kwargs.get('output_type', None) + self.provisioning_state = None + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class AdlsGen2FileSystemDataSet(DataSet): + """An ADLS Gen 2 file system data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_system: Required. The file system name. + :type file_system: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_system': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdlsGen2FileSystemDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen2FileSystem' + self.data_set_id = None + self.file_system = kwargs.get('file_system', None) + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class AdlsGen2FileSystemDataSetMapping(DataSetMapping): + """An ADLS Gen2 file system data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param file_system: Required. The file system name. + :type file_system: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'file_system': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdlsGen2FileSystemDataSetMapping, self).__init__(**kwargs) + self.kind = 'AdlsGen2FileSystem' + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.file_system = kwargs.get('file_system', None) + self.provisioning_state = None + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class AdlsGen2FolderDataSet(DataSet): + """An ADLS Gen 2 folder data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_system: Required. File system to which the folder belongs. + :type file_system: str + :param folder_path: Required. Folder path within the file system. + :type folder_path: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_system': {'required': True}, + 'folder_path': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdlsGen2FolderDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen2Folder' + self.data_set_id = None + self.file_system = kwargs.get('file_system', None) + self.folder_path = kwargs.get('folder_path', None) + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class AdlsGen2FolderDataSetMapping(DataSetMapping): + """An ADLS Gen2 folder data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param file_system: Required. File system to which the folder belongs. + :type file_system: str + :param folder_path: Required. Folder path within the file system. + :type folder_path: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'file_system': {'required': True}, + 'folder_path': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdlsGen2FolderDataSetMapping, self).__init__(**kwargs) + self.kind = 'AdlsGen2Folder' + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.file_system = kwargs.get('file_system', None) + self.folder_path = kwargs.get('folder_path', None) + self.provisioning_state = None + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class BlobContainerDataSet(DataSet): + """An Azure storage blob container data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. BLOB Container name. + :type container_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobContainerDataSet, self).__init__(**kwargs) + self.kind = 'Container' + self.container_name = kwargs.get('container_name', None) + self.data_set_id = None + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class BlobContainerDataSetMapping(DataSetMapping): + """A Blob container data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. BLOB Container name. + :type container_name: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobContainerDataSetMapping, self).__init__(**kwargs) + self.kind = 'Container' + self.container_name = kwargs.get('container_name', None) + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.provisioning_state = None + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class BlobDataSet(DataSet): + """An Azure storage blob data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. Container that has the file path. + :type container_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_path: Required. File path within the source data set. + :type file_path: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_path': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobDataSet, self).__init__(**kwargs) + self.kind = 'Blob' + self.container_name = kwargs.get('container_name', None) + self.data_set_id = None + self.file_path = kwargs.get('file_path', None) + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class BlobDataSetMapping(DataSetMapping): + """A Blob data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. Container that has the file path. + :type container_name: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param file_path: Required. File path within the source data set. + :type file_path: str + :param output_type: File output type. Possible values include: 'Csv', 'Parquet'. + :type output_type: str or ~data_share_management_client.models.OutputType + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'file_path': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'output_type': {'key': 'properties.outputType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobDataSetMapping, self).__init__(**kwargs) + self.kind = 'Blob' + self.container_name = kwargs.get('container_name', None) + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.file_path = kwargs.get('file_path', None) + self.output_type = kwargs.get('output_type', None) + self.provisioning_state = None + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class BlobFolderDataSet(DataSet): + """An Azure storage blob folder data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. Container that has the file path. + :type container_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param prefix: Required. Prefix for blob folder. + :type prefix: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'prefix': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobFolderDataSet, self).__init__(**kwargs) + self.kind = 'BlobFolder' + self.container_name = kwargs.get('container_name', None) + self.data_set_id = None + self.prefix = kwargs.get('prefix', None) + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class BlobFolderDataSetMapping(DataSetMapping): + """A Blob folder data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. Container that has the file path. + :type container_name: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param prefix: Required. Prefix for blob folder. + :type prefix: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'prefix': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BlobFolderDataSetMapping, self).__init__(**kwargs) + self.kind = 'BlobFolder' + self.container_name = kwargs.get('container_name', None) + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.prefix = kwargs.get('prefix', None) + self.provisioning_state = None + self.resource_group = kwargs.get('resource_group', None) + self.storage_account_name = kwargs.get('storage_account_name', None) + self.subscription_id = kwargs.get('subscription_id', None) + + +class ConsumerInvitation(ProxyDto): + """A consumer Invitation data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar data_set_count: Number of data sets in a share. + :vartype data_set_count: int + :ivar description: Description shared when the invitation was created. + :vartype description: str + :param invitation_id: Required. Unique id of the invitation. + :type invitation_id: str + :ivar invitation_status: The status of the invitation. Possible values include: 'Pending', + 'Accepted', 'Rejected', 'Withdrawn'. + :vartype invitation_status: str or ~data_share_management_client.models.InvitationStatus + :ivar location: invitation location. + :vartype location: str + :ivar provider_email: Email of the provider who created the resource. + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the resource. + :vartype provider_name: str + :ivar provider_tenant_name: Tenant name of the provider who created the resource. + :vartype provider_tenant_name: str + :ivar responded_at: The time the recipient responded to the invitation. + :vartype responded_at: ~datetime.datetime + :ivar sent_at: Gets the time at which the invitation was sent. + :vartype sent_at: ~datetime.datetime + :ivar share_name: Gets the source share Name. + :vartype share_name: str + :ivar terms_of_use: Terms of use shared when the invitation was created. + :vartype terms_of_use: str + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_set_count': {'readonly': True}, + 'description': {'readonly': True}, + 'invitation_id': {'required': True}, + 'invitation_status': {'readonly': True}, + 'location': {'readonly': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'provider_tenant_name': {'readonly': True}, + 'responded_at': {'readonly': True}, + 'sent_at': {'readonly': True}, + 'share_name': {'readonly': True}, + 'terms_of_use': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_set_count': {'key': 'properties.dataSetCount', 'type': 'int'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, + 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'provider_tenant_name': {'key': 'properties.providerTenantName', 'type': 'str'}, + 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, + 'sent_at': {'key': 'properties.sentAt', 'type': 'iso-8601'}, + 'share_name': {'key': 'properties.shareName', 'type': 'str'}, + 'terms_of_use': {'key': 'properties.termsOfUse', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConsumerInvitation, self).__init__(**kwargs) + self.data_set_count = None + self.description = None + self.invitation_id = kwargs.get('invitation_id', None) + self.invitation_status = None + self.location = None + self.provider_email = None + self.provider_name = None + self.provider_tenant_name = None + self.responded_at = None + self.sent_at = None + self.share_name = None + self.terms_of_use = None + self.user_email = None + self.user_name = None + + +class ConsumerInvitationList(msrest.serialization.Model): + """List response for get InvitationList. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ConsumerInvitation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ConsumerInvitation]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConsumerInvitationList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ConsumerSourceDataSet(ProxyDto): + """A consumer side dataSet data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar data_set_id: DataSet Id. + :vartype data_set_id: str + :ivar data_set_location: Location of the data set. + :vartype data_set_location: str + :ivar data_set_name: DataSet name. + :vartype data_set_name: str + :ivar data_set_path: DataSet path. + :vartype data_set_path: str + :ivar data_set_type: Type of data set. Possible values include: 'Blob', 'Container', + 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', + 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable'. + :vartype data_set_type: str or ~data_share_management_client.models.DataSetType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_set_id': {'readonly': True}, + 'data_set_location': {'readonly': True}, + 'data_set_name': {'readonly': True}, + 'data_set_path': {'readonly': True}, + 'data_set_type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_location': {'key': 'properties.dataSetLocation', 'type': 'str'}, + 'data_set_name': {'key': 'properties.dataSetName', 'type': 'str'}, + 'data_set_path': {'key': 'properties.dataSetPath', 'type': 'str'}, + 'data_set_type': {'key': 'properties.dataSetType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConsumerSourceDataSet, self).__init__(**kwargs) + self.data_set_id = None + self.data_set_location = None + self.data_set_name = None + self.data_set_path = None + self.data_set_type = None + + +class ConsumerSourceDataSetList(msrest.serialization.Model): + """A consumer side list of source dataSets. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ConsumerSourceDataSet] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ConsumerSourceDataSet]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConsumerSourceDataSetList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class DataSetList(msrest.serialization.Model): + """List response for get DataSets. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.DataSet] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DataSet]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataSetList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class DataSetMappingList(msrest.serialization.Model): + """List response for get DataSetMappings. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.DataSetMapping] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DataSetMapping]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataSetMappingList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class DataShareError(msrest.serialization.Model): + """The data share error model. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. The data share error body. + :type error: ~data_share_management_client.models.DataShareErrorInfo + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DataShareErrorInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(DataShareError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class DataShareErrorInfo(msrest.serialization.Model): + """The data share error body model. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Code of the error. + :type code: str + :param details: Nested details of the error model. + :type details: list[~data_share_management_client.models.DataShareErrorInfo] + :param message: Required. Message of the error. + :type message: str + :param target: Target of the error. + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[DataShareErrorInfo]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataShareErrorInfo, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.details = kwargs.get('details', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + + +class DimensionProperties(msrest.serialization.Model): + """properties for dimension. + + :param display_name: localized display name of the dimension to customer. + :type display_name: str + :param name: dimension name. + :type name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DimensionProperties, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.name = kwargs.get('name', None) + + +class Identity(msrest.serialization.Model): + """Identity of resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: service principal Id. + :vartype principal_id: str + :ivar tenant_id: Tenant Id. + :vartype tenant_id: str + :ivar type: Identity Type. Default value: "SystemAssigned". + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__( + self, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + + +class Invitation(ProxyDto): + """A Invitation data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar invitation_id: unique invitation id. + :vartype invitation_id: str + :ivar invitation_status: The status of the invitation. Possible values include: 'Pending', + 'Accepted', 'Rejected', 'Withdrawn'. + :vartype invitation_status: str or ~data_share_management_client.models.InvitationStatus + :ivar responded_at: The time the recipient responded to the invitation. + :vartype responded_at: ~datetime.datetime + :ivar sent_at: Gets the time at which the invitation was sent. + :vartype sent_at: ~datetime.datetime + :param target_active_directory_id: The target Azure AD Id. Can't be combined with email. + :type target_active_directory_id: str + :param target_email: The email the invitation is directed to. + :type target_email: str + :param target_object_id: The target user or application Id that invitation is being sent to. + Must be specified along TargetActiveDirectoryId. This enables sending + invitations to specific users or applications in an AD tenant. + :type target_object_id: str + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'invitation_id': {'readonly': True}, + 'invitation_status': {'readonly': True}, + 'responded_at': {'readonly': True}, + 'sent_at': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, + 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, + 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, + 'sent_at': {'key': 'properties.sentAt', 'type': 'iso-8601'}, + 'target_active_directory_id': {'key': 'properties.targetActiveDirectoryId', 'type': 'str'}, + 'target_email': {'key': 'properties.targetEmail', 'type': 'str'}, + 'target_object_id': {'key': 'properties.targetObjectId', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Invitation, self).__init__(**kwargs) + self.invitation_id = None + self.invitation_status = None + self.responded_at = None + self.sent_at = None + self.target_active_directory_id = kwargs.get('target_active_directory_id', None) + self.target_email = kwargs.get('target_email', None) + self.target_object_id = kwargs.get('target_object_id', None) + self.user_email = None + self.user_name = None + + +class InvitationList(msrest.serialization.Model): + """List response for get InvitationList. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.Invitation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Invitation]'}, + } + + def __init__( + self, + **kwargs + ): + super(InvitationList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class KustoClusterDataSet(DataSet): + """A kusto cluster data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param kusto_cluster_resource_id: Required. Resource id of the kusto cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the kusto cluster data set. Possible values + include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KustoClusterDataSet, self).__init__(**kwargs) + self.kind = 'KustoCluster' + self.data_set_id = None + self.kusto_cluster_resource_id = kwargs.get('kusto_cluster_resource_id', None) + self.location = None + self.provisioning_state = None + + +class KustoClusterDataSetMapping(DataSetMapping): + """A Kusto cluster data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param kusto_cluster_resource_id: Required. Resource id of the sink kusto cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the sink kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KustoClusterDataSetMapping, self).__init__(**kwargs) + self.kind = 'KustoCluster' + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.kusto_cluster_resource_id = kwargs.get('kusto_cluster_resource_id', None) + self.location = None + self.provisioning_state = None + + +class KustoDatabaseDataSet(DataSet): + """A kusto database data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param kusto_database_resource_id: Required. Resource id of the kusto database. + :type kusto_database_resource_id: str + :ivar location: Location of the kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the kusto database data set. Possible values + include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'kusto_database_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'kusto_database_resource_id': {'key': 'properties.kustoDatabaseResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KustoDatabaseDataSet, self).__init__(**kwargs) + self.kind = 'KustoDatabase' + self.data_set_id = None + self.kusto_database_resource_id = kwargs.get('kusto_database_resource_id', None) + self.location = None + self.provisioning_state = None + + +class KustoDatabaseDataSetMapping(DataSetMapping): + """A Kusto database data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param kusto_cluster_resource_id: Required. Resource id of the sink kusto cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the sink kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KustoDatabaseDataSetMapping, self).__init__(**kwargs) + self.kind = 'KustoDatabase' + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.kusto_cluster_resource_id = kwargs.get('kusto_cluster_resource_id', None) + self.location = None + self.provisioning_state = None + + +class OperationList(msrest.serialization.Model): + """List response for get operations. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.OperationModel] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[OperationModel]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class OperationMetaLogSpecification(msrest.serialization.Model): + """log specifications for operation api. + + :param blob_duration: blob duration of the log. + :type blob_duration: str + :param display_name: localized name of the log category. + :type display_name: str + :param name: name of the log category. + :type name: str + """ + + _attribute_map = { + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationMetaLogSpecification, self).__init__(**kwargs) + self.blob_duration = kwargs.get('blob_duration', None) + self.display_name = kwargs.get('display_name', None) + self.name = kwargs.get('name', None) + + +class OperationMetaMetricSpecification(msrest.serialization.Model): + """metric specifications for the operation. + + :param aggregation_type: aggregation type of metric. + :type aggregation_type: str + :param dimensions: properties for dimension. + :type dimensions: list[~data_share_management_client.models.DimensionProperties] + :param display_description: description of the metric. + :type display_description: str + :param display_name: localized name of the metric. + :type display_name: str + :param enable_regional_mdm_account: enable regional mdm account. + :type enable_regional_mdm_account: str + :param internal_metric_name: internal metric name. + :type internal_metric_name: str + :param name: name of the metric. + :type name: str + :param resource_id_dimension_name_override: dimension name use to replace resource id if + specified. + :type resource_id_dimension_name_override: str + :param supported_aggregation_types: supported aggregation types. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: supported time grain types. + :type supported_time_grain_types: list[str] + :param unit: units for the metric. + :type unit: str + """ + + _attribute_map = { + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationMetaMetricSpecification, self).__init__(**kwargs) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.dimensions = kwargs.get('dimensions', None) + self.display_description = kwargs.get('display_description', None) + self.display_name = kwargs.get('display_name', None) + self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) + self.internal_metric_name = kwargs.get('internal_metric_name', None) + self.name = kwargs.get('name', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.unit = kwargs.get('unit', None) + + +class OperationMetaServiceSpecification(msrest.serialization.Model): + """The operation meta service specification. + + :param log_specifications: log specifications for the operation. + :type log_specifications: + list[~data_share_management_client.models.OperationMetaLogSpecification] + :param metric_specifications: metric specifications for the operation. + :type metric_specifications: + list[~data_share_management_client.models.OperationMetaMetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationMetaServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class OperationModel(msrest.serialization.Model): + """The response model for get operations. + + :param display: Properties on the operation. + :type display: ~data_share_management_client.models.OperationModelProperties + :param name: Operation name for display purposes. + :type name: str + :param origin: origin of the operation. + :type origin: str + :param service_specification: meta service specification. + :type service_specification: + ~data_share_management_client.models.OperationMetaServiceSpecification + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'OperationModelProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationMetaServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationModel, self).__init__(**kwargs) + self.display = kwargs.get('display', None) + self.name = kwargs.get('name', None) + self.origin = kwargs.get('origin', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationModelProperties(msrest.serialization.Model): + """Properties on operations. + + :param description: Description of the operation for display purposes. + :type description: str + :param operation: Name of the operation for display purposes. + :type operation: str + :param provider: Name of the provider for display purposes. + :type provider: str + :param resource: Name of the resource type for display purposes. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationModelProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + + +class OperationResponse(msrest.serialization.Model): + """Response for long running operation. + + All required parameters must be populated in order to send to Azure. + + :param end_time: start time. + :type end_time: ~datetime.datetime + :param error: The error property when status is failed. + :type error: ~data_share_management_client.models.DataShareErrorInfo + :param start_time: start time. + :type start_time: ~datetime.datetime + :param status: Required. Operation state of the long running operation. Possible values + include: 'Accepted', 'InProgress', 'TransientFailure', 'Succeeded', 'Failed', 'Canceled'. + :type status: str or ~data_share_management_client.models.Status + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'DataShareErrorInfo'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationResponse, self).__init__(**kwargs) + self.end_time = kwargs.get('end_time', None) + self.error = kwargs.get('error', None) + self.start_time = kwargs.get('start_time', None) + self.status = kwargs.get('status', None) + + +class ProviderShareSubscription(ProxyDto): + """A provider side share subscription data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar consumer_email: Email of the consumer who created the share subscription. + :vartype consumer_email: str + :ivar consumer_name: Name of the consumer who created the share subscription. + :vartype consumer_name: str + :ivar consumer_tenant_name: Tenant name of the consumer who created the share subscription. + :vartype consumer_tenant_name: str + :ivar created_at: created at. + :vartype created_at: ~datetime.datetime + :ivar provider_email: Email of the provider who created the share. + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the share. + :vartype provider_name: str + :ivar shared_at: Shared at. + :vartype shared_at: ~datetime.datetime + :ivar share_subscription_object_id: share Subscription Object Id. + :vartype share_subscription_object_id: str + :ivar share_subscription_status: Gets the status of share subscription. Possible values + include: 'Active', 'Revoked', 'SourceDeleted', 'Revoking'. + :vartype share_subscription_status: str or + ~data_share_management_client.models.ShareSubscriptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'consumer_email': {'readonly': True}, + 'consumer_name': {'readonly': True}, + 'consumer_tenant_name': {'readonly': True}, + 'created_at': {'readonly': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'shared_at': {'readonly': True}, + 'share_subscription_object_id': {'readonly': True}, + 'share_subscription_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'consumer_email': {'key': 'properties.consumerEmail', 'type': 'str'}, + 'consumer_name': {'key': 'properties.consumerName', 'type': 'str'}, + 'consumer_tenant_name': {'key': 'properties.consumerTenantName', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'shared_at': {'key': 'properties.sharedAt', 'type': 'iso-8601'}, + 'share_subscription_object_id': {'key': 'properties.shareSubscriptionObjectId', 'type': 'str'}, + 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProviderShareSubscription, self).__init__(**kwargs) + self.consumer_email = None + self.consumer_name = None + self.consumer_tenant_name = None + self.created_at = None + self.provider_email = None + self.provider_name = None + self.shared_at = None + self.share_subscription_object_id = None + self.share_subscription_status = None + + +class ProviderShareSubscriptionList(msrest.serialization.Model): + """List response for get ShareSubscription. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ProviderShareSubscription] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProviderShareSubscription]'}, + } + + def __init__( + self, + **kwargs + ): + super(ProviderShareSubscriptionList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class SourceShareSynchronizationSetting(msrest.serialization.Model): + """A view of synchronization setting added by the provider. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduledSourceSynchronizationSetting. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ScheduleBased': 'ScheduledSourceSynchronizationSetting'} + } + + def __init__( + self, + **kwargs + ): + super(SourceShareSynchronizationSetting, self).__init__(**kwargs) + self.kind = None + + +class ScheduledSourceSynchronizationSetting(SourceShareSynchronizationSetting): + """A type of synchronization setting based on schedule. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param recurrence_interval: Recurrence Interval. Possible values include: 'Hour', 'Day'. + :type recurrence_interval: str or ~data_share_management_client.models.RecurrenceInterval + :param synchronization_time: Synchronization time. + :type synchronization_time: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, + 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduledSourceSynchronizationSetting, self).__init__(**kwargs) + self.kind = 'ScheduleBased' + self.recurrence_interval = kwargs.get('recurrence_interval', None) + self.synchronization_time = kwargs.get('synchronization_time', None) + + +class SynchronizationSetting(ProxyDto): + """A Synchronization Setting data transfer object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduledSynchronizationSetting. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ScheduleBased': 'ScheduledSynchronizationSetting'} + } + + def __init__( + self, + **kwargs + ): + super(SynchronizationSetting, self).__init__(**kwargs) + self.kind = 'SynchronizationSetting' + + +class ScheduledSynchronizationSetting(SynchronizationSetting): + """A type of synchronization setting based on schedule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar created_at: Time at which the synchronization setting was created. + :vartype created_at: ~datetime.datetime + :ivar provisioning_state: Gets or sets the provisioning state. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param recurrence_interval: Required. Recurrence Interval. Possible values include: 'Hour', + 'Day'. + :type recurrence_interval: str or ~data_share_management_client.models.RecurrenceInterval + :param synchronization_time: Required. Synchronization time. + :type synchronization_time: ~datetime.datetime + :ivar user_name: Name of the user who created the synchronization setting. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'created_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'recurrence_interval': {'required': True}, + 'synchronization_time': {'required': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, + 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduledSynchronizationSetting, self).__init__(**kwargs) + self.kind = 'ScheduleBased' + self.created_at = None + self.provisioning_state = None + self.recurrence_interval = kwargs.get('recurrence_interval', None) + self.synchronization_time = kwargs.get('synchronization_time', None) + self.user_name = None + + +class Trigger(ProxyDto): + """A Trigger data transfer object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduledTrigger. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ScheduleBased': 'ScheduledTrigger'} + } + + def __init__( + self, + **kwargs + ): + super(Trigger, self).__init__(**kwargs) + self.kind = 'Trigger' + + +class ScheduledTrigger(Trigger): + """A type of trigger based on schedule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar created_at: Time at which the trigger was created. + :vartype created_at: ~datetime.datetime + :ivar provisioning_state: Gets the provisioning state. Possible values include: 'Succeeded', + 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param recurrence_interval: Required. Recurrence Interval. Possible values include: 'Hour', + 'Day'. + :type recurrence_interval: str or ~data_share_management_client.models.RecurrenceInterval + :param synchronization_mode: Synchronization mode. Possible values include: 'Incremental', + 'FullSync'. + :type synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + :param synchronization_time: Required. Synchronization time. + :type synchronization_time: ~datetime.datetime + :ivar trigger_status: Gets the trigger state. Possible values include: 'Active', 'Inactive', + 'SourceSynchronizationSettingDeleted'. + :vartype trigger_status: str or ~data_share_management_client.models.TriggerStatus + :ivar user_name: Name of the user who created the trigger. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'created_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'recurrence_interval': {'required': True}, + 'synchronization_time': {'required': True}, + 'trigger_status': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, + 'synchronization_mode': {'key': 'properties.synchronizationMode', 'type': 'str'}, + 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, + 'trigger_status': {'key': 'properties.triggerStatus', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduledTrigger, self).__init__(**kwargs) + self.kind = 'ScheduleBased' + self.created_at = None + self.provisioning_state = None + self.recurrence_interval = kwargs.get('recurrence_interval', None) + self.synchronization_mode = kwargs.get('synchronization_mode', None) + self.synchronization_time = kwargs.get('synchronization_time', None) + self.trigger_status = None + self.user_name = None + + +class Share(ProxyDto): + """A share data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar created_at: Time at which the share was created. + :vartype created_at: ~datetime.datetime + :param description: Share description. + :type description: str + :ivar provisioning_state: Gets or sets the provisioning state. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param share_kind: Share kind. Possible values include: 'CopyBased', 'InPlace'. + :type share_kind: str or ~data_share_management_client.models.ShareKind + :param terms: Share terms. + :type terms: str + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'share_kind': {'key': 'properties.shareKind', 'type': 'str'}, + 'terms': {'key': 'properties.terms', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Share, self).__init__(**kwargs) + self.created_at = None + self.description = kwargs.get('description', None) + self.provisioning_state = None + self.share_kind = kwargs.get('share_kind', None) + self.terms = kwargs.get('terms', None) + self.user_email = None + self.user_name = None + + +class ShareList(msrest.serialization.Model): + """List response for get Shares. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.Share] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Share]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ShareSubscription(ProxyDto): + """A share subscription data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar created_at: Time at which the share subscription was created. + :vartype created_at: ~datetime.datetime + :param invitation_id: Required. The invitation id. + :type invitation_id: str + :ivar provider_email: Email of the provider who created the resource. + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the resource. + :vartype provider_name: str + :ivar provider_tenant_name: Tenant name of the provider who created the resource. + :vartype provider_tenant_name: str + :ivar provisioning_state: Provisioning state of the share subscription. Possible values + include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :ivar share_description: Description of share. + :vartype share_description: str + :ivar share_kind: Kind of share. Possible values include: 'CopyBased', 'InPlace'. + :vartype share_kind: str or ~data_share_management_client.models.ShareKind + :ivar share_name: Name of the share. + :vartype share_name: str + :ivar share_subscription_status: Gets the current status of share subscription. Possible values + include: 'Active', 'Revoked', 'SourceDeleted', 'Revoking'. + :vartype share_subscription_status: str or + ~data_share_management_client.models.ShareSubscriptionStatus + :ivar share_terms: Terms of a share. + :vartype share_terms: str + :param source_share_location: Required. Source share location. + :type source_share_location: str + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'invitation_id': {'required': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'provider_tenant_name': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'share_description': {'readonly': True}, + 'share_kind': {'readonly': True}, + 'share_name': {'readonly': True}, + 'share_subscription_status': {'readonly': True}, + 'share_terms': {'readonly': True}, + 'source_share_location': {'required': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'provider_tenant_name': {'key': 'properties.providerTenantName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'share_description': {'key': 'properties.shareDescription', 'type': 'str'}, + 'share_kind': {'key': 'properties.shareKind', 'type': 'str'}, + 'share_name': {'key': 'properties.shareName', 'type': 'str'}, + 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, + 'share_terms': {'key': 'properties.shareTerms', 'type': 'str'}, + 'source_share_location': {'key': 'properties.sourceShareLocation', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareSubscription, self).__init__(**kwargs) + self.created_at = None + self.invitation_id = kwargs.get('invitation_id', None) + self.provider_email = None + self.provider_name = None + self.provider_tenant_name = None + self.provisioning_state = None + self.share_description = None + self.share_kind = None + self.share_name = None + self.share_subscription_status = None + self.share_terms = None + self.source_share_location = kwargs.get('source_share_location', None) + self.user_email = None + self.user_name = None + + +class ShareSubscriptionList(msrest.serialization.Model): + """List response for get ShareSubscription. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ShareSubscription] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ShareSubscription]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareSubscriptionList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ShareSubscriptionSynchronization(msrest.serialization.Model): + """A ShareSubscriptionSynchronization data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar duration_ms: Synchronization duration. + :vartype duration_ms: int + :ivar end_time: End time of synchronization. + :vartype end_time: ~datetime.datetime + :ivar message: message of Synchronization. + :vartype message: str + :ivar start_time: start time of synchronization. + :vartype start_time: ~datetime.datetime + :ivar status: Raw Status. + :vartype status: str + :param synchronization_id: Required. Synchronization id. + :type synchronization_id: str + :ivar synchronization_mode: Synchronization Mode. Possible values include: 'Incremental', + 'FullSync'. + :vartype synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + """ + + _validation = { + 'duration_ms': {'readonly': True}, + 'end_time': {'readonly': True}, + 'message': {'readonly': True}, + 'start_time': {'readonly': True}, + 'status': {'readonly': True}, + 'synchronization_id': {'required': True}, + 'synchronization_mode': {'readonly': True}, + } + + _attribute_map = { + 'duration_ms': {'key': 'durationMs', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'synchronization_id': {'key': 'synchronizationId', 'type': 'str'}, + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareSubscriptionSynchronization, self).__init__(**kwargs) + self.duration_ms = None + self.end_time = None + self.message = None + self.start_time = None + self.status = None + self.synchronization_id = kwargs.get('synchronization_id', None) + self.synchronization_mode = None + + +class ShareSubscriptionSynchronizationList(msrest.serialization.Model): + """A consumer side list of share subscription synchronizations. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ShareSubscriptionSynchronization] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ShareSubscriptionSynchronization]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareSubscriptionSynchronizationList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ShareSynchronization(msrest.serialization.Model): + """A ShareSynchronization data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param consumer_email: Email of the user who created the synchronization. + :type consumer_email: str + :param consumer_name: Name of the user who created the synchronization. + :type consumer_name: str + :param consumer_tenant_name: Tenant name of the consumer who created the synchronization. + :type consumer_tenant_name: str + :param duration_ms: synchronization duration. + :type duration_ms: int + :param end_time: End time of synchronization. + :type end_time: ~datetime.datetime + :param message: message of synchronization. + :type message: str + :param start_time: start time of synchronization. + :type start_time: ~datetime.datetime + :param status: Raw Status. + :type status: str + :param synchronization_id: Synchronization id. + :type synchronization_id: str + :ivar synchronization_mode: Synchronization mode. Possible values include: 'Incremental', + 'FullSync'. + :vartype synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + """ + + _validation = { + 'synchronization_mode': {'readonly': True}, + } + + _attribute_map = { + 'consumer_email': {'key': 'consumerEmail', 'type': 'str'}, + 'consumer_name': {'key': 'consumerName', 'type': 'str'}, + 'consumer_tenant_name': {'key': 'consumerTenantName', 'type': 'str'}, + 'duration_ms': {'key': 'durationMs', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'synchronization_id': {'key': 'synchronizationId', 'type': 'str'}, + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareSynchronization, self).__init__(**kwargs) + self.consumer_email = kwargs.get('consumer_email', None) + self.consumer_name = kwargs.get('consumer_name', None) + self.consumer_tenant_name = kwargs.get('consumer_tenant_name', None) + self.duration_ms = kwargs.get('duration_ms', None) + self.end_time = kwargs.get('end_time', None) + self.message = kwargs.get('message', None) + self.start_time = kwargs.get('start_time', None) + self.status = kwargs.get('status', None) + self.synchronization_id = kwargs.get('synchronization_id', None) + self.synchronization_mode = None + + +class ShareSynchronizationList(msrest.serialization.Model): + """List response for get ShareSynchronization. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ShareSynchronization] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ShareSynchronization]'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareSynchronizationList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class SourceShareSynchronizationSettingList(msrest.serialization.Model): + """List response for get source share Synchronization settings. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.SourceShareSynchronizationSetting] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[SourceShareSynchronizationSetting]'}, + } + + def __init__( + self, + **kwargs + ): + super(SourceShareSynchronizationSettingList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class SqlDBTableDataSet(DataSet): + """A SQL DB table data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param database_name: Database name of the source data set. + :type database_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param schema_name: Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Resource id of SQL server. + :type sql_server_resource_id: str + :param table_name: SQL DB table name. + :type table_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlDBTableDataSet, self).__init__(**kwargs) + self.kind = 'SqlDBTable' + self.database_name = kwargs.get('database_name', None) + self.data_set_id = None + self.schema_name = kwargs.get('schema_name', None) + self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) + self.table_name = kwargs.get('table_name', None) + + +class SqlDBTableDataSetMapping(DataSetMapping): + """A SQL DB Table data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param database_name: Required. DatabaseName name of the sink data set. + :type database_name: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Required. Resource id of SQL server. + :type sql_server_resource_id: str + :param table_name: Required. SQL DB table name. + :type table_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'database_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'schema_name': {'required': True}, + 'sql_server_resource_id': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlDBTableDataSetMapping, self).__init__(**kwargs) + self.kind = 'SqlDBTable' + self.database_name = kwargs.get('database_name', None) + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.provisioning_state = None + self.schema_name = kwargs.get('schema_name', None) + self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) + self.table_name = kwargs.get('table_name', None) + + +class SqlDwTableDataSet(DataSet): + """A SQL DW table data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param data_warehouse_name: DataWarehouse name of the source data set. + :type data_warehouse_name: str + :param schema_name: Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Resource id of SQL server. + :type sql_server_resource_id: str + :param table_name: SQL DW table name. + :type table_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_warehouse_name': {'key': 'properties.dataWarehouseName', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlDwTableDataSet, self).__init__(**kwargs) + self.kind = 'SqlDWTable' + self.data_set_id = None + self.data_warehouse_name = kwargs.get('data_warehouse_name', None) + self.schema_name = kwargs.get('schema_name', None) + self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) + self.table_name = kwargs.get('table_name', None) + + +class SqlDwTableDataSetMapping(DataSetMapping): + """A SQL DW Table data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param data_warehouse_name: Required. DataWarehouse name of the source data set. + :type data_warehouse_name: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Required. Resource id of SQL server. + :type sql_server_resource_id: str + :param table_name: Required. SQL DW table name. + :type table_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'data_warehouse_name': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'schema_name': {'required': True}, + 'sql_server_resource_id': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'data_warehouse_name': {'key': 'properties.dataWarehouseName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SqlDwTableDataSetMapping, self).__init__(**kwargs) + self.kind = 'SqlDWTable' + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.data_warehouse_name = kwargs.get('data_warehouse_name', None) + self.provisioning_state = None + self.schema_name = kwargs.get('schema_name', None) + self.sql_server_resource_id = kwargs.get('sql_server_resource_id', None) + self.table_name = kwargs.get('table_name', None) + + +class SynchronizationDetails(msrest.serialization.Model): + """Synchronization details at data set level. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar data_set_id: Id of data set. + :vartype data_set_id: str + :ivar data_set_type: Type of the data set. Possible values include: 'Blob', 'Container', + 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', + 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable'. + :vartype data_set_type: str or ~data_share_management_client.models.DataSetType + :ivar duration_ms: Duration of data set level copy. + :vartype duration_ms: int + :ivar end_time: End time of data set level copy. + :vartype end_time: ~datetime.datetime + :ivar files_read: The number of files read from the source data set. + :vartype files_read: long + :ivar files_written: The number of files written into the sink data set. + :vartype files_written: long + :ivar message: Error message if any. + :vartype message: str + :ivar name: Name of the data set. + :vartype name: str + :ivar rows_copied: The number of files copied into the sink data set. + :vartype rows_copied: long + :ivar rows_read: The number of rows read from the source data set. + :vartype rows_read: long + :ivar size_read: The size of the data read from the source data set in bytes. + :vartype size_read: long + :ivar size_written: The size of the data written into the sink data set in bytes. + :vartype size_written: long + :ivar start_time: Start time of data set level copy. + :vartype start_time: ~datetime.datetime + :ivar status: Raw Status. + :vartype status: str + :ivar v_core: The vCore units consumed for the data set synchronization. + :vartype v_core: long + """ + + _validation = { + 'data_set_id': {'readonly': True}, + 'data_set_type': {'readonly': True}, + 'duration_ms': {'readonly': True}, + 'end_time': {'readonly': True}, + 'files_read': {'readonly': True}, + 'files_written': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'rows_copied': {'readonly': True}, + 'rows_read': {'readonly': True}, + 'size_read': {'readonly': True}, + 'size_written': {'readonly': True}, + 'start_time': {'readonly': True}, + 'status': {'readonly': True}, + 'v_core': {'readonly': True}, + } + + _attribute_map = { + 'data_set_id': {'key': 'dataSetId', 'type': 'str'}, + 'data_set_type': {'key': 'dataSetType', 'type': 'str'}, + 'duration_ms': {'key': 'durationMs', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'files_read': {'key': 'filesRead', 'type': 'long'}, + 'files_written': {'key': 'filesWritten', 'type': 'long'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'rows_copied': {'key': 'rowsCopied', 'type': 'long'}, + 'rows_read': {'key': 'rowsRead', 'type': 'long'}, + 'size_read': {'key': 'sizeRead', 'type': 'long'}, + 'size_written': {'key': 'sizeWritten', 'type': 'long'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'v_core': {'key': 'vCore', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(SynchronizationDetails, self).__init__(**kwargs) + self.data_set_id = None + self.data_set_type = None + self.duration_ms = None + self.end_time = None + self.files_read = None + self.files_written = None + self.message = None + self.name = None + self.rows_copied = None + self.rows_read = None + self.size_read = None + self.size_written = None + self.start_time = None + self.status = None + self.v_core = None + + +class SynchronizationDetailsList(msrest.serialization.Model): + """details of synchronization. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.SynchronizationDetails] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[SynchronizationDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(SynchronizationDetailsList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class SynchronizationSettingList(msrest.serialization.Model): + """List response for get Synchronization settings. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.SynchronizationSetting] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[SynchronizationSetting]'}, + } + + def __init__( + self, + **kwargs + ): + super(SynchronizationSettingList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class Synchronize(msrest.serialization.Model): + """Payload for the synchronizing the data. + + :param synchronization_mode: Mode of synchronization used in triggers and snapshot sync. + Incremental by default. Possible values include: 'Incremental', 'FullSync'. + :type synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + """ + + _attribute_map = { + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Synchronize, self).__init__(**kwargs) + self.synchronization_mode = kwargs.get('synchronization_mode', None) + + +class TriggerList(msrest.serialization.Model): + """List response for get triggers. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.Trigger] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Trigger]'}, + } + + def __init__( + self, + **kwargs + ): + super(TriggerList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/models/_models_py3.py b/src/datashare/azext_datashare/vendored_sdks/datashare/models/_models_py3.py new file mode 100644 index 00000000000..bc585b353f5 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/models/_models_py3.py @@ -0,0 +1,3998 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class DefaultDto(msrest.serialization.Model): + """Base data transfer object implementation for default resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :param location: Location of the azure resource. + :type location: str + :ivar name: Name of the azure resource. + :vartype name: str + :param tags: A set of tags. Tags on the azure resource. + :type tags: dict[str, str] + :ivar type: Type of the azure resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(DefaultDto, self).__init__(**kwargs) + self.id = None + self.location = location + self.name = None + self.tags = tags + self.type = None + + +class Account(DefaultDto): + """An account data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :param location: Location of the azure resource. + :type location: str + :ivar name: Name of the azure resource. + :vartype name: str + :param tags: A set of tags. Tags on the azure resource. + :type tags: dict[str, str] + :ivar type: Type of the azure resource. + :vartype type: str + :param identity: Required. Identity Info on the Account. + :type identity: ~data_share_management_client.models.Identity + :ivar created_at: Time at which the account was created. + :vartype created_at: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the Account. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'identity': {'required': True}, + 'created_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + *, + identity: "Identity", + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Account, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.created_at = None + self.provisioning_state = None + self.user_email = None + self.user_name = None + + +class AccountList(msrest.serialization.Model): + """List response for get Accounts. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.Account] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Account]'}, + } + + def __init__( + self, + *, + value: List["Account"], + next_link: Optional[str] = None, + **kwargs + ): + super(AccountList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class AccountUpdateParameters(msrest.serialization.Model): + """Update parameters for accounts. + + :param tags: A set of tags. Tags on the azure resource. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(AccountUpdateParameters, self).__init__(**kwargs) + self.tags = tags + + +class ProxyDto(msrest.serialization.Model): + """Base data transfer object implementation for proxy resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyDto, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DataSet(ProxyDto): + """A DataSet data transfer object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdlsGen1FileDataSet, AdlsGen1FolderDataSet, AdlsGen2FileDataSet, AdlsGen2FileSystemDataSet, AdlsGen2FolderDataSet, BlobDataSet, BlobFolderDataSet, BlobContainerDataSet, KustoClusterDataSet, KustoDatabaseDataSet, SqlDBTableDataSet, SqlDwTableDataSet. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AdlsGen1File': 'AdlsGen1FileDataSet', 'AdlsGen1Folder': 'AdlsGen1FolderDataSet', 'AdlsGen2File': 'AdlsGen2FileDataSet', 'AdlsGen2FileSystem': 'AdlsGen2FileSystemDataSet', 'AdlsGen2Folder': 'AdlsGen2FolderDataSet', 'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'Container': 'BlobContainerDataSet', 'KustoCluster': 'KustoClusterDataSet', 'KustoDatabase': 'KustoDatabaseDataSet', 'SqlDBTable': 'SqlDBTableDataSet', 'SqlDWTable': 'SqlDwTableDataSet'} + } + + def __init__( + self, + **kwargs + ): + super(DataSet, self).__init__(**kwargs) + self.kind = 'DataSet' + + +class AdlsGen1FileDataSet(DataSet): + """An ADLS Gen 1 file data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param account_name: Required. The ADLS account name. + :type account_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_name: Required. The file name in the ADLS account. + :type file_name: str + :param folder_path: Required. The folder path within the ADLS account. + :type folder_path: str + :param resource_group: Required. Resource group of ADLS account. + :type resource_group: str + :param subscription_id: Required. Subscription id of ADLS account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'account_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_name': {'required': True}, + 'folder_path': {'required': True}, + 'resource_group': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + account_name: str, + file_name: str, + folder_path: str, + resource_group: str, + subscription_id: str, + **kwargs + ): + super(AdlsGen1FileDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen1File' + self.account_name = account_name + self.data_set_id = None + self.file_name = file_name + self.folder_path = folder_path + self.resource_group = resource_group + self.subscription_id = subscription_id + + +class AdlsGen1FolderDataSet(DataSet): + """An ADLS Gen 1 folder data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param account_name: Required. The ADLS account name. + :type account_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param folder_path: Required. The folder path within the ADLS account. + :type folder_path: str + :param resource_group: Required. Resource group of ADLS account. + :type resource_group: str + :param subscription_id: Required. Subscription id of ADLS account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'account_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'folder_path': {'required': True}, + 'resource_group': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'account_name': {'key': 'properties.accountName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + account_name: str, + folder_path: str, + resource_group: str, + subscription_id: str, + **kwargs + ): + super(AdlsGen1FolderDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen1Folder' + self.account_name = account_name + self.data_set_id = None + self.folder_path = folder_path + self.resource_group = resource_group + self.subscription_id = subscription_id + + +class AdlsGen2FileDataSet(DataSet): + """An ADLS Gen 2 file data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_path: Required. File path within the file system. + :type file_path: str + :param file_system: Required. File system to which the file belongs. + :type file_system: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_path': {'required': True}, + 'file_system': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + file_path: str, + file_system: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(AdlsGen2FileDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen2File' + self.data_set_id = None + self.file_path = file_path + self.file_system = file_system + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class DataSetMapping(ProxyDto): + """A data set mapping data transfer object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdlsGen2FileDataSetMapping, AdlsGen2FileSystemDataSetMapping, AdlsGen2FolderDataSetMapping, BlobDataSetMapping, BlobFolderDataSetMapping, BlobContainerDataSetMapping, KustoClusterDataSetMapping, KustoDatabaseDataSetMapping, SqlDBTableDataSetMapping, SqlDwTableDataSetMapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'AdlsGen2File': 'AdlsGen2FileDataSetMapping', 'AdlsGen2FileSystem': 'AdlsGen2FileSystemDataSetMapping', 'AdlsGen2Folder': 'AdlsGen2FolderDataSetMapping', 'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'KustoCluster': 'KustoClusterDataSetMapping', 'KustoDatabase': 'KustoDatabaseDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping', 'SqlDWTable': 'SqlDwTableDataSetMapping'} + } + + def __init__( + self, + **kwargs + ): + super(DataSetMapping, self).__init__(**kwargs) + self.kind = 'DataSetMapping' + + +class AdlsGen2FileDataSetMapping(DataSetMapping): + """An ADLS Gen2 file data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param file_path: Required. File path within the file system. + :type file_path: str + :param file_system: Required. File system to which the file belongs. + :type file_system: str + :param output_type: Type of output file. Possible values include: 'Csv', 'Parquet'. + :type output_type: str or ~data_share_management_client.models.OutputType + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'file_path': {'required': True}, + 'file_system': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'output_type': {'key': 'properties.outputType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + data_set_id: str, + file_path: str, + file_system: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + output_type: Optional[Union[str, "OutputType"]] = None, + **kwargs + ): + super(AdlsGen2FileDataSetMapping, self).__init__(**kwargs) + self.kind = 'AdlsGen2File' + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.file_path = file_path + self.file_system = file_system + self.output_type = output_type + self.provisioning_state = None + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class AdlsGen2FileSystemDataSet(DataSet): + """An ADLS Gen 2 file system data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_system: Required. The file system name. + :type file_system: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_system': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + file_system: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(AdlsGen2FileSystemDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen2FileSystem' + self.data_set_id = None + self.file_system = file_system + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class AdlsGen2FileSystemDataSetMapping(DataSetMapping): + """An ADLS Gen2 file system data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param file_system: Required. The file system name. + :type file_system: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'file_system': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + data_set_id: str, + file_system: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(AdlsGen2FileSystemDataSetMapping, self).__init__(**kwargs) + self.kind = 'AdlsGen2FileSystem' + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.file_system = file_system + self.provisioning_state = None + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class AdlsGen2FolderDataSet(DataSet): + """An ADLS Gen 2 folder data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_system: Required. File system to which the folder belongs. + :type file_system: str + :param folder_path: Required. Folder path within the file system. + :type folder_path: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_system': {'required': True}, + 'folder_path': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + file_system: str, + folder_path: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(AdlsGen2FolderDataSet, self).__init__(**kwargs) + self.kind = 'AdlsGen2Folder' + self.data_set_id = None + self.file_system = file_system + self.folder_path = folder_path + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class AdlsGen2FolderDataSetMapping(DataSetMapping): + """An ADLS Gen2 folder data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param file_system: Required. File system to which the folder belongs. + :type file_system: str + :param folder_path: Required. Folder path within the file system. + :type folder_path: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'file_system': {'required': True}, + 'folder_path': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'file_system': {'key': 'properties.fileSystem', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + data_set_id: str, + file_system: str, + folder_path: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(AdlsGen2FolderDataSetMapping, self).__init__(**kwargs) + self.kind = 'AdlsGen2Folder' + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.file_system = file_system + self.folder_path = folder_path + self.provisioning_state = None + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class BlobContainerDataSet(DataSet): + """An Azure storage blob container data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. BLOB Container name. + :type container_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + container_name: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(BlobContainerDataSet, self).__init__(**kwargs) + self.kind = 'Container' + self.container_name = container_name + self.data_set_id = None + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class BlobContainerDataSetMapping(DataSetMapping): + """A Blob container data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. BLOB Container name. + :type container_name: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + container_name: str, + data_set_id: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(BlobContainerDataSetMapping, self).__init__(**kwargs) + self.kind = 'Container' + self.container_name = container_name + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.provisioning_state = None + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class BlobDataSet(DataSet): + """An Azure storage blob data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. Container that has the file path. + :type container_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param file_path: Required. File path within the source data set. + :type file_path: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'file_path': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + container_name: str, + file_path: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(BlobDataSet, self).__init__(**kwargs) + self.kind = 'Blob' + self.container_name = container_name + self.data_set_id = None + self.file_path = file_path + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class BlobDataSetMapping(DataSetMapping): + """A Blob data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. Container that has the file path. + :type container_name: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param file_path: Required. File path within the source data set. + :type file_path: str + :param output_type: File output type. Possible values include: 'Csv', 'Parquet'. + :type output_type: str or ~data_share_management_client.models.OutputType + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'file_path': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'output_type': {'key': 'properties.outputType', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + container_name: str, + data_set_id: str, + file_path: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + output_type: Optional[Union[str, "OutputType"]] = None, + **kwargs + ): + super(BlobDataSetMapping, self).__init__(**kwargs) + self.kind = 'Blob' + self.container_name = container_name + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.file_path = file_path + self.output_type = output_type + self.provisioning_state = None + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class BlobFolderDataSet(DataSet): + """An Azure storage blob folder data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. Container that has the file path. + :type container_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param prefix: Required. Prefix for blob folder. + :type prefix: str + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'readonly': True}, + 'prefix': {'required': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + container_name: str, + prefix: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(BlobFolderDataSet, self).__init__(**kwargs) + self.kind = 'BlobFolder' + self.container_name = container_name + self.data_set_id = None + self.prefix = prefix + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class BlobFolderDataSetMapping(DataSetMapping): + """A Blob folder data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param container_name: Required. Container that has the file path. + :type container_name: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param prefix: Required. Prefix for blob folder. + :type prefix: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param resource_group: Required. Resource group of storage account. + :type resource_group: str + :param storage_account_name: Required. Storage account name of the source data set. + :type storage_account_name: str + :param subscription_id: Required. Subscription id of storage account. + :type subscription_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'container_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'prefix': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'resource_group': {'required': True}, + 'storage_account_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'container_name': {'key': 'properties.containerName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'storage_account_name': {'key': 'properties.storageAccountName', 'type': 'str'}, + 'subscription_id': {'key': 'properties.subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + container_name: str, + data_set_id: str, + prefix: str, + resource_group: str, + storage_account_name: str, + subscription_id: str, + **kwargs + ): + super(BlobFolderDataSetMapping, self).__init__(**kwargs) + self.kind = 'BlobFolder' + self.container_name = container_name + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.prefix = prefix + self.provisioning_state = None + self.resource_group = resource_group + self.storage_account_name = storage_account_name + self.subscription_id = subscription_id + + +class ConsumerInvitation(ProxyDto): + """A consumer Invitation data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar data_set_count: Number of data sets in a share. + :vartype data_set_count: int + :ivar description: Description shared when the invitation was created. + :vartype description: str + :param invitation_id: Required. Unique id of the invitation. + :type invitation_id: str + :ivar invitation_status: The status of the invitation. Possible values include: 'Pending', + 'Accepted', 'Rejected', 'Withdrawn'. + :vartype invitation_status: str or ~data_share_management_client.models.InvitationStatus + :ivar location: invitation location. + :vartype location: str + :ivar provider_email: Email of the provider who created the resource. + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the resource. + :vartype provider_name: str + :ivar provider_tenant_name: Tenant name of the provider who created the resource. + :vartype provider_tenant_name: str + :ivar responded_at: The time the recipient responded to the invitation. + :vartype responded_at: ~datetime.datetime + :ivar sent_at: Gets the time at which the invitation was sent. + :vartype sent_at: ~datetime.datetime + :ivar share_name: Gets the source share Name. + :vartype share_name: str + :ivar terms_of_use: Terms of use shared when the invitation was created. + :vartype terms_of_use: str + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_set_count': {'readonly': True}, + 'description': {'readonly': True}, + 'invitation_id': {'required': True}, + 'invitation_status': {'readonly': True}, + 'location': {'readonly': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'provider_tenant_name': {'readonly': True}, + 'responded_at': {'readonly': True}, + 'sent_at': {'readonly': True}, + 'share_name': {'readonly': True}, + 'terms_of_use': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_set_count': {'key': 'properties.dataSetCount', 'type': 'int'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, + 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'provider_tenant_name': {'key': 'properties.providerTenantName', 'type': 'str'}, + 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, + 'sent_at': {'key': 'properties.sentAt', 'type': 'iso-8601'}, + 'share_name': {'key': 'properties.shareName', 'type': 'str'}, + 'terms_of_use': {'key': 'properties.termsOfUse', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + *, + invitation_id: str, + **kwargs + ): + super(ConsumerInvitation, self).__init__(**kwargs) + self.data_set_count = None + self.description = None + self.invitation_id = invitation_id + self.invitation_status = None + self.location = None + self.provider_email = None + self.provider_name = None + self.provider_tenant_name = None + self.responded_at = None + self.sent_at = None + self.share_name = None + self.terms_of_use = None + self.user_email = None + self.user_name = None + + +class ConsumerInvitationList(msrest.serialization.Model): + """List response for get InvitationList. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ConsumerInvitation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ConsumerInvitation]'}, + } + + def __init__( + self, + *, + value: List["ConsumerInvitation"], + next_link: Optional[str] = None, + **kwargs + ): + super(ConsumerInvitationList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ConsumerSourceDataSet(ProxyDto): + """A consumer side dataSet data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar data_set_id: DataSet Id. + :vartype data_set_id: str + :ivar data_set_location: Location of the data set. + :vartype data_set_location: str + :ivar data_set_name: DataSet name. + :vartype data_set_name: str + :ivar data_set_path: DataSet path. + :vartype data_set_path: str + :ivar data_set_type: Type of data set. Possible values include: 'Blob', 'Container', + 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', + 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable'. + :vartype data_set_type: str or ~data_share_management_client.models.DataSetType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'data_set_id': {'readonly': True}, + 'data_set_location': {'readonly': True}, + 'data_set_name': {'readonly': True}, + 'data_set_path': {'readonly': True}, + 'data_set_type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_location': {'key': 'properties.dataSetLocation', 'type': 'str'}, + 'data_set_name': {'key': 'properties.dataSetName', 'type': 'str'}, + 'data_set_path': {'key': 'properties.dataSetPath', 'type': 'str'}, + 'data_set_type': {'key': 'properties.dataSetType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConsumerSourceDataSet, self).__init__(**kwargs) + self.data_set_id = None + self.data_set_location = None + self.data_set_name = None + self.data_set_path = None + self.data_set_type = None + + +class ConsumerSourceDataSetList(msrest.serialization.Model): + """A consumer side list of source dataSets. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ConsumerSourceDataSet] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ConsumerSourceDataSet]'}, + } + + def __init__( + self, + *, + value: List["ConsumerSourceDataSet"], + next_link: Optional[str] = None, + **kwargs + ): + super(ConsumerSourceDataSetList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class DataSetList(msrest.serialization.Model): + """List response for get DataSets. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.DataSet] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DataSet]'}, + } + + def __init__( + self, + *, + value: List["DataSet"], + next_link: Optional[str] = None, + **kwargs + ): + super(DataSetList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class DataSetMappingList(msrest.serialization.Model): + """List response for get DataSetMappings. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.DataSetMapping] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DataSetMapping]'}, + } + + def __init__( + self, + *, + value: List["DataSetMapping"], + next_link: Optional[str] = None, + **kwargs + ): + super(DataSetMappingList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class DataShareError(msrest.serialization.Model): + """The data share error model. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. The data share error body. + :type error: ~data_share_management_client.models.DataShareErrorInfo + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'DataShareErrorInfo'}, + } + + def __init__( + self, + *, + error: "DataShareErrorInfo", + **kwargs + ): + super(DataShareError, self).__init__(**kwargs) + self.error = error + + +class DataShareErrorInfo(msrest.serialization.Model): + """The data share error body model. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Code of the error. + :type code: str + :param details: Nested details of the error model. + :type details: list[~data_share_management_client.models.DataShareErrorInfo] + :param message: Required. Message of the error. + :type message: str + :param target: Target of the error. + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[DataShareErrorInfo]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + details: Optional[List["DataShareErrorInfo"]] = None, + target: Optional[str] = None, + **kwargs + ): + super(DataShareErrorInfo, self).__init__(**kwargs) + self.code = code + self.details = details + self.message = message + self.target = target + + +class DimensionProperties(msrest.serialization.Model): + """properties for dimension. + + :param display_name: localized display name of the dimension to customer. + :type display_name: str + :param name: dimension name. + :type name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + super(DimensionProperties, self).__init__(**kwargs) + self.display_name = display_name + self.name = name + + +class Identity(msrest.serialization.Model): + """Identity of resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: service principal Id. + :vartype principal_id: str + :ivar tenant_id: Tenant Id. + :vartype tenant_id: str + :ivar type: Identity Type. Default value: "SystemAssigned". + :vartype type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'constant': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "SystemAssigned" + + def __init__( + self, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + + +class Invitation(ProxyDto): + """A Invitation data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar invitation_id: unique invitation id. + :vartype invitation_id: str + :ivar invitation_status: The status of the invitation. Possible values include: 'Pending', + 'Accepted', 'Rejected', 'Withdrawn'. + :vartype invitation_status: str or ~data_share_management_client.models.InvitationStatus + :ivar responded_at: The time the recipient responded to the invitation. + :vartype responded_at: ~datetime.datetime + :ivar sent_at: Gets the time at which the invitation was sent. + :vartype sent_at: ~datetime.datetime + :param target_active_directory_id: The target Azure AD Id. Can't be combined with email. + :type target_active_directory_id: str + :param target_email: The email the invitation is directed to. + :type target_email: str + :param target_object_id: The target user or application Id that invitation is being sent to. + Must be specified along TargetActiveDirectoryId. This enables sending + invitations to specific users or applications in an AD tenant. + :type target_object_id: str + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'invitation_id': {'readonly': True}, + 'invitation_status': {'readonly': True}, + 'responded_at': {'readonly': True}, + 'sent_at': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, + 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, + 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, + 'sent_at': {'key': 'properties.sentAt', 'type': 'iso-8601'}, + 'target_active_directory_id': {'key': 'properties.targetActiveDirectoryId', 'type': 'str'}, + 'target_email': {'key': 'properties.targetEmail', 'type': 'str'}, + 'target_object_id': {'key': 'properties.targetObjectId', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + *, + target_active_directory_id: Optional[str] = None, + target_email: Optional[str] = None, + target_object_id: Optional[str] = None, + **kwargs + ): + super(Invitation, self).__init__(**kwargs) + self.invitation_id = None + self.invitation_status = None + self.responded_at = None + self.sent_at = None + self.target_active_directory_id = target_active_directory_id + self.target_email = target_email + self.target_object_id = target_object_id + self.user_email = None + self.user_name = None + + +class InvitationList(msrest.serialization.Model): + """List response for get InvitationList. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.Invitation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Invitation]'}, + } + + def __init__( + self, + *, + value: List["Invitation"], + next_link: Optional[str] = None, + **kwargs + ): + super(InvitationList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class KustoClusterDataSet(DataSet): + """A kusto cluster data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param kusto_cluster_resource_id: Required. Resource id of the kusto cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the kusto cluster data set. Possible values + include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + kusto_cluster_resource_id: str, + **kwargs + ): + super(KustoClusterDataSet, self).__init__(**kwargs) + self.kind = 'KustoCluster' + self.data_set_id = None + self.kusto_cluster_resource_id = kusto_cluster_resource_id + self.location = None + self.provisioning_state = None + + +class KustoClusterDataSetMapping(DataSetMapping): + """A Kusto cluster data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param kusto_cluster_resource_id: Required. Resource id of the sink kusto cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the sink kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + data_set_id: str, + kusto_cluster_resource_id: str, + **kwargs + ): + super(KustoClusterDataSetMapping, self).__init__(**kwargs) + self.kind = 'KustoCluster' + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.kusto_cluster_resource_id = kusto_cluster_resource_id + self.location = None + self.provisioning_state = None + + +class KustoDatabaseDataSet(DataSet): + """A kusto database data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param kusto_database_resource_id: Required. Resource id of the kusto database. + :type kusto_database_resource_id: str + :ivar location: Location of the kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the kusto database data set. Possible values + include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'kusto_database_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'kusto_database_resource_id': {'key': 'properties.kustoDatabaseResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + kusto_database_resource_id: str, + **kwargs + ): + super(KustoDatabaseDataSet, self).__init__(**kwargs) + self.kind = 'KustoDatabase' + self.data_set_id = None + self.kusto_database_resource_id = kusto_database_resource_id + self.location = None + self.provisioning_state = None + + +class KustoDatabaseDataSetMapping(DataSetMapping): + """A Kusto database data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param kusto_cluster_resource_id: Required. Resource id of the sink kusto cluster. + :type kusto_cluster_resource_id: str + :ivar location: Location of the sink kusto cluster. + :vartype location: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'kusto_cluster_resource_id': {'required': True}, + 'location': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'kusto_cluster_resource_id': {'key': 'properties.kustoClusterResourceId', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + data_set_id: str, + kusto_cluster_resource_id: str, + **kwargs + ): + super(KustoDatabaseDataSetMapping, self).__init__(**kwargs) + self.kind = 'KustoDatabase' + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.kusto_cluster_resource_id = kusto_cluster_resource_id + self.location = None + self.provisioning_state = None + + +class OperationList(msrest.serialization.Model): + """List response for get operations. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.OperationModel] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[OperationModel]'}, + } + + def __init__( + self, + *, + value: List["OperationModel"], + next_link: Optional[str] = None, + **kwargs + ): + super(OperationList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class OperationMetaLogSpecification(msrest.serialization.Model): + """log specifications for operation api. + + :param blob_duration: blob duration of the log. + :type blob_duration: str + :param display_name: localized name of the log category. + :type display_name: str + :param name: name of the log category. + :type name: str + """ + + _attribute_map = { + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + blob_duration: Optional[str] = None, + display_name: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + super(OperationMetaLogSpecification, self).__init__(**kwargs) + self.blob_duration = blob_duration + self.display_name = display_name + self.name = name + + +class OperationMetaMetricSpecification(msrest.serialization.Model): + """metric specifications for the operation. + + :param aggregation_type: aggregation type of metric. + :type aggregation_type: str + :param dimensions: properties for dimension. + :type dimensions: list[~data_share_management_client.models.DimensionProperties] + :param display_description: description of the metric. + :type display_description: str + :param display_name: localized name of the metric. + :type display_name: str + :param enable_regional_mdm_account: enable regional mdm account. + :type enable_regional_mdm_account: str + :param internal_metric_name: internal metric name. + :type internal_metric_name: str + :param name: name of the metric. + :type name: str + :param resource_id_dimension_name_override: dimension name use to replace resource id if + specified. + :type resource_id_dimension_name_override: str + :param supported_aggregation_types: supported aggregation types. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: supported time grain types. + :type supported_time_grain_types: list[str] + :param unit: units for the metric. + :type unit: str + """ + + _attribute_map = { + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + *, + aggregation_type: Optional[str] = None, + dimensions: Optional[List["DimensionProperties"]] = None, + display_description: Optional[str] = None, + display_name: Optional[str] = None, + enable_regional_mdm_account: Optional[str] = None, + internal_metric_name: Optional[str] = None, + name: Optional[str] = None, + resource_id_dimension_name_override: Optional[str] = None, + supported_aggregation_types: Optional[List[str]] = None, + supported_time_grain_types: Optional[List[str]] = None, + unit: Optional[str] = None, + **kwargs + ): + super(OperationMetaMetricSpecification, self).__init__(**kwargs) + self.aggregation_type = aggregation_type + self.dimensions = dimensions + self.display_description = display_description + self.display_name = display_name + self.enable_regional_mdm_account = enable_regional_mdm_account + self.internal_metric_name = internal_metric_name + self.name = name + self.resource_id_dimension_name_override = resource_id_dimension_name_override + self.supported_aggregation_types = supported_aggregation_types + self.supported_time_grain_types = supported_time_grain_types + self.unit = unit + + +class OperationMetaServiceSpecification(msrest.serialization.Model): + """The operation meta service specification. + + :param log_specifications: log specifications for the operation. + :type log_specifications: + list[~data_share_management_client.models.OperationMetaLogSpecification] + :param metric_specifications: metric specifications for the operation. + :type metric_specifications: + list[~data_share_management_client.models.OperationMetaMetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationMetaLogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetaMetricSpecification]'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["OperationMetaLogSpecification"]] = None, + metric_specifications: Optional[List["OperationMetaMetricSpecification"]] = None, + **kwargs + ): + super(OperationMetaServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + + +class OperationModel(msrest.serialization.Model): + """The response model for get operations. + + :param display: Properties on the operation. + :type display: ~data_share_management_client.models.OperationModelProperties + :param name: Operation name for display purposes. + :type name: str + :param origin: origin of the operation. + :type origin: str + :param service_specification: meta service specification. + :type service_specification: + ~data_share_management_client.models.OperationMetaServiceSpecification + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'OperationModelProperties'}, + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationMetaServiceSpecification'}, + } + + def __init__( + self, + *, + display: Optional["OperationModelProperties"] = None, + name: Optional[str] = None, + origin: Optional[str] = None, + service_specification: Optional["OperationMetaServiceSpecification"] = None, + **kwargs + ): + super(OperationModel, self).__init__(**kwargs) + self.display = display + self.name = name + self.origin = origin + self.service_specification = service_specification + + +class OperationModelProperties(msrest.serialization.Model): + """Properties on operations. + + :param description: Description of the operation for display purposes. + :type description: str + :param operation: Name of the operation for display purposes. + :type operation: str + :param provider: Name of the provider for display purposes. + :type provider: str + :param resource: Name of the resource type for display purposes. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + operation: Optional[str] = None, + provider: Optional[str] = None, + resource: Optional[str] = None, + **kwargs + ): + super(OperationModelProperties, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + self.resource = resource + + +class OperationResponse(msrest.serialization.Model): + """Response for long running operation. + + All required parameters must be populated in order to send to Azure. + + :param end_time: start time. + :type end_time: ~datetime.datetime + :param error: The error property when status is failed. + :type error: ~data_share_management_client.models.DataShareErrorInfo + :param start_time: start time. + :type start_time: ~datetime.datetime + :param status: Required. Operation state of the long running operation. Possible values + include: 'Accepted', 'InProgress', 'TransientFailure', 'Succeeded', 'Failed', 'Canceled'. + :type status: str or ~data_share_management_client.models.Status + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'DataShareErrorInfo'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Union[str, "Status"], + end_time: Optional[datetime.datetime] = None, + error: Optional["DataShareErrorInfo"] = None, + start_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(OperationResponse, self).__init__(**kwargs) + self.end_time = end_time + self.error = error + self.start_time = start_time + self.status = status + + +class ProviderShareSubscription(ProxyDto): + """A provider side share subscription data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar consumer_email: Email of the consumer who created the share subscription. + :vartype consumer_email: str + :ivar consumer_name: Name of the consumer who created the share subscription. + :vartype consumer_name: str + :ivar consumer_tenant_name: Tenant name of the consumer who created the share subscription. + :vartype consumer_tenant_name: str + :ivar created_at: created at. + :vartype created_at: ~datetime.datetime + :ivar provider_email: Email of the provider who created the share. + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the share. + :vartype provider_name: str + :ivar shared_at: Shared at. + :vartype shared_at: ~datetime.datetime + :ivar share_subscription_object_id: share Subscription Object Id. + :vartype share_subscription_object_id: str + :ivar share_subscription_status: Gets the status of share subscription. Possible values + include: 'Active', 'Revoked', 'SourceDeleted', 'Revoking'. + :vartype share_subscription_status: str or + ~data_share_management_client.models.ShareSubscriptionStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'consumer_email': {'readonly': True}, + 'consumer_name': {'readonly': True}, + 'consumer_tenant_name': {'readonly': True}, + 'created_at': {'readonly': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'shared_at': {'readonly': True}, + 'share_subscription_object_id': {'readonly': True}, + 'share_subscription_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'consumer_email': {'key': 'properties.consumerEmail', 'type': 'str'}, + 'consumer_name': {'key': 'properties.consumerName', 'type': 'str'}, + 'consumer_tenant_name': {'key': 'properties.consumerTenantName', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'shared_at': {'key': 'properties.sharedAt', 'type': 'iso-8601'}, + 'share_subscription_object_id': {'key': 'properties.shareSubscriptionObjectId', 'type': 'str'}, + 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProviderShareSubscription, self).__init__(**kwargs) + self.consumer_email = None + self.consumer_name = None + self.consumer_tenant_name = None + self.created_at = None + self.provider_email = None + self.provider_name = None + self.shared_at = None + self.share_subscription_object_id = None + self.share_subscription_status = None + + +class ProviderShareSubscriptionList(msrest.serialization.Model): + """List response for get ShareSubscription. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ProviderShareSubscription] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ProviderShareSubscription]'}, + } + + def __init__( + self, + *, + value: List["ProviderShareSubscription"], + next_link: Optional[str] = None, + **kwargs + ): + super(ProviderShareSubscriptionList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class SourceShareSynchronizationSetting(msrest.serialization.Model): + """A view of synchronization setting added by the provider. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduledSourceSynchronizationSetting. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ScheduleBased': 'ScheduledSourceSynchronizationSetting'} + } + + def __init__( + self, + **kwargs + ): + super(SourceShareSynchronizationSetting, self).__init__(**kwargs) + self.kind = None + + +class ScheduledSourceSynchronizationSetting(SourceShareSynchronizationSetting): + """A type of synchronization setting based on schedule. + + All required parameters must be populated in order to send to Azure. + + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param recurrence_interval: Recurrence Interval. Possible values include: 'Hour', 'Day'. + :type recurrence_interval: str or ~data_share_management_client.models.RecurrenceInterval + :param synchronization_time: Synchronization time. + :type synchronization_time: ~datetime.datetime + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, + 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recurrence_interval: Optional[Union[str, "RecurrenceInterval"]] = None, + synchronization_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(ScheduledSourceSynchronizationSetting, self).__init__(**kwargs) + self.kind = 'ScheduleBased' + self.recurrence_interval = recurrence_interval + self.synchronization_time = synchronization_time + + +class SynchronizationSetting(ProxyDto): + """A Synchronization Setting data transfer object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduledSynchronizationSetting. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ScheduleBased': 'ScheduledSynchronizationSetting'} + } + + def __init__( + self, + **kwargs + ): + super(SynchronizationSetting, self).__init__(**kwargs) + self.kind = 'SynchronizationSetting' + + +class ScheduledSynchronizationSetting(SynchronizationSetting): + """A type of synchronization setting based on schedule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar created_at: Time at which the synchronization setting was created. + :vartype created_at: ~datetime.datetime + :ivar provisioning_state: Gets or sets the provisioning state. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param recurrence_interval: Required. Recurrence Interval. Possible values include: 'Hour', + 'Day'. + :type recurrence_interval: str or ~data_share_management_client.models.RecurrenceInterval + :param synchronization_time: Required. Synchronization time. + :type synchronization_time: ~datetime.datetime + :ivar user_name: Name of the user who created the synchronization setting. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'created_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'recurrence_interval': {'required': True}, + 'synchronization_time': {'required': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, + 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + *, + recurrence_interval: Union[str, "RecurrenceInterval"], + synchronization_time: datetime.datetime, + **kwargs + ): + super(ScheduledSynchronizationSetting, self).__init__(**kwargs) + self.kind = 'ScheduleBased' + self.created_at = None + self.provisioning_state = None + self.recurrence_interval = recurrence_interval + self.synchronization_time = synchronization_time + self.user_name = None + + +class Trigger(ProxyDto): + """A Trigger data transfer object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduledTrigger. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'ScheduleBased': 'ScheduledTrigger'} + } + + def __init__( + self, + **kwargs + ): + super(Trigger, self).__init__(**kwargs) + self.kind = 'Trigger' + + +class ScheduledTrigger(Trigger): + """A type of trigger based on schedule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of synchronization.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar created_at: Time at which the trigger was created. + :vartype created_at: ~datetime.datetime + :ivar provisioning_state: Gets the provisioning state. Possible values include: 'Succeeded', + 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param recurrence_interval: Required. Recurrence Interval. Possible values include: 'Hour', + 'Day'. + :type recurrence_interval: str or ~data_share_management_client.models.RecurrenceInterval + :param synchronization_mode: Synchronization mode. Possible values include: 'Incremental', + 'FullSync'. + :type synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + :param synchronization_time: Required. Synchronization time. + :type synchronization_time: ~datetime.datetime + :ivar trigger_status: Gets the trigger state. Possible values include: 'Active', 'Inactive', + 'SourceSynchronizationSettingDeleted'. + :vartype trigger_status: str or ~data_share_management_client.models.TriggerStatus + :ivar user_name: Name of the user who created the trigger. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'created_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'recurrence_interval': {'required': True}, + 'synchronization_time': {'required': True}, + 'trigger_status': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'recurrence_interval': {'key': 'properties.recurrenceInterval', 'type': 'str'}, + 'synchronization_mode': {'key': 'properties.synchronizationMode', 'type': 'str'}, + 'synchronization_time': {'key': 'properties.synchronizationTime', 'type': 'iso-8601'}, + 'trigger_status': {'key': 'properties.triggerStatus', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + *, + recurrence_interval: Union[str, "RecurrenceInterval"], + synchronization_time: datetime.datetime, + synchronization_mode: Optional[Union[str, "SynchronizationMode"]] = None, + **kwargs + ): + super(ScheduledTrigger, self).__init__(**kwargs) + self.kind = 'ScheduleBased' + self.created_at = None + self.provisioning_state = None + self.recurrence_interval = recurrence_interval + self.synchronization_mode = synchronization_mode + self.synchronization_time = synchronization_time + self.trigger_status = None + self.user_name = None + + +class Share(ProxyDto): + """A share data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar created_at: Time at which the share was created. + :vartype created_at: ~datetime.datetime + :param description: Share description. + :type description: str + :ivar provisioning_state: Gets or sets the provisioning state. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param share_kind: Share kind. Possible values include: 'CopyBased', 'InPlace'. + :type share_kind: str or ~data_share_management_client.models.ShareKind + :param terms: Share terms. + :type terms: str + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'share_kind': {'key': 'properties.shareKind', 'type': 'str'}, + 'terms': {'key': 'properties.terms', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + share_kind: Optional[Union[str, "ShareKind"]] = None, + terms: Optional[str] = None, + **kwargs + ): + super(Share, self).__init__(**kwargs) + self.created_at = None + self.description = description + self.provisioning_state = None + self.share_kind = share_kind + self.terms = terms + self.user_email = None + self.user_name = None + + +class ShareList(msrest.serialization.Model): + """List response for get Shares. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.Share] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Share]'}, + } + + def __init__( + self, + *, + value: List["Share"], + next_link: Optional[str] = None, + **kwargs + ): + super(ShareList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ShareSubscription(ProxyDto): + """A share subscription data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :ivar created_at: Time at which the share subscription was created. + :vartype created_at: ~datetime.datetime + :param invitation_id: Required. The invitation id. + :type invitation_id: str + :ivar provider_email: Email of the provider who created the resource. + :vartype provider_email: str + :ivar provider_name: Name of the provider who created the resource. + :vartype provider_name: str + :ivar provider_tenant_name: Tenant name of the provider who created the resource. + :vartype provider_tenant_name: str + :ivar provisioning_state: Provisioning state of the share subscription. Possible values + include: 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :ivar share_description: Description of share. + :vartype share_description: str + :ivar share_kind: Kind of share. Possible values include: 'CopyBased', 'InPlace'. + :vartype share_kind: str or ~data_share_management_client.models.ShareKind + :ivar share_name: Name of the share. + :vartype share_name: str + :ivar share_subscription_status: Gets the current status of share subscription. Possible values + include: 'Active', 'Revoked', 'SourceDeleted', 'Revoking'. + :vartype share_subscription_status: str or + ~data_share_management_client.models.ShareSubscriptionStatus + :ivar share_terms: Terms of a share. + :vartype share_terms: str + :param source_share_location: Required. Source share location. + :type source_share_location: str + :ivar user_email: Email of the user who created the resource. + :vartype user_email: str + :ivar user_name: Name of the user who created the resource. + :vartype user_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'invitation_id': {'required': True}, + 'provider_email': {'readonly': True}, + 'provider_name': {'readonly': True}, + 'provider_tenant_name': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'share_description': {'readonly': True}, + 'share_kind': {'readonly': True}, + 'share_name': {'readonly': True}, + 'share_subscription_status': {'readonly': True}, + 'share_terms': {'readonly': True}, + 'source_share_location': {'required': True}, + 'user_email': {'readonly': True}, + 'user_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, + 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, + 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, + 'provider_tenant_name': {'key': 'properties.providerTenantName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'share_description': {'key': 'properties.shareDescription', 'type': 'str'}, + 'share_kind': {'key': 'properties.shareKind', 'type': 'str'}, + 'share_name': {'key': 'properties.shareName', 'type': 'str'}, + 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, + 'share_terms': {'key': 'properties.shareTerms', 'type': 'str'}, + 'source_share_location': {'key': 'properties.sourceShareLocation', 'type': 'str'}, + 'user_email': {'key': 'properties.userEmail', 'type': 'str'}, + 'user_name': {'key': 'properties.userName', 'type': 'str'}, + } + + def __init__( + self, + *, + invitation_id: str, + source_share_location: str, + **kwargs + ): + super(ShareSubscription, self).__init__(**kwargs) + self.created_at = None + self.invitation_id = invitation_id + self.provider_email = None + self.provider_name = None + self.provider_tenant_name = None + self.provisioning_state = None + self.share_description = None + self.share_kind = None + self.share_name = None + self.share_subscription_status = None + self.share_terms = None + self.source_share_location = source_share_location + self.user_email = None + self.user_name = None + + +class ShareSubscriptionList(msrest.serialization.Model): + """List response for get ShareSubscription. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ShareSubscription] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ShareSubscription]'}, + } + + def __init__( + self, + *, + value: List["ShareSubscription"], + next_link: Optional[str] = None, + **kwargs + ): + super(ShareSubscriptionList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ShareSubscriptionSynchronization(msrest.serialization.Model): + """A ShareSubscriptionSynchronization data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar duration_ms: Synchronization duration. + :vartype duration_ms: int + :ivar end_time: End time of synchronization. + :vartype end_time: ~datetime.datetime + :ivar message: message of Synchronization. + :vartype message: str + :ivar start_time: start time of synchronization. + :vartype start_time: ~datetime.datetime + :ivar status: Raw Status. + :vartype status: str + :param synchronization_id: Required. Synchronization id. + :type synchronization_id: str + :ivar synchronization_mode: Synchronization Mode. Possible values include: 'Incremental', + 'FullSync'. + :vartype synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + """ + + _validation = { + 'duration_ms': {'readonly': True}, + 'end_time': {'readonly': True}, + 'message': {'readonly': True}, + 'start_time': {'readonly': True}, + 'status': {'readonly': True}, + 'synchronization_id': {'required': True}, + 'synchronization_mode': {'readonly': True}, + } + + _attribute_map = { + 'duration_ms': {'key': 'durationMs', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'synchronization_id': {'key': 'synchronizationId', 'type': 'str'}, + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, + } + + def __init__( + self, + *, + synchronization_id: str, + **kwargs + ): + super(ShareSubscriptionSynchronization, self).__init__(**kwargs) + self.duration_ms = None + self.end_time = None + self.message = None + self.start_time = None + self.status = None + self.synchronization_id = synchronization_id + self.synchronization_mode = None + + +class ShareSubscriptionSynchronizationList(msrest.serialization.Model): + """A consumer side list of share subscription synchronizations. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ShareSubscriptionSynchronization] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ShareSubscriptionSynchronization]'}, + } + + def __init__( + self, + *, + value: List["ShareSubscriptionSynchronization"], + next_link: Optional[str] = None, + **kwargs + ): + super(ShareSubscriptionSynchronizationList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ShareSynchronization(msrest.serialization.Model): + """A ShareSynchronization data transfer object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param consumer_email: Email of the user who created the synchronization. + :type consumer_email: str + :param consumer_name: Name of the user who created the synchronization. + :type consumer_name: str + :param consumer_tenant_name: Tenant name of the consumer who created the synchronization. + :type consumer_tenant_name: str + :param duration_ms: synchronization duration. + :type duration_ms: int + :param end_time: End time of synchronization. + :type end_time: ~datetime.datetime + :param message: message of synchronization. + :type message: str + :param start_time: start time of synchronization. + :type start_time: ~datetime.datetime + :param status: Raw Status. + :type status: str + :param synchronization_id: Synchronization id. + :type synchronization_id: str + :ivar synchronization_mode: Synchronization mode. Possible values include: 'Incremental', + 'FullSync'. + :vartype synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + """ + + _validation = { + 'synchronization_mode': {'readonly': True}, + } + + _attribute_map = { + 'consumer_email': {'key': 'consumerEmail', 'type': 'str'}, + 'consumer_name': {'key': 'consumerName', 'type': 'str'}, + 'consumer_tenant_name': {'key': 'consumerTenantName', 'type': 'str'}, + 'duration_ms': {'key': 'durationMs', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'synchronization_id': {'key': 'synchronizationId', 'type': 'str'}, + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, + } + + def __init__( + self, + *, + consumer_email: Optional[str] = None, + consumer_name: Optional[str] = None, + consumer_tenant_name: Optional[str] = None, + duration_ms: Optional[int] = None, + end_time: Optional[datetime.datetime] = None, + message: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + status: Optional[str] = None, + synchronization_id: Optional[str] = None, + **kwargs + ): + super(ShareSynchronization, self).__init__(**kwargs) + self.consumer_email = consumer_email + self.consumer_name = consumer_name + self.consumer_tenant_name = consumer_tenant_name + self.duration_ms = duration_ms + self.end_time = end_time + self.message = message + self.start_time = start_time + self.status = status + self.synchronization_id = synchronization_id + self.synchronization_mode = None + + +class ShareSynchronizationList(msrest.serialization.Model): + """List response for get ShareSynchronization. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.ShareSynchronization] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ShareSynchronization]'}, + } + + def __init__( + self, + *, + value: List["ShareSynchronization"], + next_link: Optional[str] = None, + **kwargs + ): + super(ShareSynchronizationList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class SourceShareSynchronizationSettingList(msrest.serialization.Model): + """List response for get source share Synchronization settings. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.SourceShareSynchronizationSetting] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[SourceShareSynchronizationSetting]'}, + } + + def __init__( + self, + *, + value: List["SourceShareSynchronizationSetting"], + next_link: Optional[str] = None, + **kwargs + ): + super(SourceShareSynchronizationSettingList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class SqlDBTableDataSet(DataSet): + """A SQL DB table data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param database_name: Database name of the source data set. + :type database_name: str + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param schema_name: Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Resource id of SQL server. + :type sql_server_resource_id: str + :param table_name: SQL DB table name. + :type table_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + } + + def __init__( + self, + *, + database_name: Optional[str] = None, + schema_name: Optional[str] = None, + sql_server_resource_id: Optional[str] = None, + table_name: Optional[str] = None, + **kwargs + ): + super(SqlDBTableDataSet, self).__init__(**kwargs) + self.kind = 'SqlDBTable' + self.database_name = database_name + self.data_set_id = None + self.schema_name = schema_name + self.sql_server_resource_id = sql_server_resource_id + self.table_name = table_name + + +class SqlDBTableDataSetMapping(DataSetMapping): + """A SQL DB Table data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param database_name: Required. DatabaseName name of the sink data set. + :type database_name: str + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Required. Resource id of SQL server. + :type sql_server_resource_id: str + :param table_name: Required. SQL DB table name. + :type table_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'database_name': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'schema_name': {'required': True}, + 'sql_server_resource_id': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + } + + def __init__( + self, + *, + database_name: str, + data_set_id: str, + schema_name: str, + sql_server_resource_id: str, + table_name: str, + **kwargs + ): + super(SqlDBTableDataSetMapping, self).__init__(**kwargs) + self.kind = 'SqlDBTable' + self.database_name = database_name + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.provisioning_state = None + self.schema_name = schema_name + self.sql_server_resource_id = sql_server_resource_id + self.table_name = table_name + + +class SqlDwTableDataSet(DataSet): + """A SQL DW table data set. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set.Constant filled by server. Possible values include: + 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', + 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :ivar data_set_id: Unique id for identifying a data set resource. + :vartype data_set_id: str + :param data_warehouse_name: DataWarehouse name of the source data set. + :type data_warehouse_name: str + :param schema_name: Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Resource id of SQL server. + :type sql_server_resource_id: str + :param table_name: SQL DW table name. + :type table_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_warehouse_name': {'key': 'properties.dataWarehouseName', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + } + + def __init__( + self, + *, + data_warehouse_name: Optional[str] = None, + schema_name: Optional[str] = None, + sql_server_resource_id: Optional[str] = None, + table_name: Optional[str] = None, + **kwargs + ): + super(SqlDwTableDataSet, self).__init__(**kwargs) + self.kind = 'SqlDWTable' + self.data_set_id = None + self.data_warehouse_name = data_warehouse_name + self.schema_name = schema_name + self.sql_server_resource_id = sql_server_resource_id + self.table_name = table_name + + +class SqlDwTableDataSetMapping(DataSetMapping): + """A SQL DW Table data set mapping. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource id of the azure resource. + :vartype id: str + :ivar name: Name of the azure resource. + :vartype name: str + :ivar type: Type of the azure resource. + :vartype type: str + :param kind: Required. Kind of data set mapping.Constant filled by server. Possible values + include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', + 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', + 'SqlDBTable', 'SqlDWTable', 'ScheduleBased'. + :type kind: str or ~data_share_management_client.models.Kind + :param data_set_id: Required. The id of the source data set. + :type data_set_id: str + :ivar data_set_mapping_status: Gets the status of the data set mapping. Possible values + include: 'Ok', 'Broken'. + :vartype data_set_mapping_status: str or + ~data_share_management_client.models.DataSetMappingStatus + :param data_warehouse_name: Required. DataWarehouse name of the source data set. + :type data_warehouse_name: str + :ivar provisioning_state: Provisioning state of the data set mapping. Possible values include: + 'Succeeded', 'Creating', 'Deleting', 'Moving', 'Failed'. + :vartype provisioning_state: str or ~data_share_management_client.models.ProvisioningState + :param schema_name: Required. Schema of the table. Default value is dbo. + :type schema_name: str + :param sql_server_resource_id: Required. Resource id of SQL server. + :type sql_server_resource_id: str + :param table_name: Required. SQL DW table name. + :type table_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'data_warehouse_name': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'schema_name': {'required': True}, + 'sql_server_resource_id': {'required': True}, + 'table_name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'data_set_mapping_status': {'key': 'properties.dataSetMappingStatus', 'type': 'str'}, + 'data_warehouse_name': {'key': 'properties.dataWarehouseName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, + 'sql_server_resource_id': {'key': 'properties.sqlServerResourceId', 'type': 'str'}, + 'table_name': {'key': 'properties.tableName', 'type': 'str'}, + } + + def __init__( + self, + *, + data_set_id: str, + data_warehouse_name: str, + schema_name: str, + sql_server_resource_id: str, + table_name: str, + **kwargs + ): + super(SqlDwTableDataSetMapping, self).__init__(**kwargs) + self.kind = 'SqlDWTable' + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.data_warehouse_name = data_warehouse_name + self.provisioning_state = None + self.schema_name = schema_name + self.sql_server_resource_id = sql_server_resource_id + self.table_name = table_name + + +class SynchronizationDetails(msrest.serialization.Model): + """Synchronization details at data set level. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar data_set_id: Id of data set. + :vartype data_set_id: str + :ivar data_set_type: Type of the data set. Possible values include: 'Blob', 'Container', + 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', + 'AdlsGen1File', 'KustoCluster', 'KustoDatabase', 'SqlDBTable', 'SqlDWTable'. + :vartype data_set_type: str or ~data_share_management_client.models.DataSetType + :ivar duration_ms: Duration of data set level copy. + :vartype duration_ms: int + :ivar end_time: End time of data set level copy. + :vartype end_time: ~datetime.datetime + :ivar files_read: The number of files read from the source data set. + :vartype files_read: long + :ivar files_written: The number of files written into the sink data set. + :vartype files_written: long + :ivar message: Error message if any. + :vartype message: str + :ivar name: Name of the data set. + :vartype name: str + :ivar rows_copied: The number of files copied into the sink data set. + :vartype rows_copied: long + :ivar rows_read: The number of rows read from the source data set. + :vartype rows_read: long + :ivar size_read: The size of the data read from the source data set in bytes. + :vartype size_read: long + :ivar size_written: The size of the data written into the sink data set in bytes. + :vartype size_written: long + :ivar start_time: Start time of data set level copy. + :vartype start_time: ~datetime.datetime + :ivar status: Raw Status. + :vartype status: str + :ivar v_core: The vCore units consumed for the data set synchronization. + :vartype v_core: long + """ + + _validation = { + 'data_set_id': {'readonly': True}, + 'data_set_type': {'readonly': True}, + 'duration_ms': {'readonly': True}, + 'end_time': {'readonly': True}, + 'files_read': {'readonly': True}, + 'files_written': {'readonly': True}, + 'message': {'readonly': True}, + 'name': {'readonly': True}, + 'rows_copied': {'readonly': True}, + 'rows_read': {'readonly': True}, + 'size_read': {'readonly': True}, + 'size_written': {'readonly': True}, + 'start_time': {'readonly': True}, + 'status': {'readonly': True}, + 'v_core': {'readonly': True}, + } + + _attribute_map = { + 'data_set_id': {'key': 'dataSetId', 'type': 'str'}, + 'data_set_type': {'key': 'dataSetType', 'type': 'str'}, + 'duration_ms': {'key': 'durationMs', 'type': 'int'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'files_read': {'key': 'filesRead', 'type': 'long'}, + 'files_written': {'key': 'filesWritten', 'type': 'long'}, + 'message': {'key': 'message', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'rows_copied': {'key': 'rowsCopied', 'type': 'long'}, + 'rows_read': {'key': 'rowsRead', 'type': 'long'}, + 'size_read': {'key': 'sizeRead', 'type': 'long'}, + 'size_written': {'key': 'sizeWritten', 'type': 'long'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'v_core': {'key': 'vCore', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(SynchronizationDetails, self).__init__(**kwargs) + self.data_set_id = None + self.data_set_type = None + self.duration_ms = None + self.end_time = None + self.files_read = None + self.files_written = None + self.message = None + self.name = None + self.rows_copied = None + self.rows_read = None + self.size_read = None + self.size_written = None + self.start_time = None + self.status = None + self.v_core = None + + +class SynchronizationDetailsList(msrest.serialization.Model): + """details of synchronization. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.SynchronizationDetails] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[SynchronizationDetails]'}, + } + + def __init__( + self, + *, + value: List["SynchronizationDetails"], + next_link: Optional[str] = None, + **kwargs + ): + super(SynchronizationDetailsList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class SynchronizationSettingList(msrest.serialization.Model): + """List response for get Synchronization settings. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.SynchronizationSetting] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[SynchronizationSetting]'}, + } + + def __init__( + self, + *, + value: List["SynchronizationSetting"], + next_link: Optional[str] = None, + **kwargs + ): + super(SynchronizationSettingList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class Synchronize(msrest.serialization.Model): + """Payload for the synchronizing the data. + + :param synchronization_mode: Mode of synchronization used in triggers and snapshot sync. + Incremental by default. Possible values include: 'Incremental', 'FullSync'. + :type synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + """ + + _attribute_map = { + 'synchronization_mode': {'key': 'synchronizationMode', 'type': 'str'}, + } + + def __init__( + self, + *, + synchronization_mode: Optional[Union[str, "SynchronizationMode"]] = None, + **kwargs + ): + super(Synchronize, self).__init__(**kwargs) + self.synchronization_mode = synchronization_mode + + +class TriggerList(msrest.serialization.Model): + """List response for get triggers. + + All required parameters must be populated in order to send to Azure. + + :param next_link: The Url of next result page. + :type next_link: str + :param value: Required. Collection of items of type DataTransferObjects. + :type value: list[~data_share_management_client.models.Trigger] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Trigger]'}, + } + + def __init__( + self, + *, + value: List["Trigger"], + next_link: Optional[str] = None, + **kwargs + ): + super(TriggerList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/__init__.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/__init__.py new file mode 100644 index 00000000000..72ad85b0b3c --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/__init__.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._account_operations import AccountOperations +from ._consumer_invitation_operations import ConsumerInvitationOperations +from ._data_set_operations import DataSetOperations +from ._data_set_mapping_operations import DataSetMappingOperations +from ._invitation_operations import InvitationOperations +from ._operation_operations import OperationOperations +from ._share_operations import ShareOperations +from ._provider_share_subscription_operations import ProviderShareSubscriptionOperations +from ._share_subscription_operations import ShareSubscriptionOperations +from ._consumer_source_data_set_operations import ConsumerSourceDataSetOperations +from ._synchronization_setting_operations import SynchronizationSettingOperations +from ._trigger_operations import TriggerOperations + +__all__ = [ + 'AccountOperations', + 'ConsumerInvitationOperations', + 'DataSetOperations', + 'DataSetMappingOperations', + 'InvitationOperations', + 'OperationOperations', + 'ShareOperations', + 'ProviderShareSubscriptionOperations', + 'ShareSubscriptionOperations', + 'ConsumerSourceDataSetOperations', + 'SynchronizationSettingOperations', + 'TriggerOperations', +] diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_account_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_account_operations.py new file mode 100644 index 00000000000..2b06a214c51 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_account_operations.py @@ -0,0 +1,539 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AccountOperations(object): + """AccountOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.Account" + """Get an account. + + Get an account under a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Account or the result of cls(response) + :rtype: ~data_share_management_client.models.Account + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Account"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Account', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + def _create_initial( + self, + resource_group_name, # type: str + account_name, # type: str + identity, # type: "models.Identity" + location=None, # type: Optional[str] + tags=None, # type: Optional[Dict[str, str]] + **kwargs # type: Any + ): + # type: (...) -> "models.Account" + cls = kwargs.pop('cls', None) # type: ClsType["models.Account"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _account = models.Account(location=location, tags=tags, identity=identity) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._create_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_account, 'Account') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Account', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Account', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + def begin_create( + self, + resource_group_name, # type: str + account_name, # type: str + identity, # type: "models.Identity" + location=None, # type: Optional[str] + tags=None, # type: Optional[Dict[str, str]] + **kwargs # type: Any + ): + # type: (...) -> "models.Account" + """Create an account. + + Create an account in the given resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param identity: Identity Info on the Account. + :type identity: ~data_share_management_client.models.Identity + :param location: Location of the azure resource. + :type location: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns Account + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.Account] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.Account"] + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + identity=identity, + location=location, + tags=tags, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Account', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + """DeleteAccount. + + Delete an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + def update( + self, + resource_group_name, # type: str + account_name, # type: str + tags=None, # type: Optional[Dict[str, str]] + **kwargs # type: Any + ): + # type: (...) -> "models.Account" + """Patch an account. + + Patch a given account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Account or the result of cls(response) + :rtype: ~data_share_management_client.models.Account + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Account"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _account_update_parameters = models.AccountUpdateParameters(tags=tags) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_account_update_parameters, 'AccountUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Account', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} + + def list_by_subscription( + self, + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.AccountList" + """List Accounts in Subscription. + + List Accounts in a subscription. + + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccountList or the result of cls(response) + :rtype: ~data_share_management_client.models.AccountList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AccountList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AccountList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts'} + + def list_by_resource_group( + self, + resource_group_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.AccountList" + """List Accounts in ResourceGroup. + + List Accounts in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccountList or the result of cls(response) + :rtype: ~data_share_management_client.models.AccountList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AccountList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AccountList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_consumer_invitation_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_consumer_invitation_operations.py new file mode 100644 index 00000000000..61235cd44a9 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_consumer_invitation_operations.py @@ -0,0 +1,231 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConsumerInvitationOperations(object): + """ConsumerInvitationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def reject_invitation( + self, + location, # type: str + invitation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ConsumerInvitation" + """Reject an invitation. + + Rejects the invitation identified by invitationId. + + :param location: Location of the invitation. + :type location: str + :param invitation_id: Unique id of the invitation. + :type invitation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerInvitation or the result of cls(response) + :rtype: ~data_share_management_client.models.ConsumerInvitation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerInvitation"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _invitation = models.ConsumerInvitation(invitation_id=invitation_id) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.reject_invitation.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_invitation, 'ConsumerInvitation') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ConsumerInvitation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + reject_invitation.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/RejectInvitation'} + + def get( + self, + location, # type: str + invitation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ConsumerInvitation" + """Get an invitation. + + Gets the invitation identified by invitationId. + + :param location: Location of the invitation. + :type location: str + :param invitation_id: An invitation id. + :type invitation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerInvitation or the result of cls(response) + :rtype: ~data_share_management_client.models.ConsumerInvitation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerInvitation"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'invitationId': self._serialize.url("invitation_id", invitation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ConsumerInvitation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/consumerInvitations/{invitationId}'} + + def list_invitation( + self, + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ConsumerInvitationList" + """Lists invitations. + + List the invitations. + + :param skip_token: The continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerInvitationList or the result of cls(response) + :rtype: ~data_share_management_client.models.ConsumerInvitationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerInvitationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_invitation.metadata['url'] + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ConsumerInvitationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_invitation.metadata = {'url': '/providers/Microsoft.DataShare/ListInvitations'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_consumer_source_data_set_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_consumer_source_data_set_operations.py new file mode 100644 index 00000000000..f45b8832698 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_consumer_source_data_set_operations.py @@ -0,0 +1,124 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConsumerSourceDataSetOperations(object): + """ConsumerSourceDataSetOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_share_subscription( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ConsumerSourceDataSetList" + """Get source dataSets of a shareSubscription. + + Get source dataSets of a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerSourceDataSetList or the result of cls(response) + :rtype: ~data_share_management_client.models.ConsumerSourceDataSetList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConsumerSourceDataSetList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ConsumerSourceDataSetList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_share_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/ConsumerSourceDataSets'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_data_set_mapping_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_data_set_mapping_operations.py new file mode 100644 index 00000000000..be59ce3d9b9 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_data_set_mapping_operations.py @@ -0,0 +1,337 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataSetMappingOperations(object): + """DataSetMappingOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + data_set_mapping_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.DataSetMapping" + """Get a DataSetMapping in a shareSubscription. + + Get DataSetMapping in a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param data_set_mapping_name: The name of the dataSetMapping. + :type data_set_mapping_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSetMapping or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSetMapping + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSetMapping"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'dataSetMappingName': self._serialize.url("data_set_mapping_name", data_set_mapping_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('DataSetMapping', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/dataSetMappings/{dataSetMappingName}'} + + def create( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + data_set_mapping_name, # type: str + data_set_mapping, # type: "models.DataSetMapping" + **kwargs # type: Any + ): + # type: (...) -> "models.DataSetMapping" + """Create a DataSetMapping. + + Maps a source data set in the source share to a sink data set in the share subscription. + Enables copying the data set from source to destination. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription which will hold the data set + sink. + :type share_subscription_name: str + :param data_set_mapping_name: The name of the data set mapping to be created. + :type data_set_mapping_name: str + :param data_set_mapping: Destination data set configuration details. + :type data_set_mapping: ~data_share_management_client.models.DataSetMapping + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSetMapping or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSetMapping or ~data_share_management_client.models.DataSetMapping + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSetMapping"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'dataSetMappingName': self._serialize.url("data_set_mapping_name", data_set_mapping_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(data_set_mapping, 'DataSetMapping') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataSetMapping', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataSetMapping', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/dataSetMappings/{dataSetMappingName}'} + + def delete( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + data_set_mapping_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a DataSetMapping in a shareSubscription. + + Delete DataSetMapping in a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param data_set_mapping_name: The name of the dataSetMapping. + :type data_set_mapping_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'dataSetMappingName': self._serialize.url("data_set_mapping_name", data_set_mapping_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/dataSetMappings/{dataSetMappingName}'} + + def list_by_share_subscription( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.DataSetMappingList" + """List DataSetMappings in a share subscription. + + List DataSetMappings in a share subscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSetMappingList or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSetMappingList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSetMappingList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataSetMappingList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_share_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/dataSetMappings'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_data_set_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_data_set_operations.py new file mode 100644 index 00000000000..95929ba4858 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_data_set_operations.py @@ -0,0 +1,374 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataSetOperations(object): + """DataSetOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + data_set_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.DataSet" + """Get a DataSet in a share. + + Get DataSet in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param data_set_name: The name of the dataSet. + :type data_set_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSet or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSet"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'dataSetName': self._serialize.url("data_set_name", data_set_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('DataSet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} + + def create( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + data_set_name, # type: str + data_set, # type: "models.DataSet" + **kwargs # type: Any + ): + # type: (...) -> "models.DataSet" + """Create a DataSet. + + Adds a new data set to an existing share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share to add the data set to. + :type share_name: str + :param data_set_name: The name of the dataSet. + :type data_set_name: str + :param data_set: The new data set information. + :type data_set: ~data_share_management_client.models.DataSet + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSet or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSet or ~data_share_management_client.models.DataSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSet"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'dataSetName': self._serialize.url("data_set_name", data_set_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(data_set, 'DataSet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('DataSet', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataSet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + data_set_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'dataSetName': self._serialize.url("data_set_name", data_set_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + data_set_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a DataSet in a share. + + Delete DataSet in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param data_set_name: The name of the dataSet. + :type data_set_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns None + :rtype: ~azure.core.polling.LROPoller[None] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + data_set_name=data_set_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} + + def list_by_share( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.DataSetList" + """List DataSets in a share. + + List DataSets in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataSetList or the result of cls(response) + :rtype: ~data_share_management_client.models.DataSetList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.DataSetList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataSetList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_invitation_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_invitation_operations.py new file mode 100644 index 00000000000..f6d2e38dc1a --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_invitation_operations.py @@ -0,0 +1,345 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class InvitationOperations(object): + """InvitationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + invitation_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.Invitation" + """Get an invitation in a share. + + Get Invitation in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param invitation_name: The name of the invitation. + :type invitation_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Invitation or the result of cls(response) + :rtype: ~data_share_management_client.models.Invitation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Invitation"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'invitationName': self._serialize.url("invitation_name", invitation_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Invitation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'} + + def create( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + invitation_name, # type: str + target_active_directory_id=None, # type: Optional[str] + target_email=None, # type: Optional[str] + target_object_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.Invitation" + """Create an invitation. + + Sends a new invitation to a recipient to access a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share to send the invitation for. + :type share_name: str + :param invitation_name: The name of the invitation. + :type invitation_name: str + :param target_active_directory_id: The target Azure AD Id. Can't be combined with email. + :type target_active_directory_id: str + :param target_email: The email the invitation is directed to. + :type target_email: str + :param target_object_id: The target user or application Id that invitation is being sent to. + Must be specified along TargetActiveDirectoryId. This enables sending + invitations to specific users or applications in an AD tenant. + :type target_object_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Invitation or the result of cls(response) + :rtype: ~data_share_management_client.models.Invitation or ~data_share_management_client.models.Invitation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Invitation"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _invitation = models.Invitation(target_active_directory_id=target_active_directory_id, target_email=target_email, target_object_id=target_object_id) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'invitationName': self._serialize.url("invitation_name", invitation_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_invitation, 'Invitation') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Invitation', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Invitation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'} + + def delete( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + invitation_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete an invitation in a share. + + Delete Invitation in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param invitation_name: The name of the invitation. + :type invitation_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'invitationName': self._serialize.url("invitation_name", invitation_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'} + + def list_by_share( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.InvitationList" + """List invitations in a share. + + List all Invitations in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: The continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: InvitationList or the result of cls(response) + :rtype: ~data_share_management_client.models.InvitationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.InvitationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('InvitationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_operation_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_operation_operations.py new file mode 100644 index 00000000000..ea88e363ce7 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_operation_operations.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationOperations(object): + """OperationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> "models.OperationList" + """List of available operations. + + Lists the available operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationList or the result of cls(response) + :rtype: ~data_share_management_client.models.OperationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataShare/operations'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_provider_share_subscription_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_provider_share_subscription_operations.py new file mode 100644 index 00000000000..8c663fab40b --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_provider_share_subscription_operations.py @@ -0,0 +1,372 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ProviderShareSubscriptionOperations(object): + """ProviderShareSubscriptionOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_by_share( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + provider_share_subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ProviderShareSubscription" + """Get share subscription in a provider share. + + Get share subscription in a provider share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param provider_share_subscription_id: To locate shareSubscription. + :type provider_share_subscription_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProviderShareSubscription or the result of cls(response) + :rtype: ~data_share_management_client.models.ProviderShareSubscription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'providerShareSubscriptionId': self._serialize.url("provider_share_subscription_id", provider_share_subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}'} + + def list_by_share( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ProviderShareSubscriptionList" + """List share subscriptions in a provider share. + + List of available share subscriptions to a provider share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: Continuation Token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProviderShareSubscriptionList or the result of cls(response) + :rtype: ~data_share_management_client.models.ProviderShareSubscriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscriptionList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProviderShareSubscriptionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions'} + + def _revoke_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + provider_share_subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ProviderShareSubscription" + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._revoke_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'providerShareSubscriptionId': self._serialize.url("provider_share_subscription_id", provider_share_subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _revoke_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/revoke'} + + def begin_revoke( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + provider_share_subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ProviderShareSubscription" + """Revoke share subscription in a provider share. + + Revoke share subscription in a provider share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param provider_share_subscription_id: To locate shareSubscription. + :type provider_share_subscription_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns ProviderShareSubscription + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ProviderShareSubscription] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscription"] + raw_result = self._revoke_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + provider_share_subscription_id=provider_share_subscription_id, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_revoke.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/revoke'} + + def reinstate( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + provider_share_subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ProviderShareSubscription" + """Reinstate share subscription in a provider share. + + Reinstate share subscription in a provider share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param provider_share_subscription_id: To locate shareSubscription. + :type provider_share_subscription_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ProviderShareSubscription or the result of cls(response) + :rtype: ~data_share_management_client.models.ProviderShareSubscription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ProviderShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.reinstate.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'providerShareSubscriptionId': self._serialize.url("provider_share_subscription_id", provider_share_subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ProviderShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + reinstate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_share_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_share_operations.py new file mode 100644 index 00000000000..a891d441424 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_share_operations.py @@ -0,0 +1,574 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +import datetime +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ShareOperations(object): + """ShareOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.Share" + """Get a share. + + Get a specified share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share to retrieve. + :type share_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Share or the result of cls(response) + :rtype: ~data_share_management_client.models.Share + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Share"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Share', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} + + def create( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + description=None, # type: Optional[str] + share_kind=None, # type: Optional[Union[str, "models.ShareKind"]] + terms=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.Share" + """Create a share. + + Create a share in the given account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param description: Share description. + :type description: str + :param share_kind: Share kind. + :type share_kind: str or ~data_share_management_client.models.ShareKind + :param terms: Share terms. + :type terms: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Share or the result of cls(response) + :rtype: ~data_share_management_client.models.Share or ~data_share_management_client.models.Share + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Share"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _share = models.Share(description=description, share_kind=share_kind, terms=terms) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share, 'Share') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Share', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Share', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + """Delete a share. + + Deletes a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} + + def list_by_account( + self, + resource_group_name, # type: str + account_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ShareList" + """List shares in an account. + + List of available shares under an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param skip_token: Continuation Token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareList or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ShareList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares'} + + def list_synchronization( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSynchronizationList" + """List synchronizations of a share. + + List Synchronizations in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSynchronizationList or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSynchronizationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSynchronizationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ShareSynchronizationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_synchronization.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizations'} + + def list_synchronization_detail( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + skip_token=None, # type: Optional[str] + consumer_email=None, # type: Optional[str] + consumer_name=None, # type: Optional[str] + consumer_tenant_name=None, # type: Optional[str] + duration_ms=None, # type: Optional[int] + end_time=None, # type: Optional[datetime.datetime] + message=None, # type: Optional[str] + start_time=None, # type: Optional[datetime.datetime] + status=None, # type: Optional[str] + synchronization_id=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.SynchronizationDetailsList" + """List synchronization details. + + List data set level details for a share synchronization. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: Continuation token. + :type skip_token: str + :param consumer_email: Email of the user who created the synchronization. + :type consumer_email: str + :param consumer_name: Name of the user who created the synchronization. + :type consumer_name: str + :param consumer_tenant_name: Tenant name of the consumer who created the synchronization. + :type consumer_tenant_name: str + :param duration_ms: synchronization duration. + :type duration_ms: int + :param end_time: End time of synchronization. + :type end_time: ~datetime.datetime + :param message: message of synchronization. + :type message: str + :param start_time: start time of synchronization. + :type start_time: ~datetime.datetime + :param status: Raw Status. + :type status: str + :param synchronization_id: Synchronization id. + :type synchronization_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationDetailsList or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationDetailsList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationDetailsList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + _share_synchronization = models.ShareSynchronization(consumer_email=consumer_email, consumer_name=consumer_name, consumer_tenant_name=consumer_tenant_name, duration_ms=duration_ms, end_time=end_time, message=message, start_time=start_time, status=status, synchronization_id=synchronization_id) + api_version = "2019-11-01" + content_type = "application/json" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization_detail.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share_synchronization, 'ShareSynchronization') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SynchronizationDetailsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_synchronization_detail.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizationDetails'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_share_subscription_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_share_subscription_operations.py new file mode 100644 index 00000000000..59e710c1c5b --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_share_subscription_operations.py @@ -0,0 +1,870 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ShareSubscriptionOperations(object): + """ShareSubscriptionOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSubscription" + """Get a shareSubscription in an account. + + Get shareSubscription in an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSubscription or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSubscription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('ShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + def create( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + invitation_id, # type: str + source_share_location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSubscription" + """Create a shareSubscription in an account. + + Create shareSubscription in an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param invitation_id: The invitation id. + :type invitation_id: str + :param source_share_location: Source share location. + :type source_share_location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSubscription or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSubscription or ~data_share_management_client.models.ShareSubscription + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscription"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _share_subscription = models.ShareSubscription(invitation_id=invitation_id, source_share_location=source_share_location) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share_subscription, 'ShareSubscription') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShareSubscription', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ShareSubscription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + """Delete a shareSubscription in an account. + + Delete shareSubscription in an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + def list_by_account( + self, + resource_group_name, # type: str + account_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSubscriptionList" + """List share subscriptions in an account. + + List of available share subscriptions under an account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param skip_token: Continuation Token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSubscriptionList or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSubscriptionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ShareSubscriptionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions'} + + def list_source_share_synchronization_setting( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.SourceShareSynchronizationSettingList" + """Get synchronization settings set on a share. + + Get source share synchronization settings for a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SourceShareSynchronizationSettingList or the result of cls(response) + :rtype: ~data_share_management_client.models.SourceShareSynchronizationSettingList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SourceShareSynchronizationSettingList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_source_share_synchronization_setting.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SourceShareSynchronizationSettingList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_source_share_synchronization_setting.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings'} + + def list_synchronization( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSubscriptionSynchronizationList" + """List synchronizations of a share subscription. + + List Synchronizations in a share subscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ShareSubscriptionSynchronizationList or the result of cls(response) + :rtype: ~data_share_management_client.models.ShareSubscriptionSynchronizationList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronizationList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ShareSubscriptionSynchronizationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_synchronization.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations'} + + def list_synchronization_detail( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + synchronization_id, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.SynchronizationDetailsList" + """List synchronization details. + + List data set level details for a share subscription synchronization. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription. + :type share_subscription_name: str + :param synchronization_id: Synchronization id. + :type synchronization_id: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationDetailsList or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationDetailsList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationDetailsList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + _share_subscription_synchronization = models.ShareSubscriptionSynchronization(synchronization_id=synchronization_id) + api_version = "2019-11-01" + content_type = "application/json" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization_detail.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share_subscription_synchronization, 'ShareSubscriptionSynchronization') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SynchronizationDetailsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_synchronization_detail.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails'} + + def _synchronize_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + synchronization_mode=None, # type: Optional[Union[str, "models.SynchronizationMode"]] + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSubscriptionSynchronization" + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronization"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _synchronize = models.Synchronize(synchronization_mode=synchronization_mode) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._synchronize_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_synchronize, 'Synchronize') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _synchronize_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/Synchronize'} + + def begin_synchronize( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + synchronization_mode=None, # type: Optional[Union[str, "models.SynchronizationMode"]] + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSubscriptionSynchronization" + """Initiate a copy. + + Initiate an asynchronous data share job. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of share subscription. + :type share_subscription_name: str + :param synchronization_mode: Mode of synchronization used in triggers and snapshot sync. + Incremental by default. + :type synchronization_mode: str or ~data_share_management_client.models.SynchronizationMode + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns ShareSubscriptionSynchronization + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ShareSubscriptionSynchronization] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronization"] + raw_result = self._synchronize_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + synchronization_mode=synchronization_mode, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_synchronize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/Synchronize'} + + def _cancel_synchronization_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + synchronization_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSubscriptionSynchronization" + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronization"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + + _share_subscription_synchronization = models.ShareSubscriptionSynchronization(synchronization_id=synchronization_id) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._cancel_synchronization_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_share_subscription_synchronization, 'ShareSubscriptionSynchronization') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _cancel_synchronization_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization'} + + def begin_cancel_synchronization( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + synchronization_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.ShareSubscriptionSynchronization" + """Request to cancel a synchronization. + + Request cancellation of a data share snapshot. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param synchronization_id: Synchronization id. + :type synchronization_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns ShareSubscriptionSynchronization + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.ShareSubscriptionSynchronization] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.ShareSubscriptionSynchronization"] + raw_result = self._cancel_synchronization_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + synchronization_id=synchronization_id, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ShareSubscriptionSynchronization', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel_synchronization.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_synchronization_setting_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_synchronization_setting_operations.py new file mode 100644 index 00000000000..4b59370d082 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_synchronization_setting_operations.py @@ -0,0 +1,383 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SynchronizationSettingOperations(object): + """SynchronizationSettingOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + synchronization_setting_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.SynchronizationSetting" + """Get a synchronizationSetting in a share. + + Get synchronizationSetting in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param synchronization_setting_name: The name of the synchronizationSetting. + :type synchronization_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationSetting or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationSetting + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationSetting"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'synchronizationSettingName': self._serialize.url("synchronization_setting_name", synchronization_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('SynchronizationSetting', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings/{synchronizationSettingName}'} + + def create( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + synchronization_setting_name, # type: str + synchronization_setting, # type: "models.SynchronizationSetting" + **kwargs # type: Any + ): + # type: (...) -> "models.SynchronizationSetting" + """Create or update a synchronizationSetting. + + Adds a new synchronization setting to an existing share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share to add the synchronization setting to. + :type share_name: str + :param synchronization_setting_name: The name of the synchronizationSetting. + :type synchronization_setting_name: str + :param synchronization_setting: The new synchronization setting information. + :type synchronization_setting: ~data_share_management_client.models.SynchronizationSetting + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationSetting or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationSetting or ~data_share_management_client.models.SynchronizationSetting + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationSetting"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'synchronizationSettingName': self._serialize.url("synchronization_setting_name", synchronization_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(synchronization_setting, 'SynchronizationSetting') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SynchronizationSetting', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SynchronizationSetting', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings/{synchronizationSettingName}'} + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + synchronization_setting_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + 'synchronizationSettingName': self._serialize.url("synchronization_setting_name", synchronization_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings/{synchronizationSettingName}'} + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + synchronization_setting_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + """Delete a synchronizationSetting in a share. + + Delete synchronizationSetting in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param synchronization_setting_name: The name of the synchronizationSetting . + :type synchronization_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_name=share_name, + synchronization_setting_name=synchronization_setting_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings/{synchronizationSettingName}'} + + def list_by_share( + self, + resource_group_name, # type: str + account_name, # type: str + share_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.SynchronizationSettingList" + """List synchronizationSettings in a share. + + List synchronizationSettings in a share. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_name: The name of the share. + :type share_name: str + :param skip_token: continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SynchronizationSettingList or the result of cls(response) + :rtype: ~data_share_management_client.models.SynchronizationSettingList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SynchronizationSettingList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareName': self._serialize.url("share_name", share_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SynchronizationSettingList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/synchronizationSettings'} diff --git a/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_trigger_operations.py b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_trigger_operations.py new file mode 100644 index 00000000000..1bea3c38c31 --- /dev/null +++ b/src/datashare/azext_datashare/vendored_sdks/datashare/operations/_trigger_operations.py @@ -0,0 +1,427 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod + +from .. import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class TriggerOperations(object): + """TriggerOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~data_share_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + trigger_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.Trigger" + """Get a Trigger in a shareSubscription. + + Get Trigger in a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param trigger_name: The name of the trigger. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Trigger or the result of cls(response) + :rtype: ~data_share_management_client.models.Trigger + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.Trigger"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('Trigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + def _create_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + trigger_name, # type: str + trigger, # type: "models.Trigger" + **kwargs # type: Any + ): + # type: (...) -> "models.Trigger" + cls = kwargs.pop('cls', None) # type: ClsType["models.Trigger"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self._create_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + # Construct and send request + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(trigger, 'Trigger') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Trigger', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Trigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + def begin_create( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + trigger_name, # type: str + trigger, # type: "models.Trigger" + **kwargs # type: Any + ): + # type: (...) -> "models.Trigger" + """Create a Trigger. + + This method creates a trigger for a share subscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription which will hold the data set + sink. + :type share_subscription_name: str + :param trigger_name: The name of the trigger. + :type trigger_name: str + :param trigger: Trigger details. + :type trigger: ~data_share_management_client.models.Trigger + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns Trigger + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.Trigger] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.Trigger"] + raw_result = self._create_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + trigger_name=trigger_name, + trigger=trigger, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Trigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + trigger_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + # Construct URL + url = self._delete_initial.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize(models.DataShareError, response) + raise HttpResponseError(response=response, model=error) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + trigger_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.OperationResponse" + """Delete a Trigger in a shareSubscription. + + Delete Trigger in a shareSubscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param trigger_name: The name of the trigger. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :return: An instance of LROPoller that returns OperationResponse + :rtype: ~azure.core.polling.LROPoller[~data_share_management_client.models.OperationResponse] + + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["models.OperationResponse"] + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + share_subscription_name=share_subscription_name, + trigger_name=trigger_name, + cls=lambda x,y,z: x, + **kwargs + ) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + lro_delay = kwargs.get( + 'polling_interval', + self._config.polling_interval + ) + if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers/{triggerName}'} + + def list_by_share_subscription( + self, + resource_group_name, # type: str + account_name, # type: str + share_subscription_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "models.TriggerList" + """List Triggers in a share subscription. + + List Triggers in a share subscription. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: The name of the share account. + :type account_name: str + :param share_subscription_name: The name of the share subscription. + :type share_subscription_name: str + :param skip_token: Continuation token. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TriggerList or the result of cls(response) + :rtype: ~data_share_management_client.models.TriggerList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.TriggerList"] + error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) + api_version = "2019-11-01" + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_share_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'shareSubscriptionName': self._serialize.url("share_subscription_name", share_subscription_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + else: + url = next_link + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TriggerList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize(models.DataShareError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_share_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/triggers'} diff --git a/src/datashare/report.md b/src/datashare/report.md new file mode 100644 index 00000000000..652f8051a95 --- /dev/null +++ b/src/datashare/report.md @@ -0,0 +1,483 @@ +# Azure CLI Module Creation Report + +### datashare account create + +create a datashare account. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--identity**|object|Identity of resource|identity|identity| +|**--location**|string|Location of the azure resource.|location|location| +|**--tags**|dictionary|Tags on the azure resource.|tags|tags| +### datashare account delete + +delete a datashare account. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +### datashare account list + +list a datashare account. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare account show + +show a datashare account. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +### datashare account update + +update a datashare account. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--tags**|dictionary|Tags on the azure resource.|tags|tags| +### datashare consumer-invitation list + +list a datashare consumer-invitation. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare consumer-invitation reject-invitation + +reject-invitation a datashare consumer-invitation. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--location**|string|Location of the invitation|location|location| +|**--invitation_id**|string|Unique id of the invitation.|invitation_id|properties_invitation_id| +### datashare consumer-invitation show + +show a datashare consumer-invitation. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--location**|string|Location of the invitation|location|location| +|**--invitation_id**|string|An invitation id|invitation_id|invitation_id| +### datashare consumer-source-data-set list + +list a datashare consumer-source-data-set. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare data-set create + +create a datashare data-set. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--data_set_name**|string|The name of the dataSet.|data_set_name|data_set_name| +|**--kind**|choice|Kind of data set.|kind|kind| +### datashare data-set delete + +delete a datashare data-set. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--data_set_name**|string|The name of the dataSet.|data_set_name|data_set_name| +### datashare data-set list + +list a datashare data-set. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare data-set show + +show a datashare data-set. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--data_set_name**|string|The name of the dataSet.|data_set_name|data_set_name| +### datashare data-set-mapping create + +create a datashare data-set-mapping. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--data_set_mapping_name**|string|The name of the dataSetMapping.|data_set_mapping_name|data_set_mapping_name| +|**--kind**|choice|Kind of data set.|kind|kind| +### datashare data-set-mapping delete + +delete a datashare data-set-mapping. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--data_set_mapping_name**|string|The name of the dataSetMapping.|data_set_mapping_name|data_set_mapping_name| +### datashare data-set-mapping list + +list a datashare data-set-mapping. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare data-set-mapping show + +show a datashare data-set-mapping. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--data_set_mapping_name**|string|The name of the dataSetMapping.|data_set_mapping_name|data_set_mapping_name| +### datashare invitation create + +create a datashare invitation. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--invitation_name**|string|The name of the invitation.|invitation_name|invitation_name| +|**--target_active_directory_id**|string|The target Azure AD Id. Can't be combined with email.|target_active_directory_id|properties_target_active_directory_id| +|**--target_email**|string|The email the invitation is directed to.|target_email|properties_target_email| +|**--target_object_id**|string|The target user or application Id that invitation is being sent to. Must be specified along TargetActiveDirectoryId. This enables sending invitations to specific users or applications in an AD tenant.|target_object_id|properties_target_object_id| +### datashare invitation delete + +delete a datashare invitation. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--invitation_name**|string|The name of the invitation.|invitation_name|invitation_name| +### datashare invitation list + +list a datashare invitation. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare invitation show + +show a datashare invitation. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--invitation_name**|string|The name of the invitation.|invitation_name|invitation_name| +### datashare provider-share-subscription list + +list a datashare provider-share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare provider-share-subscription reinstate + +reinstate a datashare provider-share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--provider_share_subscription_id**|string|To locate shareSubscription|provider_share_subscription_id|provider_share_subscription_id| +### datashare provider-share-subscription revoke + +revoke a datashare provider-share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--provider_share_subscription_id**|string|To locate shareSubscription|provider_share_subscription_id|provider_share_subscription_id| +### datashare provider-share-subscription show + +show a datashare provider-share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--provider_share_subscription_id**|string|To locate shareSubscription|provider_share_subscription_id|provider_share_subscription_id| +### datashare share create + +create a datashare share. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--description**|string|Share description.|description|properties_description| +|**--share_kind**|choice|Share kind.|share_kind|properties_share_kind| +|**--terms**|string|Share terms.|terms|properties_terms| +### datashare share delete + +delete a datashare share. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +### datashare share list + +list a datashare share. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare share list-synchronization + +list-synchronization a datashare share. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare share list-synchronization-detail + +list-synchronization-detail a datashare share. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +|**--consumer_email**|string|Email of the user who created the synchronization|consumer_email|consumer_email| +|**--consumer_name**|string|Name of the user who created the synchronization|consumer_name|consumer_name| +|**--consumer_tenant_name**|string|Tenant name of the consumer who created the synchronization|consumer_tenant_name|consumer_tenant_name| +|**--duration_ms**|integer|synchronization duration|duration_ms|duration_ms| +|**--end_time**|date-time|End time of synchronization|end_time|end_time| +|**--message**|string|message of synchronization|message|message| +|**--start_time**|date-time|start time of synchronization|start_time|start_time| +|**--status**|string|Raw Status|status|status| +|**--synchronization_id**|string|Synchronization id|synchronization_id|synchronization_id| +### datashare share show + +show a datashare share. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +### datashare share-subscription cancel-synchronization + +cancel-synchronization a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--synchronization_id**|string|Synchronization id|synchronization_id|synchronization_id| +### datashare share-subscription create + +create a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--invitation_id**|string|The invitation id.|invitation_id|properties_invitation_id| +|**--source_share_location**|string|Source share location.|source_share_location|properties_source_share_location| +### datashare share-subscription delete + +delete a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +### datashare share-subscription list + +list a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare share-subscription list-source-share-synchronization-setting + +list-source-share-synchronization-setting a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare share-subscription list-synchronization + +list-synchronization a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare share-subscription list-synchronization-detail + +list-synchronization-detail a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--synchronization_id**|string|Synchronization id|synchronization_id|synchronization_id| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare share-subscription show + +show a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +### datashare share-subscription synchronize + +synchronize a datashare share-subscription. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--synchronization_mode**|choice|Synchronization mode|synchronization_mode|synchronization_mode| +### datashare synchronization-setting create + +create a datashare synchronization-setting. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--synchronization_setting_name**|string|The name of the synchronizationSetting.|synchronization_setting_name|synchronization_setting_name| +|**--kind**|choice|Kind of data set.|kind|kind| +### datashare synchronization-setting delete + +delete a datashare synchronization-setting. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--synchronization_setting_name**|string|The name of the synchronizationSetting.|synchronization_setting_name|synchronization_setting_name| +### datashare synchronization-setting list + +list a datashare synchronization-setting. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare synchronization-setting show + +show a datashare synchronization-setting. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_name**|string|The name of the share.|share_name|share_name| +|**--synchronization_setting_name**|string|The name of the synchronizationSetting.|synchronization_setting_name|synchronization_setting_name| +### datashare trigger create + +create a datashare trigger. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--trigger_name**|string|The name of the trigger.|trigger_name|trigger_name| +|**--kind**|choice|Kind of data set.|kind|kind| +### datashare trigger delete + +delete a datashare trigger. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--trigger_name**|string|The name of the trigger.|trigger_name|trigger_name| +### datashare trigger list + +list a datashare trigger. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--skip_token**|string|Continuation token|skip_token|skip_token| +### datashare trigger show + +show a datashare trigger. + +|Option|Type|Description|Path (SDK)|Path (swagger)| +|------|----|-----------|----------|--------------| +|**--resource_group_name**|string|The resource group name.|resource_group_name|resource_group_name| +|**--account_name**|string|The name of the share account.|account_name|account_name| +|**--share_subscription_name**|string|The name of the shareSubscription.|share_subscription_name|share_subscription_name| +|**--trigger_name**|string|The name of the trigger.|trigger_name|trigger_name| \ No newline at end of file diff --git a/src/datashare/setup.cfg b/src/datashare/setup.cfg new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/datashare/setup.py b/src/datashare/setup.py new file mode 100644 index 00000000000..172005632aa --- /dev/null +++ b/src/datashare/setup.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +from codecs import open +from setuptools import setup, find_packages +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + +# TODO: Confirm this is the right version number you want and it matches your +# HISTORY.rst entry. +VERSION = '0.1.0' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', +] + +# TODO: Add any additional SDK dependencies here +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='datashare', + version=VERSION, + description='Microsoft Azure Command-Line Tools DataShareManagementClient Extension', + # TODO: Update author and email, if applicable + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + # TODO: consider pointing directly to your source code instead of the generic repo + url='https://github.com/Azure/azure-cli-extensions', + long_description=README + '\n\n' + HISTORY, + license='MIT', + classifiers=CLASSIFIERS, + packages=find_packages(), + install_requires=DEPENDENCIES, + package_data={'azext_datashare': ['azext_metadata.json']}, +)