diff --git a/sdk/storage/azure-mgmt-storagesync/MANIFEST.in b/sdk/storage/azure-mgmt-storagesync/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/storage/azure-mgmt-storagesync/MANIFEST.in +++ b/sdk/storage/azure-mgmt-storagesync/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/storage/azure-mgmt-storagesync/_meta.json b/sdk/storage/azure-mgmt-storagesync/_meta.json new file mode 100644 index 000000000000..f01e0ae832ed --- /dev/null +++ b/sdk/storage/azure-mgmt-storagesync/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "18ed65c7581a1142c0015451e4d61ef0a3797268", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/storagesync/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/storagesync/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_storage_sync_management_client.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_storage_sync_management_client.py index f5713284dc7c..7c8d040d89a8 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_storage_sync_management_client.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_storage_sync_management_client.py @@ -15,6 +15,8 @@ from ._configuration import StorageSyncManagementClientConfiguration from .operations import Operations from .operations import StorageSyncServicesOperations +from .operations import PrivateLinkResourcesOperations +from .operations import PrivateEndpointConnectionsOperations from .operations import SyncGroupsOperations from .operations import CloudEndpointsOperations from .operations import ServerEndpointsOperations @@ -34,6 +36,10 @@ class StorageSyncManagementClient(SDKClient): :vartype operations: azure.mgmt.storagesync.operations.Operations :ivar storage_sync_services: StorageSyncServices operations :vartype storage_sync_services: azure.mgmt.storagesync.operations.StorageSyncServicesOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.storagesync.operations.PrivateLinkResourcesOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.storagesync.operations.PrivateEndpointConnectionsOperations :ivar sync_groups: SyncGroups operations :vartype sync_groups: azure.mgmt.storagesync.operations.SyncGroupsOperations :ivar cloud_endpoints: CloudEndpoints operations @@ -62,7 +68,7 @@ def __init__( super(StorageSyncManagementClient, 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-06-01' + self.api_version = '2020-09-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -70,6 +76,10 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.storage_sync_services = StorageSyncServicesOperations( self._client, self.config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) self.sync_groups = SyncGroupsOperations( self._client, self.config, self._serialize, self._deserialize) self.cloud_endpoints = CloudEndpointsOperations( diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py index 60a4df781d88..b04011bbe25c 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/__init__.py @@ -16,13 +16,28 @@ from ._models_py3 import CheckNameAvailabilityResult from ._models_py3 import CloudEndpoint from ._models_py3 import CloudEndpointCreateParameters + from ._models_py3 import CloudTieringCachePerformance + from ._models_py3 import CloudTieringDatePolicyStatus + from ._models_py3 import CloudTieringFilesNotTiering + from ._models_py3 import CloudTieringSpaceSavings + from ._models_py3 import CloudTieringVolumeFreeSpacePolicyStatus + from ._models_py3 import FilesNotTieringError from ._models_py3 import OperationDisplayInfo from ._models_py3 import OperationDisplayResource from ._models_py3 import OperationEntity + from ._models_py3 import OperationProperties + from ._models_py3 import OperationResourceMetricSpecification + from ._models_py3 import OperationResourceMetricSpecificationDimension + from ._models_py3 import OperationResourceServiceSpecification from ._models_py3 import OperationStatus from ._models_py3 import PostBackupResponse from ._models_py3 import PostRestoreRequest from ._models_py3 import PreRestoreRequest + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState from ._models_py3 import ProxyResource from ._models_py3 import RecallActionParameters from ._models_py3 import RegisteredServer @@ -31,6 +46,7 @@ from ._models_py3 import ResourcesMoveInfo from ._models_py3 import RestoreFileSpec from ._models_py3 import ServerEndpoint + from ._models_py3 import ServerEndpointBackgroundDataDownloadActivity from ._models_py3 import ServerEndpointCloudTieringStatus from ._models_py3 import ServerEndpointCreateParameters from ._models_py3 import ServerEndpointFilesNotSyncingError @@ -43,6 +59,7 @@ from ._models_py3 import StorageSyncApiError from ._models_py3 import StorageSyncError, StorageSyncErrorException from ._models_py3 import StorageSyncErrorDetails + from ._models_py3 import StorageSyncInnerErrorDetails from ._models_py3 import StorageSyncService from ._models_py3 import StorageSyncServiceCreateParameters from ._models_py3 import StorageSyncServiceUpdateParameters @@ -60,13 +77,28 @@ from ._models import CheckNameAvailabilityResult from ._models import CloudEndpoint from ._models import CloudEndpointCreateParameters + from ._models import CloudTieringCachePerformance + from ._models import CloudTieringDatePolicyStatus + from ._models import CloudTieringFilesNotTiering + from ._models import CloudTieringSpaceSavings + from ._models import CloudTieringVolumeFreeSpacePolicyStatus + from ._models import FilesNotTieringError from ._models import OperationDisplayInfo from ._models import OperationDisplayResource from ._models import OperationEntity + from ._models import OperationProperties + from ._models import OperationResourceMetricSpecification + from ._models import OperationResourceMetricSpecificationDimension + from ._models import OperationResourceServiceSpecification from ._models import OperationStatus from ._models import PostBackupResponse from ._models import PostRestoreRequest from ._models import PreRestoreRequest + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceListResult + from ._models import PrivateLinkServiceConnectionState from ._models import ProxyResource from ._models import RecallActionParameters from ._models import RegisteredServer @@ -75,6 +107,7 @@ from ._models import ResourcesMoveInfo from ._models import RestoreFileSpec from ._models import ServerEndpoint + from ._models import ServerEndpointBackgroundDataDownloadActivity from ._models import ServerEndpointCloudTieringStatus from ._models import ServerEndpointCreateParameters from ._models import ServerEndpointFilesNotSyncingError @@ -87,6 +120,7 @@ from ._models import StorageSyncApiError from ._models import StorageSyncError, StorageSyncErrorException from ._models import StorageSyncErrorDetails + from ._models import StorageSyncInnerErrorDetails from ._models import StorageSyncService from ._models import StorageSyncServiceCreateParameters from ._models import StorageSyncServiceUpdateParameters @@ -99,6 +133,7 @@ from ._models import Workflow from ._paged_models import CloudEndpointPaged from ._paged_models import OperationEntityPaged +from ._paged_models import PrivateEndpointConnectionPaged from ._paged_models import RegisteredServerPaged from ._paged_models import ServerEndpointPaged from ._paged_models import StorageSyncServicePaged @@ -106,8 +141,22 @@ from ._paged_models import WorkflowPaged from ._storage_sync_management_client_enums import ( Reason, + IncomingTrafficPolicy, + PrivateEndpointServiceConnectionStatus, + PrivateEndpointConnectionProvisioningState, ChangeDetectionMode, + FeatureStatus, + InitialDownloadPolicy, + LocalCacheMode, + ServerEndpointHealthState, + ServerEndpointSyncActivityState, + ServerEndpointSyncMode, + ServerEndpointOfflineDataTransferState, + RegisteredServerAgentVersionStatus, + WorkflowStatus, + OperationDirection, NameAvailabilityReason, + ProgressType, ) __all__ = [ @@ -117,13 +166,28 @@ 'CheckNameAvailabilityResult', 'CloudEndpoint', 'CloudEndpointCreateParameters', + 'CloudTieringCachePerformance', + 'CloudTieringDatePolicyStatus', + 'CloudTieringFilesNotTiering', + 'CloudTieringSpaceSavings', + 'CloudTieringVolumeFreeSpacePolicyStatus', + 'FilesNotTieringError', 'OperationDisplayInfo', 'OperationDisplayResource', 'OperationEntity', + 'OperationProperties', + 'OperationResourceMetricSpecification', + 'OperationResourceMetricSpecificationDimension', + 'OperationResourceServiceSpecification', 'OperationStatus', 'PostBackupResponse', 'PostRestoreRequest', 'PreRestoreRequest', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', 'ProxyResource', 'RecallActionParameters', 'RegisteredServer', @@ -132,6 +196,7 @@ 'ResourcesMoveInfo', 'RestoreFileSpec', 'ServerEndpoint', + 'ServerEndpointBackgroundDataDownloadActivity', 'ServerEndpointCloudTieringStatus', 'ServerEndpointCreateParameters', 'ServerEndpointFilesNotSyncingError', @@ -144,6 +209,7 @@ 'StorageSyncApiError', 'StorageSyncError', 'StorageSyncErrorException', 'StorageSyncErrorDetails', + 'StorageSyncInnerErrorDetails', 'StorageSyncService', 'StorageSyncServiceCreateParameters', 'StorageSyncServiceUpdateParameters', @@ -156,12 +222,27 @@ 'Workflow', 'OperationEntityPaged', 'StorageSyncServicePaged', + 'PrivateEndpointConnectionPaged', 'SyncGroupPaged', 'CloudEndpointPaged', 'ServerEndpointPaged', 'RegisteredServerPaged', 'WorkflowPaged', 'Reason', + 'IncomingTrafficPolicy', + 'PrivateEndpointServiceConnectionStatus', + 'PrivateEndpointConnectionProvisioningState', 'ChangeDetectionMode', + 'FeatureStatus', + 'InitialDownloadPolicy', + 'LocalCacheMode', + 'ServerEndpointHealthState', + 'ServerEndpointSyncActivityState', + 'ServerEndpointSyncMode', + 'ServerEndpointOfflineDataTransferState', + 'RegisteredServerAgentVersionStatus', + 'WorkflowStatus', + 'OperationDirection', 'NameAvailabilityReason', + 'ProgressType', ] diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models.py index 0f10576b514f..a6abf068ce1b 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models.py @@ -16,16 +16,19 @@ class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -49,19 +52,21 @@ def __init__(self, **kwargs): class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -175,19 +180,21 @@ def __init__(self, **kwargs): class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -213,13 +220,13 @@ class CloudEndpoint(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param storage_account_resource_id: Storage Account Resource Id :type storage_account_resource_id: str @@ -282,13 +289,13 @@ class CloudEndpointCreateParameters(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param storage_account_resource_id: Storage Account Resource Id :type storage_account_resource_id: str @@ -332,6 +339,221 @@ class CloudError(Model): } +class CloudTieringCachePerformance(Model): + """Server endpoint cloud tiering status object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar cache_hit_bytes: Count of bytes that were served from the local + server + :vartype cache_hit_bytes: long + :ivar cache_miss_bytes: Count of bytes that were served from the cloud + :vartype cache_miss_bytes: long + :ivar cache_hit_bytes_percent: Percentage of total bytes (hit + miss) that + were served from the local server + :vartype cache_hit_bytes_percent: int + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'cache_hit_bytes': {'readonly': True, 'minimum': 0}, + 'cache_miss_bytes': {'readonly': True, 'minimum': 0}, + 'cache_hit_bytes_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'cache_hit_bytes': {'key': 'cacheHitBytes', 'type': 'long'}, + 'cache_miss_bytes': {'key': 'cacheMissBytes', 'type': 'long'}, + 'cache_hit_bytes_percent': {'key': 'cacheHitBytesPercent', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(CloudTieringCachePerformance, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.cache_hit_bytes = None + self.cache_miss_bytes = None + self.cache_hit_bytes_percent = None + + +class CloudTieringDatePolicyStatus(Model): + """Status of the date policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar tiered_files_most_recent_access_timestamp: Most recent access time + of tiered files + :vartype tiered_files_most_recent_access_timestamp: datetime + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'tiered_files_most_recent_access_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'tiered_files_most_recent_access_timestamp': {'key': 'tieredFilesMostRecentAccessTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(CloudTieringDatePolicyStatus, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.tiered_files_most_recent_access_timestamp = None + + +class CloudTieringFilesNotTiering(Model): + """Server endpoint cloud tiering status object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar total_file_count: Last cloud tiering result (HResult) + :vartype total_file_count: long + :ivar errors: Array of tiering errors + :vartype errors: list[~azure.mgmt.storagesync.models.FilesNotTieringError] + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'total_file_count': {'readonly': True, 'minimum': 0}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'total_file_count': {'key': 'totalFileCount', 'type': 'long'}, + 'errors': {'key': 'errors', 'type': '[FilesNotTieringError]'}, + } + + def __init__(self, **kwargs): + super(CloudTieringFilesNotTiering, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.total_file_count = None + self.errors = None + + +class CloudTieringSpaceSavings(Model): + """Server endpoint cloud tiering status object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar volume_size_bytes: Volume size + :vartype volume_size_bytes: long + :ivar total_size_cloud_bytes: Total size of content in the azure file + share + :vartype total_size_cloud_bytes: long + :ivar cached_size_bytes: Cached content size on the server + :vartype cached_size_bytes: long + :ivar space_savings_percent: Percentage of cached size over total size + :vartype space_savings_percent: int + :ivar space_savings_bytes: Count of bytes saved on the server + :vartype space_savings_bytes: long + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'volume_size_bytes': {'readonly': True, 'minimum': 0}, + 'total_size_cloud_bytes': {'readonly': True, 'minimum': 0}, + 'cached_size_bytes': {'readonly': True, 'minimum': 0}, + 'space_savings_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + 'space_savings_bytes': {'readonly': True, 'minimum': 0}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'volume_size_bytes': {'key': 'volumeSizeBytes', 'type': 'long'}, + 'total_size_cloud_bytes': {'key': 'totalSizeCloudBytes', 'type': 'long'}, + 'cached_size_bytes': {'key': 'cachedSizeBytes', 'type': 'long'}, + 'space_savings_percent': {'key': 'spaceSavingsPercent', 'type': 'int'}, + 'space_savings_bytes': {'key': 'spaceSavingsBytes', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(CloudTieringSpaceSavings, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.volume_size_bytes = None + self.total_size_cloud_bytes = None + self.cached_size_bytes = None + self.space_savings_percent = None + self.space_savings_bytes = None + + +class CloudTieringVolumeFreeSpacePolicyStatus(Model): + """Status of the volume free space policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar effective_volume_free_space_policy: In the case where multiple + server endpoints are present in a volume, an effective free space policy + is applied. + :vartype effective_volume_free_space_policy: int + :ivar current_volume_free_space_percent: Current volume free space + percentage. + :vartype current_volume_free_space_percent: int + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'effective_volume_free_space_policy': {'readonly': True, 'maximum': 100, 'minimum': 0}, + 'current_volume_free_space_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'effective_volume_free_space_policy': {'key': 'effectiveVolumeFreeSpacePolicy', 'type': 'int'}, + 'current_volume_free_space_percent': {'key': 'currentVolumeFreeSpacePercent', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(CloudTieringVolumeFreeSpacePolicyStatus, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.effective_volume_free_space_policy = None + self.current_volume_free_space_percent = None + + +class FilesNotTieringError(Model): + """Files not tiering error object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_code: Error code (HResult) + :vartype error_code: int + :ivar file_count: Count of files with this error + :vartype file_count: long + """ + + _validation = { + 'error_code': {'readonly': True}, + 'file_count': {'readonly': True, 'minimum': 0}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'file_count': {'key': 'fileCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(FilesNotTieringError, self).__init__(**kwargs) + self.error_code = None + self.file_count = None + + class OperationDisplayInfo(Model): """The operation supported by storage sync. @@ -398,12 +620,15 @@ class OperationEntity(Model): :type display: ~azure.mgmt.storagesync.models.OperationDisplayInfo :param origin: The origin. :type origin: str + :param properties: Properties of the operations resource. + :type properties: ~azure.mgmt.storagesync.models.OperationProperties """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, } def __init__(self, **kwargs): @@ -411,6 +636,108 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) self.display = kwargs.get('display', None) self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationProperties(Model): + """Properties of the operations resource. + + :param service_specification: Service specification for the operations + resource. + :type service_specification: + ~azure.mgmt.storagesync.models.OperationResourceServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'OperationResourceServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationResourceMetricSpecification(Model): + """Operation Display Resource object. + + :param name: Name of the metric. + :type name: str + :param display_name: Display name for the metric. + :type display_name: str + :param display_description: Display description for the metric. + :type display_description: str + :param unit: Unit for the metric. + :type unit: str + :param aggregation_type: Aggregation type for the metric. + :type aggregation_type: str + :param fill_gap_with_zero: Fill gaps in the metric with zero. + :type fill_gap_with_zero: bool + :param dimensions: Dimensions for the metric specification. + :type dimensions: + list[~azure.mgmt.storagesync.models.OperationResourceMetricSpecificationDimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[OperationResourceMetricSpecificationDimension]'}, + } + + def __init__(self, **kwargs): + super(OperationResourceMetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.dimensions = kwargs.get('dimensions', None) + + +class OperationResourceMetricSpecificationDimension(Model): + """OperationResourceMetricSpecificationDimension object. + + :param name: Name of the dimension. + :type name: str + :param display_name: Display name of the dimensions. + :type display_name: str + :param to_be_exported_for_shoebox: Indicates metric should be exported for + Shoebox. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(OperationResourceMetricSpecificationDimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class OperationResourceServiceSpecification(Model): + """Service specification. + + :param metric_specifications: List of metric specifications. + :type metric_specifications: + list[~azure.mgmt.storagesync.models.OperationResourceMetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationResourceMetricSpecification]'}, + } + + def __init__(self, **kwargs): + super(OperationResourceServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) class OperationStatus(Model): @@ -577,6 +904,174 @@ def __init__(self, **kwargs): self.pause_wait_for_sync_drain_time_period_in_seconds = kwargs.get('pause_wait_for_sync_drain_time_period_in_seconds', None) +class PrivateEndpoint(Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ARM identifier for Private Endpoint + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~azure.mgmt.storagesync.models.PrivateEndpoint + :param private_link_service_connection_state: Required. A collection of + information about the state of the connection between service consumer and + provider. + :type private_link_service_connection_state: + ~azure.mgmt.storagesync.models.PrivateLinkServiceConnectionState + :param provisioning_state: The provisioning state of the private endpoint + connection resource. Possible values include: 'Succeeded', 'Creating', + 'Deleting', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.storagesync.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_link_service_connection_state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS + zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(Model): + """A list of private link resources. + + :param value: Array of private link resources + :type value: list[~azure.mgmt.storagesync.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(Model): + """A collection of information about the state of the connection between + service consumer and provider. + + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected' + :type status: str or + ~azure.mgmt.storagesync.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service + provider require any updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + class RecallActionParameters(Model): """The parameters used when calling recall action on server endpoint. @@ -603,27 +1098,34 @@ class RegisteredServer(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param server_certificate: Registered Server Certificate :type server_certificate: str :param agent_version: Registered Server Agent Version :type agent_version: str + :ivar agent_version_status: Registered Server Agent Version Status. + Possible values include: 'Ok', 'NearExpiry', 'Expired', 'Blocked' + :vartype agent_version_status: str or + ~azure.mgmt.storagesync.models.RegisteredServerAgentVersionStatus + :ivar agent_version_expiration_date: Registered Server Agent Version + Expiration Date + :vartype agent_version_expiration_date: datetime :param server_os_version: Registered Server OS Version :type server_os_version: str - :param server_management_error_code: Registered Server Management Error + :ivar server_management_error_code: Registered Server Management Error Code - :type server_management_error_code: int - :param last_heart_beat: Registered Server last heart beat - :type last_heart_beat: str - :param provisioning_state: Registered Server Provisioning State - :type provisioning_state: str + :vartype server_management_error_code: int + :ivar last_heart_beat: Registered Server last heart beat + :vartype last_heart_beat: datetime + :ivar provisioning_state: Registered Server Provisioning State + :vartype provisioning_state: str :param server_role: Registered Server serverRole :type server_role: str :param cluster_id: Registered Server clusterId @@ -632,30 +1134,49 @@ class RegisteredServer(ProxyResource): :type cluster_name: str :param server_id: Registered Server serverId :type server_id: str - :param storage_sync_service_uid: Registered Server storageSyncServiceUid - :type storage_sync_service_uid: str - :param last_workflow_id: Registered Server lastWorkflowId - :type last_workflow_id: str - :param last_operation_name: Resource Last Operation Name - :type last_operation_name: str - :param discovery_endpoint_uri: Resource discoveryEndpointUri - :type discovery_endpoint_uri: str - :param resource_location: Resource Location - :type resource_location: str - :param service_location: Service Location - :type service_location: str + :ivar storage_sync_service_uid: Registered Server storageSyncServiceUid + :vartype storage_sync_service_uid: str + :ivar last_workflow_id: Registered Server lastWorkflowId + :vartype last_workflow_id: str + :ivar last_operation_name: Resource Last Operation Name + :vartype last_operation_name: str + :ivar discovery_endpoint_uri: Resource discoveryEndpointUri + :vartype discovery_endpoint_uri: str + :ivar resource_location: Resource Location + :vartype resource_location: str + :ivar service_location: Service Location + :vartype service_location: str :param friendly_name: Friendly Name :type friendly_name: str - :param management_endpoint_uri: Management Endpoint Uri - :type management_endpoint_uri: str - :param monitoring_configuration: Monitoring Configuration - :type monitoring_configuration: str + :ivar management_endpoint_uri: Management Endpoint Uri + :vartype management_endpoint_uri: str + :ivar monitoring_endpoint_uri: Telemetry Endpoint Uri + :vartype monitoring_endpoint_uri: str + :ivar monitoring_configuration: Monitoring Configuration + :vartype monitoring_configuration: str + :ivar server_name: Server name + :vartype server_name: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'agent_version_status': {'readonly': True}, + 'agent_version_expiration_date': {'readonly': True}, + 'server_management_error_code': {'readonly': True}, + 'last_heart_beat': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'storage_sync_service_uid': {'readonly': True}, + 'last_workflow_id': {'readonly': True}, + 'last_operation_name': {'readonly': True}, + 'discovery_endpoint_uri': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'service_location': {'readonly': True}, + 'management_endpoint_uri': {'readonly': True}, + 'monitoring_endpoint_uri': {'readonly': True}, + 'monitoring_configuration': {'readonly': True}, + 'server_name': {'readonly': True}, } _attribute_map = { @@ -664,9 +1185,11 @@ class RegisteredServer(ProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'server_certificate': {'key': 'properties.serverCertificate', 'type': 'str'}, 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'agent_version_status': {'key': 'properties.agentVersionStatus', 'type': 'str'}, + 'agent_version_expiration_date': {'key': 'properties.agentVersionExpirationDate', 'type': 'iso-8601'}, 'server_os_version': {'key': 'properties.serverOSVersion', 'type': 'str'}, 'server_management_error_code': {'key': 'properties.serverManagementErrorCode', 'type': 'int'}, - 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'str'}, + 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, @@ -680,30 +1203,36 @@ class RegisteredServer(ProxyResource): 'service_location': {'key': 'properties.serviceLocation', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'management_endpoint_uri': {'key': 'properties.managementEndpointUri', 'type': 'str'}, + 'monitoring_endpoint_uri': {'key': 'properties.monitoringEndpointUri', 'type': 'str'}, 'monitoring_configuration': {'key': 'properties.monitoringConfiguration', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, } def __init__(self, **kwargs): super(RegisteredServer, self).__init__(**kwargs) self.server_certificate = kwargs.get('server_certificate', None) self.agent_version = kwargs.get('agent_version', None) + self.agent_version_status = None + self.agent_version_expiration_date = None self.server_os_version = kwargs.get('server_os_version', None) - self.server_management_error_code = kwargs.get('server_management_error_code', None) - self.last_heart_beat = kwargs.get('last_heart_beat', None) - self.provisioning_state = kwargs.get('provisioning_state', None) + self.server_management_error_code = None + self.last_heart_beat = None + self.provisioning_state = 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.storage_sync_service_uid = kwargs.get('storage_sync_service_uid', None) - self.last_workflow_id = kwargs.get('last_workflow_id', None) - self.last_operation_name = kwargs.get('last_operation_name', None) - self.discovery_endpoint_uri = kwargs.get('discovery_endpoint_uri', None) - self.resource_location = kwargs.get('resource_location', None) - self.service_location = kwargs.get('service_location', None) + self.storage_sync_service_uid = None + self.last_workflow_id = None + self.last_operation_name = None + self.discovery_endpoint_uri = None + self.resource_location = None + self.service_location = None self.friendly_name = kwargs.get('friendly_name', None) - self.management_endpoint_uri = kwargs.get('management_endpoint_uri', None) - self.monitoring_configuration = kwargs.get('monitoring_configuration', None) + self.management_endpoint_uri = None + self.monitoring_endpoint_uri = None + self.monitoring_configuration = None + self.server_name = None class RegisteredServerCreateParameters(ProxyResource): @@ -712,13 +1241,13 @@ class RegisteredServerCreateParameters(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param server_certificate: Registered Server Certificate :type server_certificate: str @@ -820,18 +1349,18 @@ class ServerEndpoint(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: 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 + :type cloud_tiering: str or ~azure.mgmt.storagesync.models.FeatureStatus :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 @@ -852,7 +1381,8 @@ class ServerEndpoint(ProxyResource): ~azure.mgmt.storagesync.models.ServerEndpointSyncStatus :param offline_data_transfer: Offline data transfer. Possible values include: 'on', 'off' - :type offline_data_transfer: str or ~azure.mgmt.storagesync.models.enum + :type offline_data_transfer: str or + ~azure.mgmt.storagesync.models.FeatureStatus :ivar offline_data_transfer_storage_account_resource_id: Offline data transfer storage account resource ID :vartype offline_data_transfer_storage_account_resource_id: str @@ -869,6 +1399,19 @@ class ServerEndpoint(ProxyResource): enabled. :vartype recall_status: ~azure.mgmt.storagesync.models.ServerEndpointRecallStatus + :param initial_download_policy: Policy for how namespace and files are + recalled during FastDr. Possible values include: 'NamespaceOnly', + 'NamespaceThenModifiedFiles', 'AvoidTieredFiles' + :type initial_download_policy: str or + ~azure.mgmt.storagesync.models.InitialDownloadPolicy + :param local_cache_mode: Policy for enabling follow-the-sun business + models: link local cache to cloud behavior to pre-populate before local + access. Possible values include: 'DownloadNewAndModifiedFiles', + 'UpdateLocallyCachedFiles' + :type local_cache_mode: str or + ~azure.mgmt.storagesync.models.LocalCacheMode + :ivar server_name: Server name + :vartype server_name: str """ _validation = { @@ -885,6 +1428,7 @@ class ServerEndpoint(ProxyResource): 'offline_data_transfer_storage_account_tenant_id': {'readonly': True}, 'cloud_tiering_status': {'readonly': True}, 'recall_status': {'readonly': True}, + 'server_name': {'readonly': True}, } _attribute_map = { @@ -907,6 +1451,9 @@ class ServerEndpoint(ProxyResource): 'offline_data_transfer_share_name': {'key': 'properties.offlineDataTransferShareName', 'type': 'str'}, 'cloud_tiering_status': {'key': 'properties.cloudTieringStatus', 'type': 'ServerEndpointCloudTieringStatus'}, 'recall_status': {'key': 'properties.recallStatus', 'type': 'ServerEndpointRecallStatus'}, + 'initial_download_policy': {'key': 'properties.initialDownloadPolicy', 'type': 'str'}, + 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -927,6 +1474,42 @@ def __init__(self, **kwargs): self.offline_data_transfer_share_name = kwargs.get('offline_data_transfer_share_name', None) self.cloud_tiering_status = None self.recall_status = None + self.initial_download_policy = kwargs.get('initial_download_policy', None) + self.local_cache_mode = kwargs.get('local_cache_mode', None) + self.server_name = None + + +class ServerEndpointBackgroundDataDownloadActivity(Model): + """Background data download activity object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp when properties were updated + :vartype timestamp: datetime + :ivar percent_progress: Progress percentage + :vartype percent_progress: int + :ivar downloaded_bytes: Running count of bytes downloaded + :vartype downloaded_bytes: long + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'percent_progress': {'readonly': True, 'maximum': 100, 'minimum': 0}, + 'downloaded_bytes': {'readonly': True, 'minimum': 0}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'percent_progress': {'key': 'percentProgress', 'type': 'int'}, + 'downloaded_bytes': {'key': 'downloadedBytes', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ServerEndpointBackgroundDataDownloadActivity, self).__init__(**kwargs) + self.timestamp = None + self.percent_progress = None + self.downloaded_bytes = None class ServerEndpointCloudTieringStatus(Model): @@ -935,37 +1518,78 @@ class ServerEndpointCloudTieringStatus(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar health: Cloud tiering health state. Possible values include: - 'Healthy', 'Error' - :vartype health: str or ~azure.mgmt.storagesync.models.enum :ivar last_updated_timestamp: Last updated timestamp :vartype last_updated_timestamp: datetime + :ivar health: Cloud tiering health state. Possible values include: + 'Unavailable', 'Healthy', 'Error' + :vartype health: str or + ~azure.mgmt.storagesync.models.ServerEndpointHealthState + :ivar health_last_updated_timestamp: The last updated timestamp of health + state + :vartype health_last_updated_timestamp: datetime :ivar last_cloud_tiering_result: Last cloud tiering result (HResult) :vartype last_cloud_tiering_result: int :ivar last_success_timestamp: Last cloud tiering success timestamp :vartype last_success_timestamp: datetime + :ivar space_savings: Information regarding how much local space cloud + tiering is saving. + :vartype space_savings: + ~azure.mgmt.storagesync.models.CloudTieringSpaceSavings + :ivar cache_performance: Information regarding how well the local cache on + the server is performing. + :vartype cache_performance: + ~azure.mgmt.storagesync.models.CloudTieringCachePerformance + :ivar files_not_tiering: Information regarding files that failed to be + tiered + :vartype files_not_tiering: + ~azure.mgmt.storagesync.models.CloudTieringFilesNotTiering + :ivar volume_free_space_policy_status: Status of the volume free space + policy + :vartype volume_free_space_policy_status: + ~azure.mgmt.storagesync.models.CloudTieringVolumeFreeSpacePolicyStatus + :ivar date_policy_status: Status of the date policy + :vartype date_policy_status: + ~azure.mgmt.storagesync.models.CloudTieringDatePolicyStatus """ _validation = { - 'health': {'readonly': True}, 'last_updated_timestamp': {'readonly': True}, + 'health': {'readonly': True}, + 'health_last_updated_timestamp': {'readonly': True}, 'last_cloud_tiering_result': {'readonly': True}, 'last_success_timestamp': {'readonly': True}, + 'space_savings': {'readonly': True}, + 'cache_performance': {'readonly': True}, + 'files_not_tiering': {'readonly': True}, + 'volume_free_space_policy_status': {'readonly': True}, + 'date_policy_status': {'readonly': True}, } _attribute_map = { - 'health': {'key': 'health', 'type': 'str'}, 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'health': {'key': 'health', 'type': 'str'}, + 'health_last_updated_timestamp': {'key': 'healthLastUpdatedTimestamp', 'type': 'iso-8601'}, 'last_cloud_tiering_result': {'key': 'lastCloudTieringResult', 'type': 'int'}, 'last_success_timestamp': {'key': 'lastSuccessTimestamp', 'type': 'iso-8601'}, + 'space_savings': {'key': 'spaceSavings', 'type': 'CloudTieringSpaceSavings'}, + 'cache_performance': {'key': 'cachePerformance', 'type': 'CloudTieringCachePerformance'}, + 'files_not_tiering': {'key': 'filesNotTiering', 'type': 'CloudTieringFilesNotTiering'}, + 'volume_free_space_policy_status': {'key': 'volumeFreeSpacePolicyStatus', 'type': 'CloudTieringVolumeFreeSpacePolicyStatus'}, + 'date_policy_status': {'key': 'datePolicyStatus', 'type': 'CloudTieringDatePolicyStatus'}, } def __init__(self, **kwargs): super(ServerEndpointCloudTieringStatus, self).__init__(**kwargs) - self.health = None self.last_updated_timestamp = None + self.health = None + self.health_last_updated_timestamp = None self.last_cloud_tiering_result = None self.last_success_timestamp = None + self.space_savings = None + self.cache_performance = None + self.files_not_tiering = None + self.volume_free_space_policy_status = None + self.date_policy_status = None class ServerEndpointCreateParameters(ProxyResource): @@ -974,18 +1598,18 @@ class ServerEndpointCreateParameters(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: 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 + :type cloud_tiering: str or ~azure.mgmt.storagesync.models.FeatureStatus :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 @@ -997,9 +1621,21 @@ class ServerEndpointCreateParameters(ProxyResource): :type server_resource_id: str :param offline_data_transfer: Offline data transfer. Possible values include: 'on', 'off' - :type offline_data_transfer: str or ~azure.mgmt.storagesync.models.enum + :type offline_data_transfer: str or + ~azure.mgmt.storagesync.models.FeatureStatus :param offline_data_transfer_share_name: Offline data transfer share name :type offline_data_transfer_share_name: str + :param initial_download_policy: Policy for how namespace and files are + recalled during FastDr. Possible values include: 'NamespaceOnly', + 'NamespaceThenModifiedFiles', 'AvoidTieredFiles' + :type initial_download_policy: str or + ~azure.mgmt.storagesync.models.InitialDownloadPolicy + :param local_cache_mode: Policy for enabling follow-the-sun business + models: link local cache to cloud behavior to pre-populate before local + access. Possible values include: 'DownloadNewAndModifiedFiles', + 'UpdateLocallyCachedFiles' + :type local_cache_mode: str or + ~azure.mgmt.storagesync.models.LocalCacheMode """ _validation = { @@ -1022,6 +1658,8 @@ class ServerEndpointCreateParameters(ProxyResource): 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, 'offline_data_transfer': {'key': 'properties.offlineDataTransfer', 'type': 'str'}, 'offline_data_transfer_share_name': {'key': 'properties.offlineDataTransferShareName', 'type': 'str'}, + 'initial_download_policy': {'key': 'properties.initialDownloadPolicy', 'type': 'str'}, + 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1034,6 +1672,8 @@ def __init__(self, **kwargs): self.server_resource_id = kwargs.get('server_resource_id', None) self.offline_data_transfer = kwargs.get('offline_data_transfer', None) self.offline_data_transfer_share_name = kwargs.get('offline_data_transfer_share_name', None) + self.initial_download_policy = kwargs.get('initial_download_policy', None) + self.local_cache_mode = kwargs.get('local_cache_mode', None) class ServerEndpointFilesNotSyncingError(Model): @@ -1151,6 +1791,11 @@ class ServerEndpointSyncActivityStatus(Model): :vartype applied_bytes: long :ivar total_bytes: Total bytes (if available) :vartype total_bytes: long + :ivar sync_mode: Sync mode. Possible values include: 'Regular', + 'NamespaceDownload', 'InitialUpload', 'SnapshotUpload', + 'InitialFullDownload' + :vartype sync_mode: str or + ~azure.mgmt.storagesync.models.ServerEndpointSyncMode """ _validation = { @@ -1160,6 +1805,7 @@ class ServerEndpointSyncActivityStatus(Model): 'total_item_count': {'readonly': True, 'minimum': 0}, 'applied_bytes': {'readonly': True, 'minimum': 0}, 'total_bytes': {'readonly': True, 'minimum': 0}, + 'sync_mode': {'readonly': True}, } _attribute_map = { @@ -1169,6 +1815,7 @@ class ServerEndpointSyncActivityStatus(Model): 'total_item_count': {'key': 'totalItemCount', 'type': 'long'}, 'applied_bytes': {'key': 'appliedBytes', 'type': 'long'}, 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'sync_mode': {'key': 'syncMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1179,6 +1826,7 @@ def __init__(self, **kwargs): self.total_item_count = None self.applied_bytes = None self.total_bytes = None + self.sync_mode = None class ServerEndpointSyncSessionStatus(Model): @@ -1205,6 +1853,11 @@ class ServerEndpointSyncSessionStatus(Model): last sync session. :vartype files_not_syncing_errors: list[~azure.mgmt.storagesync.models.ServerEndpointFilesNotSyncingError] + :ivar last_sync_mode: Sync mode. Possible values include: 'Regular', + 'NamespaceDownload', 'InitialUpload', 'SnapshotUpload', + 'InitialFullDownload' + :vartype last_sync_mode: str or + ~azure.mgmt.storagesync.models.ServerEndpointSyncMode """ _validation = { @@ -1215,6 +1868,7 @@ class ServerEndpointSyncSessionStatus(Model): 'persistent_files_not_syncing_count': {'readonly': True, 'minimum': 0}, 'transient_files_not_syncing_count': {'readonly': True, 'minimum': 0}, 'files_not_syncing_errors': {'readonly': True}, + 'last_sync_mode': {'readonly': True}, } _attribute_map = { @@ -1225,6 +1879,7 @@ class ServerEndpointSyncSessionStatus(Model): 'persistent_files_not_syncing_count': {'key': 'persistentFilesNotSyncingCount', 'type': 'long'}, 'transient_files_not_syncing_count': {'key': 'transientFilesNotSyncingCount', 'type': 'long'}, 'files_not_syncing_errors': {'key': 'filesNotSyncingErrors', 'type': '[ServerEndpointFilesNotSyncingError]'}, + 'last_sync_mode': {'key': 'lastSyncMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1236,6 +1891,7 @@ def __init__(self, **kwargs): self.persistent_files_not_syncing_count = None self.transient_files_not_syncing_count = None self.files_not_syncing_errors = None + self.last_sync_mode = None class ServerEndpointSyncStatus(Model): @@ -1245,20 +1901,21 @@ class ServerEndpointSyncStatus(Model): sending a request. :ivar download_health: Download Health Status. Possible values include: - 'Healthy', 'Error', 'SyncBlockedForRestore', - 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - :vartype download_health: str or ~azure.mgmt.storagesync.models.enum + 'Unavailable', 'Healthy', 'Error' + :vartype download_health: str or + ~azure.mgmt.storagesync.models.ServerEndpointHealthState :ivar upload_health: Upload Health Status. Possible values include: - 'Healthy', 'Error', 'SyncBlockedForRestore', - 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - :vartype upload_health: str or ~azure.mgmt.storagesync.models.enum + 'Unavailable', 'Healthy', 'Error' + :vartype upload_health: str or + ~azure.mgmt.storagesync.models.ServerEndpointHealthState :ivar combined_health: Combined Health Status. Possible values include: - 'Healthy', 'Error', 'SyncBlockedForRestore', - 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - :vartype combined_health: str or ~azure.mgmt.storagesync.models.enum + 'Unavailable', 'Healthy', 'Error' + :vartype combined_health: str or + ~azure.mgmt.storagesync.models.ServerEndpointHealthState :ivar sync_activity: Sync activity. Possible values include: 'Upload', 'Download', 'UploadAndDownload' - :vartype sync_activity: str or ~azure.mgmt.storagesync.models.enum + :vartype sync_activity: str or + ~azure.mgmt.storagesync.models.ServerEndpointSyncActivityState :ivar total_persistent_files_not_syncing_count: Total count of persistent files not syncing (combined upload + download). :vartype total_persistent_files_not_syncing_count: long @@ -1279,7 +1936,10 @@ class ServerEndpointSyncStatus(Model): :ivar offline_data_transfer_status: Offline Data Transfer State. Possible values include: 'InProgress', 'Stopping', 'NotRunning', 'Complete' :vartype offline_data_transfer_status: str or - ~azure.mgmt.storagesync.models.enum + ~azure.mgmt.storagesync.models.ServerEndpointOfflineDataTransferState + :ivar background_data_download_activity: Background data download activity + :vartype background_data_download_activity: + ~azure.mgmt.storagesync.models.ServerEndpointBackgroundDataDownloadActivity """ _validation = { @@ -1294,6 +1954,7 @@ class ServerEndpointSyncStatus(Model): 'upload_activity': {'readonly': True}, 'download_activity': {'readonly': True}, 'offline_data_transfer_status': {'readonly': True}, + 'background_data_download_activity': {'readonly': True}, } _attribute_map = { @@ -1308,6 +1969,7 @@ class ServerEndpointSyncStatus(Model): 'upload_activity': {'key': 'uploadActivity', 'type': 'ServerEndpointSyncActivityStatus'}, 'download_activity': {'key': 'downloadActivity', 'type': 'ServerEndpointSyncActivityStatus'}, 'offline_data_transfer_status': {'key': 'offlineDataTransferStatus', 'type': 'str'}, + 'background_data_download_activity': {'key': 'backgroundDataDownloadActivity', 'type': 'ServerEndpointBackgroundDataDownloadActivity'}, } def __init__(self, **kwargs): @@ -1323,13 +1985,14 @@ def __init__(self, **kwargs): self.upload_activity = None self.download_activity = None self.offline_data_transfer_status = None + self.background_data_download_activity = None class ServerEndpointUpdateParameters(Model): """Parameters for updating an Server Endpoint. :param cloud_tiering: Cloud Tiering. Possible values include: 'on', 'off' - :type cloud_tiering: str or ~azure.mgmt.storagesync.models.enum + :type cloud_tiering: str or ~azure.mgmt.storagesync.models.FeatureStatus :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 @@ -1337,9 +2000,16 @@ class ServerEndpointUpdateParameters(Model): :type tier_files_older_than_days: int :param offline_data_transfer: Offline data transfer. Possible values include: 'on', 'off' - :type offline_data_transfer: str or ~azure.mgmt.storagesync.models.enum + :type offline_data_transfer: str or + ~azure.mgmt.storagesync.models.FeatureStatus :param offline_data_transfer_share_name: Offline data transfer share name :type offline_data_transfer_share_name: str + :param local_cache_mode: Policy for enabling follow-the-sun business + models: link local cache to cloud behavior to pre-populate before local + access. Possible values include: 'DownloadNewAndModifiedFiles', + 'UpdateLocallyCachedFiles' + :type local_cache_mode: str or + ~azure.mgmt.storagesync.models.LocalCacheMode """ _validation = { @@ -1353,6 +2023,7 @@ class ServerEndpointUpdateParameters(Model): 'tier_files_older_than_days': {'key': 'properties.tierFilesOlderThanDays', 'type': 'int'}, 'offline_data_transfer': {'key': 'properties.offlineDataTransfer', 'type': 'str'}, 'offline_data_transfer_share_name': {'key': 'properties.offlineDataTransferShareName', 'type': 'str'}, + 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1362,6 +2033,7 @@ def __init__(self, **kwargs): self.tier_files_older_than_days = kwargs.get('tier_files_older_than_days', None) self.offline_data_transfer = kwargs.get('offline_data_transfer', None) self.offline_data_transfer_share_name = kwargs.get('offline_data_transfer_share_name', None) + self.local_cache_mode = kwargs.get('local_cache_mode', None) class StorageSyncApiError(Model): @@ -1375,6 +2047,9 @@ class StorageSyncApiError(Model): :type target: str :param details: Error details of the given entry. :type details: ~azure.mgmt.storagesync.models.StorageSyncErrorDetails + :param inner_error: Inner error details of the given entry. + :type inner_error: + ~azure.mgmt.storagesync.models.StorageSyncInnerErrorDetails """ _attribute_map = { @@ -1382,6 +2057,7 @@ class StorageSyncApiError(Model): 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'details': {'key': 'details', 'type': 'StorageSyncErrorDetails'}, + 'inner_error': {'key': 'innerError', 'type': 'StorageSyncInnerErrorDetails'}, } def __init__(self, **kwargs): @@ -1390,6 +2066,7 @@ def __init__(self, **kwargs): self.message = kwargs.get('message', None) self.target = kwargs.get('target', None) self.details = kwargs.get('details', None) + self.inner_error = kwargs.get('inner_error', None) class StorageSyncError(Model): @@ -1433,12 +2110,27 @@ class StorageSyncErrorDetails(Model): :type message: str :param target: Target of the given entry. :type target: str + :param request_uri: Request URI of the given entry. + :type request_uri: str + :param exception_type: Exception type of the given entry. + :type exception_type: str + :param http_method: HTTP method of the given entry. + :type http_method: str + :param hashed_message: Hashed message of the given entry. + :type hashed_message: str + :param http_error_code: HTTP error code of the given entry. + :type http_error_code: str """ _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'exception_type': {'key': 'exceptionType', 'type': 'str'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + 'hashed_message': {'key': 'hashedMessage', 'type': 'str'}, + 'http_error_code': {'key': 'httpErrorCode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1446,23 +2138,59 @@ def __init__(self, **kwargs): self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) self.target = kwargs.get('target', None) + self.request_uri = kwargs.get('request_uri', None) + self.exception_type = kwargs.get('exception_type', None) + self.http_method = kwargs.get('http_method', None) + self.hashed_message = kwargs.get('hashed_message', None) + self.http_error_code = kwargs.get('http_error_code', None) + + +class StorageSyncInnerErrorDetails(Model): + """Error Details object. + + :param call_stack: Call stack of the error. + :type call_stack: str + :param message: Error message of the error. + :type message: str + :param inner_exception: Exception of the inner error. + :type inner_exception: str + :param inner_exception_call_stack: Call stack of the inner error. + :type inner_exception_call_stack: str + """ + + _attribute_map = { + 'call_stack': {'key': 'callStack', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'inner_exception': {'key': 'innerException', 'type': 'str'}, + 'inner_exception_call_stack': {'key': 'innerExceptionCallStack', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageSyncInnerErrorDetails, self).__init__(**kwargs) + self.call_stack = kwargs.get('call_stack', None) + self.message = kwargs.get('message', None) + self.inner_exception = kwargs.get('inner_exception', None) + self.inner_exception_call_stack = kwargs.get('inner_exception_call_stack', None) class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. 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: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -1499,22 +2227,36 @@ class StorageSyncService(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives :type location: str + :param incoming_traffic_policy: Incoming Traffic Policy. Possible values + include: 'AllowAllTraffic', 'AllowVirtualNetworksOnly' + :type incoming_traffic_policy: str or + ~azure.mgmt.storagesync.models.IncomingTrafficPolicy :ivar storage_sync_service_status: Storage Sync service status. :vartype storage_sync_service_status: int :ivar storage_sync_service_uid: Storage Sync service Uid :vartype storage_sync_service_uid: str + :ivar provisioning_state: StorageSyncService Provisioning State + :vartype provisioning_state: str + :ivar last_workflow_id: StorageSyncService lastWorkflowId + :vartype last_workflow_id: str + :ivar last_operation_name: Resource Last Operation Name + :vartype last_operation_name: str + :ivar private_endpoint_connections: List of private endpoint connection + associated with the specified storage sync service + :vartype private_endpoint_connections: + list[~azure.mgmt.storagesync.models.PrivateEndpointConnection] """ _validation = { @@ -1524,6 +2266,10 @@ class StorageSyncService(TrackedResource): 'location': {'required': True}, 'storage_sync_service_status': {'readonly': True}, 'storage_sync_service_uid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'last_workflow_id': {'readonly': True}, + 'last_operation_name': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { @@ -1532,14 +2278,24 @@ class StorageSyncService(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'incoming_traffic_policy': {'key': 'properties.incomingTrafficPolicy', 'type': 'str'}, 'storage_sync_service_status': {'key': 'properties.storageSyncServiceStatus', 'type': 'int'}, 'storage_sync_service_uid': {'key': 'properties.storageSyncServiceUid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, + 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, } def __init__(self, **kwargs): super(StorageSyncService, self).__init__(**kwargs) + self.incoming_traffic_policy = kwargs.get('incoming_traffic_policy', None) self.storage_sync_service_status = None self.storage_sync_service_uid = None + self.provisioning_state = None + self.last_workflow_id = None + self.last_operation_name = None + self.private_endpoint_connections = None class StorageSyncServiceCreateParameters(Model): @@ -1559,8 +2315,10 @@ class StorageSyncServiceCreateParameters(Model): 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: - :type properties: object + :param incoming_traffic_policy: Incoming Traffic Policy. Possible values + include: 'AllowAllTraffic', 'AllowVirtualNetworksOnly' + :type incoming_traffic_policy: str or + ~azure.mgmt.storagesync.models.IncomingTrafficPolicy """ _validation = { @@ -1570,14 +2328,14 @@ class StorageSyncServiceCreateParameters(Model): _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, + 'incoming_traffic_policy': {'key': 'properties.incomingTrafficPolicy', 'type': 'str'}, } def __init__(self, **kwargs): super(StorageSyncServiceCreateParameters, self).__init__(**kwargs) self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) + self.incoming_traffic_policy = kwargs.get('incoming_traffic_policy', None) class StorageSyncServiceUpdateParameters(Model): @@ -1586,19 +2344,21 @@ class StorageSyncServiceUpdateParameters(Model): :param tags: The user-specified tags associated with the storage sync service. :type tags: dict[str, str] - :param properties: The properties of the storage sync service. - :type properties: object + :param incoming_traffic_policy: Incoming Traffic Policy. Possible values + include: 'AllowAllTraffic', 'AllowVirtualNetworksOnly' + :type incoming_traffic_policy: str or + ~azure.mgmt.storagesync.models.IncomingTrafficPolicy """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, + 'incoming_traffic_policy': {'key': 'properties.incomingTrafficPolicy', 'type': 'str'}, } def __init__(self, **kwargs): super(StorageSyncServiceUpdateParameters, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) + self.incoming_traffic_policy = kwargs.get('incoming_traffic_policy', None) class SubscriptionState(Model): @@ -1639,13 +2399,13 @@ class SyncGroup(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar unique_id: Unique Id :vartype unique_id: str @@ -1681,13 +2441,13 @@ class SyncGroupCreateParameters(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param properties: The parameters used to create the sync group :type properties: object @@ -1763,32 +2523,47 @@ class Workflow(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param last_step_name: last step name - :type last_step_name: str - :param status: workflow status. Possible values include: 'active', + :ivar last_step_name: last step name + :vartype last_step_name: str + :ivar status: workflow status. Possible values include: 'active', 'expired', 'succeeded', 'aborted', 'failed' - :type status: str or ~azure.mgmt.storagesync.models.enum - :param operation: operation direction. Possible values include: 'do', + :vartype status: str or ~azure.mgmt.storagesync.models.WorkflowStatus + :ivar operation: operation direction. Possible values include: 'do', 'undo', 'cancel' - :type operation: str or ~azure.mgmt.storagesync.models.enum - :param steps: workflow steps - :type steps: str - :param last_operation_id: workflow last operation identifier. - :type last_operation_id: str + :vartype operation: str or + ~azure.mgmt.storagesync.models.OperationDirection + :ivar steps: workflow steps + :vartype steps: str + :ivar last_operation_id: workflow last operation identifier. + :vartype last_operation_id: str + :ivar command_name: workflow command name. + :vartype command_name: str + :ivar created_timestamp: workflow created timestamp. + :vartype created_timestamp: datetime + :ivar last_status_timestamp: workflow last status timestamp. + :vartype last_status_timestamp: datetime """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'last_step_name': {'readonly': True}, + 'status': {'readonly': True}, + 'operation': {'readonly': True}, + 'steps': {'readonly': True}, + 'last_operation_id': {'readonly': True}, + 'command_name': {'readonly': True}, + 'created_timestamp': {'readonly': True}, + 'last_status_timestamp': {'readonly': True}, } _attribute_map = { @@ -1800,12 +2575,18 @@ class Workflow(ProxyResource): 'operation': {'key': 'properties.operation', 'type': 'str'}, 'steps': {'key': 'properties.steps', 'type': 'str'}, 'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'}, + 'command_name': {'key': 'properties.commandName', 'type': 'str'}, + 'created_timestamp': {'key': 'properties.createdTimestamp', 'type': 'iso-8601'}, + 'last_status_timestamp': {'key': 'properties.lastStatusTimestamp', 'type': 'iso-8601'}, } def __init__(self, **kwargs): super(Workflow, self).__init__(**kwargs) - self.last_step_name = kwargs.get('last_step_name', None) - self.status = kwargs.get('status', None) - self.operation = kwargs.get('operation', None) - self.steps = kwargs.get('steps', None) - self.last_operation_id = kwargs.get('last_operation_id', None) + self.last_step_name = None + self.status = None + self.operation = None + self.steps = None + self.last_operation_id = None + self.command_name = None + self.created_timestamp = None + self.last_status_timestamp = None diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models_py3.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models_py3.py index 46c1bca387b7..f54da6f020b9 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models_py3.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_models_py3.py @@ -16,16 +16,19 @@ class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -49,19 +52,21 @@ def __init__(self, **kwargs) -> None: class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -175,19 +180,21 @@ def __init__(self, **kwargs) -> None: class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -213,13 +220,13 @@ class CloudEndpoint(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param storage_account_resource_id: Storage Account Resource Id :type storage_account_resource_id: str @@ -282,13 +289,13 @@ class CloudEndpointCreateParameters(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param storage_account_resource_id: Storage Account Resource Id :type storage_account_resource_id: str @@ -332,6 +339,221 @@ class CloudError(Model): } +class CloudTieringCachePerformance(Model): + """Server endpoint cloud tiering status object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar cache_hit_bytes: Count of bytes that were served from the local + server + :vartype cache_hit_bytes: long + :ivar cache_miss_bytes: Count of bytes that were served from the cloud + :vartype cache_miss_bytes: long + :ivar cache_hit_bytes_percent: Percentage of total bytes (hit + miss) that + were served from the local server + :vartype cache_hit_bytes_percent: int + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'cache_hit_bytes': {'readonly': True, 'minimum': 0}, + 'cache_miss_bytes': {'readonly': True, 'minimum': 0}, + 'cache_hit_bytes_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'cache_hit_bytes': {'key': 'cacheHitBytes', 'type': 'long'}, + 'cache_miss_bytes': {'key': 'cacheMissBytes', 'type': 'long'}, + 'cache_hit_bytes_percent': {'key': 'cacheHitBytesPercent', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudTieringCachePerformance, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.cache_hit_bytes = None + self.cache_miss_bytes = None + self.cache_hit_bytes_percent = None + + +class CloudTieringDatePolicyStatus(Model): + """Status of the date policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar tiered_files_most_recent_access_timestamp: Most recent access time + of tiered files + :vartype tiered_files_most_recent_access_timestamp: datetime + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'tiered_files_most_recent_access_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'tiered_files_most_recent_access_timestamp': {'key': 'tieredFilesMostRecentAccessTimestamp', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudTieringDatePolicyStatus, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.tiered_files_most_recent_access_timestamp = None + + +class CloudTieringFilesNotTiering(Model): + """Server endpoint cloud tiering status object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar total_file_count: Last cloud tiering result (HResult) + :vartype total_file_count: long + :ivar errors: Array of tiering errors + :vartype errors: list[~azure.mgmt.storagesync.models.FilesNotTieringError] + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'total_file_count': {'readonly': True, 'minimum': 0}, + 'errors': {'readonly': True}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'total_file_count': {'key': 'totalFileCount', 'type': 'long'}, + 'errors': {'key': 'errors', 'type': '[FilesNotTieringError]'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudTieringFilesNotTiering, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.total_file_count = None + self.errors = None + + +class CloudTieringSpaceSavings(Model): + """Server endpoint cloud tiering status object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar volume_size_bytes: Volume size + :vartype volume_size_bytes: long + :ivar total_size_cloud_bytes: Total size of content in the azure file + share + :vartype total_size_cloud_bytes: long + :ivar cached_size_bytes: Cached content size on the server + :vartype cached_size_bytes: long + :ivar space_savings_percent: Percentage of cached size over total size + :vartype space_savings_percent: int + :ivar space_savings_bytes: Count of bytes saved on the server + :vartype space_savings_bytes: long + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'volume_size_bytes': {'readonly': True, 'minimum': 0}, + 'total_size_cloud_bytes': {'readonly': True, 'minimum': 0}, + 'cached_size_bytes': {'readonly': True, 'minimum': 0}, + 'space_savings_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + 'space_savings_bytes': {'readonly': True, 'minimum': 0}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'volume_size_bytes': {'key': 'volumeSizeBytes', 'type': 'long'}, + 'total_size_cloud_bytes': {'key': 'totalSizeCloudBytes', 'type': 'long'}, + 'cached_size_bytes': {'key': 'cachedSizeBytes', 'type': 'long'}, + 'space_savings_percent': {'key': 'spaceSavingsPercent', 'type': 'int'}, + 'space_savings_bytes': {'key': 'spaceSavingsBytes', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudTieringSpaceSavings, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.volume_size_bytes = None + self.total_size_cloud_bytes = None + self.cached_size_bytes = None + self.space_savings_percent = None + self.space_savings_bytes = None + + +class CloudTieringVolumeFreeSpacePolicyStatus(Model): + """Status of the volume free space policy. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar last_updated_timestamp: Last updated timestamp + :vartype last_updated_timestamp: datetime + :ivar effective_volume_free_space_policy: In the case where multiple + server endpoints are present in a volume, an effective free space policy + is applied. + :vartype effective_volume_free_space_policy: int + :ivar current_volume_free_space_percent: Current volume free space + percentage. + :vartype current_volume_free_space_percent: int + """ + + _validation = { + 'last_updated_timestamp': {'readonly': True}, + 'effective_volume_free_space_policy': {'readonly': True, 'maximum': 100, 'minimum': 0}, + 'current_volume_free_space_percent': {'readonly': True, 'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'effective_volume_free_space_policy': {'key': 'effectiveVolumeFreeSpacePolicy', 'type': 'int'}, + 'current_volume_free_space_percent': {'key': 'currentVolumeFreeSpacePercent', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(CloudTieringVolumeFreeSpacePolicyStatus, self).__init__(**kwargs) + self.last_updated_timestamp = None + self.effective_volume_free_space_policy = None + self.current_volume_free_space_percent = None + + +class FilesNotTieringError(Model): + """Files not tiering error object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error_code: Error code (HResult) + :vartype error_code: int + :ivar file_count: Count of files with this error + :vartype file_count: long + """ + + _validation = { + 'error_code': {'readonly': True}, + 'file_count': {'readonly': True, 'minimum': 0}, + } + + _attribute_map = { + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'file_count': {'key': 'fileCount', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(FilesNotTieringError, self).__init__(**kwargs) + self.error_code = None + self.file_count = None + + class OperationDisplayInfo(Model): """The operation supported by storage sync. @@ -398,19 +620,124 @@ class OperationEntity(Model): :type display: ~azure.mgmt.storagesync.models.OperationDisplayInfo :param origin: The origin. :type origin: str + :param properties: Properties of the operations resource. + :type properties: ~azure.mgmt.storagesync.models.OperationProperties """ _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, } - def __init__(self, *, name: str=None, display=None, origin: str=None, **kwargs) -> None: + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: super(OperationEntity, self).__init__(**kwargs) self.name = name self.display = display self.origin = origin + self.properties = properties + + +class OperationProperties(Model): + """Properties of the operations resource. + + :param service_specification: Service specification for the operations + resource. + :type service_specification: + ~azure.mgmt.storagesync.models.OperationResourceServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'OperationResourceServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class OperationResourceMetricSpecification(Model): + """Operation Display Resource object. + + :param name: Name of the metric. + :type name: str + :param display_name: Display name for the metric. + :type display_name: str + :param display_description: Display description for the metric. + :type display_description: str + :param unit: Unit for the metric. + :type unit: str + :param aggregation_type: Aggregation type for the metric. + :type aggregation_type: str + :param fill_gap_with_zero: Fill gaps in the metric with zero. + :type fill_gap_with_zero: bool + :param dimensions: Dimensions for the metric specification. + :type dimensions: + list[~azure.mgmt.storagesync.models.OperationResourceMetricSpecificationDimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[OperationResourceMetricSpecificationDimension]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, fill_gap_with_zero: bool=None, dimensions=None, **kwargs) -> None: + super(OperationResourceMetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.fill_gap_with_zero = fill_gap_with_zero + self.dimensions = dimensions + + +class OperationResourceMetricSpecificationDimension(Model): + """OperationResourceMetricSpecificationDimension object. + + :param name: Name of the dimension. + :type name: str + :param display_name: Display name of the dimensions. + :type display_name: str + :param to_be_exported_for_shoebox: Indicates metric should be exported for + Shoebox. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(OperationResourceMetricSpecificationDimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class OperationResourceServiceSpecification(Model): + """Service specification. + + :param metric_specifications: List of metric specifications. + :type metric_specifications: + list[~azure.mgmt.storagesync.models.OperationResourceMetricSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationResourceMetricSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, **kwargs) -> None: + super(OperationResourceServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications class OperationStatus(Model): @@ -577,6 +904,174 @@ def __init__(self, *, partition: str=None, replica_group: str=None, request_id: self.pause_wait_for_sync_drain_time_period_in_seconds = pause_wait_for_sync_drain_time_period_in_seconds +class PrivateEndpoint(Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The ARM identifier for Private Endpoint + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + 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: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~azure.mgmt.storagesync.models.PrivateEndpoint + :param private_link_service_connection_state: Required. A collection of + information about the state of the connection between service consumer and + provider. + :type private_link_service_connection_state: + ~azure.mgmt.storagesync.models.PrivateLinkServiceConnectionState + :param provisioning_state: The provisioning state of the private endpoint + connection resource. Possible values include: 'Succeeded', 'Creating', + 'Deleting', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.storagesync.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_link_service_connection_state': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, private_link_service_connection_state, private_endpoint=None, provisioning_state=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS + zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, *, required_zone_names=None, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(Model): + """A list of private link resources. + + :param value: Array of private link resources + :type value: list[~azure.mgmt.storagesync.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(Model): + """A collection of information about the state of the connection between + service consumer and provider. + + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected' + :type status: str or + ~azure.mgmt.storagesync.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service + provider require any updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, *, status=None, description: str=None, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + class RecallActionParameters(Model): """The parameters used when calling recall action on server endpoint. @@ -603,27 +1098,34 @@ class RegisteredServer(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param server_certificate: Registered Server Certificate :type server_certificate: str :param agent_version: Registered Server Agent Version :type agent_version: str + :ivar agent_version_status: Registered Server Agent Version Status. + Possible values include: 'Ok', 'NearExpiry', 'Expired', 'Blocked' + :vartype agent_version_status: str or + ~azure.mgmt.storagesync.models.RegisteredServerAgentVersionStatus + :ivar agent_version_expiration_date: Registered Server Agent Version + Expiration Date + :vartype agent_version_expiration_date: datetime :param server_os_version: Registered Server OS Version :type server_os_version: str - :param server_management_error_code: Registered Server Management Error + :ivar server_management_error_code: Registered Server Management Error Code - :type server_management_error_code: int - :param last_heart_beat: Registered Server last heart beat - :type last_heart_beat: str - :param provisioning_state: Registered Server Provisioning State - :type provisioning_state: str + :vartype server_management_error_code: int + :ivar last_heart_beat: Registered Server last heart beat + :vartype last_heart_beat: datetime + :ivar provisioning_state: Registered Server Provisioning State + :vartype provisioning_state: str :param server_role: Registered Server serverRole :type server_role: str :param cluster_id: Registered Server clusterId @@ -632,30 +1134,49 @@ class RegisteredServer(ProxyResource): :type cluster_name: str :param server_id: Registered Server serverId :type server_id: str - :param storage_sync_service_uid: Registered Server storageSyncServiceUid - :type storage_sync_service_uid: str - :param last_workflow_id: Registered Server lastWorkflowId - :type last_workflow_id: str - :param last_operation_name: Resource Last Operation Name - :type last_operation_name: str - :param discovery_endpoint_uri: Resource discoveryEndpointUri - :type discovery_endpoint_uri: str - :param resource_location: Resource Location - :type resource_location: str - :param service_location: Service Location - :type service_location: str + :ivar storage_sync_service_uid: Registered Server storageSyncServiceUid + :vartype storage_sync_service_uid: str + :ivar last_workflow_id: Registered Server lastWorkflowId + :vartype last_workflow_id: str + :ivar last_operation_name: Resource Last Operation Name + :vartype last_operation_name: str + :ivar discovery_endpoint_uri: Resource discoveryEndpointUri + :vartype discovery_endpoint_uri: str + :ivar resource_location: Resource Location + :vartype resource_location: str + :ivar service_location: Service Location + :vartype service_location: str :param friendly_name: Friendly Name :type friendly_name: str - :param management_endpoint_uri: Management Endpoint Uri - :type management_endpoint_uri: str - :param monitoring_configuration: Monitoring Configuration - :type monitoring_configuration: str + :ivar management_endpoint_uri: Management Endpoint Uri + :vartype management_endpoint_uri: str + :ivar monitoring_endpoint_uri: Telemetry Endpoint Uri + :vartype monitoring_endpoint_uri: str + :ivar monitoring_configuration: Monitoring Configuration + :vartype monitoring_configuration: str + :ivar server_name: Server name + :vartype server_name: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'agent_version_status': {'readonly': True}, + 'agent_version_expiration_date': {'readonly': True}, + 'server_management_error_code': {'readonly': True}, + 'last_heart_beat': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'storage_sync_service_uid': {'readonly': True}, + 'last_workflow_id': {'readonly': True}, + 'last_operation_name': {'readonly': True}, + 'discovery_endpoint_uri': {'readonly': True}, + 'resource_location': {'readonly': True}, + 'service_location': {'readonly': True}, + 'management_endpoint_uri': {'readonly': True}, + 'monitoring_endpoint_uri': {'readonly': True}, + 'monitoring_configuration': {'readonly': True}, + 'server_name': {'readonly': True}, } _attribute_map = { @@ -664,9 +1185,11 @@ class RegisteredServer(ProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'server_certificate': {'key': 'properties.serverCertificate', 'type': 'str'}, 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'agent_version_status': {'key': 'properties.agentVersionStatus', 'type': 'str'}, + 'agent_version_expiration_date': {'key': 'properties.agentVersionExpirationDate', 'type': 'iso-8601'}, 'server_os_version': {'key': 'properties.serverOSVersion', 'type': 'str'}, 'server_management_error_code': {'key': 'properties.serverManagementErrorCode', 'type': 'int'}, - 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'str'}, + 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, @@ -680,30 +1203,36 @@ class RegisteredServer(ProxyResource): 'service_location': {'key': 'properties.serviceLocation', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'management_endpoint_uri': {'key': 'properties.managementEndpointUri', 'type': 'str'}, + 'monitoring_endpoint_uri': {'key': 'properties.monitoringEndpointUri', 'type': 'str'}, 'monitoring_configuration': {'key': 'properties.monitoringConfiguration', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, } - def __init__(self, *, server_certificate: str=None, agent_version: str=None, server_os_version: str=None, server_management_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, monitoring_configuration: str=None, **kwargs) -> None: + def __init__(self, *, server_certificate: str=None, agent_version: str=None, server_os_version: 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(RegisteredServer, self).__init__(**kwargs) self.server_certificate = server_certificate self.agent_version = agent_version + self.agent_version_status = None + self.agent_version_expiration_date = None self.server_os_version = server_os_version - self.server_management_error_code = server_management_error_code - self.last_heart_beat = last_heart_beat - self.provisioning_state = provisioning_state + self.server_management_error_code = None + self.last_heart_beat = None + self.provisioning_state = None self.server_role = server_role self.cluster_id = cluster_id self.cluster_name = cluster_name self.server_id = server_id - self.storage_sync_service_uid = storage_sync_service_uid - self.last_workflow_id = last_workflow_id - self.last_operation_name = last_operation_name - self.discovery_endpoint_uri = discovery_endpoint_uri - self.resource_location = resource_location - self.service_location = service_location + self.storage_sync_service_uid = None + self.last_workflow_id = None + self.last_operation_name = None + self.discovery_endpoint_uri = None + self.resource_location = None + self.service_location = None self.friendly_name = friendly_name - self.management_endpoint_uri = management_endpoint_uri - self.monitoring_configuration = monitoring_configuration + self.management_endpoint_uri = None + self.monitoring_endpoint_uri = None + self.monitoring_configuration = None + self.server_name = None class RegisteredServerCreateParameters(ProxyResource): @@ -712,13 +1241,13 @@ class RegisteredServerCreateParameters(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param server_certificate: Registered Server Certificate :type server_certificate: str @@ -820,18 +1349,18 @@ class ServerEndpoint(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: 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 + :type cloud_tiering: str or ~azure.mgmt.storagesync.models.FeatureStatus :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 @@ -852,7 +1381,8 @@ class ServerEndpoint(ProxyResource): ~azure.mgmt.storagesync.models.ServerEndpointSyncStatus :param offline_data_transfer: Offline data transfer. Possible values include: 'on', 'off' - :type offline_data_transfer: str or ~azure.mgmt.storagesync.models.enum + :type offline_data_transfer: str or + ~azure.mgmt.storagesync.models.FeatureStatus :ivar offline_data_transfer_storage_account_resource_id: Offline data transfer storage account resource ID :vartype offline_data_transfer_storage_account_resource_id: str @@ -869,6 +1399,19 @@ class ServerEndpoint(ProxyResource): enabled. :vartype recall_status: ~azure.mgmt.storagesync.models.ServerEndpointRecallStatus + :param initial_download_policy: Policy for how namespace and files are + recalled during FastDr. Possible values include: 'NamespaceOnly', + 'NamespaceThenModifiedFiles', 'AvoidTieredFiles' + :type initial_download_policy: str or + ~azure.mgmt.storagesync.models.InitialDownloadPolicy + :param local_cache_mode: Policy for enabling follow-the-sun business + models: link local cache to cloud behavior to pre-populate before local + access. Possible values include: 'DownloadNewAndModifiedFiles', + 'UpdateLocallyCachedFiles' + :type local_cache_mode: str or + ~azure.mgmt.storagesync.models.LocalCacheMode + :ivar server_name: Server name + :vartype server_name: str """ _validation = { @@ -885,6 +1428,7 @@ class ServerEndpoint(ProxyResource): 'offline_data_transfer_storage_account_tenant_id': {'readonly': True}, 'cloud_tiering_status': {'readonly': True}, 'recall_status': {'readonly': True}, + 'server_name': {'readonly': True}, } _attribute_map = { @@ -907,9 +1451,12 @@ class ServerEndpoint(ProxyResource): 'offline_data_transfer_share_name': {'key': 'properties.offlineDataTransferShareName', 'type': 'str'}, 'cloud_tiering_status': {'key': 'properties.cloudTieringStatus', 'type': 'ServerEndpointCloudTieringStatus'}, 'recall_status': {'key': 'properties.recallStatus', 'type': 'ServerEndpointRecallStatus'}, + 'initial_download_policy': {'key': 'properties.initialDownloadPolicy', 'type': 'str'}, + 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, + 'server_name': {'key': 'properties.serverName', 'type': 'str'}, } - def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, friendly_name: str=None, server_resource_id: str=None, offline_data_transfer=None, offline_data_transfer_share_name: str=None, **kwargs) -> None: + def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, friendly_name: str=None, server_resource_id: str=None, offline_data_transfer=None, offline_data_transfer_share_name: str=None, initial_download_policy=None, local_cache_mode=None, **kwargs) -> None: super(ServerEndpoint, self).__init__(**kwargs) self.server_local_path = server_local_path self.cloud_tiering = cloud_tiering @@ -927,6 +1474,42 @@ def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_fr self.offline_data_transfer_share_name = offline_data_transfer_share_name self.cloud_tiering_status = None self.recall_status = None + self.initial_download_policy = initial_download_policy + self.local_cache_mode = local_cache_mode + self.server_name = None + + +class ServerEndpointBackgroundDataDownloadActivity(Model): + """Background data download activity object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar timestamp: Timestamp when properties were updated + :vartype timestamp: datetime + :ivar percent_progress: Progress percentage + :vartype percent_progress: int + :ivar downloaded_bytes: Running count of bytes downloaded + :vartype downloaded_bytes: long + """ + + _validation = { + 'timestamp': {'readonly': True}, + 'percent_progress': {'readonly': True, 'maximum': 100, 'minimum': 0}, + 'downloaded_bytes': {'readonly': True, 'minimum': 0}, + } + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'percent_progress': {'key': 'percentProgress', 'type': 'int'}, + 'downloaded_bytes': {'key': 'downloadedBytes', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(ServerEndpointBackgroundDataDownloadActivity, self).__init__(**kwargs) + self.timestamp = None + self.percent_progress = None + self.downloaded_bytes = None class ServerEndpointCloudTieringStatus(Model): @@ -935,37 +1518,78 @@ class ServerEndpointCloudTieringStatus(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar health: Cloud tiering health state. Possible values include: - 'Healthy', 'Error' - :vartype health: str or ~azure.mgmt.storagesync.models.enum :ivar last_updated_timestamp: Last updated timestamp :vartype last_updated_timestamp: datetime + :ivar health: Cloud tiering health state. Possible values include: + 'Unavailable', 'Healthy', 'Error' + :vartype health: str or + ~azure.mgmt.storagesync.models.ServerEndpointHealthState + :ivar health_last_updated_timestamp: The last updated timestamp of health + state + :vartype health_last_updated_timestamp: datetime :ivar last_cloud_tiering_result: Last cloud tiering result (HResult) :vartype last_cloud_tiering_result: int :ivar last_success_timestamp: Last cloud tiering success timestamp :vartype last_success_timestamp: datetime + :ivar space_savings: Information regarding how much local space cloud + tiering is saving. + :vartype space_savings: + ~azure.mgmt.storagesync.models.CloudTieringSpaceSavings + :ivar cache_performance: Information regarding how well the local cache on + the server is performing. + :vartype cache_performance: + ~azure.mgmt.storagesync.models.CloudTieringCachePerformance + :ivar files_not_tiering: Information regarding files that failed to be + tiered + :vartype files_not_tiering: + ~azure.mgmt.storagesync.models.CloudTieringFilesNotTiering + :ivar volume_free_space_policy_status: Status of the volume free space + policy + :vartype volume_free_space_policy_status: + ~azure.mgmt.storagesync.models.CloudTieringVolumeFreeSpacePolicyStatus + :ivar date_policy_status: Status of the date policy + :vartype date_policy_status: + ~azure.mgmt.storagesync.models.CloudTieringDatePolicyStatus """ _validation = { - 'health': {'readonly': True}, 'last_updated_timestamp': {'readonly': True}, + 'health': {'readonly': True}, + 'health_last_updated_timestamp': {'readonly': True}, 'last_cloud_tiering_result': {'readonly': True}, 'last_success_timestamp': {'readonly': True}, + 'space_savings': {'readonly': True}, + 'cache_performance': {'readonly': True}, + 'files_not_tiering': {'readonly': True}, + 'volume_free_space_policy_status': {'readonly': True}, + 'date_policy_status': {'readonly': True}, } _attribute_map = { - 'health': {'key': 'health', 'type': 'str'}, 'last_updated_timestamp': {'key': 'lastUpdatedTimestamp', 'type': 'iso-8601'}, + 'health': {'key': 'health', 'type': 'str'}, + 'health_last_updated_timestamp': {'key': 'healthLastUpdatedTimestamp', 'type': 'iso-8601'}, 'last_cloud_tiering_result': {'key': 'lastCloudTieringResult', 'type': 'int'}, 'last_success_timestamp': {'key': 'lastSuccessTimestamp', 'type': 'iso-8601'}, + 'space_savings': {'key': 'spaceSavings', 'type': 'CloudTieringSpaceSavings'}, + 'cache_performance': {'key': 'cachePerformance', 'type': 'CloudTieringCachePerformance'}, + 'files_not_tiering': {'key': 'filesNotTiering', 'type': 'CloudTieringFilesNotTiering'}, + 'volume_free_space_policy_status': {'key': 'volumeFreeSpacePolicyStatus', 'type': 'CloudTieringVolumeFreeSpacePolicyStatus'}, + 'date_policy_status': {'key': 'datePolicyStatus', 'type': 'CloudTieringDatePolicyStatus'}, } def __init__(self, **kwargs) -> None: super(ServerEndpointCloudTieringStatus, self).__init__(**kwargs) - self.health = None self.last_updated_timestamp = None + self.health = None + self.health_last_updated_timestamp = None self.last_cloud_tiering_result = None self.last_success_timestamp = None + self.space_savings = None + self.cache_performance = None + self.files_not_tiering = None + self.volume_free_space_policy_status = None + self.date_policy_status = None class ServerEndpointCreateParameters(ProxyResource): @@ -974,18 +1598,18 @@ class ServerEndpointCreateParameters(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: 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 + :type cloud_tiering: str or ~azure.mgmt.storagesync.models.FeatureStatus :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 @@ -997,9 +1621,21 @@ class ServerEndpointCreateParameters(ProxyResource): :type server_resource_id: str :param offline_data_transfer: Offline data transfer. Possible values include: 'on', 'off' - :type offline_data_transfer: str or ~azure.mgmt.storagesync.models.enum + :type offline_data_transfer: str or + ~azure.mgmt.storagesync.models.FeatureStatus :param offline_data_transfer_share_name: Offline data transfer share name :type offline_data_transfer_share_name: str + :param initial_download_policy: Policy for how namespace and files are + recalled during FastDr. Possible values include: 'NamespaceOnly', + 'NamespaceThenModifiedFiles', 'AvoidTieredFiles' + :type initial_download_policy: str or + ~azure.mgmt.storagesync.models.InitialDownloadPolicy + :param local_cache_mode: Policy for enabling follow-the-sun business + models: link local cache to cloud behavior to pre-populate before local + access. Possible values include: 'DownloadNewAndModifiedFiles', + 'UpdateLocallyCachedFiles' + :type local_cache_mode: str or + ~azure.mgmt.storagesync.models.LocalCacheMode """ _validation = { @@ -1022,9 +1658,11 @@ class ServerEndpointCreateParameters(ProxyResource): 'server_resource_id': {'key': 'properties.serverResourceId', 'type': 'str'}, 'offline_data_transfer': {'key': 'properties.offlineDataTransfer', 'type': 'str'}, 'offline_data_transfer_share_name': {'key': 'properties.offlineDataTransferShareName', 'type': 'str'}, + 'initial_download_policy': {'key': 'properties.initialDownloadPolicy', 'type': 'str'}, + 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, } - def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, friendly_name: str=None, server_resource_id: str=None, offline_data_transfer=None, offline_data_transfer_share_name: str=None, **kwargs) -> None: + def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, friendly_name: str=None, server_resource_id: str=None, offline_data_transfer=None, offline_data_transfer_share_name: str=None, initial_download_policy=None, local_cache_mode=None, **kwargs) -> None: super(ServerEndpointCreateParameters, self).__init__(**kwargs) self.server_local_path = server_local_path self.cloud_tiering = cloud_tiering @@ -1034,6 +1672,8 @@ def __init__(self, *, server_local_path: str=None, cloud_tiering=None, volume_fr self.server_resource_id = server_resource_id self.offline_data_transfer = offline_data_transfer self.offline_data_transfer_share_name = offline_data_transfer_share_name + self.initial_download_policy = initial_download_policy + self.local_cache_mode = local_cache_mode class ServerEndpointFilesNotSyncingError(Model): @@ -1151,6 +1791,11 @@ class ServerEndpointSyncActivityStatus(Model): :vartype applied_bytes: long :ivar total_bytes: Total bytes (if available) :vartype total_bytes: long + :ivar sync_mode: Sync mode. Possible values include: 'Regular', + 'NamespaceDownload', 'InitialUpload', 'SnapshotUpload', + 'InitialFullDownload' + :vartype sync_mode: str or + ~azure.mgmt.storagesync.models.ServerEndpointSyncMode """ _validation = { @@ -1160,6 +1805,7 @@ class ServerEndpointSyncActivityStatus(Model): 'total_item_count': {'readonly': True, 'minimum': 0}, 'applied_bytes': {'readonly': True, 'minimum': 0}, 'total_bytes': {'readonly': True, 'minimum': 0}, + 'sync_mode': {'readonly': True}, } _attribute_map = { @@ -1169,6 +1815,7 @@ class ServerEndpointSyncActivityStatus(Model): 'total_item_count': {'key': 'totalItemCount', 'type': 'long'}, 'applied_bytes': {'key': 'appliedBytes', 'type': 'long'}, 'total_bytes': {'key': 'totalBytes', 'type': 'long'}, + 'sync_mode': {'key': 'syncMode', 'type': 'str'}, } def __init__(self, **kwargs) -> None: @@ -1179,6 +1826,7 @@ def __init__(self, **kwargs) -> None: self.total_item_count = None self.applied_bytes = None self.total_bytes = None + self.sync_mode = None class ServerEndpointSyncSessionStatus(Model): @@ -1205,6 +1853,11 @@ class ServerEndpointSyncSessionStatus(Model): last sync session. :vartype files_not_syncing_errors: list[~azure.mgmt.storagesync.models.ServerEndpointFilesNotSyncingError] + :ivar last_sync_mode: Sync mode. Possible values include: 'Regular', + 'NamespaceDownload', 'InitialUpload', 'SnapshotUpload', + 'InitialFullDownload' + :vartype last_sync_mode: str or + ~azure.mgmt.storagesync.models.ServerEndpointSyncMode """ _validation = { @@ -1215,6 +1868,7 @@ class ServerEndpointSyncSessionStatus(Model): 'persistent_files_not_syncing_count': {'readonly': True, 'minimum': 0}, 'transient_files_not_syncing_count': {'readonly': True, 'minimum': 0}, 'files_not_syncing_errors': {'readonly': True}, + 'last_sync_mode': {'readonly': True}, } _attribute_map = { @@ -1225,6 +1879,7 @@ class ServerEndpointSyncSessionStatus(Model): 'persistent_files_not_syncing_count': {'key': 'persistentFilesNotSyncingCount', 'type': 'long'}, 'transient_files_not_syncing_count': {'key': 'transientFilesNotSyncingCount', 'type': 'long'}, 'files_not_syncing_errors': {'key': 'filesNotSyncingErrors', 'type': '[ServerEndpointFilesNotSyncingError]'}, + 'last_sync_mode': {'key': 'lastSyncMode', 'type': 'str'}, } def __init__(self, **kwargs) -> None: @@ -1236,6 +1891,7 @@ def __init__(self, **kwargs) -> None: self.persistent_files_not_syncing_count = None self.transient_files_not_syncing_count = None self.files_not_syncing_errors = None + self.last_sync_mode = None class ServerEndpointSyncStatus(Model): @@ -1245,20 +1901,21 @@ class ServerEndpointSyncStatus(Model): sending a request. :ivar download_health: Download Health Status. Possible values include: - 'Healthy', 'Error', 'SyncBlockedForRestore', - 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - :vartype download_health: str or ~azure.mgmt.storagesync.models.enum + 'Unavailable', 'Healthy', 'Error' + :vartype download_health: str or + ~azure.mgmt.storagesync.models.ServerEndpointHealthState :ivar upload_health: Upload Health Status. Possible values include: - 'Healthy', 'Error', 'SyncBlockedForRestore', - 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - :vartype upload_health: str or ~azure.mgmt.storagesync.models.enum + 'Unavailable', 'Healthy', 'Error' + :vartype upload_health: str or + ~azure.mgmt.storagesync.models.ServerEndpointHealthState :ivar combined_health: Combined Health Status. Possible values include: - 'Healthy', 'Error', 'SyncBlockedForRestore', - 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - :vartype combined_health: str or ~azure.mgmt.storagesync.models.enum + 'Unavailable', 'Healthy', 'Error' + :vartype combined_health: str or + ~azure.mgmt.storagesync.models.ServerEndpointHealthState :ivar sync_activity: Sync activity. Possible values include: 'Upload', 'Download', 'UploadAndDownload' - :vartype sync_activity: str or ~azure.mgmt.storagesync.models.enum + :vartype sync_activity: str or + ~azure.mgmt.storagesync.models.ServerEndpointSyncActivityState :ivar total_persistent_files_not_syncing_count: Total count of persistent files not syncing (combined upload + download). :vartype total_persistent_files_not_syncing_count: long @@ -1279,7 +1936,10 @@ class ServerEndpointSyncStatus(Model): :ivar offline_data_transfer_status: Offline Data Transfer State. Possible values include: 'InProgress', 'Stopping', 'NotRunning', 'Complete' :vartype offline_data_transfer_status: str or - ~azure.mgmt.storagesync.models.enum + ~azure.mgmt.storagesync.models.ServerEndpointOfflineDataTransferState + :ivar background_data_download_activity: Background data download activity + :vartype background_data_download_activity: + ~azure.mgmt.storagesync.models.ServerEndpointBackgroundDataDownloadActivity """ _validation = { @@ -1294,6 +1954,7 @@ class ServerEndpointSyncStatus(Model): 'upload_activity': {'readonly': True}, 'download_activity': {'readonly': True}, 'offline_data_transfer_status': {'readonly': True}, + 'background_data_download_activity': {'readonly': True}, } _attribute_map = { @@ -1308,6 +1969,7 @@ class ServerEndpointSyncStatus(Model): 'upload_activity': {'key': 'uploadActivity', 'type': 'ServerEndpointSyncActivityStatus'}, 'download_activity': {'key': 'downloadActivity', 'type': 'ServerEndpointSyncActivityStatus'}, 'offline_data_transfer_status': {'key': 'offlineDataTransferStatus', 'type': 'str'}, + 'background_data_download_activity': {'key': 'backgroundDataDownloadActivity', 'type': 'ServerEndpointBackgroundDataDownloadActivity'}, } def __init__(self, **kwargs) -> None: @@ -1323,13 +1985,14 @@ def __init__(self, **kwargs) -> None: self.upload_activity = None self.download_activity = None self.offline_data_transfer_status = None + self.background_data_download_activity = None class ServerEndpointUpdateParameters(Model): """Parameters for updating an Server Endpoint. :param cloud_tiering: Cloud Tiering. Possible values include: 'on', 'off' - :type cloud_tiering: str or ~azure.mgmt.storagesync.models.enum + :type cloud_tiering: str or ~azure.mgmt.storagesync.models.FeatureStatus :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 @@ -1337,9 +2000,16 @@ class ServerEndpointUpdateParameters(Model): :type tier_files_older_than_days: int :param offline_data_transfer: Offline data transfer. Possible values include: 'on', 'off' - :type offline_data_transfer: str or ~azure.mgmt.storagesync.models.enum + :type offline_data_transfer: str or + ~azure.mgmt.storagesync.models.FeatureStatus :param offline_data_transfer_share_name: Offline data transfer share name :type offline_data_transfer_share_name: str + :param local_cache_mode: Policy for enabling follow-the-sun business + models: link local cache to cloud behavior to pre-populate before local + access. Possible values include: 'DownloadNewAndModifiedFiles', + 'UpdateLocallyCachedFiles' + :type local_cache_mode: str or + ~azure.mgmt.storagesync.models.LocalCacheMode """ _validation = { @@ -1353,15 +2023,17 @@ class ServerEndpointUpdateParameters(Model): 'tier_files_older_than_days': {'key': 'properties.tierFilesOlderThanDays', 'type': 'int'}, 'offline_data_transfer': {'key': 'properties.offlineDataTransfer', 'type': 'str'}, 'offline_data_transfer_share_name': {'key': 'properties.offlineDataTransferShareName', 'type': 'str'}, + 'local_cache_mode': {'key': 'properties.localCacheMode', 'type': 'str'}, } - def __init__(self, *, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, offline_data_transfer=None, offline_data_transfer_share_name: str=None, **kwargs) -> None: + def __init__(self, *, cloud_tiering=None, volume_free_space_percent: int=None, tier_files_older_than_days: int=None, offline_data_transfer=None, offline_data_transfer_share_name: str=None, local_cache_mode=None, **kwargs) -> None: super(ServerEndpointUpdateParameters, self).__init__(**kwargs) self.cloud_tiering = cloud_tiering self.volume_free_space_percent = volume_free_space_percent self.tier_files_older_than_days = tier_files_older_than_days self.offline_data_transfer = offline_data_transfer self.offline_data_transfer_share_name = offline_data_transfer_share_name + self.local_cache_mode = local_cache_mode class StorageSyncApiError(Model): @@ -1375,6 +2047,9 @@ class StorageSyncApiError(Model): :type target: str :param details: Error details of the given entry. :type details: ~azure.mgmt.storagesync.models.StorageSyncErrorDetails + :param inner_error: Inner error details of the given entry. + :type inner_error: + ~azure.mgmt.storagesync.models.StorageSyncInnerErrorDetails """ _attribute_map = { @@ -1382,14 +2057,16 @@ class StorageSyncApiError(Model): 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, 'details': {'key': 'details', 'type': 'StorageSyncErrorDetails'}, + 'inner_error': {'key': 'innerError', 'type': 'StorageSyncInnerErrorDetails'}, } - def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, inner_error=None, **kwargs) -> None: super(StorageSyncApiError, self).__init__(**kwargs) self.code = code self.message = message self.target = target self.details = details + self.inner_error = inner_error class StorageSyncError(Model): @@ -1433,36 +2110,87 @@ class StorageSyncErrorDetails(Model): :type message: str :param target: Target of the given entry. :type target: str + :param request_uri: Request URI of the given entry. + :type request_uri: str + :param exception_type: Exception type of the given entry. + :type exception_type: str + :param http_method: HTTP method of the given entry. + :type http_method: str + :param hashed_message: Hashed message of the given entry. + :type hashed_message: str + :param http_error_code: HTTP error code of the given entry. + :type http_error_code: str """ _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'exception_type': {'key': 'exceptionType', 'type': 'str'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + 'hashed_message': {'key': 'hashedMessage', 'type': 'str'}, + 'http_error_code': {'key': 'httpErrorCode', 'type': 'str'}, } - def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None: + def __init__(self, *, code: str=None, message: str=None, target: str=None, request_uri: str=None, exception_type: str=None, http_method: str=None, hashed_message: str=None, http_error_code: str=None, **kwargs) -> None: super(StorageSyncErrorDetails, self).__init__(**kwargs) self.code = code self.message = message self.target = target + self.request_uri = request_uri + self.exception_type = exception_type + self.http_method = http_method + self.hashed_message = hashed_message + self.http_error_code = http_error_code + + +class StorageSyncInnerErrorDetails(Model): + """Error Details object. + + :param call_stack: Call stack of the error. + :type call_stack: str + :param message: Error message of the error. + :type message: str + :param inner_exception: Exception of the inner error. + :type inner_exception: str + :param inner_exception_call_stack: Call stack of the inner error. + :type inner_exception_call_stack: str + """ + + _attribute_map = { + 'call_stack': {'key': 'callStack', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'inner_exception': {'key': 'innerException', 'type': 'str'}, + 'inner_exception_call_stack': {'key': 'innerExceptionCallStack', 'type': 'str'}, + } + + def __init__(self, *, call_stack: str=None, message: str=None, inner_exception: str=None, inner_exception_call_stack: str=None, **kwargs) -> None: + super(StorageSyncInnerErrorDetails, self).__init__(**kwargs) + self.call_stack = call_stack + self.message = message + self.inner_exception = inner_exception + self.inner_exception_call_stack = inner_exception_call_stack class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. 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: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -1499,22 +2227,36 @@ class StorageSyncService(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives :type location: str + :param incoming_traffic_policy: Incoming Traffic Policy. Possible values + include: 'AllowAllTraffic', 'AllowVirtualNetworksOnly' + :type incoming_traffic_policy: str or + ~azure.mgmt.storagesync.models.IncomingTrafficPolicy :ivar storage_sync_service_status: Storage Sync service status. :vartype storage_sync_service_status: int :ivar storage_sync_service_uid: Storage Sync service Uid :vartype storage_sync_service_uid: str + :ivar provisioning_state: StorageSyncService Provisioning State + :vartype provisioning_state: str + :ivar last_workflow_id: StorageSyncService lastWorkflowId + :vartype last_workflow_id: str + :ivar last_operation_name: Resource Last Operation Name + :vartype last_operation_name: str + :ivar private_endpoint_connections: List of private endpoint connection + associated with the specified storage sync service + :vartype private_endpoint_connections: + list[~azure.mgmt.storagesync.models.PrivateEndpointConnection] """ _validation = { @@ -1524,6 +2266,10 @@ class StorageSyncService(TrackedResource): 'location': {'required': True}, 'storage_sync_service_status': {'readonly': True}, 'storage_sync_service_uid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'last_workflow_id': {'readonly': True}, + 'last_operation_name': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { @@ -1532,14 +2278,24 @@ class StorageSyncService(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'incoming_traffic_policy': {'key': 'properties.incomingTrafficPolicy', 'type': 'str'}, 'storage_sync_service_status': {'key': 'properties.storageSyncServiceStatus', 'type': 'int'}, 'storage_sync_service_uid': {'key': 'properties.storageSyncServiceUid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'last_workflow_id': {'key': 'properties.lastWorkflowId', 'type': 'str'}, + 'last_operation_name': {'key': 'properties.lastOperationName', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, } - def __init__(self, *, location: str, tags=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, incoming_traffic_policy=None, **kwargs) -> None: super(StorageSyncService, self).__init__(tags=tags, location=location, **kwargs) + self.incoming_traffic_policy = incoming_traffic_policy self.storage_sync_service_status = None self.storage_sync_service_uid = None + self.provisioning_state = None + self.last_workflow_id = None + self.last_operation_name = None + self.private_endpoint_connections = None class StorageSyncServiceCreateParameters(Model): @@ -1559,8 +2315,10 @@ class StorageSyncServiceCreateParameters(Model): 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: - :type properties: object + :param incoming_traffic_policy: Incoming Traffic Policy. Possible values + include: 'AllowAllTraffic', 'AllowVirtualNetworksOnly' + :type incoming_traffic_policy: str or + ~azure.mgmt.storagesync.models.IncomingTrafficPolicy """ _validation = { @@ -1570,14 +2328,14 @@ class StorageSyncServiceCreateParameters(Model): _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, + 'incoming_traffic_policy': {'key': 'properties.incomingTrafficPolicy', 'type': 'str'}, } - def __init__(self, *, location: str, tags=None, properties=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, incoming_traffic_policy=None, **kwargs) -> None: super(StorageSyncServiceCreateParameters, self).__init__(**kwargs) self.location = location self.tags = tags - self.properties = properties + self.incoming_traffic_policy = incoming_traffic_policy class StorageSyncServiceUpdateParameters(Model): @@ -1586,19 +2344,21 @@ class StorageSyncServiceUpdateParameters(Model): :param tags: The user-specified tags associated with the storage sync service. :type tags: dict[str, str] - :param properties: The properties of the storage sync service. - :type properties: object + :param incoming_traffic_policy: Incoming Traffic Policy. Possible values + include: 'AllowAllTraffic', 'AllowVirtualNetworksOnly' + :type incoming_traffic_policy: str or + ~azure.mgmt.storagesync.models.IncomingTrafficPolicy """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'object'}, + 'incoming_traffic_policy': {'key': 'properties.incomingTrafficPolicy', 'type': 'str'}, } - def __init__(self, *, tags=None, properties=None, **kwargs) -> None: + def __init__(self, *, tags=None, incoming_traffic_policy=None, **kwargs) -> None: super(StorageSyncServiceUpdateParameters, self).__init__(**kwargs) self.tags = tags - self.properties = properties + self.incoming_traffic_policy = incoming_traffic_policy class SubscriptionState(Model): @@ -1639,13 +2399,13 @@ class SyncGroup(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar unique_id: Unique Id :vartype unique_id: str @@ -1681,13 +2441,13 @@ class SyncGroupCreateParameters(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param properties: The parameters used to create the sync group :type properties: object @@ -1763,32 +2523,47 @@ class Workflow(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str - :param last_step_name: last step name - :type last_step_name: str - :param status: workflow status. Possible values include: 'active', + :ivar last_step_name: last step name + :vartype last_step_name: str + :ivar status: workflow status. Possible values include: 'active', 'expired', 'succeeded', 'aborted', 'failed' - :type status: str or ~azure.mgmt.storagesync.models.enum - :param operation: operation direction. Possible values include: 'do', + :vartype status: str or ~azure.mgmt.storagesync.models.WorkflowStatus + :ivar operation: operation direction. Possible values include: 'do', 'undo', 'cancel' - :type operation: str or ~azure.mgmt.storagesync.models.enum - :param steps: workflow steps - :type steps: str - :param last_operation_id: workflow last operation identifier. - :type last_operation_id: str + :vartype operation: str or + ~azure.mgmt.storagesync.models.OperationDirection + :ivar steps: workflow steps + :vartype steps: str + :ivar last_operation_id: workflow last operation identifier. + :vartype last_operation_id: str + :ivar command_name: workflow command name. + :vartype command_name: str + :ivar created_timestamp: workflow created timestamp. + :vartype created_timestamp: datetime + :ivar last_status_timestamp: workflow last status timestamp. + :vartype last_status_timestamp: datetime """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'last_step_name': {'readonly': True}, + 'status': {'readonly': True}, + 'operation': {'readonly': True}, + 'steps': {'readonly': True}, + 'last_operation_id': {'readonly': True}, + 'command_name': {'readonly': True}, + 'created_timestamp': {'readonly': True}, + 'last_status_timestamp': {'readonly': True}, } _attribute_map = { @@ -1800,12 +2575,18 @@ class Workflow(ProxyResource): 'operation': {'key': 'properties.operation', 'type': 'str'}, 'steps': {'key': 'properties.steps', 'type': 'str'}, 'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'}, + 'command_name': {'key': 'properties.commandName', 'type': 'str'}, + 'created_timestamp': {'key': 'properties.createdTimestamp', 'type': 'iso-8601'}, + 'last_status_timestamp': {'key': 'properties.lastStatusTimestamp', 'type': 'iso-8601'}, } - def __init__(self, *, last_step_name: str=None, status=None, operation=None, steps: str=None, last_operation_id: str=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(Workflow, self).__init__(**kwargs) - self.last_step_name = last_step_name - self.status = status - self.operation = operation - self.steps = steps - self.last_operation_id = last_operation_id + self.last_step_name = None + self.status = None + self.operation = None + self.steps = None + self.last_operation_id = None + self.command_name = None + self.created_timestamp = None + self.last_status_timestamp = None diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_paged_models.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_paged_models.py index 375104a5730b..9ec666f259eb 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_paged_models.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_paged_models.py @@ -38,6 +38,19 @@ class StorageSyncServicePaged(Paged): def __init__(self, *args, **kwargs): super(StorageSyncServicePaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) class SyncGroupPaged(Paged): """ A paging container for iterating over a list of :class:`SyncGroup ` object diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_storage_sync_management_client_enums.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_storage_sync_management_client_enums.py index 769a68bf9202..ed9fb767c6dd 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_storage_sync_management_client_enums.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/_storage_sync_management_client_enums.py @@ -21,13 +21,117 @@ class Reason(str, Enum): deleted = "Deleted" +class IncomingTrafficPolicy(str, Enum): + + allow_all_traffic = "AllowAllTraffic" + allow_virtual_networks_only = "AllowVirtualNetworksOnly" + + +class PrivateEndpointServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + + +class PrivateEndpointConnectionProvisioningState(str, Enum): + + succeeded = "Succeeded" + creating = "Creating" + deleting = "Deleting" + failed = "Failed" + + class ChangeDetectionMode(str, Enum): default = "Default" recursive = "Recursive" +class FeatureStatus(str, Enum): + + on = "on" + off = "off" + + +class InitialDownloadPolicy(str, Enum): + + namespace_only = "NamespaceOnly" + namespace_then_modified_files = "NamespaceThenModifiedFiles" + avoid_tiered_files = "AvoidTieredFiles" + + +class LocalCacheMode(str, Enum): + + download_new_and_modified_files = "DownloadNewAndModifiedFiles" + update_locally_cached_files = "UpdateLocallyCachedFiles" + + +class ServerEndpointHealthState(str, Enum): + + unavailable = "Unavailable" + healthy = "Healthy" + error = "Error" + + +class ServerEndpointSyncActivityState(str, Enum): + + upload = "Upload" + download = "Download" + upload_and_download = "UploadAndDownload" + + +class ServerEndpointSyncMode(str, Enum): + + regular = "Regular" + namespace_download = "NamespaceDownload" + initial_upload = "InitialUpload" + snapshot_upload = "SnapshotUpload" + initial_full_download = "InitialFullDownload" + + +class ServerEndpointOfflineDataTransferState(str, Enum): + + in_progress = "InProgress" + stopping = "Stopping" + not_running = "NotRunning" + complete = "Complete" + + +class RegisteredServerAgentVersionStatus(str, Enum): + + ok = "Ok" + near_expiry = "NearExpiry" + expired = "Expired" + blocked = "Blocked" + + +class WorkflowStatus(str, Enum): + + active = "active" + expired = "expired" + succeeded = "succeeded" + aborted = "aborted" + failed = "failed" + + +class OperationDirection(str, Enum): + + do = "do" + undo = "undo" + cancel = "cancel" + + class NameAvailabilityReason(str, Enum): invalid = "Invalid" already_exists = "AlreadyExists" + + +class ProgressType(str, Enum): + + none = "none" + initialize = "initialize" + download = "download" + upload = "upload" + recall = "recall" diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/__init__.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/__init__.py index 8d799c110446..da737f0d7213 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/__init__.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/__init__.py @@ -11,6 +11,8 @@ from ._operations import Operations from ._storage_sync_services_operations import StorageSyncServicesOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._sync_groups_operations import SyncGroupsOperations from ._cloud_endpoints_operations import CloudEndpointsOperations from ._server_endpoints_operations import ServerEndpointsOperations @@ -21,6 +23,8 @@ __all__ = [ 'Operations', 'StorageSyncServicesOperations', + 'PrivateLinkResourcesOperations', + 'PrivateEndpointConnectionsOperations', 'SyncGroupsOperations', 'CloudEndpointsOperations', 'ServerEndpointsOperations', diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_cloud_endpoints_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_cloud_endpoints_operations.py index 36cb6869a698..fe2475cad58e 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_cloud_endpoints_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_cloud_endpoints_operations.py @@ -26,7 +26,7 @@ class CloudEndpointsOperations(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 for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. 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-06-01" + self.api_version = "2020-09-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operation_status_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operation_status_operations.py index 2e16f651314c..ae295682f2f0 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operation_status_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operation_status_operations.py @@ -24,7 +24,7 @@ class OperationStatusOperations(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 for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. 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-06-01" + self.api_version = "2020-09-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operations.py index 5c5e1cda7788..8ffa9d715e90 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/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 for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. 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-06-01" + self.api_version = "2020-09-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_endpoint_connections_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..a30f497fcec8 --- /dev/null +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,408 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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 for this operation. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def get( + self, resource_group_name, storage_sync_service_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified private endpoint connection associated with the + storage sync service. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: The name of the storage sync service + name within the specified resource group. + :type storage_sync_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the Azure resource + :type private_endpoint_connection_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: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.storagesync.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`StorageSyncErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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', min_length=1) + + # 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.StorageSyncErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _create_initial( + self, resource_group_name, storage_sync_service_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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', min_length=1) + + # 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(properties, 'PrivateEndpointConnection') + + # 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, 202]: + raise models.StorageSyncErrorException(self._deserialize, response) + + deserialized = None + header_dict = {} + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + header_dict = { + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, storage_sync_service_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the state of specified private endpoint connection associated + with the storage sync service. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: The name of the storage sync service + name within the specified resource group. + :type storage_sync_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the Azure resource + :type private_endpoint_connection_name: str + :param properties: The private endpoint connection properties. + :type properties: + ~azure.mgmt.storagesync.models.PrivateEndpointConnection + :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 + PrivateEndpointConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.storagesync.models.PrivateEndpointConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storagesync.models.PrivateEndpointConnection]] + :raises: + :class:`StorageSyncErrorException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + storage_sync_service_name=storage_sync_service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + } + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + 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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_initial( + self, resource_group_name, storage_sync_service_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_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', min_length=1) + + # Construct headers + header_parameters = {} + 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.StorageSyncErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + } + client_raw_response.add_headers(header_dict) + return client_raw_response + + def delete( + self, resource_group_name, storage_sync_service_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified private endpoint connection associated with the + storage sync service. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: The name of the storage sync service + name within the specified resource group. + :type storage_sync_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the Azure resource + :type private_endpoint_connection_name: 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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`StorageSyncErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + storage_sync_service_name=storage_sync_service_name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + }) + return client_raw_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) + 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.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def list_by_storage_sync_service( + self, resource_group_name, storage_sync_service_name, custom_headers=None, raw=False, **operation_config): + """Get a PrivateEndpointConnection List. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: Name of Storage Sync Service + resource. + :type storage_sync_service_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: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.storagesync.models.PrivateEndpointConnectionPaged[~azure.mgmt.storagesync.models.PrivateEndpointConnection] + :raises: + :class:`StorageSyncErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_storage_sync_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_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', min_length=1) + + 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.StorageSyncErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_storage_sync_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections'} diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_link_resources_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..a40a89f4c517 --- /dev/null +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_private_link_resources_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :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 for this operation. Constant value: "2020-09-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-09-01" + + self.config = config + + def list_by_storage_sync_service( + self, resource_group_name, storage_sync_service_name, custom_headers=None, raw=False, **operation_config): + """Gets the private link resources that need to be created for a storage + sync service. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: The name of the storage sync service + name within the specified resource group. + :type storage_sync_service_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: PrivateLinkResourceListResult or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.storagesync.models.PrivateLinkResourceListResult + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list_by_storage_sync_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'storageSyncServiceName': self._serialize.url("storage_sync_service_name", storage_sync_service_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + 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', min_length=1) + + # 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]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourceListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_storage_sync_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateLinkResources'} diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_registered_servers_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_registered_servers_operations.py index ded9d05e5e1f..9e02c683c58b 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_registered_servers_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_registered_servers_operations.py @@ -26,7 +26,7 @@ class RegisteredServersOperations(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 for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. 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-06-01" + self.api_version = "2020-09-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_server_endpoints_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_server_endpoints_operations.py index 37c6a91f22e6..ffe7db1ae9de 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_server_endpoints_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_server_endpoints_operations.py @@ -26,7 +26,7 @@ class ServerEndpointsOperations(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 for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. 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-06-01" + self.api_version = "2020-09-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_storage_sync_services_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_storage_sync_services_operations.py index ad424d78f42d..28ed1d1c6f3f 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_storage_sync_services_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_storage_sync_services_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -25,7 +27,7 @@ class StorageSyncServicesOperations(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 for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. Constant value: "2020-09-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-06-01" + self.api_version = "2020-09-01" self.config = config @@ -105,30 +107,9 @@ def check_name_availability( return deserialized check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/checkNameAvailability'} - def create( - self, resource_group_name, storage_sync_service_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create a new StorageSyncService. - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param storage_sync_service_name: Name of Storage Sync Service - resource. - :type storage_sync_service_name: str - :param parameters: Storage Sync Service resource name. - :type parameters: - ~azure.mgmt.storagesync.models.StorageSyncServiceCreateParameters - :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: StorageSyncService or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.storagesync.models.StorageSyncService or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`StorageSyncErrorException` - """ + def _create_initial( + self, resource_group_name, storage_sync_service_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create.metadata['url'] path_format_arguments = { @@ -160,18 +141,89 @@ def create( 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]: + if response.status_code not in [200, 202]: raise models.StorageSyncErrorException(self._deserialize, response) deserialized = None + header_dict = {} + if response.status_code == 200: deserialized = self._deserialize('StorageSyncService', response) + header_dict = { + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + } if raw: client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) return client_raw_response return deserialized + + def create( + self, resource_group_name, storage_sync_service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create a new StorageSyncService. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: Name of Storage Sync Service + resource. + :type storage_sync_service_name: str + :param parameters: Storage Sync Service resource name. + :type parameters: + ~azure.mgmt.storagesync.models.StorageSyncServiceCreateParameters + :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 StorageSyncService or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.storagesync.models.StorageSyncService] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storagesync.models.StorageSyncService]] + :raises: + :class:`StorageSyncErrorException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + storage_sync_service_name=storage_sync_service_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + } + deserialized = self._deserialize('StorageSyncService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + 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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}'} def get( @@ -242,35 +294,12 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}'} - def update( - self, resource_group_name, storage_sync_service_name, tags=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Patch a given StorageSyncService. - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param storage_sync_service_name: Name of Storage Sync Service - resource. - :type storage_sync_service_name: str - :param tags: The user-specified tags associated with the storage sync - service. - :type tags: dict[str, str] - :param properties: The properties of the storage sync service. - :type properties: object - :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: StorageSyncService or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.storagesync.models.StorageSyncService or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`StorageSyncErrorException` - """ + def _update_initial( + self, resource_group_name, storage_sync_service_name, tags=None, incoming_traffic_policy=None, custom_headers=None, raw=False, **operation_config): parameters = None - if tags is not None or properties is not None: - parameters = models.StorageSyncServiceUpdateParameters(tags=tags, properties=properties) + if tags is not None or incoming_traffic_policy is not None: + parameters = models.StorageSyncServiceUpdateParameters(tags=tags, incoming_traffic_policy=incoming_traffic_policy) # Construct URL url = self.update.metadata['url'] @@ -306,16 +335,20 @@ def update( request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.StorageSyncErrorException(self._deserialize, response) - header_dict = {} deserialized = None + header_dict = {} + if response.status_code == 200: deserialized = self._deserialize('StorageSyncService', response) header_dict = { 'x-ms-request-id': 'str', 'x-ms-correlation-request-id': 'str', + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', } if raw: @@ -324,11 +357,10 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}'} - def delete( - self, resource_group_name, storage_sync_service_name, custom_headers=None, raw=False, **operation_config): - """Delete a given StorageSyncService. + def update( + self, resource_group_name, storage_sync_service_name, tags=None, incoming_traffic_policy=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Patch a given StorageSyncService. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -336,16 +368,66 @@ def delete( :param storage_sync_service_name: Name of Storage Sync Service resource. :type storage_sync_service_name: str + :param tags: The user-specified tags associated with the storage sync + service. + :type tags: dict[str, str] + :param incoming_traffic_policy: Incoming Traffic Policy. Possible + values include: 'AllowAllTraffic', 'AllowVirtualNetworksOnly' + :type incoming_traffic_policy: str or + ~azure.mgmt.storagesync.models.IncomingTrafficPolicy :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: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :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 StorageSyncService or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.storagesync.models.StorageSyncService] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.storagesync.models.StorageSyncService]] :raises: :class:`StorageSyncErrorException` """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + storage_sync_service_name=storage_sync_service_name, + tags=tags, + incoming_traffic_policy=incoming_traffic_policy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + } + deserialized = self._deserialize('StorageSyncService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + + 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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}'} + + + def _delete_initial( + self, resource_group_name, storage_sync_service_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -372,16 +454,70 @@ def delete( 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, 204]: + if response.status_code not in [200, 202, 204]: raise models.StorageSyncErrorException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) - client_raw_response.add_headers({ + header_dict = { 'x-ms-request-id': 'str', 'x-ms-correlation-request-id': 'str', - }) + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + } + client_raw_response.add_headers(header_dict) return client_raw_response + + def delete( + self, resource_group_name, storage_sync_service_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a given StorageSyncService. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param storage_sync_service_name: Name of Storage Sync Service + resource. + :type storage_sync_service_name: 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 None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`StorageSyncErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + storage_sync_service_name=storage_sync_service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + client_raw_response.add_headers({ + 'x-ms-request-id': 'str', + 'x-ms-correlation-request-id': 'str', + 'Azure-AsyncOperation': 'str', + 'Location': 'str', + 'Retry-After': 'str', + }) + return client_raw_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) + 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.StorageSync/storageSyncServices/{storageSyncServiceName}'} def list_by_resource_group( diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_sync_groups_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_sync_groups_operations.py index 124202bd880c..9ab308ffea7b 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_sync_groups_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_sync_groups_operations.py @@ -24,7 +24,7 @@ class SyncGroupsOperations(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 for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. 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-06-01" + self.api_version = "2020-09-01" self.config = config diff --git a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_workflows_operations.py b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_workflows_operations.py index 990cc989b8b1..60eea148c58b 100644 --- a/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_workflows_operations.py +++ b/sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/operations/_workflows_operations.py @@ -24,7 +24,7 @@ class WorkflowsOperations(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 for this operation. Constant value: "2019-06-01". + :ivar api_version: The API version to use for this operation. 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-06-01" + self.api_version = "2020-09-01" self.config = config