diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_directory_operations_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_directory_operations_async.py index 30aea571fb36..26a962f8df72 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_directory_operations_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_directory_operations_async.py @@ -595,7 +595,7 @@ async def force_close_handles(self, handle_id, timeout=None, marker=None, shares """Closes all handles open for given directory. :param handle_id: Specifies handle ID opened on the file or directory - to be closed. Asterix (‘*’) is a wildcard that specifies all handles. + to be closed. Asterisk (‘*’) is a wildcard that specifies all handles. :type handle_id: str :param timeout: The timeout parameter is expressed in seconds. For more information, see None: self._config = config self.restype = "share" - async def create(self, timeout=None, metadata=None, quota=None, *, cls=None, **kwargs): + async def create(self, timeout=None, metadata=None, quota=None, access_tier=None, *, cls=None, **kwargs): """Creates a new share under the specified account. If the share with the same name already exists, the operation fails. @@ -51,6 +51,10 @@ async def create(self, timeout=None, metadata=None, quota=None, *, cls=None, **k :type metadata: str :param quota: Specifies the maximum size of the share, in gigabytes. :type quota: int + :param access_tier: Specifies the access tier of the share. Possible + values include: 'TransactionOptimized', 'Hot', 'Cool' + :type access_tier: str or + ~azure.storage.fileshare.models.ShareAccessTier :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) @@ -78,6 +82,8 @@ async def create(self, timeout=None, metadata=None, quota=None, *, cls=None, **k header_parameters['x-ms-meta'] = self._serialize.header("metadata", metadata, 'str') if quota is not None: header_parameters['x-ms-share-quota'] = self._serialize.header("quota", quota, 'int', minimum=1) + if access_tier is not None: + header_parameters['x-ms-access-tier'] = self._serialize.header("access_tier", access_tier, 'str') header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') # Construct and send request @@ -163,6 +169,9 @@ async def get_properties(self, sharesnapshot=None, timeout=None, *, cls=None, ** 'x-ms-share-provisioned-ingress-mbps': self._deserialize('int', response.headers.get('x-ms-share-provisioned-ingress-mbps')), 'x-ms-share-provisioned-egress-mbps': self._deserialize('int', response.headers.get('x-ms-share-provisioned-egress-mbps')), 'x-ms-share-next-allowed-quota-downgrade-time': self._deserialize('rfc-1123', response.headers.get('x-ms-share-next-allowed-quota-downgrade-time')), + 'x-ms-access-tier': self._deserialize('str', response.headers.get('x-ms-access-tier')), + 'x-ms-access-tier-change-time': self._deserialize('rfc-1123', response.headers.get('x-ms-access-tier-change-time')), + 'x-ms-access-tier-transition-state': self._deserialize('str', response.headers.get('x-ms-access-tier-transition-state')), 'x-ms-error-code': self._deserialize('str', response.headers.get('x-ms-error-code')), } return cls(response, None, response_headers) @@ -428,8 +437,8 @@ async def get_permission(self, file_permission_key, timeout=None, *, cls=None, * return deserialized get_permission.metadata = {'url': '/{shareName}'} - async def set_quota(self, timeout=None, quota=None, *, cls=None, **kwargs): - """Sets quota for the specified share. + async def set_properties(self, timeout=None, quota=None, access_tier=None, *, cls=None, **kwargs): + """Sets properties for the specified share. :param timeout: The timeout parameter is expressed in seconds. For more information, see None: + super(ProtocolSettings, self).__init__(**kwargs) + self.smb_settings = smb_settings + + class Range(Model): """An Azure Storage file range. @@ -721,6 +739,12 @@ class ShareProperties(Model): :type deleted_time: datetime :param remaining_retention_days: :type remaining_retention_days: int + :param access_tier: + :type access_tier: str + :param access_tier_change_time: + :type access_tier_change_time: datetime + :param access_tier_transition_state: + :type access_tier_transition_state: str """ _validation = { @@ -739,11 +763,14 @@ class ShareProperties(Model): 'next_allowed_quota_downgrade_time': {'key': 'NextAllowedQuotaDowngradeTime', 'type': 'rfc-1123', 'xml': {'name': 'NextAllowedQuotaDowngradeTime'}}, 'deleted_time': {'key': 'DeletedTime', 'type': 'rfc-1123', 'xml': {'name': 'DeletedTime'}}, 'remaining_retention_days': {'key': 'RemainingRetentionDays', 'type': 'int', 'xml': {'name': 'RemainingRetentionDays'}}, + 'access_tier': {'key': 'AccessTier', 'type': 'str', 'xml': {'name': 'AccessTier'}}, + 'access_tier_change_time': {'key': 'AccessTierChangeTime', 'type': 'rfc-1123', 'xml': {'name': 'AccessTierChangeTime'}}, + 'access_tier_transition_state': {'key': 'AccessTierTransitionState', 'type': 'str', 'xml': {'name': 'AccessTierTransitionState'}}, } _xml_map = { } - def __init__(self, *, last_modified, etag: str, quota: int, provisioned_iops: int=None, provisioned_ingress_mbps: int=None, provisioned_egress_mbps: int=None, next_allowed_quota_downgrade_time=None, deleted_time=None, remaining_retention_days: int=None, **kwargs) -> None: + def __init__(self, *, last_modified, etag: str, quota: int, provisioned_iops: int=None, provisioned_ingress_mbps: int=None, provisioned_egress_mbps: int=None, next_allowed_quota_downgrade_time=None, deleted_time=None, remaining_retention_days: int=None, access_tier: str=None, access_tier_change_time=None, access_tier_transition_state: str=None, **kwargs) -> None: super(ShareProperties, self).__init__(**kwargs) self.last_modified = last_modified self.etag = etag @@ -754,6 +781,9 @@ def __init__(self, *, last_modified, etag: str, quota: int, provisioned_iops: in self.next_allowed_quota_downgrade_time = next_allowed_quota_downgrade_time self.deleted_time = deleted_time self.remaining_retention_days = remaining_retention_days + self.access_tier = access_tier + self.access_tier_change_time = access_tier_change_time + self.access_tier_transition_state = access_tier_transition_state class ShareStats(Model): @@ -810,6 +840,43 @@ def __init__(self, *, id: str, access_policy=None, **kwargs) -> None: self.access_policy = access_policy +class SmbMultichannel(Model): + """Settings for SMB multichannel. + + :param enabled: If SMB multichannel is enabled. + :type enabled: bool + """ + + _attribute_map = { + 'enabled': {'key': 'Enabled', 'type': 'bool', 'xml': {'name': 'Enabled'}}, + } + _xml_map = { + 'name': 'Multichannel' + } + + def __init__(self, *, enabled: bool=None, **kwargs) -> None: + super(SmbMultichannel, self).__init__(**kwargs) + self.enabled = enabled + + +class SmbSettings(Model): + """Settings for SMB protocol. + + :param multichannel: Settings for SMB Multichannel. + :type multichannel: ~azure.storage.fileshare.models.SmbMultichannel + """ + + _attribute_map = { + 'multichannel': {'key': 'Multichannel', 'type': 'SmbMultichannel', 'xml': {'name': 'Multichannel'}}, + } + _xml_map = { + } + + def __init__(self, *, multichannel=None, **kwargs) -> None: + super(SmbSettings, self).__init__(**kwargs) + self.multichannel = multichannel + + class SourceModifiedAccessConditions(Model): """Additional parameters for upload_range_from_url operation. @@ -879,18 +946,22 @@ class StorageServiceProperties(Model): :type minute_metrics: ~azure.storage.fileshare.models.Metrics :param cors: The set of CORS rules. :type cors: list[~azure.storage.fileshare.models.CorsRule] + :param protocol_settings: Protocol settings + :type protocol_settings: ~azure.storage.fileshare.models.ProtocolSettings """ _attribute_map = { 'hour_metrics': {'key': 'HourMetrics', 'type': 'Metrics', 'xml': {'name': 'HourMetrics'}}, 'minute_metrics': {'key': 'MinuteMetrics', 'type': 'Metrics', 'xml': {'name': 'MinuteMetrics'}}, 'cors': {'key': 'Cors', 'type': '[CorsRule]', 'xml': {'name': 'Cors', 'itemsName': 'CorsRule', 'wrapped': True}}, + 'protocol_settings': {'key': 'ProtocolSettings', 'type': 'ProtocolSettings', 'xml': {'name': 'ProtocolSettings'}}, } _xml_map = { } - def __init__(self, *, hour_metrics=None, minute_metrics=None, cors=None, **kwargs) -> None: + def __init__(self, *, hour_metrics=None, minute_metrics=None, cors=None, protocol_settings=None, **kwargs) -> None: super(StorageServiceProperties, self).__init__(**kwargs) self.hour_metrics = hour_metrics self.minute_metrics = minute_metrics self.cors = cors + self.protocol_settings = protocol_settings diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_directory_operations.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_directory_operations.py index c1afd8e23b39..c38bc8d2fe2e 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_directory_operations.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_directory_operations.py @@ -595,7 +595,7 @@ def force_close_handles(self, handle_id, timeout=None, marker=None, sharesnapsho """Closes all handles open for given directory. :param handle_id: Specifies handle ID opened on the file or directory - to be closed. Asterix (‘*’) is a wildcard that specifies all handles. + to be closed. Asterisk (‘*’) is a wildcard that specifies all handles. :type handle_id: str :param timeout: The timeout parameter is expressed in seconds. For more information, see