diff --git a/azure-mgmt-storagesync/README.rst b/azure-mgmt-storagesync/README.rst index 946284e8df1b..269b1656e4ca 100644 --- a/azure-mgmt-storagesync/README.rst +++ b/azure-mgmt-storagesync/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Storage Sync Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py index 7dcf74509622..e21b612cadab 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py @@ -11,11 +11,18 @@ try: from .storage_sync_error_details_py3 import StorageSyncErrorDetails + from .storage_sync_api_error_py3 import StorageSyncApiError from .storage_sync_error_py3 import StorageSyncError, StorageSyncErrorException from .subscription_state_py3 import SubscriptionState from .storage_sync_service_py3 import StorageSyncService from .sync_group_py3 import SyncGroup from .cloud_endpoint_py3 import CloudEndpoint + from .recall_action_parameters_py3 import RecallActionParameters + from .storage_sync_service_create_parameters_py3 import StorageSyncServiceCreateParameters + from .sync_group_create_parameters_py3 import SyncGroupCreateParameters + from .cloud_endpoint_create_parameters_py3 import CloudEndpointCreateParameters + from .server_endpoint_create_parameters_py3 import ServerEndpointCreateParameters + from .registered_server_create_parameters_py3 import RegisteredServerCreateParameters from .server_endpoint_update_parameters_py3 import ServerEndpointUpdateParameters from .server_endpoint_py3 import ServerEndpoint from .registered_server_py3 import RegisteredServer @@ -39,11 +46,18 @@ from .resource_py3 import Resource except (SyntaxError, ImportError): from .storage_sync_error_details import StorageSyncErrorDetails + from .storage_sync_api_error import StorageSyncApiError from .storage_sync_error import StorageSyncError, StorageSyncErrorException from .subscription_state import SubscriptionState from .storage_sync_service import StorageSyncService from .sync_group import SyncGroup from .cloud_endpoint import CloudEndpoint + from .recall_action_parameters import RecallActionParameters + from .storage_sync_service_create_parameters import StorageSyncServiceCreateParameters + from .sync_group_create_parameters import SyncGroupCreateParameters + from .cloud_endpoint_create_parameters import CloudEndpointCreateParameters + from .server_endpoint_create_parameters import ServerEndpointCreateParameters + from .registered_server_create_parameters import RegisteredServerCreateParameters from .server_endpoint_update_parameters import ServerEndpointUpdateParameters from .server_endpoint import ServerEndpoint from .registered_server import RegisteredServer @@ -78,11 +92,18 @@ __all__ = [ 'StorageSyncErrorDetails', + 'StorageSyncApiError', 'StorageSyncError', 'StorageSyncErrorException', 'SubscriptionState', 'StorageSyncService', 'SyncGroup', 'CloudEndpoint', + 'RecallActionParameters', + 'StorageSyncServiceCreateParameters', + 'SyncGroupCreateParameters', + 'CloudEndpointCreateParameters', + 'ServerEndpointCreateParameters', + 'RegisteredServerCreateParameters', 'ServerEndpointUpdateParameters', 'ServerEndpoint', 'RegisteredServer', diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py index 27d8edbc9682..313f35377704 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint.py @@ -26,10 +26,6 @@ class CloudEndpoint(Resource): :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str - :param storage_account_key: Storage Account access key. - :type storage_account_key: str - :param storage_account: Storage Account name. - :type storage_account: str :param storage_account_resource_id: Storage Account Resource Id :type storage_account_resource_id: str :param storage_account_share_name: Storage Account Share name @@ -61,8 +57,6 @@ class CloudEndpoint(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'storage_account_key': {'key': 'properties.storageAccountKey', 'type': 'str'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, 'storage_account_share_name': {'key': 'properties.storageAccountShareName', 'type': 'str'}, 'storage_account_tenant_id': {'key': 'properties.storageAccountTenantId', 'type': 'str'}, @@ -76,8 +70,6 @@ class CloudEndpoint(Resource): def __init__(self, **kwargs): super(CloudEndpoint, self).__init__(**kwargs) - self.storage_account_key = kwargs.get('storage_account_key', None) - self.storage_account = kwargs.get('storage_account', None) self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) self.storage_account_share_name = kwargs.get('storage_account_share_name', None) self.storage_account_tenant_id = kwargs.get('storage_account_tenant_id', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters.py new file mode 100644 index 000000000000..d1eb614bc370 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CloudEndpointCreateParameters(Model): + """The parameters used when creating a storage sync service. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param storage_account_resource_id: Storage Account Resource Id + :type storage_account_resource_id: str + :param storage_account_share_name: Storage Account Share name + :type storage_account_share_name: str + :param storage_account_tenant_id: Storage Account Tenant Id + :type storage_account_tenant_id: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'storage_account_share_name': {'key': 'properties.storageAccountShareName', 'type': 'str'}, + 'storage_account_tenant_id': {'key': 'properties.storageAccountTenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CloudEndpointCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) + self.storage_account_share_name = kwargs.get('storage_account_share_name', None) + self.storage_account_tenant_id = kwargs.get('storage_account_tenant_id', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters_py3.py new file mode 100644 index 000000000000..33ff555d026b --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_create_parameters_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CloudEndpointCreateParameters(Model): + """The parameters used when creating a storage sync service. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param storage_account_resource_id: Storage Account Resource Id + :type storage_account_resource_id: str + :param storage_account_share_name: Storage Account Share name + :type storage_account_share_name: str + :param storage_account_tenant_id: Storage Account Tenant Id + :type storage_account_tenant_id: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'storage_account_share_name': {'key': 'properties.storageAccountShareName', 'type': 'str'}, + 'storage_account_tenant_id': {'key': 'properties.storageAccountTenantId', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, storage_account_resource_id: str=None, storage_account_share_name: str=None, storage_account_tenant_id: str=None, **kwargs) -> None: + super(CloudEndpointCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.storage_account_resource_id = storage_account_resource_id + self.storage_account_share_name = storage_account_share_name + self.storage_account_tenant_id = storage_account_tenant_id diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py index c2ad96051bd0..cf6aaaf35992 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/cloud_endpoint_py3.py @@ -26,10 +26,6 @@ class CloudEndpoint(Resource): :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str - :param storage_account_key: Storage Account access key. - :type storage_account_key: str - :param storage_account: Storage Account name. - :type storage_account: str :param storage_account_resource_id: Storage Account Resource Id :type storage_account_resource_id: str :param storage_account_share_name: Storage Account Share name @@ -61,8 +57,6 @@ class CloudEndpoint(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'storage_account_key': {'key': 'properties.storageAccountKey', 'type': 'str'}, - 'storage_account': {'key': 'properties.storageAccount', 'type': 'str'}, 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, 'storage_account_share_name': {'key': 'properties.storageAccountShareName', 'type': 'str'}, 'storage_account_tenant_id': {'key': 'properties.storageAccountTenantId', 'type': 'str'}, @@ -74,10 +68,8 @@ class CloudEndpoint(Resource): 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, } - def __init__(self, *, storage_account_key: str=None, storage_account: str=None, storage_account_resource_id: str=None, storage_account_share_name: str=None, storage_account_tenant_id: str=None, partnership_id: str=None, friendly_name: str=None, provisioning_state: str=None, last_workflow_id: str=None, last_operation_name: str=None, **kwargs) -> None: + def __init__(self, *, storage_account_resource_id: str=None, storage_account_share_name: str=None, storage_account_tenant_id: str=None, partnership_id: str=None, friendly_name: str=None, provisioning_state: str=None, last_workflow_id: str=None, last_operation_name: str=None, **kwargs) -> None: super(CloudEndpoint, self).__init__(**kwargs) - self.storage_account_key = storage_account_key - self.storage_account = storage_account self.storage_account_resource_id = storage_account_resource_id self.storage_account_share_name = storage_account_share_name self.storage_account_tenant_id = storage_account_tenant_id diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/recall_action_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/recall_action_parameters.py new file mode 100644 index 000000000000..aebb1bca3c1b --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/recall_action_parameters.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecallActionParameters(Model): + """The parameters used when calling recall action on server endpoint. + + :param pattern: Pattern of the files. + :type pattern: str + :param recall_path: Recall path. + :type recall_path: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'recall_path': {'key': 'recallPath', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecallActionParameters, self).__init__(**kwargs) + self.pattern = kwargs.get('pattern', None) + self.recall_path = kwargs.get('recall_path', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/recall_action_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/recall_action_parameters_py3.py new file mode 100644 index 000000000000..e755fe00abc6 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/recall_action_parameters_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RecallActionParameters(Model): + """The parameters used when calling recall action on server endpoint. + + :param pattern: Pattern of the files. + :type pattern: str + :param recall_path: Recall path. + :type recall_path: str + """ + + _attribute_map = { + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'recall_path': {'key': 'recallPath', 'type': 'str'}, + } + + def __init__(self, *, pattern: str=None, recall_path: str=None, **kwargs) -> None: + super(RecallActionParameters, self).__init__(**kwargs) + self.pattern = pattern + self.recall_path = recall_path diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py index edf1a9cb94df..bfb8d368118b 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server.py @@ -9,20 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .resource import Resource -class RegisteredServer(Model): +class RegisteredServer(Resource): """Registered Server resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Resource name + :ivar name: The name of the resource :vartype name: str - :ivar type: Resource type + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str :param server_certificate: Registered Server Certificate :type server_certificate: str @@ -95,9 +97,6 @@ class RegisteredServer(Model): def __init__(self, **kwargs): super(RegisteredServer, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None self.server_certificate = kwargs.get('server_certificate', None) self.agent_version = kwargs.get('agent_version', None) self.server_os_version = kwargs.get('server_os_version', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters.py new file mode 100644 index 000000000000..ec7b30e1fe06 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegisteredServerCreateParameters(Model): + """The parameters used when creating a storage sync service. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param server_certificate: Registered Server Certificate + :type server_certificate: str + :param agent_version: Registered Server Agent Version + :type agent_version: str + :param server_os_version: Registered Server OS Version + :type server_os_version: str + :param last_heart_beat: Registered Server last heart beat + :type last_heart_beat: str + :param server_role: Registered Server serverRole + :type server_role: str + :param cluster_id: Registered Server clusterId + :type cluster_id: str + :param cluster_name: Registered Server clusterName + :type cluster_name: str + :param server_id: Registered Server serverId + :type server_id: str + :param friendly_name: Friendly Name + :type friendly_name: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'server_certificate': {'key': 'properties.serverCertificate', 'type': 'str'}, + 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'server_os_version': {'key': 'properties.serverOSVersion', 'type': 'str'}, + 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'str'}, + 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, + 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, + 'cluster_name': {'key': 'properties.clusterName', 'type': 'str'}, + 'server_id': {'key': 'properties.serverId', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegisteredServerCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.server_certificate = kwargs.get('server_certificate', None) + self.agent_version = kwargs.get('agent_version', None) + self.server_os_version = kwargs.get('server_os_version', None) + self.last_heart_beat = kwargs.get('last_heart_beat', None) + self.server_role = kwargs.get('server_role', None) + self.cluster_id = kwargs.get('cluster_id', None) + self.cluster_name = kwargs.get('cluster_name', None) + self.server_id = kwargs.get('server_id', None) + self.friendly_name = kwargs.get('friendly_name', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters_py3.py new file mode 100644 index 000000000000..0f9140055548 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_create_parameters_py3.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RegisteredServerCreateParameters(Model): + """The parameters used when creating a storage sync service. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param server_certificate: Registered Server Certificate + :type server_certificate: str + :param agent_version: Registered Server Agent Version + :type agent_version: str + :param server_os_version: Registered Server OS Version + :type server_os_version: str + :param last_heart_beat: Registered Server last heart beat + :type last_heart_beat: str + :param server_role: Registered Server serverRole + :type server_role: str + :param cluster_id: Registered Server clusterId + :type cluster_id: str + :param cluster_name: Registered Server clusterName + :type cluster_name: str + :param server_id: Registered Server serverId + :type server_id: str + :param friendly_name: Friendly Name + :type friendly_name: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'server_certificate': {'key': 'properties.serverCertificate', 'type': 'str'}, + 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'server_os_version': {'key': 'properties.serverOSVersion', 'type': 'str'}, + 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'str'}, + 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, + 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, + 'cluster_name': {'key': 'properties.clusterName', 'type': 'str'}, + 'server_id': {'key': 'properties.serverId', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, server_certificate: str=None, agent_version: str=None, server_os_version: str=None, last_heart_beat: str=None, server_role: str=None, cluster_id: str=None, cluster_name: str=None, server_id: str=None, friendly_name: str=None, **kwargs) -> None: + super(RegisteredServerCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.server_certificate = server_certificate + self.agent_version = agent_version + self.server_os_version = server_os_version + self.last_heart_beat = last_heart_beat + self.server_role = server_role + self.cluster_id = cluster_id + self.cluster_name = cluster_name + self.server_id = server_id + self.friendly_name = friendly_name diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py index 8e1cc0ead172..5499399a4806 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/registered_server_py3.py @@ -9,20 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .resource_py3 import Resource -class RegisteredServer(Model): +class RegisteredServer(Resource): """Registered Server resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str - :ivar name: Resource name + :ivar name: The name of the resource :vartype name: str - :ivar type: Resource type + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str :param server_certificate: Registered Server Certificate :type server_certificate: str @@ -95,9 +97,6 @@ class RegisteredServer(Model): def __init__(self, *, server_certificate: str=None, agent_version: str=None, server_os_version: str=None, server_managementt_error_code: int=None, last_heart_beat: str=None, provisioning_state: str=None, server_role: str=None, cluster_id: str=None, cluster_name: str=None, server_id: str=None, storage_sync_service_uid: str=None, last_workflow_id: str=None, last_operation_name: str=None, discovery_endpoint_uri: str=None, resource_location: str=None, service_location: str=None, friendly_name: str=None, management_endpoint_uri: str=None, **kwargs) -> None: super(RegisteredServer, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None self.server_certificate = server_certificate self.agent_version = agent_version self.server_os_version = server_os_version diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters.py new file mode 100644 index 000000000000..a96b07deded3 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerEndpointCreateParameters(Model): + """The parameters used when creating a storage sync service. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param server_local_path: Server Local path. + :type server_local_path: str + :param cloud_tiering: Cloud Tiering. Possible values include: 'on', 'off' + :type cloud_tiering: str or ~azure.mgmt.storagesync.models.enum + :param volume_free_space_percent: Level of free space to be maintained by + Cloud Tiering if it is enabled. + :type volume_free_space_percent: int + :param friendly_name: Friendly Name + :type friendly_name: str + :param server_resource_id: Server Resource Id. + :type server_resource_id: str + """ + + _validation = { + 'volume_free_space_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'server_local_path': {'key': 'properties.serverLocalPath', 'type': 'str'}, + 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, + 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerEndpointCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.server_local_path = kwargs.get('server_local_path', None) + self.cloud_tiering = kwargs.get('cloud_tiering', None) + self.volume_free_space_percent = kwargs.get('volume_free_space_percent', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.server_resource_id = kwargs.get('server_resource_id', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters_py3.py new file mode 100644 index 000000000000..3c6da44af327 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/server_endpoint_create_parameters_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServerEndpointCreateParameters(Model): + """The parameters used when creating a storage sync service. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param server_local_path: Server Local path. + :type server_local_path: str + :param cloud_tiering: Cloud Tiering. Possible values include: 'on', 'off' + :type cloud_tiering: str or ~azure.mgmt.storagesync.models.enum + :param volume_free_space_percent: Level of free space to be maintained by + Cloud Tiering if it is enabled. + :type volume_free_space_percent: int + :param friendly_name: Friendly Name + :type friendly_name: str + :param server_resource_id: Server Resource Id. + :type server_resource_id: str + """ + + _validation = { + 'volume_free_space_percent': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'server_local_path': {'key': 'properties.serverLocalPath', 'type': 'str'}, + 'cloud_tiering': {'key': 'properties.cloudTiering', 'type': 'str'}, + 'volume_free_space_percent': {'key': 'properties.volumeFreeSpacePercent', 'type': 'int'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, friendly_name: str=None, server_resource_id: str=None, **kwargs) -> None: + super(ServerEndpointCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.server_local_path = server_local_path + self.cloud_tiering = cloud_tiering + self.volume_free_space_percent = volume_free_space_percent + self.friendly_name = friendly_name + self.server_resource_id = server_resource_id diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_api_error.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_api_error.py new file mode 100644 index 000000000000..6994277562aa --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_api_error.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageSyncApiError(Model): + """Error type. + + :param code: Error code of the given entry. + :type code: str + :param message: Error message of the given entry. + :type message: str + :param target: Target of the given error entry. + :type target: str + :param details: Error details of the given entry. + :type details: ~azure.mgmt.storagesync.models.StorageSyncErrorDetails + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'StorageSyncErrorDetails'}, + } + + def __init__(self, **kwargs): + super(StorageSyncApiError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_api_error_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_api_error_py3.py new file mode 100644 index 000000000000..c95d94f7ebf8 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_api_error_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageSyncApiError(Model): + """Error type. + + :param code: Error code of the given entry. + :type code: str + :param message: Error message of the given entry. + :type message: str + :param target: Target of the given error entry. + :type target: str + :param details: Error details of the given entry. + :type details: ~azure.mgmt.storagesync.models.StorageSyncErrorDetails + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'StorageSyncErrorDetails'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(StorageSyncApiError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_error.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_error.py index 98d50b5367e9..f218da1917d1 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_error.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_error.py @@ -16,25 +16,21 @@ class StorageSyncError(Model): """Error type. - :param code: Error code of the given entry. - :type code: str - :param message: Error message of the given entry. - :type message: str - :param details: Error details of the given entry. - :type details: ~azure.mgmt.storagesync.models.StorageSyncErrorDetails + :param error: Error details of the given entry. + :type error: ~azure.mgmt.storagesync.models.StorageSyncApiError + :param innererror: Error details of the given entry. + :type innererror: ~azure.mgmt.storagesync.models.StorageSyncApiError """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'StorageSyncErrorDetails'}, + 'error': {'key': 'error', 'type': 'StorageSyncApiError'}, + 'innererror': {'key': 'innererror', 'type': 'StorageSyncApiError'}, } def __init__(self, **kwargs): super(StorageSyncError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.details = kwargs.get('details', None) + self.error = kwargs.get('error', None) + self.innererror = kwargs.get('innererror', None) class StorageSyncErrorException(HttpOperationError): diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_error_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_error_py3.py index eebcfb1ac972..4c7863155a2a 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_error_py3.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_error_py3.py @@ -16,25 +16,21 @@ class StorageSyncError(Model): """Error type. - :param code: Error code of the given entry. - :type code: str - :param message: Error message of the given entry. - :type message: str - :param details: Error details of the given entry. - :type details: ~azure.mgmt.storagesync.models.StorageSyncErrorDetails + :param error: Error details of the given entry. + :type error: ~azure.mgmt.storagesync.models.StorageSyncApiError + :param innererror: Error details of the given entry. + :type innererror: ~azure.mgmt.storagesync.models.StorageSyncApiError """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'StorageSyncErrorDetails'}, + 'error': {'key': 'error', 'type': 'StorageSyncApiError'}, + 'innererror': {'key': 'innererror', 'type': 'StorageSyncApiError'}, } - def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + def __init__(self, *, error=None, innererror=None, **kwargs) -> None: super(StorageSyncError, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details + self.error = error + self.innererror = innererror class StorageSyncErrorException(HttpOperationError): diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters.py new file mode 100644 index 000000000000..34ef75a32907 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageSyncServiceCreateParameters(Model): + """The parameters used when creating a storage sync service. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(StorageSyncServiceCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters_py3.py new file mode 100644 index 000000000000..4d7536827676 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/storage_sync_service_create_parameters_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageSyncServiceCreateParameters(Model): + """The parameters used when creating a storage sync service. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(StorageSyncServiceCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters.py new file mode 100644 index 000000000000..4204db4c6a25 --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SyncGroupCreateParameters(Model): + """The parameters used when creating a sync group. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param properties: The parameters used to create the sync group + :type properties: object + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(SyncGroupCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters_py3.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters_py3.py new file mode 100644 index 000000000000..df7745368a3a --- /dev/null +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/models/sync_group_create_parameters_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SyncGroupCreateParameters(Model): + """The parameters used when creating a sync group. + + :param location: Required. Gets or sets the location of the resource. This + will be one of the supported and registered Azure Geo Regions (e.g. West + US, East US, Southeast Asia, etc.). The geo region of a resource cannot be + changed once it is created, but if an identical geo region is specified on + update, the request will succeed. + :type location: str + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key with a length no greater than 128 + characters and a value with a length no greater than 256 characters. + :type tags: dict[str, str] + :param properties: The parameters used to create the sync group + :type properties: object + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(SyncGroupCreateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py index 5b6d8de3c982..f8f703ed0523 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/cloud_endpoints_operations.py @@ -68,7 +68,7 @@ def _create_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'CloudEndpoint') + body_content = self._serialize.body(parameters, 'CloudEndpointCreateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -112,7 +112,8 @@ def create( :param cloud_endpoint_name: Name of Cloud Endpoint object. :type cloud_endpoint_name: str :param parameters: Body of Cloud Endpoint resource. - :type parameters: ~azure.mgmt.storagesync.models.CloudEndpoint + :type parameters: + ~azure.mgmt.storagesync.models.CloudEndpointCreateParameters :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 diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py index ef3298992bf2..1cb46ff84117 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/registered_servers_operations.py @@ -210,7 +210,7 @@ def _create_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'RegisteredServer') + body_content = self._serialize.body(parameters, 'RegisteredServerCreateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -251,7 +251,8 @@ def create( :param server_id: GUID identifying the on-premises server. :type server_id: str :param parameters: Body of Registered Server object. - :type parameters: ~azure.mgmt.storagesync.models.RegisteredServer + :type parameters: + ~azure.mgmt.storagesync.models.RegisteredServerCreateParameters :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 diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py index 6ed18409755c..5440e1c2edd8 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/server_endpoints_operations.py @@ -68,7 +68,7 @@ def _create_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'ServerEndpoint') + body_content = self._serialize.body(parameters, 'ServerEndpointCreateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) @@ -111,7 +111,8 @@ def create( :param server_endpoint_name: Name of Server Endpoint object. :type server_endpoint_name: str :param parameters: Body of Server Endpoint object. - :type parameters: ~azure.mgmt.storagesync.models.ServerEndpoint + :type parameters: + ~azure.mgmt.storagesync.models.ServerEndpointCreateParameters :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 @@ -540,7 +541,9 @@ def internal_paging(next_link=None, raw=False): def _recall_action_initial( - self, resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, pattern=None, recall_path=None, custom_headers=None, raw=False, **operation_config): + parameters = models.RecallActionParameters(pattern=pattern, recall_path=recall_path) + # Construct URL url = self.recall_action.metadata['url'] path_format_arguments = { @@ -558,6 +561,7 @@ def _recall_action_initial( # Construct headers header_parameters = {} + 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: @@ -565,8 +569,11 @@ def _recall_action_initial( 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(parameters, 'RecallActionParameters') + # Construct and send request - request = self._client.post(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]: @@ -583,7 +590,7 @@ def _recall_action_initial( return client_raw_response def recall_action( - self, resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, storage_sync_service_name, sync_group_name, server_endpoint_name, pattern=None, recall_path=None, custom_headers=None, raw=False, polling=True, **operation_config): """Recall a serverendpoint. :param resource_group_name: The name of the resource group. The name @@ -596,6 +603,10 @@ def recall_action( :type sync_group_name: str :param server_endpoint_name: Name of Server Endpoint object. :type server_endpoint_name: str + :param pattern: Pattern of the files. + :type pattern: str + :param recall_path: Recall path. + :type recall_path: 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 @@ -613,6 +624,8 @@ def recall_action( storage_sync_service_name=storage_sync_service_name, sync_group_name=sync_group_name, server_endpoint_name=server_endpoint_name, + pattern=pattern, + recall_path=recall_path, custom_headers=custom_headers, raw=True, **operation_config diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py index 304e1285856c..455bf778b46a 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/storage_sync_services_operations.py @@ -105,7 +105,7 @@ def check_name_availability( check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/checkNameAvailability'} def create( - self, resource_group_name, storage_sync_service_name, location, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, storage_sync_service_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): """Create a new StorageSyncService. :param resource_group_name: The name of the resource group. The name @@ -114,9 +114,18 @@ def create( :param storage_sync_service_name: Name of Storage Sync Service resource. :type storage_sync_service_name: str - :param location: The geo-location where the resource lives + :param location: Required. Gets or sets the location of the resource. + This will be one of the supported and registered Azure Geo Regions + (e.g. West US, East US, Southeast Asia, etc.). The geo region of a + resource cannot be changed once it is created, but if an identical geo + region is specified on update, the request will succeed. :type location: str - :param tags: Resource tags. + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used for viewing and grouping this + resource (across resource groups). A maximum of 15 tags can be + provided for a resource. Each tag must have a key with a length no + greater than 128 characters and a value with a length no greater than + 256 characters. :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -129,7 +138,7 @@ def create( :raises: :class:`StorageSyncErrorException` """ - parameters = models.StorageSyncService(tags=tags, location=location) + parameters = models.StorageSyncServiceCreateParameters(location=location, tags=tags) # Construct URL url = self.create.metadata['url'] @@ -156,7 +165,7 @@ 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(parameters, 'StorageSyncService') + body_content = self._serialize.body(parameters, 'StorageSyncServiceCreateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) diff --git a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py index d20fd9114ec2..5d2f03074c13 100644 --- a/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py +++ b/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/sync_groups_operations.py @@ -108,7 +108,7 @@ def internal_paging(next_link=None, raw=False): list_by_storage_sync_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups'} def create( - self, resource_group_name, storage_sync_service_name, sync_group_name, unique_id=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, storage_sync_service_name, sync_group_name, parameters, custom_headers=None, raw=False, **operation_config): """Create a new SyncGroup. :param resource_group_name: The name of the resource group. The name @@ -119,8 +119,9 @@ def create( :type storage_sync_service_name: str :param sync_group_name: Name of Sync Group resource. :type sync_group_name: str - :param unique_id: Unique Id - :type unique_id: str + :param parameters: Sync Group Body + :type parameters: + ~azure.mgmt.storagesync.models.SyncGroupCreateParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -132,8 +133,6 @@ def create( :raises: :class:`StorageSyncErrorException` """ - parameters = models.SyncGroup(unique_id=unique_id) - # Construct URL url = self.create.metadata['url'] path_format_arguments = { @@ -160,7 +159,7 @@ 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(parameters, 'SyncGroup') + body_content = self._serialize.body(parameters, 'SyncGroupCreateParameters') # Construct and send request request = self._client.put(url, query_parameters, header_parameters, body_content) diff --git a/azure-mgmt-storagesync/setup.py b/azure-mgmt-storagesync/setup.py index de9a36e12f36..78fecbe70633 100644 --- a/azure-mgmt-storagesync/setup.py +++ b/azure-mgmt-storagesync/setup.py @@ -72,12 +72,14 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.27,<2.0.0', + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass