Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
from ._models_py3 import AzureEntityResource
from ._models_py3 import AzureFilesIdentityBasedAuthentication
from ._models_py3 import BlobContainer
from ._models_py3 import BlobRestoreParameters
from ._models_py3 import BlobRestoreRange
from ._models_py3 import BlobRestoreStatus
from ._models_py3 import BlobServiceProperties
from ._models_py3 import ChangeFeed
from ._models_py3 import CheckNameAvailabilityResult
Expand Down Expand Up @@ -66,6 +69,7 @@
from ._models_py3 import PrivateLinkServiceConnectionState
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import RestorePolicyProperties
from ._models_py3 import Restriction
from ._models_py3 import RoutingPreference
from ._models_py3 import ServiceSasParameters
Expand Down Expand Up @@ -94,6 +98,9 @@
from ._models import AzureEntityResource
from ._models import AzureFilesIdentityBasedAuthentication
from ._models import BlobContainer
from ._models import BlobRestoreParameters
from ._models import BlobRestoreRange
from ._models import BlobRestoreStatus
from ._models import BlobServiceProperties
from ._models import ChangeFeed
from ._models import CheckNameAvailabilityResult
Expand Down Expand Up @@ -145,6 +152,7 @@
from ._models import PrivateLinkServiceConnectionState
from ._models import ProxyResource
from ._models import Resource
from ._models import RestorePolicyProperties
from ._models import Restriction
from ._models import RoutingPreference
from ._models import ServiceSasParameters
Expand Down Expand Up @@ -191,6 +199,7 @@
LargeFileSharesState,
RoutingChoice,
GeoReplicationStatus,
BlobRestoreProgressStatus,
ProvisioningState,
AccountStatus,
PrivateEndpointServiceConnectionStatus,
Expand All @@ -208,6 +217,8 @@
LeaseDuration,
ImmutabilityPolicyState,
ImmutabilityPolicyUpdateType,
EnabledProtocols,
RootSquashType,
StorageAccountExpand,
ListKeyExpand,
)
Expand All @@ -218,6 +229,9 @@
'AzureEntityResource',
'AzureFilesIdentityBasedAuthentication',
'BlobContainer',
'BlobRestoreParameters',
'BlobRestoreRange',
'BlobRestoreStatus',
'BlobServiceProperties',
'ChangeFeed',
'CheckNameAvailabilityResult',
Expand Down Expand Up @@ -269,6 +283,7 @@
'PrivateLinkServiceConnectionState',
'ProxyResource',
'Resource',
'RestorePolicyProperties',
'Restriction',
'RoutingPreference',
'ServiceSasParameters',
Expand Down Expand Up @@ -314,6 +329,7 @@
'LargeFileSharesState',
'RoutingChoice',
'GeoReplicationStatus',
'BlobRestoreProgressStatus',
'ProvisioningState',
'AccountStatus',
'PrivateEndpointServiceConnectionStatus',
Expand All @@ -331,6 +347,8 @@
'LeaseDuration',
'ImmutabilityPolicyState',
'ImmutabilityPolicyUpdateType',
'EnabledProtocols',
'RootSquashType',
'StorageAccountExpand',
'ListKeyExpand',
]
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,105 @@ def __init__(self, **kwargs):
self.has_immutability_policy = None


class BlobRestoreParameters(Model):
"""Blob restore parameters.

All required parameters must be populated in order to send to Azure.

:param time_to_restore: Required. Restore blob to the specified time.
:type time_to_restore: datetime
:param blob_ranges: Required. Blob ranges to restore.
:type blob_ranges:
list[~azure.mgmt.storage.v2019_06_01.models.BlobRestoreRange]
"""

_validation = {
'time_to_restore': {'required': True},
'blob_ranges': {'required': True},
}

_attribute_map = {
'time_to_restore': {'key': 'timeToRestore', 'type': 'iso-8601'},
'blob_ranges': {'key': 'blobRanges', 'type': '[BlobRestoreRange]'},
}

def __init__(self, **kwargs):
super(BlobRestoreParameters, self).__init__(**kwargs)
self.time_to_restore = kwargs.get('time_to_restore', None)
self.blob_ranges = kwargs.get('blob_ranges', None)


class BlobRestoreRange(Model):
"""Blob range.

All required parameters must be populated in order to send to Azure.

:param start_range: Required. Blob start range. Empty means account start.
:type start_range: str
:param end_range: Required. Blob end range. Empty means account end.
:type end_range: str
"""

_validation = {
'start_range': {'required': True},
'end_range': {'required': True},
}

