From c88cac8ec2867fad97d6132ec9b1f5036e18fa1a Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Tue, 23 Apr 2024 17:09:27 -0700 Subject: [PATCH 1/9] APIView feedback round1, not done --- .../filedatalake/_data_lake_directory_client.py | 3 ++- .../azure/storage/fileshare/_file_client.py | 8 ++++---- .../azure/storage/fileshare/_share_client.py | 14 +++++++++----- .../storage/fileshare/aio/_file_client_async.py | 10 +++++----- .../storage/fileshare/aio/_share_client_async.py | 10 +++++++--- .../azure-storage-file-share/tests/test_file.py | 4 ++-- .../tests/test_file_async.py | 4 ++-- 7 files changed, 31 insertions(+), 22 deletions(-) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 28eba4492e94..7239fd39d46d 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -292,7 +292,8 @@ def get_directory_properties(self, **kwargs): :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be + in the :attr:~DirectoryProperties.owner, ~DirectoryProperties.group, + and DirectoryProperties.permission response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py index a035cd840972..c7bba5418af3 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py @@ -706,7 +706,7 @@ def start_copy_from_url(self, source_url, **kwargs): :keyword metadata: Name-value pairs associated with the file as metadata. - :type metadata: dict[str, str] + :paramtype metadata: dict[str, str] :keyword lease: Required if the file has an active lease. Value can be a ShareLeaseClient object or the lease ID as a string. @@ -1486,7 +1486,7 @@ def get_ranges_diff( offset: Optional[int] = None, length: Optional[int] = None, *, - include_renames: Optional[bool] = None, + allow_renames: Optional[bool] = None, **kwargs: Any ) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]: """Returns the list of valid page ranges for a file or snapshot @@ -1502,7 +1502,7 @@ def get_ranges_diff( The snapshot diff parameter that contains an opaque DateTime value that specifies a previous file snapshot to be compared against a more recent snapshot or the current file. - :keyword Optional[bool] include_renames: + :keyword Optional[bool] allow_renames: Only valid if previous_sharesnapshot parameter is provided. Specifies whether the changed ranges for a file that has been renamed or moved between the target snapshot (or live file) and the previous snapshot should be listed. If set to True, the valid changed ranges for the file will be returned. @@ -1526,7 +1526,7 @@ def get_ranges_diff( offset=offset, length=length, previous_sharesnapshot=previous_sharesnapshot, - support_rename=include_renames, + support_rename=allow_renames, **kwargs) try: ranges = self._client.file.get_range_list(**options) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py index 6335fd7ed1c4..8f48c86a2e08 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py @@ -338,8 +338,9 @@ def create_share(self, **kwargs): """Creates a new Share under the account. If a share with the same name already exists, the operation fails. - :keyword dict[str, str] metadata: + :keyword metadata: Name-value pairs associated with the share as metadata. + :paramtype metadata: dict[str, str] :keyword int quota: The quota to be allotted. :keyword access_tier: @@ -417,8 +418,9 @@ def create_snapshot( # type: ignore is taken, with a DateTime value appended to indicate the time at which the snapshot was taken. - :keyword dict[str, str] metadata: + :keyword metadata: Name-value pairs associated with the share as metadata. + :paramtype metadata: dict[str, str] :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations. @@ -459,7 +461,9 @@ def delete_share( later deleted during garbage collection. :param delete_snapshots: - Indicates if snapshots are to be deleted. + Indicates if snapshots are to be deleted. If "True" or enum "include", snapshots will + be deleted (but not include leased). To include leased snapshots, specify the "include-leased" + enum. :type delete_snapshots: Optional[Union[bool, Literal['include', 'include-leased']]] :keyword lease: @@ -966,8 +970,8 @@ def create_directory(self, directory_name, **kwargs): :param str directory_name: The name of the directory. :keyword metadata: - Name-value pairs associated with the directory as metadata. - :type metadata: dict[str, str] + Name-value pairs associated with the share as metadata. + :paramtype metadata: dict[str, str] :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations. diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py index 2e4cfc28dc04..07f2bb9bdb3d 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py @@ -570,8 +570,8 @@ async def start_copy_from_url(self, source_url, **kwargs): This parameter was introduced in API version '2019-07-07'. :keyword metadata: - Name-value pairs associated with the file as metadata. - :type metadata: dict[str, str] + Name-value pairs associated with the share as metadata. + :paramtype metadata: dict[str, str] :keyword lease: Required if the file has an active lease. Value can be a ShareLeaseClient object or the lease ID as a string. @@ -1285,7 +1285,7 @@ async def get_ranges_diff( offset: Optional[int] = None, length: Optional[int] = None, *, - include_renames: Optional[bool] = None, + allow_renames: Optional[bool] = None, **kwargs: Any ) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]: """Returns the list of valid page ranges for a file or snapshot @@ -1301,7 +1301,7 @@ async def get_ranges_diff( The snapshot diff parameter that contains an opaque DateTime value that specifies a previous file snapshot to be compared against a more recent snapshot or the current file. - :keyword Optional[bool] include_renames: + :keyword Optional[bool] allow_renames: Only valid if previous_sharesnapshot parameter is provided. Specifies whether the changed ranges for a file that has been renamed or moved between the target snapshot (or live file) and the previous snapshot should be listed. If set to True, the valid changed ranges for the file will be returned. @@ -1325,7 +1325,7 @@ async def get_ranges_diff( offset=offset, length=length, previous_sharesnapshot=previous_sharesnapshot, - support_rename=include_renames, + support_rename=allow_renames, **kwargs) try: ranges = await self._client.file.get_range_list(**options) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py index d942fbd17acc..f17c347cd887 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py @@ -201,8 +201,9 @@ async def create_share(self, **kwargs): """Creates a new Share under the account. If a share with the same name already exists, the operation fails. - :keyword dict[str, str] metadata: + :keyword metadata: Name-value pairs associated with the share as metadata. + :paramtype metadata: dict[str, str] :keyword int quota: The quota to be allotted. :keyword access_tier: @@ -280,8 +281,9 @@ async def create_snapshot( # type: ignore is taken, with a DateTime value appended to indicate the time at which the snapshot was taken. - :keyword dict[str, str] metadata: + :keyword metadata: Name-value pairs associated with the share as metadata. + :paramtype metadata: dict[str, str] :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations. @@ -322,7 +324,9 @@ async def delete_share( later deleted during garbage collection. :param delete_snapshots: - Indicates if snapshots are to be deleted. + Indicates if snapshots are to be deleted. If "True" or enum "include", snapshots will + be deleted (but not include leased). To include leased snapshots, specify the "include-leased" + enum. :type delete_snapshots: Optional[Union[bool, Literal['include', 'include-leased']]] :keyword int timeout: diff --git a/sdk/storage/azure-storage-file-share/tests/test_file.py b/sdk/storage/azure-storage-file-share/tests/test_file.py index 86ea0dfec4f3..7a09ff9fd75e 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file.py @@ -2038,8 +2038,8 @@ def test_list_ranges_diff_support_rename(self, **kwargs): with pytest.raises(ResourceExistsError): file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot) with pytest.raises(ResourceExistsError): - file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, include_renames=False) - ranges, cleared = file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, include_renames=True) + file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, allow_renames=False) + ranges, cleared = file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, allow_renames=True) assert ranges is not None assert isinstance(ranges, list) assert len(ranges) == 1 diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_async.py index 3b1317fb6a6d..750a7ef6215a 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_async.py @@ -2082,8 +2082,8 @@ async def test_list_ranges_diff_support_rename(self, **kwargs): with pytest.raises(ResourceExistsError): await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot) with pytest.raises(ResourceExistsError): - await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, include_renames=False) - ranges, cleared = await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, include_renames=True) + await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, allow_renames=False) + ranges, cleared = await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, allow_renames=True) assert ranges is not None assert isinstance(ranges, list) assert len(ranges) == 1 From 00f442130e7a93ed160b085b27a134e318cf34e9 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Wed, 24 Apr 2024 19:48:27 -0700 Subject: [PATCH 2/9] More feedback, check on upn and propagate after correct, adjust Services to be keywords not params --- .../azure/storage/blob/_quick_query_helper.py | 3 +-- .../azure/storage/blob/_shared/models.py | 24 ++++++++----------- .../_data_lake_directory_client.py | 4 ++-- .../storage/filedatalake/_shared/models.py | 24 ++++++++----------- .../azure/storage/fileshare/_share_client.py | 2 +- .../azure/storage/fileshare/_shared/models.py | 24 ++++++++----------- .../fileshare/aio/_file_client_async.py | 2 +- .../azure/storage/queue/_shared/models.py | 24 ++++++++----------- 8 files changed, 45 insertions(+), 62 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_quick_query_helper.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_quick_query_helper.py index b4d13ebf4bd2..4e6c95b438e1 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_quick_query_helper.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_quick_query_helper.py @@ -93,8 +93,7 @@ def readall(self): return data.decode(self._encoding) return data - def readinto(self, stream): - # type: (IO) -> None + def readinto(self, stream: IO[bytes]) -> None: """Download the query result to a stream. :param IO stream: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py index 8b92efde375e..2b09563f1e5f 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py @@ -453,22 +453,18 @@ def from_string(cls, permission): class Services(object): """Specifies the services accessible with the account SAS. - :param bool blob: - Access for the `~azure.storage.blob.BlobServiceClient` - :param bool queue: - Access for the `~azure.storage.queue.QueueServiceClient` - :param bool fileshare: - Access for the `~azure.storage.fileshare.ShareServiceClient` + :keyword bool blob: + Access for the `~azure.storage.blob.BlobServiceClient`. Default is False. + :keyword bool queue: + Access for the `~azure.storage.queue.QueueServiceClient`. Default is False. + :keyword bool fileshare: + Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. """ - blob: bool = False - queue: bool = False - fileshare: bool = False - - def __init__(self, blob: bool = False, queue: bool = False, fileshare: bool = False): - self.blob = blob - self.queue = queue - self.fileshare = fileshare + def __init__(self, **kwargs): + self.blob = kwargs.get('blob', False) + self.queue = kwargs.get('queue', False) + self.fileshare = kwargs.get('fileshare', False) self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + ('f' if self.fileshare else '')) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 7239fd39d46d..42b4f41064df 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -292,8 +292,8 @@ def get_directory_properties(self, **kwargs): :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the :attr:~DirectoryProperties.owner, ~DirectoryProperties.group, - and DirectoryProperties.permission response headers will be + in the :attr:`.~DirectoryProperties.owner`, :attr:`~.DirectoryProperties.group`, + and :attr:`~DirectoryProperties.permission` response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py index ca54c92d7d1c..cc530025fa2e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py @@ -453,22 +453,18 @@ def from_string(cls, permission): class Services(object): """Specifies the services accessible with the account SAS. - :param bool blob: - Access for the `~azure.storage.blob.BlobServiceClient` - :param bool queue: - Access for the `~azure.storage.queue.QueueServiceClient` - :param bool fileshare: - Access for the `~azure.storage.fileshare.ShareServiceClient` + :keyword bool blob: + Access for the `~azure.storage.blob.BlobServiceClient`. Default is False. + :keyword bool queue: + Access for the `~azure.storage.queue.QueueServiceClient`. Default is False. + :keyword bool fileshare: + Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. """ - blob: bool = False - queue: bool = False - fileshare: bool = False - - def __init__(self, blob: bool = False, queue: bool = False, fileshare: bool = False): - self.blob = blob - self.queue = queue - self.fileshare = fileshare + def __init__(self, **kwargs): + self.blob = kwargs.get('blob', False) + self.queue = kwargs.get('queue', False) + self.fileshare = kwargs.get('fileshare', False) self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + ('f' if self.fileshare else '')) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py index 8f48c86a2e08..e3b8d4a75928 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py @@ -970,7 +970,7 @@ def create_directory(self, directory_name, **kwargs): :param str directory_name: The name of the directory. :keyword metadata: - Name-value pairs associated with the share as metadata. + Name-value pairs associated with the directory as metadata. :paramtype metadata: dict[str, str] :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py index 5506f614cbb9..763a84777280 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py @@ -453,22 +453,18 @@ def from_string(cls, permission): class Services(object): """Specifies the services accessible with the account SAS. - :param bool blob: - Access for the `~azure.storage.blob.BlobServiceClient` - :param bool queue: - Access for the `~azure.storage.queue.QueueServiceClient` - :param bool fileshare: - Access for the `~azure.storage.fileshare.ShareServiceClient` + :keyword bool blob: + Access for the `~azure.storage.blob.BlobServiceClient`. Default is False. + :keyword bool queue: + Access for the `~azure.storage.queue.QueueServiceClient`. Default is False. + :keyword bool fileshare: + Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. """ - blob: bool = False - queue: bool = False - fileshare: bool = False - - def __init__(self, blob: bool = False, queue: bool = False, fileshare: bool = False): - self.blob = blob - self.queue = queue - self.fileshare = fileshare + def __init__(self, **kwargs): + self.blob = kwargs.get('blob', False) + self.queue = kwargs.get('queue', False) + self.fileshare = kwargs.get('fileshare', False) self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + ('f' if self.fileshare else '')) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py index 07f2bb9bdb3d..17b322c06712 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py @@ -570,7 +570,7 @@ async def start_copy_from_url(self, source_url, **kwargs): This parameter was introduced in API version '2019-07-07'. :keyword metadata: - Name-value pairs associated with the share as metadata. + Name-value pairs associated with the file as metadata. :paramtype metadata: dict[str, str] :keyword lease: Required if the file has an active lease. Value can be a ShareLeaseClient object diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py index 34ce22b7a632..ee9b77933449 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py @@ -453,22 +453,18 @@ def from_string(cls, permission): class Services(object): """Specifies the services accessible with the account SAS. - :param bool blob: - Access for the `~azure.storage.blob.BlobServiceClient` - :param bool queue: - Access for the `~azure.storage.queue.QueueServiceClient` - :param bool fileshare: - Access for the `~azure.storage.fileshare.ShareServiceClient` + :keyword bool blob: + Access for the `~azure.storage.blob.BlobServiceClient`. Default is False. + :keyword bool queue: + Access for the `~azure.storage.queue.QueueServiceClient`. Default is False. + :keyword bool fileshare: + Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. """ - blob: bool = False - queue: bool = False - fileshare: bool = False - - def __init__(self, blob: bool = False, queue: bool = False, fileshare: bool = False): - self.blob = blob - self.queue = queue - self.fileshare = fileshare + def __init__(self, **kwargs): + self.blob = kwargs.get('blob', False) + self.queue = kwargs.get('queue', False) + self.fileshare = kwargs.get('fileshare', False) self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + ('f' if self.fileshare else '')) From bc918e5fa7bd7bd990950517c2625b1dc913d87c Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Thu, 25 Apr 2024 21:39:38 -0700 Subject: [PATCH 3/9] Fix up keywords --- .../azure-storage-blob/azure/storage/blob/_shared/models.py | 2 +- .../azure/storage/filedatalake/_shared/models.py | 2 +- .../azure/storage/fileshare/_shared/models.py | 2 +- .../azure-storage-queue/azure/storage/queue/_shared/models.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py index 2b09563f1e5f..48e541892cef 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py @@ -489,7 +489,7 @@ def from_string(cls, string): res_queue = 'q' in string res_file = 'f' in string - parsed = cls(res_blob, res_queue, res_file) + parsed = cls(blob=res_blob, queue=res_queue, fileshare=res_file) parsed._str = string # pylint: disable = protected-access return parsed diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py index cc530025fa2e..cb7fcf978183 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py @@ -489,7 +489,7 @@ def from_string(cls, string): res_queue = 'q' in string res_file = 'f' in string - parsed = cls(res_blob, res_queue, res_file) + parsed = cls(blob=res_blob, queue=res_queue, fileshare=res_file) parsed._str = string # pylint: disable = protected-access return parsed diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py index 763a84777280..2ea36a9b94e4 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py @@ -489,7 +489,7 @@ def from_string(cls, string): res_queue = 'q' in string res_file = 'f' in string - parsed = cls(res_blob, res_queue, res_file) + parsed = cls(blob=res_blob, queue=res_queue, fileshare=res_file) parsed._str = string # pylint: disable = protected-access return parsed diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py index ee9b77933449..7999156b038b 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py @@ -489,7 +489,7 @@ def from_string(cls, string): res_queue = 'q' in string res_file = 'f' in string - parsed = cls(res_blob, res_queue, res_file) + parsed = cls(blob=res_blob, queue=res_queue, fileshare=res_file) parsed._str = string # pylint: disable = protected-access return parsed From 57b5db015c7417b37cced40aa68c38fd7e2e83a6 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Fri, 26 Apr 2024 11:51:40 -0700 Subject: [PATCH 4/9] upn change --- .../azure/storage/filedatalake/_data_lake_directory_client.py | 2 +- .../azure/storage/filedatalake/_data_lake_file_client.py | 3 ++- .../azure/storage/filedatalake/_file_system_client.py | 3 ++- .../filedatalake/aio/_data_lake_directory_client_async.py | 3 ++- .../storage/filedatalake/aio/_data_lake_file_client_async.py | 3 ++- .../storage/filedatalake/aio/_file_system_client_async.py | 3 ++- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 42b4f41064df..c68c0ffa645e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -292,7 +292,7 @@ def get_directory_properties(self, **kwargs): :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the :attr:`.~DirectoryProperties.owner`, :attr:`~.DirectoryProperties.group`, + in the :attr:`~DirectoryProperties.owner`, :attr:`~DirectoryProperties.group`, and :attr:`~DirectoryProperties.permission` response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py index e14d66afb497..ee1fe0a3eb86 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py @@ -310,7 +310,8 @@ def get_file_properties(self, **kwargs): :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be + in the :attr:`~FileProperties.owner`, :attr:`~FileProperties.group`, + and :attr:`~FileProperties.permission` response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py index c5f9e53dabfa..59f51d06f2d1 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py @@ -565,7 +565,8 @@ def get_paths( :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be + in the :attr:`~PathProperties.owner`, :attr:`~PathProperties.group`, + and :attr:`~PathProperties.permission` response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py index de27bb4078c3..e9d31afa00a0 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py @@ -269,7 +269,8 @@ async def get_directory_properties(self, **kwargs): :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be + in the :attr:`~DirectoryProperties.owner`, :attr:`~DirectoryProperties.group`, + and :attr:`~DirectoryProperties.permission` response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py index 607b33059ee6..94c84337ebd5 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py @@ -277,7 +277,8 @@ async def get_file_properties(self, **kwargs): :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be + in the :attr:`~FileProperties.owner`, :attr:`~FileProperties.group`, + and :attr:`~FileProperties.permission` response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py index b8d35a251b41..53158e883090 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py @@ -508,7 +508,8 @@ def get_paths( :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be + in the :attr:`~PathProperties.owner`, :attr:`~PathProperties.group`, + and :attr:`~PathProperties.permission` response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and From 623f4a61c2453f33415c7f52194ae53dcf00e89f Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Tue, 30 Apr 2024 13:18:03 -0700 Subject: [PATCH 5/9] Jacobs APIView feedback --- .../azure/storage/blob/_quick_query_helper.py | 3 ++- .../azure/storage/blob/_shared/models.py | 13 +++++++++---- .../filedatalake/_data_lake_directory_client.py | 5 +++-- .../azure/storage/filedatalake/_shared/models.py | 13 +++++++++---- .../azure/storage/fileshare/_file_client.py | 6 +++--- .../azure/storage/fileshare/_shared/models.py | 13 +++++++++---- .../storage/fileshare/aio/_file_client_async.py | 6 +++--- .../azure-storage-file-share/tests/test_file.py | 4 ++-- .../tests/test_file_async.py | 4 ++-- .../azure/storage/queue/_shared/models.py | 13 +++++++++---- 10 files changed, 51 insertions(+), 29 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_quick_query_helper.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_quick_query_helper.py index 4e6c95b438e1..b4d13ebf4bd2 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_quick_query_helper.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_quick_query_helper.py @@ -93,7 +93,8 @@ def readall(self): return data.decode(self._encoding) return data - def readinto(self, stream: IO[bytes]) -> None: + def readinto(self, stream): + # type: (IO) -> None """Download the query result to a stream. :param IO stream: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py index 48e541892cef..33a70a72fd7a 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py @@ -461,10 +461,15 @@ class Services(object): Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. """ - def __init__(self, **kwargs): - self.blob = kwargs.get('blob', False) - self.queue = kwargs.get('queue', False) - self.fileshare = kwargs.get('fileshare', False) + def __init__( + self, *, + blob: bool = False, + queue: bool = False, + fileshare: bool = False + ) -> None: + self.blob = blob + self.queue = queue + self.fileshare = fileshare self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + ('f' if self.fileshare else '')) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index c68c0ffa645e..5867f43d9a53 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -292,8 +292,9 @@ def get_directory_properties(self, **kwargs): :keyword bool upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If "True", the user identity values returned - in the :attr:`~DirectoryProperties.owner`, :attr:`~DirectoryProperties.group`, - and :attr:`~DirectoryProperties.permission` response headers will be + in the :attr:`~azure.storage.filedatalake.DirectoryProperties.owner`, + `~azure.storage.filedatalake.DirectoryProperties.group`, + and ~azure.storage.filedatalake.DirectoryProperties.permission response headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py index cb7fcf978183..e06b6ac6cd7d 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py @@ -461,10 +461,15 @@ class Services(object): Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. """ - def __init__(self, **kwargs): - self.blob = kwargs.get('blob', False) - self.queue = kwargs.get('queue', False) - self.fileshare = kwargs.get('fileshare', False) + def __init__( + self, *, + blob: bool = False, + queue: bool = False, + fileshare: bool = False + ) -> None: + self.blob = blob + self.queue = queue + self.fileshare = fileshare self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + ('f' if self.fileshare else '')) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py index c7bba5418af3..c1c1dfb4abda 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py @@ -1486,7 +1486,7 @@ def get_ranges_diff( offset: Optional[int] = None, length: Optional[int] = None, *, - allow_renames: Optional[bool] = None, + include_renames: Optional[bool] = None, **kwargs: Any ) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]: """Returns the list of valid page ranges for a file or snapshot @@ -1502,7 +1502,7 @@ def get_ranges_diff( The snapshot diff parameter that contains an opaque DateTime value that specifies a previous file snapshot to be compared against a more recent snapshot or the current file. - :keyword Optional[bool] allow_renames: + :keyword Optional[bool] include_renames: Only valid if previous_sharesnapshot parameter is provided. Specifies whether the changed ranges for a file that has been renamed or moved between the target snapshot (or live file) and the previous snapshot should be listed. If set to True, the valid changed ranges for the file will be returned. @@ -1526,7 +1526,7 @@ def get_ranges_diff( offset=offset, length=length, previous_sharesnapshot=previous_sharesnapshot, - support_rename=allow_renames, + support_rename=include_renames, **kwargs) try: ranges = self._client.file.get_range_list(**options) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py index 2ea36a9b94e4..78550376ac64 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py @@ -461,10 +461,15 @@ class Services(object): Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. """ - def __init__(self, **kwargs): - self.blob = kwargs.get('blob', False) - self.queue = kwargs.get('queue', False) - self.fileshare = kwargs.get('fileshare', False) + def __init__( + self, *, + blob: bool = False, + queue: bool = False, + fileshare: bool = False + ) -> None: + self.blob = blob + self.queue = queue + self.fileshare = fileshare self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + ('f' if self.fileshare else '')) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py index 17b322c06712..a32c43e19664 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py @@ -1285,7 +1285,7 @@ async def get_ranges_diff( offset: Optional[int] = None, length: Optional[int] = None, *, - allow_renames: Optional[bool] = None, + include_renames: Optional[bool] = None, **kwargs: Any ) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]: """Returns the list of valid page ranges for a file or snapshot @@ -1301,7 +1301,7 @@ async def get_ranges_diff( The snapshot diff parameter that contains an opaque DateTime value that specifies a previous file snapshot to be compared against a more recent snapshot or the current file. - :keyword Optional[bool] allow_renames: + :keyword Optional[bool] include_renames: Only valid if previous_sharesnapshot parameter is provided. Specifies whether the changed ranges for a file that has been renamed or moved between the target snapshot (or live file) and the previous snapshot should be listed. If set to True, the valid changed ranges for the file will be returned. @@ -1325,7 +1325,7 @@ async def get_ranges_diff( offset=offset, length=length, previous_sharesnapshot=previous_sharesnapshot, - support_rename=allow_renames, + support_rename=include_renames, **kwargs) try: ranges = await self._client.file.get_range_list(**options) diff --git a/sdk/storage/azure-storage-file-share/tests/test_file.py b/sdk/storage/azure-storage-file-share/tests/test_file.py index 7a09ff9fd75e..86ea0dfec4f3 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file.py @@ -2038,8 +2038,8 @@ def test_list_ranges_diff_support_rename(self, **kwargs): with pytest.raises(ResourceExistsError): file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot) with pytest.raises(ResourceExistsError): - file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, allow_renames=False) - ranges, cleared = file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, allow_renames=True) + file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, include_renames=False) + ranges, cleared = file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, include_renames=True) assert ranges is not None assert isinstance(ranges, list) assert len(ranges) == 1 diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_async.py index 750a7ef6215a..3b1317fb6a6d 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_async.py @@ -2082,8 +2082,8 @@ async def test_list_ranges_diff_support_rename(self, **kwargs): with pytest.raises(ResourceExistsError): await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot) with pytest.raises(ResourceExistsError): - await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, allow_renames=False) - ranges, cleared = await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, allow_renames=True) + await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, include_renames=False) + ranges, cleared = await file_client.get_ranges_diff(previous_sharesnapshot=previous_snapshot, include_renames=True) assert ranges is not None assert isinstance(ranges, list) assert len(ranges) == 1 diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py index 7999156b038b..1be0b60b7e78 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py @@ -461,10 +461,15 @@ class Services(object): Access for the `~azure.storage.fileshare.ShareServiceClient`. Default is False. """ - def __init__(self, **kwargs): - self.blob = kwargs.get('blob', False) - self.queue = kwargs.get('queue', False) - self.fileshare = kwargs.get('fileshare', False) + def __init__( + self, *, + blob: bool = False, + queue: bool = False, + fileshare: bool = False + ) -> None: + self.blob = blob + self.queue = queue + self.fileshare = fileshare self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + ('f' if self.fileshare else '')) From 2bb5bf87d1662b7ba8f20acf5aada72475d7aff1 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Tue, 30 Apr 2024 14:51:30 -0700 Subject: [PATCH 6/9] Best effort at sphinx for upn --- .../filedatalake/_data_lake_directory_client.py | 16 ++++++---------- .../filedatalake/_data_lake_file_client.py | 17 +++++++---------- .../storage/filedatalake/_file_system_client.py | 15 ++++++--------- .../azure/storage/filedatalake/_path_client.py | 14 ++++++-------- .../aio/_data_lake_directory_client_async.py | 15 ++++++--------- .../aio/_data_lake_file_client_async.py | 17 +++++++---------- .../aio/_file_system_client_async.py | 15 ++++++--------- .../filedatalake/aio/_path_client_async.py | 14 ++++++-------- 8 files changed, 50 insertions(+), 73 deletions(-) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 5867f43d9a53..b250d1362e33 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -290,16 +290,12 @@ def get_directory_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the directory was created with a customer-provided key. :keyword bool upn: - Optional. Valid only when Hierarchical Namespace is - enabled for the account. If "True", the user identity values returned - in the :attr:`~azure.storage.filedatalake.DirectoryProperties.owner`, - `~azure.storage.filedatalake.DirectoryProperties.group`, - and ~azure.storage.filedatalake.DirectoryProperties.permission response headers will be - transformed from Azure Active Directory Object IDs to User Principal - Names. If "False", the values will be returned as Azure Active - Directory Object IDs. The default value is false. Note that group and - application Object IDs are not translated because they do not have - unique friendly names. + If "True", the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.DirectoryProperties. + If "False", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translate + because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py index ee1fe0a3eb86..a4690dd2010d 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py @@ -308,15 +308,12 @@ def get_file_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the file was created with a customer-provided key. :keyword bool upn: - Optional. Valid only when Hierarchical Namespace is - enabled for the account. If "True", the user identity values returned - in the :attr:`~FileProperties.owner`, :attr:`~FileProperties.group`, - and :attr:`~FileProperties.permission` response headers will be - transformed from Azure Active Directory Object IDs to User Principal - Names. If "False", the values will be returned as Azure Active - Directory Object IDs. The default value is false. Note that group and - application Object IDs are not translated because they do not have - unique friendly names. + If "True", the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.FileProperties. + If "False", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translate + because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. @@ -324,7 +321,7 @@ def get_file_properties(self, **kwargs): see `here `_. :returns: All user-defined metadata, standard HTTP properties, and system properties for the file. - :rtype: FileProperties + :rtype: ~azure.storage.filedatalake.FileProperties .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py index 59f51d06f2d1..ac7dbf54d537 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py @@ -563,15 +563,12 @@ def get_paths( number of items to return per page. If omitted or greater than 5,000, the response will include up to 5,000 items per page. :keyword bool upn: - Optional. Valid only when Hierarchical Namespace is - enabled for the account. If "True", the user identity values returned - in the :attr:`~PathProperties.owner`, :attr:`~PathProperties.group`, - and :attr:`~PathProperties.permission` response headers will be - transformed from Azure Active Directory Object IDs to User Principal - Names. If "False", the values will be returned as Azure Active - Directory Object IDs. The default value is false. Note that group and - application Object IDs are not translated because they do not have - unique friendly names. + If "True", the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.PathProperties. + If "False", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translate + because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py index 15432b2e62e2..f334d030a9bb 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py @@ -923,14 +923,12 @@ def _get_path_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the file/directory was created with a customer-provided key. :keyword bool upn: - Optional. Valid only when Hierarchical Namespace is - enabled for the account. If "True", the user identity values returned - in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be - transformed from Azure Active Directory Object IDs to User Principal - Names. If "False", the values will be returned as Azure Active - Directory Object IDs. The default value is false. Note that group and - application Object IDs are not translated because they do not have - unique friendly names. + If "True", the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of the respective property object returned. + If "False", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translate + because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py index e9d31afa00a0..7d60fa4b76fb 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py @@ -267,15 +267,12 @@ async def get_directory_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the directory was created with a customer-provided key. :keyword bool upn: - Optional. Valid only when Hierarchical Namespace is - enabled for the account. If "True", the user identity values returned - in the :attr:`~DirectoryProperties.owner`, :attr:`~DirectoryProperties.group`, - and :attr:`~DirectoryProperties.permission` response headers will be - transformed from Azure Active Directory Object IDs to User Principal - Names. If "False", the values will be returned as Azure Active - Directory Object IDs. The default value is false. Note that group and - application Object IDs are not translated because they do not have - unique friendly names. + If "True", the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.DirectoryProperties. + If "False", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translate + because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py index 94c84337ebd5..3e30b78178b7 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py @@ -275,15 +275,12 @@ async def get_file_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the file was created with a customer-provided key. :keyword bool upn: - Optional. Valid only when Hierarchical Namespace is - enabled for the account. If "True", the user identity values returned - in the :attr:`~FileProperties.owner`, :attr:`~FileProperties.group`, - and :attr:`~FileProperties.permission` response headers will be - transformed from Azure Active Directory Object IDs to User Principal - Names. If "False", the values will be returned as Azure Active - Directory Object IDs. The default value is false. Note that group and - application Object IDs are not translated because they do not have - unique friendly names. + If "True", the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.FileProperties. + If "False", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translate + because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. @@ -291,7 +288,7 @@ async def get_file_properties(self, **kwargs): see `here `_. :returns: All user-defined metadata, standard HTTP properties, and system properties for the file. - :rtype: FileProperties + :rtype: ~azure.storage.filedatalake.FileProperties .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py index 53158e883090..c6c0b3a6df67 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py @@ -506,15 +506,12 @@ def get_paths( number of items to return per page. If omitted or greater than 5,000, the response will include up to 5,000 items per page. :keyword bool upn: - Optional. Valid only when Hierarchical Namespace is - enabled for the account. If "True", the user identity values returned - in the :attr:`~PathProperties.owner`, :attr:`~PathProperties.group`, - and :attr:`~PathProperties.permission` response headers will be - transformed from Azure Active Directory Object IDs to User Principal - Names. If "False", the values will be returned as Azure Active - Directory Object IDs. The default value is false. Note that group and - application Object IDs are not translated because they do not have - unique friendly names. + If "True", the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.PathProperties. + If "False", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translate + because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py index 6ebce0ec16c3..3ffa5d673737 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py @@ -712,14 +712,12 @@ async def _get_path_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the file/directory was created with a customer-provided key. :keyword bool upn: - Optional. Valid only when Hierarchical Namespace is - enabled for the account. If "True", the user identity values returned - in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be - transformed from Azure Active Directory Object IDs to User Principal - Names. If "False", the values will be returned as Azure Active - Directory Object IDs. The default value is false. Note that group and - application Object IDs are not translated because they do not have - unique friendly names. + If "True", the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of the respective property object returned. + If "False", the values will be returned as Azure Active Directory Object IDs. + The default value is false. Note that group and application Object IDs are not translate + because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. From c4c9fe8ec8963ac97cc442fc82ddba6f7000dcaa Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Tue, 30 Apr 2024 16:03:29 -0700 Subject: [PATCH 7/9] Remove period to get hyperlink working pls --- .../azure/storage/filedatalake/_data_lake_directory_client.py | 2 +- .../azure/storage/filedatalake/_data_lake_file_client.py | 2 +- .../filedatalake/aio/_data_lake_directory_client_async.py | 2 +- .../storage/filedatalake/aio/_data_lake_file_client_async.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index b250d1362e33..3fdfe05d0eb7 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -292,7 +292,7 @@ def get_directory_properties(self, **kwargs): :keyword bool upn: If "True", the user identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.DirectoryProperties. + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.DirectoryProperties If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not translate because they do not have unique friendly names. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py index a4690dd2010d..0f02108d7edb 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py @@ -310,7 +310,7 @@ def get_file_properties(self, **kwargs): :keyword bool upn: If "True", the user identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.FileProperties. + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.FileProperties If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not translate because they do not have unique friendly names. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py index 7d60fa4b76fb..da8e94ae88ca 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py @@ -269,7 +269,7 @@ async def get_directory_properties(self, **kwargs): :keyword bool upn: If "True", the user identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.DirectoryProperties. + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.DirectoryProperties If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not translate because they do not have unique friendly names. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py index 3e30b78178b7..81ee2c324bf0 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py @@ -277,7 +277,7 @@ async def get_file_properties(self, **kwargs): :keyword bool upn: If "True", the user identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.FileProperties. + Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.FileProperties If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not translate because they do not have unique friendly names. From 7c6b54a6fca0ea47f51a2992bcf82887832700e6 Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Wed, 1 May 2024 11:23:13 -0700 Subject: [PATCH 8/9] Try again with :class: annotation --- .../azure/storage/filedatalake/_data_lake_directory_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 3fdfe05d0eb7..6b39461e119d 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -292,7 +292,8 @@ def get_directory_properties(self, **kwargs): :keyword bool upn: If "True", the user identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.DirectoryProperties + Principal Names in the owner, group, and acl fields of + :class:`~azure.storage.filedatalake.DirectoryProperties` If "False", the values will be returned as Azure Active Directory Object IDs. The default value is false. Note that group and application Object IDs are not translate because they do not have unique friendly names. From 1ca09b117e0543df0743130175ba460eb51cde2f Mon Sep 17 00:00:00 2001 From: Vincent Tran Date: Wed, 1 May 2024 13:35:07 -0700 Subject: [PATCH 9/9] Final rev on upn docstring --- .../filedatalake/_data_lake_directory_client.py | 11 +++++------ .../storage/filedatalake/_data_lake_file_client.py | 12 ++++++------ .../storage/filedatalake/_file_system_client.py | 12 ++++++------ .../azure/storage/filedatalake/_path_client.py | 6 +++--- .../aio/_data_lake_directory_client_async.py | 12 ++++++------ .../filedatalake/aio/_data_lake_file_client_async.py | 12 ++++++------ .../filedatalake/aio/_file_system_client_async.py | 12 ++++++------ .../storage/filedatalake/aio/_path_client_async.py | 6 +++--- 8 files changed, 41 insertions(+), 42 deletions(-) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 6b39461e119d..59bcce4120d3 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -290,13 +290,12 @@ def get_directory_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the directory was created with a customer-provided key. :keyword bool upn: - If "True", the user identity values returned in the x-ms-owner, x-ms-group, - and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + If True, the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User Principal Names in the owner, group, and acl fields of - :class:`~azure.storage.filedatalake.DirectoryProperties` - If "False", the values will be returned as Azure Active Directory Object IDs. - The default value is false. Note that group and application Object IDs are not translate - because they do not have unique friendly names. + :class:`~azure.storage.filedatalake.DirectoryProperties`. If False, the values will be returned + as Azure Active Directory Object IDs. The default value is False. Note that group and application + Object IDs are not translate because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py index 0f02108d7edb..cdbf63e0a175 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py @@ -308,12 +308,12 @@ def get_file_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the file was created with a customer-provided key. :keyword bool upn: - If "True", the user identity values returned in the x-ms-owner, x-ms-group, - and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.FileProperties - If "False", the values will be returned as Azure Active Directory Object IDs. - The default value is false. Note that group and application Object IDs are not translate - because they do not have unique friendly names. + If True, the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of + :class:`~azure.storage.filedatalake.FileProperties`. If False, the values will be returned + as Azure Active Directory Object IDs. The default value is False. Note that group and application + Object IDs are not translate because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py index ac7dbf54d537..ed97c02e7141 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py @@ -563,12 +563,12 @@ def get_paths( number of items to return per page. If omitted or greater than 5,000, the response will include up to 5,000 items per page. :keyword bool upn: - If "True", the user identity values returned in the x-ms-owner, x-ms-group, - and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.PathProperties. - If "False", the values will be returned as Azure Active Directory Object IDs. - The default value is false. Note that group and application Object IDs are not translate - because they do not have unique friendly names. + If True, the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of + :class:`~azure.storage.filedatalake.PathProperties`. If False, the values will be returned + as Azure Active Directory Object IDs. The default value is False. Note that group and application + Object IDs are not translate because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py index f334d030a9bb..8d95acb81590 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py @@ -923,11 +923,11 @@ def _get_path_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the file/directory was created with a customer-provided key. :keyword bool upn: - If "True", the user identity values returned in the x-ms-owner, x-ms-group, + If True, the user identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User Principal Names in the owner, group, and acl fields of the respective property object returned. - If "False", the values will be returned as Azure Active Directory Object IDs. - The default value is false. Note that group and application Object IDs are not translate + If False, the values will be returned as Azure Active Directory Object IDs. + The default value is False. Note that group and application Object IDs are not translate because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py index da8e94ae88ca..39c5d3a01082 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py @@ -267,12 +267,12 @@ async def get_directory_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the directory was created with a customer-provided key. :keyword bool upn: - If "True", the user identity values returned in the x-ms-owner, x-ms-group, - and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.DirectoryProperties - If "False", the values will be returned as Azure Active Directory Object IDs. - The default value is false. Note that group and application Object IDs are not translate - because they do not have unique friendly names. + If True, the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of + :class:`~azure.storage.filedatalake.DirectoryProperties`. If False, the values will be returned + as Azure Active Directory Object IDs. The default value is False. Note that group and application + Object IDs are not translate because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py index 81ee2c324bf0..d29f1f7f3811 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_data_lake_file_client_async.py @@ -275,12 +275,12 @@ async def get_file_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the file was created with a customer-provided key. :keyword bool upn: - If "True", the user identity values returned in the x-ms-owner, x-ms-group, - and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.FileProperties - If "False", the values will be returned as Azure Active Directory Object IDs. - The default value is false. Note that group and application Object IDs are not translate - because they do not have unique friendly names. + If True, the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of + :class:`~azure.storage.filedatalake.FileProperties`. If False, the values will be returned + as Azure Active Directory Object IDs. The default value is False. Note that group and application + Object IDs are not translate because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py index c6c0b3a6df67..a66f195cb36e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py @@ -506,12 +506,12 @@ def get_paths( number of items to return per page. If omitted or greater than 5,000, the response will include up to 5,000 items per page. :keyword bool upn: - If "True", the user identity values returned in the x-ms-owner, x-ms-group, - and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User - Principal Names in the owner, group, and acl fields of ~azure.storage.filedatalake.PathProperties. - If "False", the values will be returned as Azure Active Directory Object IDs. - The default value is false. Note that group and application Object IDs are not translate - because they do not have unique friendly names. + If True, the user identity values returned in the x-ms-owner, x-ms-group, + and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User + Principal Names in the owner, group, and acl fields of + :class:`~azure.storage.filedatalake.PathProperties`. If False, the values will be returned + as Azure Active Directory Object IDs. The default value is False. Note that group and application + Object IDs are not translate because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py index 3ffa5d673737..41dad15281b4 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_path_client_async.py @@ -712,11 +712,11 @@ async def _get_path_properties(self, **kwargs): Use of customer-provided keys must be done over HTTPS. Required if the file/directory was created with a customer-provided key. :keyword bool upn: - If "True", the user identity values returned in the x-ms-owner, x-ms-group, + If True, the user identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response headers will be transformed from Azure Active Directory Object IDs to User Principal Names in the owner, group, and acl fields of the respective property object returned. - If "False", the values will be returned as Azure Active Directory Object IDs. - The default value is false. Note that group and application Object IDs are not translate + If False, the values will be returned as Azure Active Directory Object IDs. + The default value is False. Note that group and application Object IDs are not translate because they do not have unique friendly names. :keyword int timeout: Sets the server-side timeout for the operation in seconds. For more details see