From 5d053b2083c984aff443bc2d399939661eca6f02 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 12 Apr 2021 07:23:22 +0000 Subject: [PATCH] CodeGen from PR 13876 in Azure/azure-rest-api-specs Merge d39893819826e5e612d48e71dcae82b27b0ecc83 into 58f2489b1dc4752b6470d45e30ed1bd2469741f3 --- .../azure-mgmt-datashare/MANIFEST.in | 1 + sdk/datashare/azure-mgmt-datashare/_meta.json | 8 + .../_data_share_management_client.py | 2 +- .../azure/mgmt/datashare/models/__init__.py | 39 +- .../_data_share_management_client_enums.py | 73 +- .../azure/mgmt/datashare/models/_models.py | 456 +++++++++++-- .../mgmt/datashare/models/_models_py3.py | 464 +++++++++++-- .../mgmt/datashare/models/_paged_models.py | 40 +- .../operations/_accounts_operations.py | 146 ++-- .../_consumer_invitations_operations.py | 182 ++--- .../_consumer_source_data_sets_operations.py | 6 +- .../_data_set_mappings_operations.py | 14 +- .../operations/_data_sets_operations.py | 14 +- .../operations/_invitations_operations.py | 14 +- .../mgmt/datashare/operations/_operations.py | 4 +- ...provider_share_subscriptions_operations.py | 220 +++++-- .../_share_subscriptions_operations.py | 623 +++++++++--------- .../operations/_shares_operations.py | 364 +++++----- .../_synchronization_settings_operations.py | 6 +- .../operations/_triggers_operations.py | 4 +- 20 files changed, 1771 insertions(+), 909 deletions(-) create mode 100644 sdk/datashare/azure-mgmt-datashare/_meta.json diff --git a/sdk/datashare/azure-mgmt-datashare/MANIFEST.in b/sdk/datashare/azure-mgmt-datashare/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/datashare/azure-mgmt-datashare/MANIFEST.in +++ b/sdk/datashare/azure-mgmt-datashare/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/datashare/azure-mgmt-datashare/_meta.json b/sdk/datashare/azure-mgmt-datashare/_meta.json new file mode 100644 index 000000000000..dbc0bd852f7c --- /dev/null +++ b/sdk/datashare/azure-mgmt-datashare/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "0fe293f32576610e821d6428d05075c556855041", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/datashare/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/datashare/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py index 70b9adaed9bb..bbac2d1d6a11 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_data_share_management_client.py @@ -74,7 +74,7 @@ def __init__( super(DataShareManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2019-11-01' + self.api_version = '2020-09-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py index 3886fa1dba1b..3d9bb00da0bd 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/__init__.py @@ -60,9 +60,12 @@ from ._models_py3 import SqlDBTableDataSetMapping from ._models_py3 import SqlDWTableDataSet from ._models_py3 import SqlDWTableDataSetMapping + from ._models_py3 import SynapseWorkspaceSqlPoolTableDataSet + from ._models_py3 import SynapseWorkspaceSqlPoolTableDataSetMapping from ._models_py3 import SynchronizationDetails from ._models_py3 import SynchronizationSetting from ._models_py3 import Synchronize + from ._models_py3 import SystemData from ._models_py3 import Trigger except (SyntaxError, ImportError): from ._models import Account @@ -115,9 +118,12 @@ from ._models import SqlDBTableDataSetMapping from ._models import SqlDWTableDataSet from ._models import SqlDWTableDataSetMapping + from ._models import SynapseWorkspaceSqlPoolTableDataSet + from ._models import SynapseWorkspaceSqlPoolTableDataSetMapping from ._models import SynchronizationDetails from ._models import SynchronizationSetting from ._models import Synchronize + from ._models import SystemData from ._models import Trigger from ._paged_models import AccountPaged from ._paged_models import ConsumerInvitationPaged @@ -138,16 +144,18 @@ from ._data_share_management_client_enums import ( Type, ProvisioningState, - Status, + DataSetMappingStatus, + OutputType, InvitationStatus, - ShareKind, - SynchronizationMode, DataSetType, + Status, ShareSubscriptionStatus, + CreatedByType, + LastModifiedByType, RecurrenceInterval, + SynchronizationMode, TriggerStatus, - DataSetMappingStatus, - OutputType, + ShareKind, ) __all__ = [ @@ -201,9 +209,12 @@ 'SqlDBTableDataSetMapping', 'SqlDWTableDataSet', 'SqlDWTableDataSetMapping', + 'SynapseWorkspaceSqlPoolTableDataSet', + 'SynapseWorkspaceSqlPoolTableDataSetMapping', 'SynchronizationDetails', 'SynchronizationSetting', 'Synchronize', + 'SystemData', 'Trigger', 'AccountPaged', 'ConsumerInvitationPaged', @@ -211,26 +222,28 @@ 'DataSetMappingPaged', 'InvitationPaged', 'OperationModelPaged', - 'SharePaged', - 'ShareSynchronizationPaged', 'SynchronizationDetailsPaged', + 'ShareSynchronizationPaged', + 'SharePaged', 'ProviderShareSubscriptionPaged', - 'ShareSubscriptionPaged', 'SourceShareSynchronizationSettingPaged', 'ShareSubscriptionSynchronizationPaged', + 'ShareSubscriptionPaged', 'ConsumerSourceDataSetPaged', 'SynchronizationSettingPaged', 'TriggerPaged', 'Type', 'ProvisioningState', - 'Status', + 'DataSetMappingStatus', + 'OutputType', 'InvitationStatus', - 'ShareKind', - 'SynchronizationMode', 'DataSetType', + 'Status', 'ShareSubscriptionStatus', + 'CreatedByType', + 'LastModifiedByType', 'RecurrenceInterval', + 'SynchronizationMode', 'TriggerStatus', - 'DataSetMappingStatus', - 'OutputType', + 'ShareKind', ] diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py index 84d018a2e46b..288980ae97de 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_data_share_management_client_enums.py @@ -26,14 +26,16 @@ class ProvisioningState(str, Enum): failed = "Failed" -class Status(str, Enum): +class DataSetMappingStatus(str, Enum): - accepted = "Accepted" - in_progress = "InProgress" - transient_failure = "TransientFailure" - succeeded = "Succeeded" - failed = "Failed" - canceled = "Canceled" + ok = "Ok" + broken = "Broken" + + +class OutputType(str, Enum): + + csv = "Csv" + parquet = "Parquet" class InvitationStatus(str, Enum): @@ -44,18 +46,6 @@ class InvitationStatus(str, Enum): withdrawn = "Withdrawn" -class ShareKind(str, Enum): - - copy_based = "CopyBased" - in_place = "InPlace" - - -class SynchronizationMode(str, Enum): - - incremental = "Incremental" - full_sync = "FullSync" - - class DataSetType(str, Enum): blob = "Blob" @@ -70,6 +60,17 @@ class DataSetType(str, Enum): kusto_database = "KustoDatabase" sql_db_table = "SqlDBTable" sql_dw_table = "SqlDWTable" + synapse_workspace_sql_pool_table = "SynapseWorkspaceSqlPoolTable" + + +class Status(str, Enum): + + accepted = "Accepted" + in_progress = "InProgress" + transient_failure = "TransientFailure" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" class ShareSubscriptionStatus(str, Enum): @@ -80,12 +81,34 @@ class ShareSubscriptionStatus(str, Enum): revoking = "Revoking" +class CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class LastModifiedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + class RecurrenceInterval(str, Enum): hour = "Hour" day = "Day" +class SynchronizationMode(str, Enum): + + incremental = "Incremental" + full_sync = "FullSync" + + class TriggerStatus(str, Enum): active = "Active" @@ -93,13 +116,7 @@ class TriggerStatus(str, Enum): source_synchronization_setting_deleted = "SourceSynchronizationSettingDeleted" -class DataSetMappingStatus(str, Enum): - - ok = "Ok" - broken = "Broken" - - -class OutputType(str, Enum): +class ShareKind(str, Enum): - csv = "Csv" - parquet = "Parquet" + copy_based = "CopyBased" + in_place = "InPlace" diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py index b67c05eb25df..3af2593750c9 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models.py @@ -13,7 +13,45 @@ from msrest.exceptions import HttpOperationError -class DefaultDto(Model): +class ProxyDto(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 system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData + :ivar type: Type of the azure resource + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'system_data': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyDto, self).__init__(**kwargs) + self.id = None + self.name = None + self.system_data = None + self.type = None + + +class DefaultDto(ProxyDto): """Base data transfer object implementation for default resources. Variables are only populated by the server, and will be ignored when @@ -21,37 +59,38 @@ class DefaultDto(Model): :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: Tags on the azure resource. - :type tags: dict[str, str] + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str + :param location: Location of the azure resource. + :type location: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', '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): @@ -64,14 +103,16 @@ class Account(DefaultDto): :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: Tags on the azure resource. - :type tags: dict[str, str] + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str + :param location: Location of the azure resource. + :type location: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] :param identity: Required. Identity Info on the Account :type identity: ~azure.mgmt.datashare.models.Identity :ivar created_at: Time at which the account was created. @@ -89,6 +130,7 @@ class Account(DefaultDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'identity': {'required': True}, 'created_at': {'readonly': True}, @@ -99,10 +141,11 @@ class Account(DefaultDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -135,47 +178,15 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class ProxyDto(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: BlobDataSet, BlobFolderDataSet, BlobContainerDataSet, - ADLSGen2FileDataSet, ADLSGen2FolderDataSet, ADLSGen2FileSystemDataSet, - ADLSGen1FolderDataSet, ADLSGen1FileDataSet, KustoClusterDataSet, - KustoDatabaseDataSet, SqlDWTableDataSet, SqlDBTableDataSet + sub-classes are: ADLSGen1FileDataSet, ADLSGen1FolderDataSet, + ADLSGen2FileDataSet, ADLSGen2FileSystemDataSet, ADLSGen2FolderDataSet, + BlobContainerDataSet, BlobDataSet, BlobFolderDataSet, KustoClusterDataSet, + KustoDatabaseDataSet, SqlDBTableDataSet, SqlDWTableDataSet, + SynapseWorkspaceSqlPoolTableDataSet Variables are only populated by the server, and will be ignored when sending a request. @@ -186,6 +197,8 @@ class DataSet(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -195,6 +208,7 @@ class DataSet(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, } @@ -202,12 +216,13 @@ class DataSet(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } _subtype_map = { - 'kind': {'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'Container': 'BlobContainerDataSet', 'AdlsGen2File': 'ADLSGen2FileDataSet', 'AdlsGen2Folder': 'ADLSGen2FolderDataSet', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSet', 'AdlsGen1Folder': 'ADLSGen1FolderDataSet', 'AdlsGen1File': 'ADLSGen1FileDataSet', 'KustoCluster': 'KustoClusterDataSet', 'KustoDatabase': 'KustoDatabaseDataSet', 'SqlDWTable': 'SqlDWTableDataSet', 'SqlDBTable': 'SqlDBTableDataSet'} + 'kind': {'AdlsGen1File': 'ADLSGen1FileDataSet', 'AdlsGen1Folder': 'ADLSGen1FolderDataSet', 'AdlsGen2File': 'ADLSGen2FileDataSet', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSet', 'AdlsGen2Folder': 'ADLSGen2FolderDataSet', 'Container': 'BlobContainerDataSet', 'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'KustoCluster': 'KustoClusterDataSet', 'KustoDatabase': 'KustoDatabaseDataSet', 'SqlDBTable': 'SqlDBTableDataSet', 'SqlDWTable': 'SqlDWTableDataSet', 'SynapseWorkspaceSqlPoolTable': 'SynapseWorkspaceSqlPoolTableDataSet'} } def __init__(self, **kwargs): @@ -228,6 +243,8 @@ class ADLSGen1FileDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -249,6 +266,7 @@ class ADLSGen1FileDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'account_name': {'required': True}, @@ -262,6 +280,7 @@ class ADLSGen1FileDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'account_name': {'key': 'properties.accountName', 'type': 'str'}, @@ -295,6 +314,8 @@ class ADLSGen1FolderDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -314,6 +335,7 @@ class ADLSGen1FolderDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'account_name': {'required': True}, @@ -326,6 +348,7 @@ class ADLSGen1FolderDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'account_name': {'key': 'properties.accountName', 'type': 'str'}, @@ -357,6 +380,8 @@ class ADLSGen2FileDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -379,6 +404,7 @@ class ADLSGen2FileDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -392,6 +418,7 @@ class ADLSGen2FileDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -417,11 +444,12 @@ 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: BlobDataSetMapping, BlobFolderDataSetMapping, - BlobContainerDataSetMapping, ADLSGen2FileDataSetMapping, - ADLSGen2FolderDataSetMapping, ADLSGen2FileSystemDataSetMapping, + sub-classes are: ADLSGen2FileDataSetMapping, + ADLSGen2FileSystemDataSetMapping, ADLSGen2FolderDataSetMapping, + BlobContainerDataSetMapping, BlobDataSetMapping, BlobFolderDataSetMapping, KustoClusterDataSetMapping, KustoDatabaseDataSetMapping, - SqlDWTableDataSetMapping, SqlDBTableDataSetMapping + SqlDBTableDataSetMapping, SqlDWTableDataSetMapping, + SynapseWorkspaceSqlPoolTableDataSetMapping Variables are only populated by the server, and will be ignored when sending a request. @@ -432,6 +460,8 @@ class DataSetMapping(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -441,6 +471,7 @@ class DataSetMapping(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, } @@ -448,12 +479,13 @@ class DataSetMapping(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } _subtype_map = { - 'kind': {'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'AdlsGen2File': 'ADLSGen2FileDataSetMapping', 'AdlsGen2Folder': 'ADLSGen2FolderDataSetMapping', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSetMapping', 'KustoCluster': 'KustoClusterDataSetMapping', 'KustoDatabase': 'KustoDatabaseDataSetMapping', 'SqlDWTable': 'SqlDWTableDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping'} + 'kind': {'AdlsGen2File': 'ADLSGen2FileDataSetMapping', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSetMapping', 'AdlsGen2Folder': 'ADLSGen2FolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'KustoCluster': 'KustoClusterDataSetMapping', 'KustoDatabase': 'KustoDatabaseDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping', 'SqlDWTable': 'SqlDWTableDataSetMapping', 'SynapseWorkspaceSqlPoolTable': 'SynapseWorkspaceSqlPoolTableDataSetMapping'} } def __init__(self, **kwargs): @@ -474,6 +506,8 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -508,6 +542,7 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -523,6 +558,7 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -562,6 +598,8 @@ class ADLSGen2FileSystemDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -582,6 +620,7 @@ class ADLSGen2FileSystemDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -594,6 +633,7 @@ class ADLSGen2FileSystemDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -625,6 +665,8 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -654,6 +696,7 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -668,6 +711,7 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -703,6 +747,8 @@ class ADLSGen2FolderDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -725,6 +771,7 @@ class ADLSGen2FolderDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -738,6 +785,7 @@ class ADLSGen2FolderDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -771,6 +819,8 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -802,6 +852,7 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -817,6 +868,7 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -854,6 +906,8 @@ class BlobContainerDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -874,6 +928,7 @@ class BlobContainerDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -886,6 +941,7 @@ class BlobContainerDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -917,6 +973,8 @@ class BlobContainerDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -946,6 +1004,7 @@ class BlobContainerDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -960,6 +1019,7 @@ class BlobContainerDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -995,6 +1055,8 @@ class BlobDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1017,6 +1079,7 @@ class BlobDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -1030,6 +1093,7 @@ class BlobDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -1063,6 +1127,8 @@ class BlobDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1097,6 +1163,7 @@ class BlobDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -1112,6 +1179,7 @@ class BlobDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -1151,6 +1219,8 @@ class BlobFolderDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1173,6 +1243,7 @@ class BlobFolderDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -1186,6 +1257,7 @@ class BlobFolderDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -1219,6 +1291,8 @@ class BlobFolderDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1250,6 +1324,7 @@ class BlobFolderDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -1265,6 +1340,7 @@ class BlobFolderDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -1310,12 +1386,17 @@ class ConsumerInvitation(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :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 + :ivar expiration_date: The expiration date for the share subscription + created by accepting the invitation. + :vartype expiration_date: datetime :param invitation_id: Required. Unique id of the invitation. :type invitation_id: str :ivar invitation_status: The status of the invitation. Possible values @@ -1348,9 +1429,11 @@ class ConsumerInvitation(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'data_set_count': {'readonly': True}, 'description': {'readonly': True}, + 'expiration_date': {'readonly': True}, 'invitation_id': {'required': True}, 'invitation_status': {'readonly': True}, 'location': {'readonly': True}, @@ -1368,9 +1451,11 @@ class ConsumerInvitation(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'data_set_count': {'key': 'properties.dataSetCount', 'type': 'int'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, 'location': {'key': 'properties.location', 'type': 'str'}, @@ -1389,6 +1474,7 @@ def __init__(self, **kwargs): super(ConsumerInvitation, self).__init__(**kwargs) self.data_set_count = None self.description = None + self.expiration_date = None self.invitation_id = kwargs.get('invitation_id', None) self.invitation_status = None self.location = None @@ -1413,6 +1499,8 @@ class ConsumerSourceDataSet(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :ivar data_set_id: DataSet Id @@ -1426,13 +1514,15 @@ class ConsumerSourceDataSet(ProxyDto): :ivar data_set_type: Type of data set. Possible values include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', - 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' + 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'SynapseWorkspaceSqlPoolTable' :vartype data_set_type: str or ~azure.mgmt.datashare.models.DataSetType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'data_set_id': {'readonly': True}, 'data_set_location': {'readonly': True}, @@ -1444,6 +1534,7 @@ class ConsumerSourceDataSet(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_location': {'key': 'properties.dataSetLocation', 'type': 'str'}, @@ -1592,8 +1683,13 @@ class Invitation(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str + :param expiration_date: The expiration date for the invitation and share + subscription. + :type expiration_date: datetime :ivar invitation_id: unique invitation id :vartype invitation_id: str :ivar invitation_status: The status of the invitation. Possible values @@ -1623,6 +1719,7 @@ class Invitation(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'invitation_id': {'readonly': True}, 'invitation_status': {'readonly': True}, @@ -1635,7 +1732,9 @@ class Invitation(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, @@ -1649,6 +1748,7 @@ class Invitation(ProxyDto): def __init__(self, **kwargs): super(Invitation, self).__init__(**kwargs) + self.expiration_date = kwargs.get('expiration_date', None) self.invitation_id = None self.invitation_status = None self.responded_at = None @@ -1672,6 +1772,8 @@ class KustoClusterDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1693,6 +1795,7 @@ class KustoClusterDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -1704,6 +1807,7 @@ class KustoClusterDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -1733,6 +1837,8 @@ class KustoClusterDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1758,6 +1864,7 @@ class KustoClusterDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -1770,6 +1877,7 @@ class KustoClusterDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -1801,6 +1909,8 @@ class KustoDatabaseDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1822,6 +1932,7 @@ class KustoDatabaseDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -1833,6 +1944,7 @@ class KustoDatabaseDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -1862,6 +1974,8 @@ class KustoDatabaseDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1887,6 +2001,7 @@ class KustoDatabaseDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -1899,6 +2014,7 @@ class KustoDatabaseDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -1955,6 +2071,8 @@ class OperationMetaMetricSpecification(Model): :type display_name: str :param enable_regional_mdm_account: enable regional mdm account :type enable_regional_mdm_account: str + :param fill_gap_with_zero: fill gap with zero + :type fill_gap_with_zero: bool :param internal_metric_name: internal metric name :type internal_metric_name: str :param name: name of the metric @@ -1976,6 +2094,7 @@ class OperationMetaMetricSpecification(Model): 'display_description': {'key': 'displayDescription', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, @@ -1991,6 +2110,7 @@ def __init__(self, **kwargs): 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.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', 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) @@ -2124,6 +2244,8 @@ class ProviderShareSubscription(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :ivar consumer_email: Email of the consumer who created the share @@ -2137,6 +2259,9 @@ class ProviderShareSubscription(ProxyDto): :vartype consumer_tenant_name: str :ivar created_at: created at :vartype created_at: datetime + :param expiration_date: Expiration date of the share subscription in UTC + format + :type expiration_date: 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 @@ -2154,6 +2279,7 @@ class ProviderShareSubscription(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'consumer_email': {'readonly': True}, 'consumer_name': {'readonly': True}, @@ -2169,11 +2295,13 @@ class ProviderShareSubscription(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, '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'}, + 'expiration_date': {'key': 'properties.expirationDate', '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'}, @@ -2187,6 +2315,7 @@ def __init__(self, **kwargs): self.consumer_name = None self.consumer_tenant_name = None self.created_at = None + self.expiration_date = kwargs.get('expiration_date', None) self.provider_email = None self.provider_name = None self.shared_at = None @@ -2270,6 +2399,8 @@ class SynchronizationSetting(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2279,6 +2410,7 @@ class SynchronizationSetting(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, } @@ -2286,6 +2418,7 @@ class SynchronizationSetting(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -2312,6 +2445,8 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2335,6 +2470,7 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'created_at': {'readonly': True}, @@ -2347,6 +2483,7 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, @@ -2381,6 +2518,8 @@ class Trigger(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2390,6 +2529,7 @@ class Trigger(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, } @@ -2397,6 +2537,7 @@ class Trigger(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -2423,6 +2564,8 @@ class ScheduledTrigger(Trigger): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2453,6 +2596,7 @@ class ScheduledTrigger(Trigger): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'created_at': {'readonly': True}, @@ -2466,6 +2610,7 @@ class ScheduledTrigger(Trigger): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, @@ -2499,6 +2644,8 @@ class Share(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :ivar created_at: Time at which the share was created. @@ -2523,6 +2670,7 @@ class Share(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, 'provisioning_state': {'readonly': True}, @@ -2533,6 +2681,7 @@ class Share(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'description': {'key': 'properties.description', 'type': 'str'}, @@ -2566,10 +2715,14 @@ class ShareSubscription(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :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 + :param expiration_date: The expiration date of the share subscription. + :type expiration_date: datetime :param invitation_id: Required. The invitation id. :type invitation_id: str :ivar provider_email: Email of the provider who created the resource @@ -2609,6 +2762,7 @@ class ShareSubscription(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, 'invitation_id': {'required': True}, @@ -2629,8 +2783,10 @@ class ShareSubscription(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, @@ -2649,6 +2805,7 @@ class ShareSubscription(ProxyDto): def __init__(self, **kwargs): super(ShareSubscription, self).__init__(**kwargs) self.created_at = None + self.expiration_date = kwargs.get('expiration_date', None) self.invitation_id = kwargs.get('invitation_id', None) self.provider_email = None self.provider_name = None @@ -2795,6 +2952,8 @@ class SqlDBTableDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2814,6 +2973,7 @@ class SqlDBTableDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'database_name': {'required': True}, @@ -2826,6 +2986,7 @@ class SqlDBTableDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, @@ -2857,6 +3018,8 @@ class SqlDBTableDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2885,6 +3048,7 @@ class SqlDBTableDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'database_name': {'required': True}, @@ -2899,6 +3063,7 @@ class SqlDBTableDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, @@ -2934,6 +3099,8 @@ class SqlDWTableDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2954,6 +3121,7 @@ class SqlDWTableDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -2966,6 +3134,7 @@ class SqlDWTableDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -2997,6 +3166,8 @@ class SqlDWTableDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -3026,6 +3197,7 @@ class SqlDWTableDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -3040,6 +3212,7 @@ class SqlDWTableDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -3063,6 +3236,125 @@ def __init__(self, **kwargs): self.kind = 'SqlDWTable' +class SynapseWorkspaceSqlPoolTableDataSet(DataSet): + """A Synapse Workspace Sql Pool 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 system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar data_set_id: Unique id for identifying a data set resource + :vartype data_set_id: str + :param synapse_workspace_sql_pool_table_resource_id: Required. Resource id + of the Synapse Workspace SQL Pool Table + :type synapse_workspace_sql_pool_table_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'system_data': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'synapse_workspace_sql_pool_table_resource_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'synapse_workspace_sql_pool_table_resource_id': {'key': 'properties.synapseWorkspaceSqlPoolTableResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SynapseWorkspaceSqlPoolTableDataSet, self).__init__(**kwargs) + self.data_set_id = None + self.synapse_workspace_sql_pool_table_resource_id = kwargs.get('synapse_workspace_sql_pool_table_resource_id', None) + self.kind = 'SynapseWorkspaceSqlPoolTable' + + +class SynapseWorkspaceSqlPoolTableDataSetMapping(DataSetMapping): + """A Synapse Workspace Sql Pool 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 system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: 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 + ~azure.mgmt.datashare.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 + ~azure.mgmt.datashare.models.ProvisioningState + :param synapse_workspace_sql_pool_table_resource_id: Required. Resource id + of the Synapse Workspace SQL Pool Table + :type synapse_workspace_sql_pool_table_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'system_data': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'synapse_workspace_sql_pool_table_resource_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'synapse_workspace_sql_pool_table_resource_id': {'key': 'properties.synapseWorkspaceSqlPoolTableResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SynapseWorkspaceSqlPoolTableDataSetMapping, self).__init__(**kwargs) + self.data_set_id = kwargs.get('data_set_id', None) + self.data_set_mapping_status = None + self.provisioning_state = None + self.synapse_workspace_sql_pool_table_resource_id = kwargs.get('synapse_workspace_sql_pool_table_resource_id', None) + self.kind = 'SynapseWorkspaceSqlPoolTable' + + class SynchronizationDetails(Model): """Synchronization details at data set level. @@ -3074,7 +3366,8 @@ class SynchronizationDetails(Model): :ivar data_set_type: Type of the data set. Possible values include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', - 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' + 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'SynapseWorkspaceSqlPoolTable' :vartype data_set_type: str or ~azure.mgmt.datashare.models.DataSetType :ivar duration_ms: Duration of data set level copy :vartype duration_ms: int @@ -3178,3 +3471,44 @@ class Synchronize(Model): def __init__(self, **kwargs): super(Synchronize, self).__init__(**kwargs) self.synchronization_mode = kwargs.get('synchronization_mode', None) + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.datashare.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.datashare.models.LastModifiedByType + """ + + _attribute_map = { + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_at = kwargs.get('created_at', None) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py index 91cd2c4d872c..7d02015cabe5 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_models_py3.py @@ -13,7 +13,45 @@ from msrest.exceptions import HttpOperationError -class DefaultDto(Model): +class ProxyDto(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 system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData + :ivar type: Type of the azure resource + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'system_data': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyDto, self).__init__(**kwargs) + self.id = None + self.name = None + self.system_data = None + self.type = None + + +class DefaultDto(ProxyDto): """Base data transfer object implementation for default resources. Variables are only populated by the server, and will be ignored when @@ -21,37 +59,38 @@ class DefaultDto(Model): :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: Tags on the azure resource. - :type tags: dict[str, str] + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str + :param location: Location of the azure resource. + :type location: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'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}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: super(DefaultDto, self).__init__(**kwargs) - self.id = None self.location = location - self.name = None self.tags = tags - self.type = None class Account(DefaultDto): @@ -64,14 +103,16 @@ class Account(DefaultDto): :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: Tags on the azure resource. - :type tags: dict[str, str] + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str + :param location: Location of the azure resource. + :type location: str + :param tags: Tags on the azure resource. + :type tags: dict[str, str] :param identity: Required. Identity Info on the Account :type identity: ~azure.mgmt.datashare.models.Identity :ivar created_at: Time at which the account was created. @@ -89,6 +130,7 @@ class Account(DefaultDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'identity': {'required': True}, 'created_at': {'readonly': True}, @@ -99,10 +141,11 @@ class Account(DefaultDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'Identity'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -135,47 +178,15 @@ def __init__(self, *, tags=None, **kwargs) -> None: self.tags = tags -class ProxyDto(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) -> None: - 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: BlobDataSet, BlobFolderDataSet, BlobContainerDataSet, - ADLSGen2FileDataSet, ADLSGen2FolderDataSet, ADLSGen2FileSystemDataSet, - ADLSGen1FolderDataSet, ADLSGen1FileDataSet, KustoClusterDataSet, - KustoDatabaseDataSet, SqlDWTableDataSet, SqlDBTableDataSet + sub-classes are: ADLSGen1FileDataSet, ADLSGen1FolderDataSet, + ADLSGen2FileDataSet, ADLSGen2FileSystemDataSet, ADLSGen2FolderDataSet, + BlobContainerDataSet, BlobDataSet, BlobFolderDataSet, KustoClusterDataSet, + KustoDatabaseDataSet, SqlDBTableDataSet, SqlDWTableDataSet, + SynapseWorkspaceSqlPoolTableDataSet Variables are only populated by the server, and will be ignored when sending a request. @@ -186,6 +197,8 @@ class DataSet(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -195,6 +208,7 @@ class DataSet(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, } @@ -202,12 +216,13 @@ class DataSet(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } _subtype_map = { - 'kind': {'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'Container': 'BlobContainerDataSet', 'AdlsGen2File': 'ADLSGen2FileDataSet', 'AdlsGen2Folder': 'ADLSGen2FolderDataSet', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSet', 'AdlsGen1Folder': 'ADLSGen1FolderDataSet', 'AdlsGen1File': 'ADLSGen1FileDataSet', 'KustoCluster': 'KustoClusterDataSet', 'KustoDatabase': 'KustoDatabaseDataSet', 'SqlDWTable': 'SqlDWTableDataSet', 'SqlDBTable': 'SqlDBTableDataSet'} + 'kind': {'AdlsGen1File': 'ADLSGen1FileDataSet', 'AdlsGen1Folder': 'ADLSGen1FolderDataSet', 'AdlsGen2File': 'ADLSGen2FileDataSet', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSet', 'AdlsGen2Folder': 'ADLSGen2FolderDataSet', 'Container': 'BlobContainerDataSet', 'Blob': 'BlobDataSet', 'BlobFolder': 'BlobFolderDataSet', 'KustoCluster': 'KustoClusterDataSet', 'KustoDatabase': 'KustoDatabaseDataSet', 'SqlDBTable': 'SqlDBTableDataSet', 'SqlDWTable': 'SqlDWTableDataSet', 'SynapseWorkspaceSqlPoolTable': 'SynapseWorkspaceSqlPoolTableDataSet'} } def __init__(self, **kwargs) -> None: @@ -228,6 +243,8 @@ class ADLSGen1FileDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -249,6 +266,7 @@ class ADLSGen1FileDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'account_name': {'required': True}, @@ -262,6 +280,7 @@ class ADLSGen1FileDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'account_name': {'key': 'properties.accountName', 'type': 'str'}, @@ -295,6 +314,8 @@ class ADLSGen1FolderDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -314,6 +335,7 @@ class ADLSGen1FolderDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'account_name': {'required': True}, @@ -326,6 +348,7 @@ class ADLSGen1FolderDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'account_name': {'key': 'properties.accountName', 'type': 'str'}, @@ -357,6 +380,8 @@ class ADLSGen2FileDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -379,6 +404,7 @@ class ADLSGen2FileDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -392,6 +418,7 @@ class ADLSGen2FileDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -417,11 +444,12 @@ 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: BlobDataSetMapping, BlobFolderDataSetMapping, - BlobContainerDataSetMapping, ADLSGen2FileDataSetMapping, - ADLSGen2FolderDataSetMapping, ADLSGen2FileSystemDataSetMapping, + sub-classes are: ADLSGen2FileDataSetMapping, + ADLSGen2FileSystemDataSetMapping, ADLSGen2FolderDataSetMapping, + BlobContainerDataSetMapping, BlobDataSetMapping, BlobFolderDataSetMapping, KustoClusterDataSetMapping, KustoDatabaseDataSetMapping, - SqlDWTableDataSetMapping, SqlDBTableDataSetMapping + SqlDBTableDataSetMapping, SqlDWTableDataSetMapping, + SynapseWorkspaceSqlPoolTableDataSetMapping Variables are only populated by the server, and will be ignored when sending a request. @@ -432,6 +460,8 @@ class DataSetMapping(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -441,6 +471,7 @@ class DataSetMapping(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, } @@ -448,12 +479,13 @@ class DataSetMapping(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } _subtype_map = { - 'kind': {'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'AdlsGen2File': 'ADLSGen2FileDataSetMapping', 'AdlsGen2Folder': 'ADLSGen2FolderDataSetMapping', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSetMapping', 'KustoCluster': 'KustoClusterDataSetMapping', 'KustoDatabase': 'KustoDatabaseDataSetMapping', 'SqlDWTable': 'SqlDWTableDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping'} + 'kind': {'AdlsGen2File': 'ADLSGen2FileDataSetMapping', 'AdlsGen2FileSystem': 'ADLSGen2FileSystemDataSetMapping', 'AdlsGen2Folder': 'ADLSGen2FolderDataSetMapping', 'Container': 'BlobContainerDataSetMapping', 'Blob': 'BlobDataSetMapping', 'BlobFolder': 'BlobFolderDataSetMapping', 'KustoCluster': 'KustoClusterDataSetMapping', 'KustoDatabase': 'KustoDatabaseDataSetMapping', 'SqlDBTable': 'SqlDBTableDataSetMapping', 'SqlDWTable': 'SqlDWTableDataSetMapping', 'SynapseWorkspaceSqlPoolTable': 'SynapseWorkspaceSqlPoolTableDataSetMapping'} } def __init__(self, **kwargs) -> None: @@ -474,6 +506,8 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -508,6 +542,7 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -523,6 +558,7 @@ class ADLSGen2FileDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -562,6 +598,8 @@ class ADLSGen2FileSystemDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -582,6 +620,7 @@ class ADLSGen2FileSystemDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -594,6 +633,7 @@ class ADLSGen2FileSystemDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -625,6 +665,8 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -654,6 +696,7 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -668,6 +711,7 @@ class ADLSGen2FileSystemDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -703,6 +747,8 @@ class ADLSGen2FolderDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -725,6 +771,7 @@ class ADLSGen2FolderDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -738,6 +785,7 @@ class ADLSGen2FolderDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -771,6 +819,8 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -802,6 +852,7 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -817,6 +868,7 @@ class ADLSGen2FolderDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -854,6 +906,8 @@ class BlobContainerDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -874,6 +928,7 @@ class BlobContainerDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -886,6 +941,7 @@ class BlobContainerDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -917,6 +973,8 @@ class BlobContainerDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -946,6 +1004,7 @@ class BlobContainerDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -960,6 +1019,7 @@ class BlobContainerDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -995,6 +1055,8 @@ class BlobDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1017,6 +1079,7 @@ class BlobDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -1030,6 +1093,7 @@ class BlobDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -1063,6 +1127,8 @@ class BlobDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1097,6 +1163,7 @@ class BlobDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -1112,6 +1179,7 @@ class BlobDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -1151,6 +1219,8 @@ class BlobFolderDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1173,6 +1243,7 @@ class BlobFolderDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -1186,6 +1257,7 @@ class BlobFolderDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -1219,6 +1291,8 @@ class BlobFolderDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1250,6 +1324,7 @@ class BlobFolderDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'container_name': {'required': True}, @@ -1265,6 +1340,7 @@ class BlobFolderDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'container_name': {'key': 'properties.containerName', 'type': 'str'}, @@ -1310,12 +1386,17 @@ class ConsumerInvitation(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :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 + :ivar expiration_date: The expiration date for the share subscription + created by accepting the invitation. + :vartype expiration_date: datetime :param invitation_id: Required. Unique id of the invitation. :type invitation_id: str :ivar invitation_status: The status of the invitation. Possible values @@ -1348,9 +1429,11 @@ class ConsumerInvitation(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'data_set_count': {'readonly': True}, 'description': {'readonly': True}, + 'expiration_date': {'readonly': True}, 'invitation_id': {'required': True}, 'invitation_status': {'readonly': True}, 'location': {'readonly': True}, @@ -1368,9 +1451,11 @@ class ConsumerInvitation(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'data_set_count': {'key': 'properties.dataSetCount', 'type': 'int'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, 'location': {'key': 'properties.location', 'type': 'str'}, @@ -1389,6 +1474,7 @@ def __init__(self, *, invitation_id: str, **kwargs) -> None: super(ConsumerInvitation, self).__init__(**kwargs) self.data_set_count = None self.description = None + self.expiration_date = None self.invitation_id = invitation_id self.invitation_status = None self.location = None @@ -1413,6 +1499,8 @@ class ConsumerSourceDataSet(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :ivar data_set_id: DataSet Id @@ -1426,13 +1514,15 @@ class ConsumerSourceDataSet(ProxyDto): :ivar data_set_type: Type of data set. Possible values include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', - 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' + 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'SynapseWorkspaceSqlPoolTable' :vartype data_set_type: str or ~azure.mgmt.datashare.models.DataSetType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'data_set_id': {'readonly': True}, 'data_set_location': {'readonly': True}, @@ -1444,6 +1534,7 @@ class ConsumerSourceDataSet(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, 'data_set_location': {'key': 'properties.dataSetLocation', 'type': 'str'}, @@ -1592,8 +1683,13 @@ class Invitation(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str + :param expiration_date: The expiration date for the invitation and share + subscription. + :type expiration_date: datetime :ivar invitation_id: unique invitation id :vartype invitation_id: str :ivar invitation_status: The status of the invitation. Possible values @@ -1623,6 +1719,7 @@ class Invitation(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'invitation_id': {'readonly': True}, 'invitation_status': {'readonly': True}, @@ -1635,7 +1732,9 @@ class Invitation(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'invitation_status': {'key': 'properties.invitationStatus', 'type': 'str'}, 'responded_at': {'key': 'properties.respondedAt', 'type': 'iso-8601'}, @@ -1647,8 +1746,9 @@ class Invitation(ProxyDto): 'user_name': {'key': 'properties.userName', 'type': 'str'}, } - def __init__(self, *, target_active_directory_id: str=None, target_email: str=None, target_object_id: str=None, **kwargs) -> None: + def __init__(self, *, expiration_date=None, target_active_directory_id: str=None, target_email: str=None, target_object_id: str=None, **kwargs) -> None: super(Invitation, self).__init__(**kwargs) + self.expiration_date = expiration_date self.invitation_id = None self.invitation_status = None self.responded_at = None @@ -1672,6 +1772,8 @@ class KustoClusterDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1693,6 +1795,7 @@ class KustoClusterDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -1704,6 +1807,7 @@ class KustoClusterDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -1733,6 +1837,8 @@ class KustoClusterDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1758,6 +1864,7 @@ class KustoClusterDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -1770,6 +1877,7 @@ class KustoClusterDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -1801,6 +1909,8 @@ class KustoDatabaseDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1822,6 +1932,7 @@ class KustoDatabaseDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -1833,6 +1944,7 @@ class KustoDatabaseDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -1862,6 +1974,8 @@ class KustoDatabaseDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -1887,6 +2001,7 @@ class KustoDatabaseDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -1899,6 +2014,7 @@ class KustoDatabaseDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -1955,6 +2071,8 @@ class OperationMetaMetricSpecification(Model): :type display_name: str :param enable_regional_mdm_account: enable regional mdm account :type enable_regional_mdm_account: str + :param fill_gap_with_zero: fill gap with zero + :type fill_gap_with_zero: bool :param internal_metric_name: internal metric name :type internal_metric_name: str :param name: name of the metric @@ -1976,6 +2094,7 @@ class OperationMetaMetricSpecification(Model): 'display_description': {'key': 'displayDescription', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, @@ -1984,13 +2103,14 @@ class OperationMetaMetricSpecification(Model): 'unit': {'key': 'unit', 'type': 'str'}, } - def __init__(self, *, aggregation_type: str=None, dimensions=None, display_description: str=None, display_name: str=None, enable_regional_mdm_account: str=None, internal_metric_name: str=None, name: str=None, resource_id_dimension_name_override: str=None, supported_aggregation_types=None, supported_time_grain_types=None, unit: str=None, **kwargs) -> None: + def __init__(self, *, aggregation_type: str=None, dimensions=None, display_description: str=None, display_name: str=None, enable_regional_mdm_account: str=None, fill_gap_with_zero: bool=None, internal_metric_name: str=None, name: str=None, resource_id_dimension_name_override: str=None, supported_aggregation_types=None, supported_time_grain_types=None, unit: str=None, **kwargs) -> None: 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.fill_gap_with_zero = fill_gap_with_zero self.internal_metric_name = internal_metric_name self.name = name self.resource_id_dimension_name_override = resource_id_dimension_name_override @@ -2124,6 +2244,8 @@ class ProviderShareSubscription(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :ivar consumer_email: Email of the consumer who created the share @@ -2137,6 +2259,9 @@ class ProviderShareSubscription(ProxyDto): :vartype consumer_tenant_name: str :ivar created_at: created at :vartype created_at: datetime + :param expiration_date: Expiration date of the share subscription in UTC + format + :type expiration_date: 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 @@ -2154,6 +2279,7 @@ class ProviderShareSubscription(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'consumer_email': {'readonly': True}, 'consumer_name': {'readonly': True}, @@ -2169,11 +2295,13 @@ class ProviderShareSubscription(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, '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'}, + 'expiration_date': {'key': 'properties.expirationDate', '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'}, @@ -2181,12 +2309,13 @@ class ProviderShareSubscription(ProxyDto): 'share_subscription_status': {'key': 'properties.shareSubscriptionStatus', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, expiration_date=None, **kwargs) -> None: super(ProviderShareSubscription, self).__init__(**kwargs) self.consumer_email = None self.consumer_name = None self.consumer_tenant_name = None self.created_at = None + self.expiration_date = expiration_date self.provider_email = None self.provider_name = None self.shared_at = None @@ -2270,6 +2399,8 @@ class SynchronizationSetting(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2279,6 +2410,7 @@ class SynchronizationSetting(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, } @@ -2286,6 +2418,7 @@ class SynchronizationSetting(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -2312,6 +2445,8 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2335,6 +2470,7 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'created_at': {'readonly': True}, @@ -2347,6 +2483,7 @@ class ScheduledSynchronizationSetting(SynchronizationSetting): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, @@ -2381,6 +2518,8 @@ class Trigger(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2390,6 +2529,7 @@ class Trigger(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, } @@ -2397,6 +2537,7 @@ class Trigger(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, } @@ -2423,6 +2564,8 @@ class ScheduledTrigger(Trigger): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2453,6 +2596,7 @@ class ScheduledTrigger(Trigger): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'created_at': {'readonly': True}, @@ -2466,6 +2610,7 @@ class ScheduledTrigger(Trigger): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, @@ -2499,6 +2644,8 @@ class Share(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :ivar created_at: Time at which the share was created. @@ -2523,6 +2670,7 @@ class Share(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, 'provisioning_state': {'readonly': True}, @@ -2533,6 +2681,7 @@ class Share(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, 'description': {'key': 'properties.description', 'type': 'str'}, @@ -2566,10 +2715,14 @@ class ShareSubscription(ProxyDto): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :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 + :param expiration_date: The expiration date of the share subscription. + :type expiration_date: datetime :param invitation_id: Required. The invitation id. :type invitation_id: str :ivar provider_email: Email of the provider who created the resource @@ -2609,6 +2762,7 @@ class ShareSubscription(ProxyDto): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'created_at': {'readonly': True}, 'invitation_id': {'required': True}, @@ -2629,8 +2783,10 @@ class ShareSubscription(ProxyDto): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'expiration_date': {'key': 'properties.expirationDate', 'type': 'iso-8601'}, 'invitation_id': {'key': 'properties.invitationId', 'type': 'str'}, 'provider_email': {'key': 'properties.providerEmail', 'type': 'str'}, 'provider_name': {'key': 'properties.providerName', 'type': 'str'}, @@ -2646,9 +2802,10 @@ class ShareSubscription(ProxyDto): 'user_name': {'key': 'properties.userName', 'type': 'str'}, } - def __init__(self, *, invitation_id: str, source_share_location: str, **kwargs) -> None: + def __init__(self, *, invitation_id: str, source_share_location: str, expiration_date=None, **kwargs) -> None: super(ShareSubscription, self).__init__(**kwargs) self.created_at = None + self.expiration_date = expiration_date self.invitation_id = invitation_id self.provider_email = None self.provider_name = None @@ -2795,6 +2952,8 @@ class SqlDBTableDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2814,6 +2973,7 @@ class SqlDBTableDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'database_name': {'required': True}, @@ -2826,6 +2986,7 @@ class SqlDBTableDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, @@ -2857,6 +3018,8 @@ class SqlDBTableDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2885,6 +3048,7 @@ class SqlDBTableDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'database_name': {'required': True}, @@ -2899,6 +3063,7 @@ class SqlDBTableDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, @@ -2934,6 +3099,8 @@ class SqlDWTableDataSet(DataSet): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -2954,6 +3121,7 @@ class SqlDWTableDataSet(DataSet): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'readonly': True}, @@ -2966,6 +3134,7 @@ class SqlDWTableDataSet(DataSet): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -2997,6 +3166,8 @@ class SqlDWTableDataSetMapping(DataSetMapping): :vartype id: str :ivar name: Name of the azure resource :vartype name: str + :ivar system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData :ivar type: Type of the azure resource :vartype type: str :param kind: Required. Constant filled by server. @@ -3026,6 +3197,7 @@ class SqlDWTableDataSetMapping(DataSetMapping): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, + 'system_data': {'readonly': True}, 'type': {'readonly': True}, 'kind': {'required': True}, 'data_set_id': {'required': True}, @@ -3040,6 +3212,7 @@ class SqlDWTableDataSetMapping(DataSetMapping): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type': {'key': 'type', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, @@ -3063,6 +3236,125 @@ def __init__(self, *, data_set_id: str, data_warehouse_name: str, schema_name: s self.kind = 'SqlDWTable' +class SynapseWorkspaceSqlPoolTableDataSet(DataSet): + """A Synapse Workspace Sql Pool 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 system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: str + :ivar data_set_id: Unique id for identifying a data set resource + :vartype data_set_id: str + :param synapse_workspace_sql_pool_table_resource_id: Required. Resource id + of the Synapse Workspace SQL Pool Table + :type synapse_workspace_sql_pool_table_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'system_data': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'readonly': True}, + 'synapse_workspace_sql_pool_table_resource_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'data_set_id': {'key': 'properties.dataSetId', 'type': 'str'}, + 'synapse_workspace_sql_pool_table_resource_id': {'key': 'properties.synapseWorkspaceSqlPoolTableResourceId', 'type': 'str'}, + } + + def __init__(self, *, synapse_workspace_sql_pool_table_resource_id: str, **kwargs) -> None: + super(SynapseWorkspaceSqlPoolTableDataSet, self).__init__(**kwargs) + self.data_set_id = None + self.synapse_workspace_sql_pool_table_resource_id = synapse_workspace_sql_pool_table_resource_id + self.kind = 'SynapseWorkspaceSqlPoolTable' + + +class SynapseWorkspaceSqlPoolTableDataSetMapping(DataSetMapping): + """A Synapse Workspace Sql Pool 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 system_data: System Data of the Azure resource. + :vartype system_data: ~azure.mgmt.datashare.models.SystemData + :ivar type: Type of the azure resource + :vartype type: str + :param kind: Required. Constant filled by server. + :type kind: 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 + ~azure.mgmt.datashare.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 + ~azure.mgmt.datashare.models.ProvisioningState + :param synapse_workspace_sql_pool_table_resource_id: Required. Resource id + of the Synapse Workspace SQL Pool Table + :type synapse_workspace_sql_pool_table_resource_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'system_data': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'required': True}, + 'data_set_id': {'required': True}, + 'data_set_mapping_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'synapse_workspace_sql_pool_table_resource_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + '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'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'synapse_workspace_sql_pool_table_resource_id': {'key': 'properties.synapseWorkspaceSqlPoolTableResourceId', 'type': 'str'}, + } + + def __init__(self, *, data_set_id: str, synapse_workspace_sql_pool_table_resource_id: str, **kwargs) -> None: + super(SynapseWorkspaceSqlPoolTableDataSetMapping, self).__init__(**kwargs) + self.data_set_id = data_set_id + self.data_set_mapping_status = None + self.provisioning_state = None + self.synapse_workspace_sql_pool_table_resource_id = synapse_workspace_sql_pool_table_resource_id + self.kind = 'SynapseWorkspaceSqlPoolTable' + + class SynchronizationDetails(Model): """Synchronization details at data set level. @@ -3074,7 +3366,8 @@ class SynchronizationDetails(Model): :ivar data_set_type: Type of the data set. Possible values include: 'Blob', 'Container', 'BlobFolder', 'AdlsGen2FileSystem', 'AdlsGen2Folder', 'AdlsGen2File', 'AdlsGen1Folder', 'AdlsGen1File', 'KustoCluster', - 'KustoDatabase', 'SqlDBTable', 'SqlDWTable' + 'KustoDatabase', 'SqlDBTable', 'SqlDWTable', + 'SynapseWorkspaceSqlPoolTable' :vartype data_set_type: str or ~azure.mgmt.datashare.models.DataSetType :ivar duration_ms: Duration of data set level copy :vartype duration_ms: int @@ -3178,3 +3471,44 @@ class Synchronize(Model): def __init__(self, *, synchronization_mode=None, **kwargs) -> None: super(Synchronize, self).__init__(**kwargs) self.synchronization_mode = synchronization_mode + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or ~azure.mgmt.datashare.models.CreatedByType + :param last_modified_at: The type of identity that last modified the + resource. + :type last_modified_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.datashare.models.LastModifiedByType + """ + + _attribute_map = { + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + } + + def __init__(self, *, created_at=None, created_by: str=None, created_by_type=None, last_modified_at=None, last_modified_by: str=None, last_modified_by_type=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_at = created_at + self.created_by = created_by + self.created_by_type = created_by_type + self.last_modified_at = last_modified_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py index ade4b8a64811..1238d5d91882 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/models/_paged_models.py @@ -90,19 +90,19 @@ class OperationModelPaged(Paged): def __init__(self, *args, **kwargs): super(OperationModelPaged, self).__init__(*args, **kwargs) -class SharePaged(Paged): +class SynchronizationDetailsPaged(Paged): """ - A paging container for iterating over a list of :class:`Share ` object + A paging container for iterating over a list of :class:`SynchronizationDetails ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Share]'} + 'current_page': {'key': 'value', 'type': '[SynchronizationDetails]'} } def __init__(self, *args, **kwargs): - super(SharePaged, self).__init__(*args, **kwargs) + super(SynchronizationDetailsPaged, self).__init__(*args, **kwargs) class ShareSynchronizationPaged(Paged): """ A paging container for iterating over a list of :class:`ShareSynchronization ` object @@ -116,19 +116,19 @@ class ShareSynchronizationPaged(Paged): def __init__(self, *args, **kwargs): super(ShareSynchronizationPaged, self).__init__(*args, **kwargs) -class SynchronizationDetailsPaged(Paged): +class SharePaged(Paged): """ - A paging container for iterating over a list of :class:`SynchronizationDetails ` object + A paging container for iterating over a list of :class:`Share ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SynchronizationDetails]'} + 'current_page': {'key': 'value', 'type': '[Share]'} } def __init__(self, *args, **kwargs): - super(SynchronizationDetailsPaged, self).__init__(*args, **kwargs) + super(SharePaged, self).__init__(*args, **kwargs) class ProviderShareSubscriptionPaged(Paged): """ A paging container for iterating over a list of :class:`ProviderShareSubscription ` object @@ -142,45 +142,45 @@ class ProviderShareSubscriptionPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderShareSubscriptionPaged, self).__init__(*args, **kwargs) -class ShareSubscriptionPaged(Paged): +class SourceShareSynchronizationSettingPaged(Paged): """ - A paging container for iterating over a list of :class:`ShareSubscription ` object + A paging container for iterating over a list of :class:`SourceShareSynchronizationSetting ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ShareSubscription]'} + 'current_page': {'key': 'value', 'type': '[SourceShareSynchronizationSetting]'} } def __init__(self, *args, **kwargs): - super(ShareSubscriptionPaged, self).__init__(*args, **kwargs) -class SourceShareSynchronizationSettingPaged(Paged): + super(SourceShareSynchronizationSettingPaged, self).__init__(*args, **kwargs) +class ShareSubscriptionSynchronizationPaged(Paged): """ - A paging container for iterating over a list of :class:`SourceShareSynchronizationSetting ` object + A paging container for iterating over a list of :class:`ShareSubscriptionSynchronization ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SourceShareSynchronizationSetting]'} + 'current_page': {'key': 'value', 'type': '[ShareSubscriptionSynchronization]'} } def __init__(self, *args, **kwargs): - super(SourceShareSynchronizationSettingPaged, self).__init__(*args, **kwargs) -class ShareSubscriptionSynchronizationPaged(Paged): + super(ShareSubscriptionSynchronizationPaged, self).__init__(*args, **kwargs) +class ShareSubscriptionPaged(Paged): """ - A paging container for iterating over a list of :class:`ShareSubscriptionSynchronization ` object + A paging container for iterating over a list of :class:`ShareSubscription ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ShareSubscriptionSynchronization]'} + 'current_page': {'key': 'value', 'type': '[ShareSubscription]'} } def __init__(self, *args, **kwargs): - super(ShareSubscriptionSynchronizationPaged, self).__init__(*args, **kwargs) + super(ShareSubscriptionPaged, self).__init__(*args, **kwargs) class ConsumerSourceDataSetPaged(Paged): """ A paging container for iterating over a list of :class:`ConsumerSourceDataSet ` object diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py index 247999b1aad7..1cd222dc6dd2 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_accounts_operations.py @@ -26,7 +26,7 @@ class AccountsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -36,10 +36,81 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config + def list_by_subscription( + self, skip_token=None, custom_headers=None, raw=False, **operation_config): + """List Accounts in a subscription. + + List Accounts in Subscription. + + :param skip_token: Continuation token + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Account + :rtype: + ~azure.mgmt.datashare.models.AccountPaged[~azure.mgmt.datashare.models.Account] + :raises: + :class:`DataShareErrorException` + """ + 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) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.AccountPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts'} + def get( self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): """Get an account under a resource group. @@ -369,77 +440,6 @@ def update( return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}'} - def list_by_subscription( - self, skip_token=None, custom_headers=None, raw=False, **operation_config): - """List Accounts in a subscription. - - List Accounts in Subscription. - - :param skip_token: Continuation token - :type skip_token: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Account - :rtype: - ~azure.mgmt.datashare.models.AccountPaged[~azure.mgmt.datashare.models.Account] - :raises: - :class:`DataShareErrorException` - """ - 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) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.AccountPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataShare/accounts'} - def list_by_resource_group( self, resource_group_name, skip_token=None, custom_headers=None, raw=False, **operation_config): """List Accounts in a resource group. diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_invitations_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_invitations_operations.py index babbd197d2b7..1e65937c5c75 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_invitations_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_invitations_operations.py @@ -24,7 +24,7 @@ class ConsumerInvitationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -34,75 +34,76 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config - def reject_invitation( - self, location, invitation_id, custom_headers=None, raw=False, **operation_config): - """Rejects the invitation identified by invitationId. + def list_invitations( + self, skip_token=None, custom_headers=None, raw=False, **operation_config): + """List the invitations. - Reject an invitation. + Lists invitations. - :param location: Location of the invitation - :type location: str - :param invitation_id: Unique id of the invitation. - :type invitation_id: str + :param skip_token: The continuation token + :type skip_token: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ConsumerInvitation or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datashare.models.ConsumerInvitation or - ~msrest.pipeline.ClientRawResponse + :return: An iterator like instance of ConsumerInvitation + :rtype: + ~azure.mgmt.datashare.models.ConsumerInvitationPaged[~azure.mgmt.datashare.models.ConsumerInvitation] :raises: :class:`DataShareErrorException` """ - invitation = models.ConsumerInvitation(invitation_id=invitation_id) + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_invitations.metadata['url'] - # 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + else: + url = next_link + query_parameters = {} - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(invitation, 'ConsumerInvitation') + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + def internal_paging(next_link=None): + request = prepare_request(next_link) - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) + response = self._client.send(request, stream=False, **operation_config) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConsumerInvitation', response) + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) + return response + + # Deserialize response + header_dict = None if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + header_dict = {} + deserialized = models.ConsumerInvitationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - reject_invitation.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/RejectInvitation'} + list_invitations.metadata = {'url': '/providers/Microsoft.DataShare/listInvitations'} def get( self, location, invitation_id, custom_headers=None, raw=False, **operation_config): @@ -165,69 +166,68 @@ def get( return deserialized get.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/consumerInvitations/{invitationId}'} - def list_invitations( - self, skip_token=None, custom_headers=None, raw=False, **operation_config): - """List the invitations. + def reject_invitation( + self, location, invitation_id, custom_headers=None, raw=False, **operation_config): + """Rejects the invitation identified by invitationId. - Lists invitations. + Reject an invitation. - :param skip_token: The continuation token - :type skip_token: str + :param location: Location of the invitation + :type location: str + :param invitation_id: Unique id of the invitation. + :type invitation_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of ConsumerInvitation - :rtype: - ~azure.mgmt.datashare.models.ConsumerInvitationPaged[~azure.mgmt.datashare.models.ConsumerInvitation] + :return: ConsumerInvitation or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datashare.models.ConsumerInvitation or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DataShareErrorException` """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_invitations.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + invitation = models.ConsumerInvitation(invitation_id=invitation_id) - else: - url = next_link - query_parameters = {} + # 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 headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - def internal_paging(next_link=None): - request = prepare_request(next_link) + # Construct body + body_content = self._serialize.body(invitation, 'ConsumerInvitation') - response = self._client.send(request, stream=False, **operation_config) + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) - return response + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConsumerInvitation', response) - # Deserialize response - header_dict = None if raw: - header_dict = {} - deserialized = models.ConsumerInvitationPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response return deserialized - list_invitations.metadata = {'url': '/providers/Microsoft.DataShare/ListInvitations'} + reject_invitation.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/rejectInvitation'} diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_source_data_sets_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_source_data_sets_operations.py index e88759d10625..8f452a54a32b 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_source_data_sets_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_consumer_source_data_sets_operations.py @@ -24,7 +24,7 @@ class ConsumerSourceDataSetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config @@ -116,4 +116,4 @@ def internal_paging(next_link=None): deserialized = models.ConsumerSourceDataSetPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_share_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/ConsumerSourceDataSets'} + list_by_share_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/consumerSourceDataSets'} diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_set_mappings_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_set_mappings_operations.py index c8cd5cf2906f..3f66987eeb92 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_set_mappings_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_set_mappings_operations.py @@ -24,7 +24,7 @@ class DataSetMappingsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config @@ -247,7 +247,7 @@ def delete( 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, account_name, share_subscription_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, share_subscription_name, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): """List DataSetMappings in a share subscription. List DataSetMappings in a share subscription. @@ -260,6 +260,10 @@ def list_by_share_subscription( :type share_subscription_name: str :param skip_token: Continuation token :type skip_token: str + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -288,6 +292,10 @@ def prepare_request(next_link=None): query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') else: url = next_link diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py index df50352d19d3..6d78a2fef039 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_data_sets_operations.py @@ -26,7 +26,7 @@ class DataSetsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config @@ -273,7 +273,7 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/dataSets/{dataSetName}'} def list_by_share( - self, resource_group_name, account_name, share_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, share_name, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): """List DataSets in a share. List DataSets in a share. @@ -286,6 +286,10 @@ def list_by_share( :type share_name: str :param skip_token: continuation token :type skip_token: str + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -314,6 +318,10 @@ def prepare_request(next_link=None): query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') else: url = next_link diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_invitations_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_invitations_operations.py index 19d8707745e6..3a6a56c92302 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_invitations_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_invitations_operations.py @@ -24,7 +24,7 @@ class InvitationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config @@ -243,7 +243,7 @@ def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/invitations/{invitationName}'} def list_by_share( - self, resource_group_name, account_name, share_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, share_name, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): """List all Invitations in a share. List invitations in a share. @@ -256,6 +256,10 @@ def list_by_share( :type share_name: str :param skip_token: The continuation token :type skip_token: str + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -284,6 +288,10 @@ def prepare_request(next_link=None): query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') else: url = next_link diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_operations.py index 0adc6b8c25e2..c2aafb5aff86 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_operations.py @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py index e7ee3aec5a69..bff9e0d8afbd 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_provider_share_subscriptions_operations.py @@ -26,7 +26,7 @@ class ProviderShareSubscriptionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -36,15 +36,15 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config - def get_by_share( - self, resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers=None, raw=False, **operation_config): - """Get share subscription in a provider share. + def adjust( + self, resource_group_name, account_name, share_name, provider_share_subscription_id, expiration_date=None, custom_headers=None, raw=False, **operation_config): + """Adjust the expiration date of a share subscription in a provider share. - Get share subscription in a provider share. + Adjust a share subscription's expiration date in a provider share. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -54,6 +54,9 @@ def get_by_share( :type share_name: str :param provider_share_subscription_id: To locate shareSubscription :type provider_share_subscription_id: str + :param expiration_date: Expiration date of the share subscription in + UTC format + :type expiration_date: datetime :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -65,8 +68,10 @@ def get_by_share( :raises: :class:`DataShareErrorException` """ + provider_share_subscription = models.ProviderShareSubscription(expiration_date=expiration_date) + # Construct URL - url = self.get_by_share.metadata['url'] + url = self.adjust.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'), @@ -83,6 +88,7 @@ def get_by_share( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -90,8 +96,11 @@ def get_by_share( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(provider_share_subscription, 'ProviderShareSubscription') + # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -106,13 +115,13 @@ def get_by_share( return client_raw_response return deserialized - get_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}'} + adjust.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/adjust'} - def list_by_share( - self, resource_group_name, account_name, share_name, skip_token=None, custom_headers=None, raw=False, **operation_config): - """List of available share subscriptions to a provider share. + def reinstate( + self, resource_group_name, account_name, share_name, provider_share_subscription_id, expiration_date=None, custom_headers=None, raw=False, **operation_config): + """Reinstate share subscription in a provider share. - List share subscriptions in a provider share. + Reinstate share subscription in a provider share. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -120,73 +129,70 @@ def list_by_share( :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 provider_share_subscription_id: To locate shareSubscription + :type provider_share_subscription_id: str + :param expiration_date: Expiration date of the share subscription in + UTC format + :type expiration_date: datetime :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of ProviderShareSubscription - :rtype: - ~azure.mgmt.datashare.models.ProviderShareSubscriptionPaged[~azure.mgmt.datashare.models.ProviderShareSubscription] + :return: ProviderShareSubscription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datashare.models.ProviderShareSubscription or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DataShareErrorException` """ - 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) + provider_share_subscription = models.ProviderShareSubscription(expiration_date=expiration_date) - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - else: - url = next_link - query_parameters = {} + # 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 headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - def internal_paging(next_link=None): - request = prepare_request(next_link) + # Construct body + body_content = self._serialize.body(provider_share_subscription, 'ProviderShareSubscription') - response = self._client.send(request, stream=False, **operation_config) + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) - return response + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ProviderShareSubscription', response) - # Deserialize response - header_dict = None if raw: - header_dict = {} - deserialized = models.ProviderShareSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response return deserialized - list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions'} + reinstate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate'} def _revoke_initial( @@ -293,11 +299,11 @@ def get_long_running_output(response): return LROPoller(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'} - def reinstate( + def get_by_share( self, resource_group_name, account_name, share_name, provider_share_subscription_id, custom_headers=None, raw=False, **operation_config): - """Reinstate share subscription in a provider share. + """Get share subscription in a provider share. - Reinstate 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 @@ -319,7 +325,7 @@ def reinstate( :class:`DataShareErrorException` """ # Construct URL - url = self.reinstate.metadata['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'), @@ -344,7 +350,7 @@ def reinstate( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -359,4 +365,84 @@ def reinstate( return client_raw_response return deserialized - reinstate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions/{providerShareSubscriptionId}/reinstate'} + 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, account_name, share_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """List of available share subscriptions to a provider share. + + List share subscriptions 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 skip_token: Continuation Token + :type skip_token: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProviderShareSubscription + :rtype: + ~azure.mgmt.datashare.models.ProviderShareSubscriptionPaged[~azure.mgmt.datashare.models.ProviderShareSubscription] + :raises: + :class:`DataShareErrorException` + """ + 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) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ProviderShareSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_share.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/providerShareSubscriptions'} diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py index c78cc7dab0c3..c247eb9020d2 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_share_subscriptions_operations.py @@ -26,7 +26,7 @@ class ShareSubscriptionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -36,106 +36,17 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config - def get( - self, resource_group_name, account_name, share_subscription_name, custom_headers=None, raw=False, **operation_config): - """Get shareSubscription in an account. - - Get a 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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ShareSubscription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datashare.models.ShareSubscription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DataShareErrorException` - """ - # 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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ShareSubscription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} - def create( - self, resource_group_name, account_name, share_subscription_name, invitation_id, source_share_location, custom_headers=None, raw=False, **operation_config): - """Create shareSubscription in an account. - - Create a 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ShareSubscription or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.datashare.models.ShareSubscription or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DataShareErrorException` - """ - share_subscription = models.ShareSubscription(invitation_id=invitation_id, source_share_location=source_share_location) + def _cancel_synchronization_initial( + self, resource_group_name, account_name, share_subscription_name, synchronization_id, custom_headers=None, raw=False, **operation_config): + share_subscription_synchronization = models.ShareSubscriptionSynchronization(synchronization_id=synchronization_id) # Construct URL - url = self.create.metadata['url'] + url = self.cancel_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'), @@ -160,66 +71,21 @@ def create( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(share_subscription, 'ShareSubscription') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201]: - raise models.DataShareErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ShareSubscription', response) - if response.status_code == 201: - deserialized = self._deserialize('ShareSubscription', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} - - - def _delete_initial( - self, resource_group_name, account_name, share_subscription_name, custom_headers=None, raw=False, **operation_config): - # 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') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + body_content = self._serialize.body(share_subscription_synchronization, 'ShareSubscriptionSynchronization') # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: raise models.DataShareErrorException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('OperationResponse', response) + deserialized = self._deserialize('ShareSubscriptionSynchronization', response) + if response.status_code == 202: + deserialized = self._deserialize('ShareSubscriptionSynchronization', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -227,11 +93,11 @@ def _delete_initial( return deserialized - def delete( - self, resource_group_name, account_name, share_subscription_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Delete shareSubscription in an account. + def cancel_synchronization( + self, resource_group_name, account_name, share_subscription_name, synchronization_id, custom_headers=None, raw=False, polling=True, **operation_config): + """Request cancellation of a data share snapshot. - Delete a shareSubscription in an account. + Request to cancel a synchronization. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -239,31 +105,35 @@ def delete( :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 :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns OperationResponse or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns + ShareSubscriptionSynchronization or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datashare.models.OperationResponse] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datashare.models.ShareSubscriptionSynchronization] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datashare.models.OperationResponse]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datashare.models.ShareSubscriptionSynchronization]] :raises: :class:`DataShareErrorException` """ - raw_result = self._delete_initial( + 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, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('OperationResponse', response) + deserialized = self._deserialize('ShareSubscriptionSynchronization', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -274,43 +144,47 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + cancel_synchronization.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/cancelSynchronization'} - def list_by_account( - self, resource_group_name, account_name, skip_token=None, custom_headers=None, raw=False, **operation_config): - """List of available share subscriptions under an account. + def list_source_share_synchronization_settings( + self, resource_group_name, account_name, share_subscription_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + """Get source share synchronization settings for a shareSubscription. - List share subscriptions in an account. + Get synchronization settings set on 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 skip_token: Continuation Token + :param share_subscription_name: The name of the shareSubscription. + :type share_subscription_name: str + :param skip_token: Continuation token :type skip_token: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of ShareSubscription + :return: An iterator like instance of + SourceShareSynchronizationSetting :rtype: - ~azure.mgmt.datashare.models.ShareSubscriptionPaged[~azure.mgmt.datashare.models.ShareSubscription] + ~azure.mgmt.datashare.models.SourceShareSynchronizationSettingPaged[~azure.mgmt.datashare.models.SourceShareSynchronizationSetting] :raises: :class:`DataShareErrorException` """ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_account.metadata['url'] + url = self.list_source_share_synchronization_settings.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') + '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) @@ -335,7 +209,7 @@ def prepare_request(next_link=None): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) return request def internal_paging(next_link=None): @@ -352,41 +226,48 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.ShareSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.SourceShareSynchronizationSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions'} + list_source_share_synchronization_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings'} - def list_source_share_synchronization_settings( - self, resource_group_name, account_name, share_subscription_name, skip_token=None, custom_headers=None, raw=False, **operation_config): - """Get source share synchronization settings for a shareSubscription. + def list_synchronization_details( + self, resource_group_name, account_name, share_subscription_name, synchronization_id, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """List data set level details for a share subscription synchronization. - Get synchronization settings set on a share. + List synchronization details. :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. + :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 + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - SourceShareSynchronizationSetting + :return: An iterator like instance of SynchronizationDetails :rtype: - ~azure.mgmt.datashare.models.SourceShareSynchronizationSettingPaged[~azure.mgmt.datashare.models.SourceShareSynchronizationSetting] + ~azure.mgmt.datashare.models.SynchronizationDetailsPaged[~azure.mgmt.datashare.models.SynchronizationDetails] :raises: :class:`DataShareErrorException` """ + share_subscription_synchronization = models.ShareSubscriptionSynchronization(synchronization_id=synchronization_id) + def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_source_share_synchronization_settings.metadata['url'] + url = self.list_synchronization_details.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'), @@ -400,6 +281,10 @@ def prepare_request(next_link=None): query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') else: url = next_link @@ -408,6 +293,7 @@ def prepare_request(next_link=None): # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -415,8 +301,11 @@ def prepare_request(next_link=None): if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct body + body_content = self._serialize.body(share_subscription_synchronization, 'ShareSubscriptionSynchronization') + # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters, body_content) return request def internal_paging(next_link=None): @@ -433,13 +322,13 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.SourceShareSynchronizationSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.SynchronizationDetailsPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_source_share_synchronization_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSourceShareSynchronizationSettings'} + list_synchronization_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails'} def list_synchronizations( - self, resource_group_name, account_name, share_subscription_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, share_subscription_name, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): """List Synchronizations in a share subscription. List synchronizations of a share subscription. @@ -452,6 +341,10 @@ def list_synchronizations( :type share_subscription_name: str :param skip_token: Continuation token :type skip_token: str + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -480,6 +373,10 @@ def prepare_request(next_link=None): query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') else: url = next_link @@ -518,98 +415,10 @@ def internal_paging(next_link=None): return deserialized list_synchronizations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizations'} - def list_synchronization_details( - self, resource_group_name, account_name, share_subscription_name, synchronization_id, skip_token=None, custom_headers=None, raw=False, **operation_config): - """List data set level details for a share subscription synchronization. - List synchronization details. - - :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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SynchronizationDetails - :rtype: - ~azure.mgmt.datashare.models.SynchronizationDetailsPaged[~azure.mgmt.datashare.models.SynchronizationDetails] - :raises: - :class:`DataShareErrorException` - """ - share_subscription_synchronization = models.ShareSubscriptionSynchronization(synchronization_id=synchronization_id) - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_synchronization_details.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(share_subscription_synchronization, 'ShareSubscriptionSynchronization') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SynchronizationDetailsPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_synchronization_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/listSynchronizationDetails'} - - - def _synchronize_method_initial( - self, resource_group_name, account_name, share_subscription_name, synchronization_mode=None, custom_headers=None, raw=False, **operation_config): - synchronize = models.Synchronize(synchronization_mode=synchronization_mode) + def _synchronize_method_initial( + self, resource_group_name, account_name, share_subscription_name, synchronization_mode=None, custom_headers=None, raw=False, **operation_config): + synchronize = models.Synchronize(synchronization_mode=synchronization_mode) # Construct URL url = self.synchronize_method.metadata['url'] @@ -717,15 +526,101 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - synchronize_method.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/Synchronize'} + synchronize_method.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}/synchronize'} + def get( + self, resource_group_name, account_name, share_subscription_name, custom_headers=None, raw=False, **operation_config): + """Get shareSubscription in an account. - def _cancel_synchronization_initial( - self, resource_group_name, account_name, share_subscription_name, synchronization_id, custom_headers=None, raw=False, **operation_config): - share_subscription_synchronization = models.ShareSubscriptionSynchronization(synchronization_id=synchronization_id) + Get a 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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ShareSubscription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datashare.models.ShareSubscription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DataShareErrorException` + """ # Construct URL - url = self.cancel_synchronization.metadata['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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShareSubscription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + def create( + self, resource_group_name, account_name, share_subscription_name, share_subscription, custom_headers=None, raw=False, **operation_config): + """Create shareSubscription in an account. + + Create a 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 share_subscription: create parameters for shareSubscription + :type share_subscription: + ~azure.mgmt.datashare.models.ShareSubscription + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ShareSubscription or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datashare.models.ShareSubscription or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DataShareErrorException` + """ + # 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'), @@ -750,21 +645,66 @@ def _cancel_synchronization_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(share_subscription_synchronization, 'ShareSubscriptionSynchronization') + body_content = self._serialize.body(share_subscription, 'ShareSubscription') # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) + request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: + raise models.DataShareErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ShareSubscription', response) + if response.status_code == 201: + deserialized = self._deserialize('ShareSubscription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + + def _delete_initial( + self, resource_group_name, account_name, share_subscription_name, custom_headers=None, raw=False, **operation_config): + # 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: raise models.DataShareErrorException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ShareSubscriptionSynchronization', response) - if response.status_code == 202: - deserialized = self._deserialize('ShareSubscriptionSynchronization', response) + deserialized = self._deserialize('OperationResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -772,11 +712,11 @@ def _cancel_synchronization_initial( return deserialized - def cancel_synchronization( - self, resource_group_name, account_name, share_subscription_name, synchronization_id, custom_headers=None, raw=False, polling=True, **operation_config): - """Request cancellation of a data share snapshot. + def delete( + self, resource_group_name, account_name, share_subscription_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete shareSubscription in an account. - Request to cancel a synchronization. + Delete a shareSubscription in an account. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -784,35 +724,31 @@ def cancel_synchronization( :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 :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns - ShareSubscriptionSynchronization or - ClientRawResponse if raw==True + :return: An instance of LROPoller that returns OperationResponse or + ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datashare.models.ShareSubscriptionSynchronization] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datashare.models.OperationResponse] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datashare.models.ShareSubscriptionSynchronization]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datashare.models.OperationResponse]] :raises: :class:`DataShareErrorException` """ - raw_result = self._cancel_synchronization_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, account_name=account_name, share_subscription_name=share_subscription_name, - synchronization_id=synchronization_id, custom_headers=custom_headers, raw=True, **operation_config ) def get_long_running_output(response): - deserialized = self._deserialize('ShareSubscriptionSynchronization', response) + deserialized = self._deserialize('OperationResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -823,8 +759,93 @@ def get_long_running_output(response): lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, **operation_config) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(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'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions/{shareSubscriptionName}'} + + def list_by_account( + self, resource_group_name, account_name, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """List of available share subscriptions under an account. + + List share subscriptions 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 skip_token: Continuation Token + :type skip_token: str + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ShareSubscription + :rtype: + ~azure.mgmt.datashare.models.ShareSubscriptionPaged[~azure.mgmt.datashare.models.ShareSubscription] + :raises: + :class:`DataShareErrorException` + """ + 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) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ShareSubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shareSubscriptions'} diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py index 4d00b63fb7ad..3d12e9b54c74 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_shares_operations.py @@ -26,7 +26,7 @@ class SharesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -36,10 +36,193 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config + def list_synchronization_details( + self, resource_group_name, account_name, share_name, share_synchronization, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """List data set level details for a share synchronization. + + List synchronization details. + + :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 share_synchronization: Share Synchronization payload. + :type share_synchronization: + ~azure.mgmt.datashare.models.ShareSynchronization + :param skip_token: Continuation token + :type skip_token: str + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SynchronizationDetails + :rtype: + ~azure.mgmt.datashare.models.SynchronizationDetailsPaged[~azure.mgmt.datashare.models.SynchronizationDetails] + :raises: + :class:`DataShareErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronization_details.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(share_synchronization, 'ShareSynchronization') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SynchronizationDetailsPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_synchronization_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizationDetails'} + + def list_synchronizations( + self, resource_group_name, account_name, share_name, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): + """List Synchronizations in a share. + + List synchronizations of 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 + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ShareSynchronization + :rtype: + ~azure.mgmt.datashare.models.ShareSynchronizationPaged[~azure.mgmt.datashare.models.ShareSynchronization] + :raises: + :class:`DataShareErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_synchronizations.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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DataShareErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ShareSynchronizationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_synchronizations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizations'} + def get( self, resource_group_name, account_name, share_name, custom_headers=None, raw=False, **operation_config): """Get a specified share. @@ -277,7 +460,7 @@ def get_long_running_output(response): delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}'} def list_by_account( - self, resource_group_name, account_name, skip_token=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, skip_token=None, filter=None, orderby=None, custom_headers=None, raw=False, **operation_config): """List of available shares under an account. List shares in an account. @@ -288,6 +471,10 @@ def list_by_account( :type account_name: str :param skip_token: Continuation Token :type skip_token: str + :param filter: Filters the results using OData syntax. + :type filter: str + :param orderby: Sorts the results using OData syntax. + :type orderby: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -315,6 +502,10 @@ def prepare_request(next_link=None): query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') if skip_token is not None: query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') else: url = next_link @@ -352,170 +543,3 @@ def internal_paging(next_link=None): return deserialized list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares'} - - def list_synchronizations( - self, resource_group_name, account_name, share_name, skip_token=None, custom_headers=None, raw=False, **operation_config): - """List Synchronizations in a share. - - List synchronizations of 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 - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ShareSynchronization - :rtype: - ~azure.mgmt.datashare.models.ShareSynchronizationPaged[~azure.mgmt.datashare.models.ShareSynchronization] - :raises: - :class:`DataShareErrorException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_synchronizations.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ShareSynchronizationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_synchronizations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizations'} - - def list_synchronization_details( - self, resource_group_name, account_name, share_name, share_synchronization, skip_token=None, custom_headers=None, raw=False, **operation_config): - """List data set level details for a share synchronization. - - List synchronization details. - - :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 share_synchronization: Share Synchronization payload. - :type share_synchronization: - ~azure.mgmt.datashare.models.ShareSynchronization - :param skip_token: Continuation token - :type skip_token: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of SynchronizationDetails - :rtype: - ~azure.mgmt.datashare.models.SynchronizationDetailsPaged[~azure.mgmt.datashare.models.SynchronizationDetails] - :raises: - :class:`DataShareErrorException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_synchronization_details.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 = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(share_synchronization, 'ShareSynchronization') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DataShareErrorException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.SynchronizationDetailsPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_synchronization_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataShare/accounts/{accountName}/shares/{shareName}/listSynchronizationDetails'} diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py index 460a240b6bd5..c673c5815ce2 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py @@ -26,7 +26,7 @@ class SynchronizationSettingsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config @@ -113,7 +113,7 @@ def create( self, resource_group_name, account_name, share_name, synchronization_setting_name, synchronization_setting, custom_headers=None, raw=False, **operation_config): """Adds a new synchronization setting to an existing share. - Create or update a synchronizationSetting . + Create a synchronizationSetting. :param resource_group_name: The resource group name. :type resource_group_name: str diff --git a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py index f9e8118cb828..e516cbc6cd1c 100644 --- a/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py +++ b/sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py @@ -26,7 +26,7 @@ class TriggersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The api version to use. Constant value: "2019-11-01". + :ivar api_version: The api version to use. Constant value: "2020-09-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01" + self.api_version = "2020-09-01" self.config = config