From 91813fcb590cab64c2acc451b305226509ad0ab2 Mon Sep 17 00:00:00 2001 From: vincenttran-msft <101599632+vincenttran-msft@users.noreply.github.com> Date: Thu, 2 May 2024 18:04:42 -0700 Subject: [PATCH] [Storage] [STG93 GA] APIView Feedback (#35331) --- .../azure/storage/blob/_shared/models.py | 25 ++++++++++--------- .../_data_lake_directory_client.py | 14 +++++------ .../filedatalake/_data_lake_file_client.py | 16 ++++++------ .../filedatalake/_file_system_client.py | 14 +++++------ .../storage/filedatalake/_path_client.py | 14 +++++------ .../storage/filedatalake/_shared/models.py | 25 ++++++++++--------- .../aio/_data_lake_directory_client_async.py | 14 +++++------ .../aio/_data_lake_file_client_async.py | 16 ++++++------ .../aio/_file_system_client_async.py | 14 +++++------ .../filedatalake/aio/_path_client_async.py | 14 +++++------ .../azure/storage/fileshare/_file_client.py | 2 +- .../azure/storage/fileshare/_share_client.py | 12 ++++++--- .../azure/storage/fileshare/_shared/models.py | 25 ++++++++++--------- .../fileshare/aio/_file_client_async.py | 2 +- .../fileshare/aio/_share_client_async.py | 10 +++++--- .../azure/storage/queue/_shared/models.py | 25 ++++++++++--------- 16 files changed, 119 insertions(+), 123 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 8b92efde375e..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 @@ -453,19 +453,20 @@ 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): + def __init__( + self, *, + blob: bool = False, + queue: bool = False, + fileshare: bool = False + ) -> None: self.blob = blob self.queue = queue self.fileshare = fileshare @@ -493,7 +494,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/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 6013569c27a5..87a082990c40 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 @@ -297,14 +297,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 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 + :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 e361fe606ab1..de685b606cee 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 @@ -315,14 +315,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 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 + :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. @@ -330,7 +328,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 340b03347734..c67a251f6b85 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 @@ -569,14 +569,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 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 + :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 ff9f0e13c1ca..a9d6d4b82be8 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 @@ -929,14 +929,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/_shared/models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py index ca54c92d7d1c..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 @@ -453,19 +453,20 @@ 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): + def __init__( + self, *, + blob: bool = False, + queue: bool = False, + fileshare: bool = False + ) -> None: self.blob = blob self.queue = queue self.fileshare = fileshare @@ -493,7 +494,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/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 e625769c74c5..1bc1dfb9f1b7 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 @@ -273,14 +273,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 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 + :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 f016cd8bc2de..f473c898fe0c 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 @@ -281,14 +281,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 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 + :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. @@ -296,7 +294,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 ebe8503be6ad..0678b93a7eb2 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 @@ -511,14 +511,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 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 + :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 16b1190aef07..cf25aaf87481 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 @@ -718,14 +718,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. 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 471c64dbf633..2620fbe1410a 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 @@ -718,7 +718,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. 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 01491d496958..0ad4c7b3b25c 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 @@ -349,8 +349,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: @@ -428,8 +429,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. @@ -470,7 +472,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: @@ -978,7 +982,7 @@ def create_directory(self, directory_name, **kwargs): The name of the directory. :keyword metadata: Name-value pairs associated with the directory as metadata. - :type metadata: dict[str, str] + :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/_shared/models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py index 5506f614cbb9..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 @@ -453,19 +453,20 @@ 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): + def __init__( + self, *, + blob: bool = False, + queue: bool = False, + fileshare: bool = False + ) -> None: self.blob = blob self.queue = queue self.fileshare = fileshare @@ -493,7 +494,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/aio/_file_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py index b1469f6f7896..6b5e95bd07f1 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 @@ -578,7 +578,7 @@ async 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. 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 9166f92834cd..824b2e1a4c80 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 @@ -207,8 +207,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: @@ -286,8 +287,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. @@ -328,7 +330,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-queue/azure/storage/queue/_shared/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py index 34ce22b7a632..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 @@ -453,19 +453,20 @@ 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): + def __init__( + self, *, + blob: bool = False, + queue: bool = False, + fileshare: bool = False + ) -> None: self.blob = blob self.queue = queue self.fileshare = fileshare @@ -493,7 +494,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