_attribute_map = {
'start_range': {'key': 'startRange', 'type': 'str'},
'end_range': {'key': 'endRange', 'type': 'str'},
}

def __init__(self, **kwargs):
super(BlobRestoreRange, self).__init__(**kwargs)
self.start_range = kwargs.get('start_range', None)
self.end_range = kwargs.get('end_range', None)


class BlobRestoreStatus(Model):
"""Blob restore status.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar status: The status of blob restore progress. Possible values are: -
InProgress: Indicates that blob restore is ongoing. - Complete: Indicates
that blob restore has been completed successfully. - Failed: Indicates
that blob restore is failed. Possible values include: 'InProgress',
'Complete', 'Failed'
:vartype status: str or
~azure.mgmt.storage.v2019_06_01.models.BlobRestoreProgressStatus
:ivar failure_reason: Failure reason when blob restore is failed.
:vartype failure_reason: str
:ivar restore_id: Id for tracking blob restore request.
:vartype restore_id: str
:ivar parameters: Blob restore request parameters.
:vartype parameters:
~azure.mgmt.storage.v2019_06_01.models.BlobRestoreParameters
"""

_validation = {
'status': {'readonly': True},
'failure_reason': {'readonly': True},
'restore_id': {'readonly': True},
'parameters': {'readonly': True},
}

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'failure_reason': {'key': 'failureReason', 'type': 'str'},
'restore_id': {'key': 'restoreId', 'type': 'str'},
'parameters': {'key': 'parameters', 'type': 'BlobRestoreParameters'},
}

def __init__(self, **kwargs):
super(BlobRestoreStatus, self).__init__(**kwargs)
self.status = None
self.failure_reason = None
self.restore_id = None
self.parameters = None


class BlobServiceProperties(Resource):
"""The properties of a storage account’s Blob service.

Expand Down Expand Up @@ -373,6 +472,10 @@ class BlobServiceProperties(Resource):
:type automatic_snapshot_policy_enabled: bool
:param change_feed: The blob service properties for change feed events.
:type change_feed: ~azure.mgmt.storage.v2019_06_01.models.ChangeFeed
:param restore_policy: The blob service properties for blob restore
policy.
:type restore_policy:
~azure.mgmt.storage.v2019_06_01.models.RestorePolicyProperties
:ivar sku: Sku name and tier.
:vartype sku: ~azure.mgmt.storage.v2019_06_01.models.Sku
"""
Expand All @@ -393,6 +496,7 @@ class BlobServiceProperties(Resource):
'delete_retention_policy': {'key': 'properties.deleteRetentionPolicy', 'type': 'DeleteRetentionPolicy'},
'automatic_snapshot_policy_enabled': {'key': 'properties.automaticSnapshotPolicyEnabled', 'type': 'bool'},
'change_feed': {'key': 'properties.changeFeed', 'type': 'ChangeFeed'},
'restore_policy': {'key': 'properties.restorePolicy', 'type': 'RestorePolicyProperties'},
'sku': {'key': 'sku', 'type': 'Sku'},
}

Expand All @@ -403,6 +507,7 @@ def __init__(self, **kwargs):
self.delete_retention_policy = kwargs.get('delete_retention_policy', None)
self.automatic_snapshot_policy_enabled = kwargs.get('automatic_snapshot_policy_enabled', None)
self.change_feed = kwargs.get('change_feed', None)
self.restore_policy = kwargs.get('restore_policy', None)
self.sku = None


Expand Down Expand Up @@ -1002,6 +1107,15 @@ class FileShare(AzureEntityResource):
greater than 0, and less than or equal to 5TB (5120). For Large File
Shares, the maximum size is 102400.
:type share_quota: int
:param enabled_protocols: Immutable property for file shares protocol.
Possible values include: 'SMB', 'NFS'
:type enabled_protocols: str or
~azure.mgmt.storage.v2019_06_01.models.EnabledProtocols
:param root_squash: Reduction of the access rights for the remote
superuser. Possible values include: 'NoRootSquash', 'RootSquash',
'AllSquash'
:type root_squash: str or
~azure.mgmt.storage.v2019_06_01.models.RootSquashType
"""

_validation = {
Expand All @@ -1021,13 +1135,17 @@ class FileShare(AzureEntityResource):
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'metadata': {'key': 'properties.metadata', 'type': '{str}'},
'share_quota': {'key': 'properties.shareQuota', 'type': 'int'},
'enabled_protocols': {'key': 'properties.enabledProtocols', 'type': 'str'},
'root_squash': {'key': 'properties.rootSquash', 'type': 'str'},
}

def __init__(self, **kwargs):
super(FileShare, self).__init__(**kwargs)
self.last_modified_time = None
self.metadata = kwargs.get('metadata', None)
self.share_quota = kwargs.get('share_quota', None)
self.enabled_protocols = kwargs.get('enabled_protocols', None)
self.root_squash = kwargs.get('root_squash', None)


class FileShareItem(AzureEntityResource):
Expand Down Expand Up @@ -1056,6 +1174,15 @@ class FileShareItem(AzureEntityResource):
greater than 0, and less than or equal to 5TB (5120). For Large File
Shares, the maximum size is 102400.
:type share_quota: int
:param enabled_protocols: Immutable property for file shares protocol.
Possible values include: 'SMB', 'NFS'
:type enabled_protocols: str or
~azure.mgmt.storage.v2019_06_01.models.EnabledProtocols
:param root_squash: Reduction of the access rights for the remote
superuser. Possible values include: 'NoRootSquash', 'RootSquash',
'AllSquash'
:type root_squash: str or
~azure.mgmt.storage.v2019_06_01.models.RootSquashType
"""

_validation = {
Expand All @@ -1075,13 +1202,17 @@ class FileShareItem(AzureEntityResource):
'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'},
'metadata': {'key': 'properties.metadata', 'type': '{str}'},
'share_quota': {'key': 'properties.shareQuota', 'type': 'int'},
'enabled_protocols': {'key': 'properties.enabledProtocols', 'type': 'str'},
'root_squash': {'key': 'properties.rootSquash', 'type': 'str'},
}

def __init__(self, **kwargs):
super(FileShareItem, self).__init__(**kwargs)
self.last_modified_time = None
self.metadata = kwargs.get('metadata', None)
self.share_quota = kwargs.get('share_quota', None)
self.enabled_protocols = kwargs.get('enabled_protocols', None)
self.root_squash = kwargs.get('root_squash', None)


class GeoReplicationStats(Model):
Expand Down Expand Up @@ -2204,6 +2335,34 @@ def __init__(self, **kwargs):
super(ProxyResource, self).__init__(**kwargs)


class RestorePolicyProperties(Model):
"""The blob service properties for blob restore policy.

All required parameters must be populated in order to send to Azure.

:param enabled: Required. Blob restore is enabled if set to true.
:type enabled: bool
:param days: how long this blob can be restored. It should be great than
zero and less than DeleteRetentionPolicy.days.
:type days: int
"""

_validation = {
'enabled': {'required': True},
'days': {'maximum': 365, 'minimum': 1},
}

_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'days': {'key': 'days', 'type': 'int'},
}

def __init__(self, **kwargs):
super(RestorePolicyProperties, self).__init__(**kwargs)
self.enabled = kwargs.get('enabled', None)
self.days = kwargs.get('days', None)


class Restriction(Model):
"""The restriction because of which SKU cannot be used.

Expand Down Expand Up @@ -2679,6 +2838,9 @@ class StorageAccount(TrackedResource):
choice opted by the user for data transfer
:type routing_preference:
~azure.mgmt.storage.v2019_06_01.models.RoutingPreference
:ivar blob_restore_status: Blob restore status
:vartype blob_restore_status:
~azure.mgmt.storage.v2019_06_01.models.BlobRestoreStatus
"""

_validation = {
Expand All @@ -2704,6 +2866,7 @@ class StorageAccount(TrackedResource):
'geo_replication_stats': {'readonly': True},
'failover_in_progress': {'readonly': True},
'private_endpoint_connections': {'readonly': True},
'blob_restore_status': {'readonly': True},
}

_attribute_map = {
Expand Down Expand Up @@ -2736,6 +2899,7 @@ class StorageAccount(TrackedResource):
'large_file_shares_state': {'key': 'properties.largeFileSharesState', 'type': 'str'},
'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
'routing_preference': {'key': 'properties.routingPreference', 'type': 'RoutingPreference'},
'blob_restore_status': {'key': 'properties.blobRestoreStatus', 'type': 'BlobRestoreStatus'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -2764,6 +2928,7 @@ def __init__(self, **kwargs):
self.large_file_shares_state = kwargs.get('large_file_shares_state', None)
self.private_endpoint_connections = None
self.routing_preference = kwargs.get('routing_preference', None)
self.blob_restore_status = None


class StorageAccountCheckNameAvailabilityParameters(Model):
Expand Down
Loading