From 1d30e0486035e98a68206ebf0bfbd1a81a21c1bb Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 3 Oct 2019 16:20:20 -0700 Subject: [PATCH 1/5] Docstring improvement --- doc/sphinx/ref/azure.storage.blob.aio.rst | 44 ---- doc/sphinx/ref/azure.storage.blob.rst | 51 ---- doc/sphinx/ref/azure.storage.file.aio.rst | 43 ---- doc/sphinx/ref/azure.storage.file.rst | 51 ---- doc/sphinx/ref/azure.storage.queue.aio.rst | 27 --- doc/sphinx/ref/azure.storage.queue.rst | 35 --- .../storage/blob/aio/blob_client_async.py | 168 ++++++------- .../blob/aio/blob_service_client_async.py | 45 ++-- .../blob/aio/container_client_async.py | 82 +++---- .../azure/storage/blob/aio/lease_async.py | 24 +- .../azure/storage/blob/blob_client.py | 224 +++++++++--------- .../azure/storage/blob/blob_service_client.py | 55 ++--- .../azure/storage/blob/container_client.py | 94 ++++---- .../azure/storage/blob/lease.py | 22 +- .../azure/storage/blob/models.py | 14 +- 15 files changed, 360 insertions(+), 619 deletions(-) diff --git a/doc/sphinx/ref/azure.storage.blob.aio.rst b/doc/sphinx/ref/azure.storage.blob.aio.rst index 2a8b6aa79f70..f137b1cfd35a 100644 --- a/doc/sphinx/ref/azure.storage.blob.aio.rst +++ b/doc/sphinx/ref/azure.storage.blob.aio.rst @@ -1,50 +1,6 @@ azure.storage.blob.aio package ============================== -Submodules ----------- - -azure.storage.blob.aio.blob\_client\_async module -------------------------------------------------- - -.. automodule:: azure.storage.blob.aio.blob_client_async - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.aio.blob\_service\_client\_async module ----------------------------------------------------------- - -.. automodule:: azure.storage.blob.aio.blob_service_client_async - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.aio.container\_client\_async module ------------------------------------------------------- - -.. automodule:: azure.storage.blob.aio.container_client_async - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.aio.lease\_async module ------------------------------------------- - -.. automodule:: azure.storage.blob.aio.lease_async - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.aio.models module ------------------------------------- - -.. automodule:: azure.storage.blob.aio.models - :members: - :undoc-members: - :show-inheritance: - - Module contents --------------- diff --git a/doc/sphinx/ref/azure.storage.blob.rst b/doc/sphinx/ref/azure.storage.blob.rst index bdb39a3a496e..6e1706ba402c 100644 --- a/doc/sphinx/ref/azure.storage.blob.rst +++ b/doc/sphinx/ref/azure.storage.blob.rst @@ -8,57 +8,6 @@ Subpackages azure.storage.blob.aio -Submodules ----------- - -azure.storage.blob.blob\_client module --------------------------------------- - -.. automodule:: azure.storage.blob.blob_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.blob\_service\_client module ------------------------------------------------ - -.. automodule:: azure.storage.blob.blob_service_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.container\_client module -------------------------------------------- - -.. automodule:: azure.storage.blob.container_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.lease module -------------------------------- - -.. automodule:: azure.storage.blob.lease - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.models module --------------------------------- - -.. automodule:: azure.storage.blob.models - :members: - :undoc-members: - :show-inheritance: - -azure.storage.blob.version module ---------------------------------- - -.. automodule:: azure.storage.blob.version - :members: - :undoc-members: - :show-inheritance: - Module contents --------------- diff --git a/doc/sphinx/ref/azure.storage.file.aio.rst b/doc/sphinx/ref/azure.storage.file.aio.rst index 39209bacdee4..f0b96a2e6350 100644 --- a/doc/sphinx/ref/azure.storage.file.aio.rst +++ b/doc/sphinx/ref/azure.storage.file.aio.rst @@ -1,49 +1,6 @@ azure.storage.file.aio package ============================== -Submodules ----------- - -azure.storage.file.aio.directory\_client\_async module ------------------------------------------------------- - -.. automodule:: azure.storage.file.aio.directory_client_async - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.aio.file\_client\_async module -------------------------------------------------- - -.. automodule:: azure.storage.file.aio.file_client_async - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.aio.file\_service\_client\_async module ----------------------------------------------------------- - -.. automodule:: azure.storage.file.aio.file_service_client_async - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.aio.models module ------------------------------------- - -.. automodule:: azure.storage.file.aio.models - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.aio.share\_client\_async module --------------------------------------------------- - -.. automodule:: azure.storage.file.aio.share_client_async - :members: - :undoc-members: - :show-inheritance: - Module contents --------------- diff --git a/doc/sphinx/ref/azure.storage.file.rst b/doc/sphinx/ref/azure.storage.file.rst index 61f0ceaef69e..771da5b780bf 100644 --- a/doc/sphinx/ref/azure.storage.file.rst +++ b/doc/sphinx/ref/azure.storage.file.rst @@ -8,57 +8,6 @@ Subpackages azure.storage.file.aio -Submodules ----------- - -azure.storage.file.directory\_client module -------------------------------------------- - -.. automodule:: azure.storage.file.directory_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.file\_client module --------------------------------------- - -.. automodule:: azure.storage.file.file_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.file\_service\_client module ------------------------------------------------ - -.. automodule:: azure.storage.file.file_service_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.models module --------------------------------- - -.. automodule:: azure.storage.file.models - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.share\_client module ---------------------------------------- - -.. automodule:: azure.storage.file.share_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.file.version module ---------------------------------- - -.. automodule:: azure.storage.file.version - :members: - :undoc-members: - :show-inheritance: - Module contents --------------- diff --git a/doc/sphinx/ref/azure.storage.queue.aio.rst b/doc/sphinx/ref/azure.storage.queue.aio.rst index 639ea94f0256..121a5d3a10fa 100644 --- a/doc/sphinx/ref/azure.storage.queue.aio.rst +++ b/doc/sphinx/ref/azure.storage.queue.aio.rst @@ -1,33 +1,6 @@ azure.storage.queue.aio package =============================== -Submodules ----------- - -azure.storage.queue.aio.models module -------------------------------------- - -.. automodule:: azure.storage.queue.aio.models - :members: - :undoc-members: - :show-inheritance: - -azure.storage.queue.aio.queue\_client\_async module ---------------------------------------------------- - -.. automodule:: azure.storage.queue.aio.queue_client_async - :members: - :undoc-members: - :show-inheritance: - -azure.storage.queue.aio.queue\_service\_client\_async module ------------------------------------------------------------- - -.. automodule:: azure.storage.queue.aio.queue_service_client_async - :members: - :undoc-members: - :show-inheritance: - Module contents --------------- diff --git a/doc/sphinx/ref/azure.storage.queue.rst b/doc/sphinx/ref/azure.storage.queue.rst index 13c80dc07718..c056043b5b85 100644 --- a/doc/sphinx/ref/azure.storage.queue.rst +++ b/doc/sphinx/ref/azure.storage.queue.rst @@ -8,41 +8,6 @@ Subpackages azure.storage.queue.aio -Submodules ----------- - -azure.storage.queue.models module ---------------------------------- - -.. automodule:: azure.storage.queue.models - :members: - :undoc-members: - :show-inheritance: - -azure.storage.queue.queue\_client module ----------------------------------------- - -.. automodule:: azure.storage.queue.queue_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.queue.queue\_service\_client module -------------------------------------------------- - -.. automodule:: azure.storage.queue.queue_service_client - :members: - :undoc-members: - :show-inheritance: - -azure.storage.queue.version module ----------------------------------- - -.. automodule:: azure.storage.queue.version - :members: - :undoc-members: - :show-inheritance: - Module contents --------------- diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_client_async.py index e6e3a334a7e5..24897070773c 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_client_async.py @@ -68,10 +68,10 @@ class BlobClient(AsyncStorageAccountHostsMixin, BlobClientBase): # pylint: disa or container, in which case the blob and/or container must also be specified. :param container: The container for the blob. If specified, this value will override a container value specified in the blob URL. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param blob: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param str snapshot: The optional blob snapshot on which to operate. :param credential: @@ -150,7 +150,7 @@ async def upload_blob( """Creates a new blob from a data source with automatic chunking. :param data: The blob data to upload. - :param ~azure.storage.blob.models.BlobType blob_type: The type of the blob. This can be + :param ~azure.storage.blob.BlobType blob_type: The type of the blob. This can be either BlockBlob, PageBlob or AppendBlob. The default value is BlockBlob. :param bool overwrite: Whether the blob to be uploaded should overwrite the current data. If True, upload_blob will silently overwrite the existing data. If set to False, the @@ -164,7 +164,7 @@ async def upload_blob( :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set blob properties. :param bool validate_content: If true, calculates an MD5 hash for each chunk of the blob. The storage @@ -179,13 +179,13 @@ async def upload_blob( If specified, upload_blob only succeeds if the blob's lease is active and matches this ID. Required if the blob has an active lease. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -200,11 +200,11 @@ async def upload_blob( the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :param ~azure.storage.blob.models.StandardBlobTier standard_blob_tier: + :param ~azure.storage.blob.StandardBlobTier standard_blob_tier: A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts. :param int maxsize_condition: @@ -216,7 +216,7 @@ async def upload_blob( :param int max_concurrency: Maximum number of parallel connections to use when the blob size exceeds 64MB. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -279,13 +279,13 @@ async def download_blob(self, offset=None, length=None, validate_content=False, If specified, download_blob only succeeds if the blob's lease is active and matches this ID. Required if the blob has an active lease. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -300,7 +300,7 @@ async def download_blob(self, offset=None, length=None, validate_content=False, the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -358,13 +358,13 @@ async def delete_blob(self, delete_snapshots=False, **kwargs): Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -434,13 +434,13 @@ async def get_blob_properties(self, **kwargs): Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -455,7 +455,7 @@ async def get_blob_properties(self, **kwargs): the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -463,7 +463,7 @@ async def get_blob_properties(self, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: BlobProperties - :rtype: ~azure.storage.blob.models.BlobProperties + :rtype: ~azure.storage.blob.BlobProperties .. admonition:: Example: @@ -509,19 +509,19 @@ async def set_http_headers(self, content_settings=None, **kwargs): If one property is set for the content_settings, all properties will be overridden. - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set blob properties. :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -561,13 +561,13 @@ async def set_blob_metadata(self, metadata=None, **kwargs): Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -582,7 +582,7 @@ async def set_blob_metadata(self, metadata=None, **kwargs): the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -613,7 +613,7 @@ async def create_page_blob( # type: ignore This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set properties on the blob. :param int sequence_number: Only for Page blobs. The sequence number is a user-controlled value that you can use to @@ -626,13 +626,13 @@ async def create_page_blob( # type: ignore Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -647,14 +647,14 @@ async def create_page_blob( # type: ignore the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, a secure connection must be established to transfer the key. :param int timeout: The timeout parameter is expressed in seconds. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. @@ -678,7 +678,7 @@ async def create_append_blob(self, content_settings=None, metadata=None, **kwarg # type: (Optional[ContentSettings], Optional[Dict[str, str]], Any) -> Dict[str, Union[str, datetime]] """Creates a new Append Blob. - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set properties on the blob. :param metadata: Name-value pairs associated with the blob as metadata. @@ -687,13 +687,13 @@ async def create_append_blob(self, content_settings=None, metadata=None, **kwarg Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -708,7 +708,7 @@ async def create_append_blob(self, content_settings=None, metadata=None, **kwarg the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -743,13 +743,13 @@ async def create_snapshot(self, metadata=None, **kwargs): :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -768,7 +768,7 @@ async def create_snapshot(self, metadata=None, **kwargs): Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -846,13 +846,13 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy= pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. :type metadata: dict(str, str) - :param datetime source_if_modified_since: + :param ~datetime.datetime source_if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this conditional header to copy the blob only if the source blob has been modified since the specified date/time. - :param datetime source_if_unmodified_since: + :param ~datetime.datetime source_if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -870,7 +870,7 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy= specified. If the values are identical, the Blob service returns status code 412 (Precondition Failed). This header cannot be specified if the source is an Azure File. - :param datetime destination_if_modified_since: + :param ~datetime.datetime destination_if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -878,7 +878,7 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy= if the destination blob has been modified since the specified date/time. If the destination blob has not been modified, the Blob service returns status code 412 (Precondition Failed). - :param datetime destination_if_unmodified_since: + :param ~datetime.datetime destination_if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -916,14 +916,14 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy= the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. Defaults to False. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :param ~azure.storage.blob.models.StandardBlobTier standard_blob_tier: + :param ~azure.storage.blob.StandardBlobTier standard_blob_tier: A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts. - :param :class:`~azure.storage.blob.models.RehydratePriority` rehydrate_priority: + :param ~azure.storage.blob.RehydratePriority rehydrate_priority: Indicates the priority with which to rehydrate an archived blob :param bool requires_sync: Enforces that the service will not return a response until the copy is complete. @@ -962,7 +962,7 @@ async def abort_copy(self, copy_id, **kwargs): :param copy_id: The copy operation to abort. This can be either an ID, or an instance of BlobProperties. - :type copy_id: str or ~azure.storage.blob.models.BlobProperties + :type copy_id: str or ~azure.storage.blob.BlobProperties :rtype: None .. admonition:: Example: @@ -997,13 +997,13 @@ async def acquire_lease(self, lease_duration=-1, lease_id=None, **kwargs): Proposed lease ID, in a GUID string format. The Blob Service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1051,8 +1051,8 @@ async def set_standard_blob_tier(self, standard_blob_tier, **kwargs): is infrequently accessed and stored for at least a month. The archive tier is optimized for storing data that is rarely accessed and stored for at least six months with flexible latency requirements. - :type standard_blob_tier: str or ~azure.storage.blob.models.StandardBlobTier - :param :class:`~azure.storage.blob.models.RehydratePriority` rehydrate_priority: + :type standard_blob_tier: str or ~azure.storage.blob.StandardBlobTier + :param ~azure.storage.blob.RehydratePriority rehydrate_priority: Indicates the priority with which to rehydrate an archived blob :param int timeout: The timeout parameter is expressed in seconds. @@ -1106,7 +1106,7 @@ async def stage_block( :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str :param str encoding: Defaults to UTF-8. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1155,7 +1155,7 @@ async def stage_block_from_url( Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1193,7 +1193,7 @@ async def get_block_list(self, block_list_type="committed", **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: A tuple of two lists - committed and uncommitted blocks - :rtype: tuple(list(~azure.storage.blob.models.BlobBlock), list(~azure.storage.blob.models.BlobBlock)) + :rtype: tuple(list(~azure.storage.blob.BlobBlock), list(~azure.storage.blob.BlobBlock)) """ access_conditions = get_access_conditions(kwargs.pop('kease', None)) try: @@ -1225,7 +1225,7 @@ async def commit_block_list( # type: ignore Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set blob properties. :param metadata: Name-value pairs associated with the blob as metadata. @@ -1237,13 +1237,13 @@ async def commit_block_list( # type: ignore bitflips on the wire if using http instead of https as https (the default) will already validate. Note that this MD5 hash is not stored with the blob. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1258,10 +1258,10 @@ async def commit_block_list( # type: ignore the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.StandardBlobTier standard_blob_tier: + :param ~azure.storage.blob.StandardBlobTier standard_blob_tier: A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1291,7 +1291,7 @@ async def set_premium_page_blob_tier(self, premium_page_blob_tier, **kwargs): A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :type premium_page_blob_tier: ~azure.storage.blob.models.PremiumPageBlobTier + :type premium_page_blob_tier: ~azure.storage.blob.PremiumPageBlobTier :param int timeout: The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to @@ -1347,13 +1347,13 @@ async def get_page_ranges( # type: ignore The snapshot diff parameter that contains an opaque DateTime value that specifies a previous blob snapshot to be compared against a more recent snapshot or the current blob. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1400,7 +1400,7 @@ async def set_sequence_number( # type: ignore :param str sequence_number_action: This property indicates how the service should modify the blob's sequence - number. See :class:`~azure.storage.blob.models.SequenceNumberAction` for more information. + number. See :class:`~azure.storage.blob.SequenceNumberAction` for more information. :param str sequence_number: This property sets the blob's sequence number. The sequence number is a user-controlled property that you can use to track requests and manage @@ -1409,13 +1409,13 @@ async def set_sequence_number( # type: ignore Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1456,13 +1456,13 @@ async def resize_blob(self, size, **kwargs): Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1477,7 +1477,7 @@ async def resize_blob(self, size, **kwargs): the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. @@ -1538,13 +1538,13 @@ async def upload_page( # type: ignore :param int if_sequence_number_eq: If the blob's sequence number is equal to the specified value, the request proceeds; otherwise it fails. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1559,7 +1559,7 @@ async def upload_page( # type: ignore header to write the page only if the blob's ETag value does not match the value specified. If the values are identical, the Blob service fails. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1613,13 +1613,13 @@ async def upload_pages_from_url(self, source_url, # type: str The service will read the same number of bytes as the destination range (end_range-start_range). :param bytes source_content_md5: If given, the service will calculate the MD5 hash of the block content and compare against this value. - :param datetime source_if_modified_since: + :param ~datetime.datetime source_if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the source resource has been modified since the specified time. - :param datetime source_if_unmodified_since: + :param ~datetime.datetime source_if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1645,13 +1645,13 @@ async def upload_pages_from_url(self, source_url, # type: str :param int if_sequence_number_eq: If the blob's sequence number is equal to the specified value, the request proceeds; otherwise it fails. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1666,7 +1666,7 @@ async def upload_pages_from_url(self, source_url, # type: str the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1716,13 +1716,13 @@ async def clear_page(self, start_range, end_range, **kwargs): :param int if_sequence_number_eq: If the blob's sequence number is equal to the specified value, the request proceeds; otherwise it fails. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1737,7 +1737,7 @@ async def clear_page(self, start_range, end_range, **kwargs): header to write the page only if the blob's ETag value does not match the value specified. If the values are identical, the Blob service fails. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. @@ -1791,13 +1791,13 @@ async def append_block( # type: ignore Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1814,7 +1814,7 @@ async def append_block( # type: ignore operation if it does exist. :param str encoding: Defaults to UTF-8. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1874,13 +1874,13 @@ async def append_block_from_url(self, copy_source_url, # type: str :param ~azure.storage.blob.lease.LeaseClient or str lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1895,13 +1895,13 @@ async def append_block_from_url(self, copy_source_url, # type: str the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param datetime source_if_modified_since: + :param ~datetime.datetime source_if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the source resource has been modified since the specified time. - :param datetime source_if_unmodified_since: + :param ~datetime.datetime source_if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1916,7 +1916,7 @@ async def append_block_from_url(self, copy_source_url, # type: str the value specified. Specify the wildcard character (*) to perform the operation only if the source resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py index 10587ebbca9c..18e431034422 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py @@ -124,9 +124,9 @@ async def get_user_delegation_key(self, key_start_time, # type: datetime Obtain a user delegation key for the purpose of signing SAS tokens. A token credential must be present on the service object for this request to succeed. - :param datetime key_start_time: + :param ~datetime.datetime key_start_time: A DateTime value. Indicates when the key becomes valid. - :param datetime key_expiry_time: + :param ~datetime.datetime key_expiry_time: A DateTime value. Indicates when the key stops being valid. :param int timeout: The timeout parameter is expressed in seconds. @@ -254,36 +254,31 @@ async def set_service_properties( :param logging: Groups the Azure Analytics Logging settings. - :type logging: - :class:`~azure.storage.blob.models.Logging` + :type logging: ~azure.storage.blob.Logging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for blobs. - :type hour_metrics: - :class:`~azure.storage.blob.models.Metrics` + :type hour_metrics: ~azure.storage.blob.Metrics :param minute_metrics: The minute metrics settings provide request statistics for each minute for blobs. - :type minute_metrics: - :class:`~azure.storage.blob.models.Metrics` + :type minute_metrics: ~azure.storage.blob.Metrics :param cors: You can include up to five CorsRule elements in the list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. - :type cors: list(:class:`~azure.storage.blob.models.CorsRule`) + :type cors: list[~azure.storage.blob.CorsRule] :param str target_version: Indicates the default version to use for requests if an incoming request's version is not specified. :param delete_retention_policy: The delete retention policy specifies whether to retain deleted blobs. It also specifies the number of days and versions of blob to keep. - :type delete_retention_policy: - :class:`~azure.storage.blob.models.RetentionPolicy` + :type delete_retention_policy: ~azure.storage.blob.RetentionPolicy :param static_website: Specifies whether the static website feature is enabled, and if yes, indicates the index document and 404 error document to use. - :type static_website: - :class:`~azure.storage.blob.models.StaticWebsite` + :type static_website: ~azure.storage.blob.StaticWebsite :param int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -337,7 +332,7 @@ def list_containers( :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ContainerProperties. - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.models.ContainerProperties] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.ContainerProperties] .. admonition:: Example: @@ -384,10 +379,10 @@ async def create_container( :type metadata: dict(str, str) :param public_access: Possible values include: container, blob. - :type public_access: str or ~azure.storage.blob.models.PublicAccess + :type public_access: str or ~azure.storage.blob.PublicAccess :param int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.blob.aio.container_client_async.ContainerClient + :rtype: ~azure.storage.blob.aio.ContainerClient .. admonition:: Example: @@ -420,18 +415,18 @@ async def delete_container( :param container: The container to delete. This can either be the name of the container, or an instance of ContainerProperties. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param ~azure.storage.blob.lease.LeaseClient lease: If specified, delete_container only succeeds if the container's lease is active and matches this ID. Required if the container has an active lease. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -475,9 +470,9 @@ def get_container_client(self, container): :param container: The container. This can either be the name of the container, or an instance of ContainerProperties. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :returns: A ContainerClient. - :rtype: ~azure.core.blob.aio.container_client_async.ContainerClient + :rtype: ~azure.core.blob.aio.ContainerClient .. admonition:: Example: @@ -508,18 +503,18 @@ def get_blob_client( :param container: The container that the blob is in. This can either be the name of the container, or an instance of ContainerProperties. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param blob: The blob with which to interact. This can either be the name of the blob, or an instance of BlobProperties. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param snapshot: The optional blob snapshot on which to operate. This can either be the ID of the snapshot, or a dictionary output returned by - :func:`~azure.storage.blob.aio.blob_client_async.BlobClient.create_snapshot()`. + :func:`~azure.storage.blob.aio.BlobClient.create_snapshot()`. :type snapshot: str or dict(str, Any) :returns: A BlobClient. - :rtype: ~azure.storage.blob.aio.blob_client_async.BlobClient + :rtype: ~azure.storage.blob.aio.BlobClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/container_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/container_client_async.py index 58e3e9a184c3..0c8a7b5ef16c 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/container_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/container_client_async.py @@ -78,7 +78,7 @@ class ContainerClient(AsyncStorageAccountHostsMixin, ContainerClientBase): account, in which case the blob container must also be specified. :param container: The container for the blob. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param credential: The credentials with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string, and account @@ -130,7 +130,7 @@ async def create_container(self, metadata=None, public_access=None, timeout=None A dict with name_value pairs to associate with the container as metadata. Example:{'Category':'test'} :type metadata: dict[str, str] - :param ~azure.storage.blob.models.PublicAccess public_access: + :param ~azure.storage.blob.PublicAccess public_access: Possible values include: container, blob. :param int timeout: The timeout parameter is expressed in seconds. @@ -168,17 +168,17 @@ async def delete_container( Marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection. - :param ~azure.storage.blob.aio.lease_async.LeaseClient lease: + :param ~azure.storage.blob.aio.LeaseClient lease: If specified, delete_container only succeeds if the container's lease is active and matches this ID. Required if the container has an active lease. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -241,13 +241,13 @@ async def acquire_lease( :param str lease_id: Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -265,7 +265,7 @@ async def acquire_lease( :param int timeout: The timeout parameter is expressed in seconds. :returns: A LeaseClient object, that can be run in a context manager. - :rtype: ~azure.storage.blob.aio.lease_async.LeaseClient + :rtype: ~azure.storage.blob.aio.LeaseClient .. admonition:: Example: @@ -303,13 +303,13 @@ async def get_container_properties(self, lease=None, timeout=None, **kwargs): """Returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs. - :param ~azure.storage.blob.aio.lease_async.LeaseClient lease: + :param ~azure.storage.blob.aio.LeaseClient lease: If specified, get_container_properties only succeeds if the container's lease is active and matches this ID. :param int timeout: The timeout parameter is expressed in seconds. :return: Properties for the specified container within a container object. - :rtype: ~azure.storage.blob.models.ContainerProperties + :rtype: ~azure.storage.blob.ContainerProperties .. admonition:: Example: @@ -352,7 +352,7 @@ async def set_container_metadata( # type: ignore :param str lease: If specified, set_container_metadata only succeeds if the container's lease is active and matches this ID. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -439,20 +439,20 @@ async def set_container_access_policy( A dictionary of access policies to associate with the container. The dictionary may contain up to 5 elements. An empty dictionary will clear the access policies set on the service. - :type signed_identifiers: dict(str, :class:`~azure.storage.blob.models.AccessPolicy`) - :param ~azure.storage.blob.models.PublicAccess public_access: + :type signed_identifiers: dict[str, ~azure.storage.blob.AccessPolicy] + :param ~azure.storage.blob.PublicAccess public_access: Possible values include: container, blob. :param lease: Required if the container has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.aio.LeaseClient or str + :param ~datetime.datetime if_modified_since: A datetime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified date/time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A datetime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -516,7 +516,7 @@ def list_blobs(self, name_starts_with=None, include=None, timeout=None, **kwargs :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.models.BlobProperties] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.BlobProperties] .. admonition:: Example: @@ -571,7 +571,7 @@ def walk_blobs( :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.models.BlobProperties] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.BlobProperties] """ if include and not isinstance(include, list): include = [include] @@ -610,8 +610,8 @@ async def upload_blob( :param name: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type name: str or ~azure.storage.blob.models.BlobProperties - :param ~azure.storage.blob.models.BlobType blob_type: The type of the blob. This can be + :type name: str or ~azure.storage.blob.BlobProperties + :param ~azure.storage.blob.BlobType blob_type: The type of the blob. This can be either BlockBlob, PageBlob or AppendBlob. The default value is BlockBlob. :param bool overwrite: Whether the blob to be uploaded should overwrite the current data. If True, upload_blob will silently overwrite the existing data. If set to False, the @@ -625,7 +625,7 @@ async def upload_blob( :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set blob properties. :param bool validate_content: If true, calculates an MD5 hash for each chunk of the blob. The storage @@ -639,14 +639,14 @@ async def upload_blob( :param lease: Required if the container has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.aio.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -665,11 +665,11 @@ async def upload_blob( The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to each call individually. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :param ~azure.storage.blob.models.StandardBlobTier standard_blob_tier: + :param ~azure.storage.blob.StandardBlobTier standard_blob_tier: A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts. :param int maxsize_condition: @@ -681,7 +681,7 @@ async def upload_blob( :param int max_concurrency: Maximum number of parallel connections to use when the blob size exceeds 64MB. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -689,7 +689,7 @@ async def upload_blob( :param str encoding: Defaults to UTF-8. :returns: A BlobClient to interact with the newly uploaded blob. - :rtype: ~azure.storage.blob.aio.blob_client_async.BlobClient + :rtype: ~azure.storage.blob.aio.BlobClient .. admonition:: Example: @@ -742,7 +742,7 @@ async def delete_blob( :param blob: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param str delete_snapshots: Required if the blob has associated snapshots. Values include: - "only": Deletes only the blobs snapshots. @@ -750,18 +750,18 @@ async def delete_blob( :param lease: Required if the blob has an active lease. Value can be a Lease object or the lease ID as a string. - :type lease: ~azure.storage.blob.aio.lease_async.LeaseClient or str + :type lease: ~azure.storage.blob.aio.LeaseClient or str :param str delete_snapshots: Required if the blob has associated snapshots. Values include: - "only": Deletes only the blobs snapshots. - "include": Deletes the blob along with all snapshots. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -812,7 +812,7 @@ async def delete_blobs( # pylint: disable=arguments-differ :param blob: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param str delete_snapshots: Required if the blob has associated snapshots. Values include: - "only": Deletes only the blobs snapshots. @@ -825,13 +825,13 @@ async def delete_blobs( # pylint: disable=arguments-differ Required if the blob has associated snapshots. Values include: - "only": Deletes only the blobs snapshots. - "include": Deletes the blob along with all snapshots. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -887,7 +887,7 @@ async def set_standard_blob_tier_blobs( This operation does not update the blob's ETag. :param blobs: The blobs with which to interact. - :type blobs: str or ~azure.storage.blob.models.BlobProperties + :type blobs: str or ~azure.storage.blob.BlobProperties :param standard_blob_tier: Indicates the tier to be set on the blob. Options include 'Hot', 'Cool', 'Archive'. The hot tier is optimized for storing data that is accessed @@ -895,7 +895,7 @@ async def set_standard_blob_tier_blobs( is infrequently accessed and stored for at least a month. The archive tier is optimized for storing data that is rarely accessed and stored for at least six months with flexible latency requirements. - :type standard_blob_tier: str or ~azure.storage.blob.models.StandardBlobTier + :type standard_blob_tier: str or ~azure.storage.blob.StandardBlobTier :param int timeout: The timeout parameter is expressed in seconds. :param lease: @@ -940,12 +940,12 @@ async def set_premium_page_blob_tier_blobs( """Sets the page blob tiers on the blobs. This API is only supported for page blobs on premium accounts. :param blobs: The blobs with which to interact. - :type blobs: str or ~azure.storage.blob.models.BlobProperties + :type blobs: str or ~azure.storage.blob.BlobProperties :param premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :type premium_page_blob_tier: ~azure.storage.blob.models.PremiumPageBlobTier + :type premium_page_blob_tier: ~azure.storage.blob.PremiumPageBlobTier :param int timeout: The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to @@ -994,11 +994,11 @@ def get_blob_client( :param blob: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param str snapshot: The optional blob snapshot on which to operate. :returns: A BlobClient. - :rtype: ~azure.storage.blob.aio.blob_client_async.BlobClient + :rtype: ~azure.storage.blob.aio.BlobClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/lease_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/lease_async.py index c372eb045b94..890c517b0ba5 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/lease_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/lease_async.py @@ -42,8 +42,8 @@ class LeaseClient(LeaseClientBase): :param client: The client of the blob or container to lease. - :type client: ~azure.storage.blob.aio.blob_client_async.BlobClient or - ~azure.storage.blob.aio.container_client_async.ContainerClient + :type client: ~azure.storage.blob.aio.BlobClient or + ~azure.storage.blob.aio.ContainerClient :param str lease_id: A string representing the lease ID of an existing lease. This value does not need to be specified in order to acquire a new lease, or break one. @@ -74,13 +74,13 @@ async def acquire(self, lease_duration=-1, timeout=None, **kwargs): (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. Default is -1 (infinite lease). - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -129,13 +129,13 @@ async def renew(self, timeout=None, **kwargs): or blob has not been leased again since the expiration of that lease. When you renew a lease, the lease duration clock resets. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -181,13 +181,13 @@ async def release(self, timeout=None, **kwargs): that associated with the container or blob. Releasing the lease allows another client to immediately acquire the lease for the container or blob as soon as the release is complete. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -232,13 +232,13 @@ async def change(self, proposed_lease_id, timeout=None, **kwargs): :param str proposed_lease_id: Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -298,13 +298,13 @@ async def break_lease(self, lease_break_period=None, timeout=None, **kwargs): period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py index 5b73f388d901..07cbc1fcb3dd 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py @@ -94,10 +94,10 @@ class BlobClient(StorageAccountHostsMixin): # pylint: disable=too-many-public-m or container, in which case the blob and/or container must also be specified. :param container: The container for the blob. If specified, this value will override a container value specified in the blob URL. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param blob: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param str snapshot: The optional blob snapshot on which to operate. :param credential: @@ -198,10 +198,10 @@ def from_connection_string( A connection string to an Azure Storage account. :param container: The container for the blob. This can either be the name of the container, or an instance of ContainerProperties - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param blob: The blob with which to interact. This can either be the name of the blob, or an instance of BlobProperties. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param str snapshot: The optional blob snapshot on which to operate. :param credential: @@ -254,7 +254,7 @@ def generate_shared_access_signature( Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. - :type permission: str or ~azure.storage.blob.models.BlobPermissions + :type permission: str or ~azure.storage.blob.BlobPermissions :param expiry: The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy @@ -455,7 +455,7 @@ def upload_blob( # pylint: disable=too-many-locals """Creates a new blob from a data source with automatic chunking. :param data: The blob data to upload. - :param ~azure.storage.blob.models.BlobType blob_type: The type of the blob. This can be + :param ~azure.storage.blob.BlobType blob_type: The type of the blob. This can be either BlockBlob, PageBlob or AppendBlob. The default value is BlockBlob. :param bool overwrite: Whether the blob to be uploaded should overwrite the current data. If True, upload_blob will silently overwrite the existing data. If set to False, the @@ -469,7 +469,7 @@ def upload_blob( # pylint: disable=too-many-locals :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set blob properties. :param bool validate_content: If true, calculates an MD5 hash for each chunk of the blob. The storage @@ -480,17 +480,17 @@ def upload_blob( # pylint: disable=too-many-locals blob. Also note that if enabled, the memory-efficient upload algorithm will not be used, because computing the MD5 hash requires buffering entire blocks, and doing so defeats the purpose of the memory-efficient algorithm. - :param ~azure.storage.blob.lease.LeaseClient lease: + :param ~azure.storage.blob.LeaseClient lease: If specified, upload_blob only succeeds if the blob's lease is active and matches this ID. Required if the blob has an active lease. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -505,11 +505,11 @@ def upload_blob( # pylint: disable=too-many-locals the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :param ~azure.storage.blob.models.StandardBlobTier standard_blob_tier: + :param ~azure.storage.blob.StandardBlobTier standard_blob_tier: A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts. :param int maxsize_condition: @@ -521,7 +521,7 @@ def upload_blob( # pylint: disable=too-many-locals :param int max_concurrency: Maximum number of parallel connections to use when the blob size exceeds 64MB. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -623,14 +623,14 @@ def download_blob(self, offset=None, length=None, validate_content=False, **kwar :param lease: If specified, download_blob only succeeds if the blob's lease is active and matches this ID. Required if the blob has an active lease. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -645,7 +645,7 @@ def download_blob(self, offset=None, length=None, validate_content=False, **kwar the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -727,14 +727,14 @@ def delete_blob(self, delete_snapshots=False, **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -803,14 +803,14 @@ def get_blob_properties(self, **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -825,7 +825,7 @@ def get_blob_properties(self, **kwargs): the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -833,7 +833,7 @@ def get_blob_properties(self, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: BlobProperties - :rtype: ~azure.storage.blob.models.BlobProperties + :rtype: ~azure.storage.blob.BlobProperties .. admonition:: Example: @@ -907,19 +907,19 @@ def set_http_headers(self, content_settings=None, **kwargs): If one property is set for the content_settings, all properties will be overriden. - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set blob properties. :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -986,14 +986,14 @@ def set_blob_metadata(self, metadata=None, **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1008,7 +1008,7 @@ def set_blob_metadata(self, metadata=None, **kwargs): the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1096,7 +1096,7 @@ def create_page_blob( # type: ignore This header specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary. - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set properties on the blob. :param int sequence_number: Only for Page blobs. The sequence number is a user-controlled value that you can use to @@ -1108,14 +1108,14 @@ def create_page_blob( # type: ignore :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1130,14 +1130,14 @@ def create_page_blob( # type: ignore the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, a secure connection must be established to transfer the key. :param int timeout: The timeout parameter is expressed in seconds. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. @@ -1204,7 +1204,7 @@ def create_append_blob(self, content_settings=None, metadata=None, **kwargs): # type: (Optional[ContentSettings], Optional[Dict[str, str]], **Any) -> Dict[str, Union[str, datetime]] """Creates a new Append Blob. - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set properties on the blob. :param metadata: Name-value pairs associated with the blob as metadata. @@ -1212,14 +1212,14 @@ def create_append_blob(self, content_settings=None, metadata=None, **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1234,7 +1234,7 @@ def create_append_blob(self, content_settings=None, metadata=None, **kwargs): the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1298,13 +1298,13 @@ def create_snapshot(self, metadata=None, **kwargs): :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1322,8 +1322,8 @@ def create_snapshot(self, metadata=None, **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1443,13 +1443,13 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. :type metadata: dict(str, str) - :param datetime source_if_modified_since: + :param ~datetime.datetime source_if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this conditional header to copy the blob only if the source blob has been modified since the specified date/time. - :param datetime source_if_unmodified_since: + :param ~datetime.datetime source_if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1467,7 +1467,7 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, specified. If the values are identical, the Blob service returns status code 412 (Precondition Failed). This header cannot be specified if the source is an Azure File. - :param datetime destination_if_modified_since: + :param ~datetime.datetime destination_if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1475,7 +1475,7 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, if the destination blob has been modified since the specified date/time. If the destination blob has not been modified, the Blob service returns status code 412 (Precondition Failed). - :param datetime destination_if_unmodified_since: + :param ~datetime.datetime destination_if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1500,11 +1500,11 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, The lease ID specified for this header must match the lease ID of the destination blob. If the request does not include the lease ID or it is not valid, the operation fails with status code 412 (Precondition Failed). - :type destination_lease: ~azure.storage.blob.lease.LeaseClient or str + :type destination_lease: ~azure.storage.blob.LeaseClient or str :param source_lease: Specify this to perform the Copy Blob operation only if the lease ID given matches the active lease ID of the source blob. - :type source_lease: ~azure.storage.blob.lease.LeaseClient or str + :type source_lease: ~azure.storage.blob.LeaseClient or str :param int timeout: The timeout parameter is expressed in seconds. :param bool incremental_copy: @@ -1513,14 +1513,14 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, the previously copied snapshot are transferred to the destination. The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual. Defaults to False. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :param ~azure.storage.blob.models.StandardBlobTier standard_blob_tier: + :param ~azure.storage.blob.StandardBlobTier standard_blob_tier: A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts. - :param :class:`~azure.storage.blob.models.RehydratePriority` rehydrate_priority: + :param ~azure.storage.blob.RehydratePriority rehydrate_priority: Indicates the priority with which to rehydrate an archived blob :param bool requires_sync: Enforces that the service will not return a response until the copy is complete. @@ -1576,7 +1576,7 @@ def abort_copy(self, copy_id, **kwargs): :param copy_id: The copy operation to abort. This can be either an ID, or an instance of BlobProperties. - :type copy_id: str or ~azure.storage.blob.models.BlobProperties + :type copy_id: str or ~azure.storage.blob.BlobProperties :rtype: None .. admonition:: Example: @@ -1611,13 +1611,13 @@ def acquire_lease(self, lease_duration=-1, lease_id=None, **kwargs): Proposed lease ID, in a GUID string format. The Blob Service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1635,7 +1635,7 @@ def acquire_lease(self, lease_duration=-1, lease_id=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: A LeaseClient object. - :rtype: ~azure.storage.blob.lease.LeaseClient + :rtype: ~azure.storage.blob.LeaseClient .. admonition:: Example: @@ -1665,15 +1665,15 @@ def set_standard_blob_tier(self, standard_blob_tier, **kwargs): is infrequently accessed and stored for at least a month. The archive tier is optimized for storing data that is rarely accessed and stored for at least six months with flexible latency requirements. - :type standard_blob_tier: str or ~azure.storage.blob.models.StandardBlobTier - :param :class:`~azure.storage.blob._generated.models.RehydratePriority` rehydrate_priority: + :type standard_blob_tier: str or ~azure.storage.blob.StandardBlobTier + :param ~azure.storage.blob._generated.models.RehydratePriority rehydrate_priority: Indicates the priority with which to rehydrate an archived blob :param int timeout: The timeout parameter is expressed in seconds. :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :rtype: None """ access_conditions = get_access_conditions(kwargs.pop('lease', None)) @@ -1759,10 +1759,10 @@ def stage_block( :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :param str encoding: Defaults to UTF-8. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1848,8 +1848,8 @@ def stage_block_from_url( :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -1893,11 +1893,11 @@ def get_block_list(self, block_list_type="committed", **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :param int timeout: The timeout parameter is expressed in seconds. :returns: A tuple of two lists - committed and uncommitted blocks - :rtype: tuple(list(~azure.storage.blob.models.BlobBlock), list(~azure.storage.blob.models.BlobBlock)) + :rtype: tuple(list(~azure.storage.blob.BlobBlock), list(~azure.storage.blob.BlobBlock)) """ access_conditions = get_access_conditions(kwargs.pop('lease', None)) try: @@ -1992,8 +1992,8 @@ def commit_block_list( # type: ignore :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param ~azure.storage.blob.models.ContentSettings content_settings: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set blob properties. :param metadata: Name-value pairs associated with the blob as metadata. @@ -2005,13 +2005,13 @@ def commit_block_list( # type: ignore bitflips on the wire if using http instead of https as https (the default) will already validate. Note that this MD5 hash is not stored with the blob. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2026,10 +2026,10 @@ def commit_block_list( # type: ignore the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.StandardBlobTier standard_blob_tier: + :param ~azure.storage.blob.StandardBlobTier standard_blob_tier: A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -2059,7 +2059,7 @@ def set_premium_page_blob_tier(self, premium_page_blob_tier, **kwargs): A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :type premium_page_blob_tier: ~azure.storage.blob.models.PremiumPageBlobTier + :type premium_page_blob_tier: ~azure.storage.blob.PremiumPageBlobTier :param int timeout: The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to @@ -2067,7 +2067,7 @@ def set_premium_page_blob_tier(self, premium_page_blob_tier, **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :rtype: None """ access_conditions = get_access_conditions(kwargs.pop('lease', None)) @@ -2145,18 +2145,18 @@ def get_page_ranges( # type: ignore :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :param str previous_snapshot_diff: The snapshot diff parameter that contains an opaque DateTime value that specifies a previous blob snapshot to be compared against a more recent snapshot or the current blob. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2219,7 +2219,7 @@ def set_sequence_number(self, sequence_number_action, sequence_number=None, **kw :param str sequence_number_action: This property indicates how the service should modify the blob's sequence - number. See :class:`~azure.storage.blob.models.SequenceNumberAction` for more information. + number. See :class:`~azure.storage.blob.SequenceNumberAction` for more information. :param str sequence_number: This property sets the blob's sequence number. The sequence number is a user-controlled property that you can use to track requests and manage @@ -2227,14 +2227,14 @@ def set_sequence_number(self, sequence_number_action, sequence_number=None, **kw :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2302,14 +2302,14 @@ def resize_blob(self, size, **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2324,7 +2324,7 @@ def resize_blob(self, size, **kwargs): the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. @@ -2425,7 +2425,7 @@ def upload_page( # type: ignore :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :param bool validate_content: If true, calculates an MD5 hash of the page content. The storage service checks the hash of the content that has arrived @@ -2442,13 +2442,13 @@ def upload_page( # type: ignore :param int if_sequence_number_eq: If the blob's sequence number is equal to the specified value, the request proceeds; otherwise it fails. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2463,7 +2463,7 @@ def upload_page( # type: ignore header to write the page only if the blob's ETag value does not match the value specified. If the values are identical, the Blob service fails. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -2582,13 +2582,13 @@ def upload_pages_from_url(self, source_url, # type: str The service will read the same number of bytes as the destination range (end_range-start_range). :param bytes source_content_md5: If given, the service will calculate the MD5 hash of the block content and compare against this value. - :param datetime source_if_modified_since: + :param ~datetime.datetime source_if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the source resource has been modified since the specified time. - :param datetime source_if_unmodified_since: + :param ~datetime.datetime source_if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2614,13 +2614,13 @@ def upload_pages_from_url(self, source_url, # type: str :param int if_sequence_number_eq: If the blob's sequence number is equal to the specified value, the request proceeds; otherwise it fails. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2635,7 +2635,7 @@ def upload_pages_from_url(self, source_url, # type: str the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -2717,7 +2717,7 @@ def clear_page(self, start_range, end_range, **kwargs): :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :param int if_sequence_number_lte: If the blob's sequence number is less than or equal to the specified value, the request proceeds; otherwise it fails. @@ -2727,13 +2727,13 @@ def clear_page(self, start_range, end_range, **kwargs): :param int if_sequence_number_eq: If the blob's sequence number is equal to the specified value, the request proceeds; otherwise it fails. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2748,7 +2748,7 @@ def clear_page(self, start_range, end_range, **kwargs): header to write the page only if the blob's ETag value does not match the value specified. If the values are identical, the Blob service fails. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -2859,14 +2859,14 @@ def append_block( # type: ignore :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -2883,7 +2883,7 @@ def append_block( # type: ignore operation if it does exist. :param str encoding: Defaults to UTF-8. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -3005,16 +3005,16 @@ def append_block_from_url(self, copy_source_url, # type: str is not, the request will fail with the AppendPositionConditionNotMet error (HTTP status code 412 - Precondition Failed). - :param ~azure.storage.blob.lease.LeaseClient or str lease: + :param ~azure.storage.blob.LeaseClient or str lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -3029,13 +3029,13 @@ def append_block_from_url(self, copy_source_url, # type: str the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - :param datetime source_if_modified_since: + :param ~datetime.datetime source_if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the source resource has been modified since the specified time. - :param datetime source_if_unmodified_since: + :param ~datetime.datetime source_if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -3050,7 +3050,7 @@ def append_block_from_url(self, copy_source_url, # type: str the value specified. Specify the wildcard character (*) to perform the operation only if the source resource does not exist, and fail the operation if it does exist. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index bb44129bc5ce..6ed4d926b8fa 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -172,14 +172,14 @@ def generate_shared_access_signature( :param resource_types: Specifies the resource types that are accessible with the account SAS. - :type resource_types: str or ~azure.storage.blob.models.ResourceTypes + :type resource_types: str or ~azure.storage.blob.ResourceTypes :param permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. - :type permission: str or ~azure.storage.blob.models.AccountPermissions + :type permission: str or ~azure.storage.blob.AccountPermissions :param expiry: The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy @@ -187,14 +187,14 @@ def generate_shared_access_signature( been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type expiry: datetime or str + :type expiry: ~datetime.datetime or str :param start: The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type start: datetime or str + :type start: ~datetime.datetime or str :param str ip: Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address from which the request originates does not match the IP address @@ -240,9 +240,9 @@ def get_user_delegation_key(self, key_start_time, # type: datetime Obtain a user delegation key for the purpose of signing SAS tokens. A token credential must be present on the service object for this request to succeed. - :param datetime key_start_time: + :param ~datetime.datetime key_start_time: A DateTime value. Indicates when the key becomes valid. - :param datetime key_expiry_time: + :param ~datetime.datetime key_expiry_time: A DateTime value. Indicates when the key stops being valid. :param int timeout: The timeout parameter is expressed in seconds. @@ -370,36 +370,31 @@ def set_service_properties( :param logging: Groups the Azure Analytics Logging settings. - :type logging: - :class:`~azure.storage.blob.models.Logging` + :type logging: ~azure.storage.blob.Logging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for blobs. - :type hour_metrics: - :class:`~azure.storage.blob.models.Metrics` + :type hour_metrics: ~azure.storage.blob.Metrics :param minute_metrics: The minute metrics settings provide request statistics for each minute for blobs. - :type minute_metrics: - :class:`~azure.storage.blob.models.Metrics` + :type minute_metrics: ~azure.storage.blob.Metrics :param cors: You can include up to five CorsRule elements in the list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. - :type cors: list(:class:`~azure.storage.blob.models.CorsRule`) + :type cors: list[~azure.storage.blob.CorsRule] :param str target_version: Indicates the default version to use for requests if an incoming request's version is not specified. :param delete_retention_policy: The delete retention policy specifies whether to retain deleted blobs. It also specifies the number of days and versions of blob to keep. - :type delete_retention_policy: - :class:`~azure.storage.blob.models.RetentionPolicy` + :type delete_retention_policy: ~azure.storage.blob.RetentionPolicy :param static_website: Specifies whether the static website feature is enabled, and if yes, indicates the index document and 404 error document to use. - :type static_website: - :class:`~azure.storage.blob.models.StaticWebsite` + :type static_website: ~azure.storage.blob.StaticWebsite :param int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -453,7 +448,7 @@ def list_containers( :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ContainerProperties. - :rtype: ~azure.core.paging.ItemPaged[~azure.core.blob.models.ContainerProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.ContainerProperties] .. admonition:: Example: @@ -500,10 +495,10 @@ def create_container( :type metadata: dict(str, str) :param public_access: Possible values include: container, blob. - :type public_access: str or ~azure.storage.blob.models.PublicAccess + :type public_access: str or ~azure.storage.blob.PublicAccess :param int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.blob.container_client.ContainerClient + :rtype: ~azure.storage.blob.ContainerClient .. admonition:: Example: @@ -536,18 +531,18 @@ def delete_container( :param container: The container to delete. This can either be the name of the container, or an instance of ContainerProperties. - :type container: str or ~azure.storage.blob.models.ContainerProperties - :param ~azure.storage.blob.lease.LeaseClient lease: + :type container: str or ~azure.storage.blob.ContainerProperties + :param ~azure.storage.blob.LeaseClient lease: If specified, delete_container only succeeds if the container's lease is active and matches this ID. Required if the container has an active lease. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -591,9 +586,9 @@ def get_container_client(self, container): :param container: The container. This can either be the name of the container, or an instance of ContainerProperties. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :returns: A ContainerClient. - :rtype: ~azure.core.blob.container_client.ContainerClient + :rtype: ~azure.storage.blob.ContainerClient .. admonition:: Example: @@ -624,17 +619,17 @@ def get_blob_client( :param container: The container that the blob is in. This can either be the name of the container, or an instance of ContainerProperties. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param blob: The blob with which to interact. This can either be the name of the blob, or an instance of BlobProperties. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param snapshot: The optional blob snapshot on which to operate. This can either be the ID of the snapshot, - or a dictionary output returned by :func:`~azure.storage.blob.blob_client.BlobClient.create_snapshot()`. + or a dictionary output returned by :func:`~azure.storage.blob.BlobClient.create_snapshot()`. :type snapshot: str or dict(str, Any) :returns: A BlobClient. - :rtype: ~azure.storage.blob.blob_client.BlobClient + :rtype: ~azure.storage.blob.BlobClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py index 5000bbc261f6..3207a2dc309d 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py @@ -86,7 +86,7 @@ class ContainerClient(StorageAccountHostsMixin): account, in which case the blob container must also be specified. :param container: The container for the blob. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param credential: The credentials with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string, and account @@ -163,7 +163,7 @@ def from_connection_string( A connection string to an Azure Storage account. :param container: The container for the blob. - :type container: str or ~azure.storage.blob.models.ContainerProperties + :type container: str or ~azure.storage.blob.ContainerProperties :param credential: The credentials with which to authenticate. This is optional if the account URL already has a SAS token, or the connection string already has shared @@ -213,7 +213,7 @@ def generate_shared_access_signature( Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. - :type permission: str or ~azure.storage.blob.models.ContainerPermissions + :type permission: str or ~azure.storage.blob.ContainerPermissions :param expiry: The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy @@ -310,7 +310,7 @@ def create_container(self, metadata=None, public_access=None, timeout=None, **kw A dict with name_value pairs to associate with the container as metadata. Example:{'Category':'test'} :type metadata: dict[str, str] - :param ~azure.storage.blob.models.PublicAccess public_access: + :param ~azure.storage.blob.PublicAccess public_access: Possible values include: container, blob. :param int timeout: The timeout parameter is expressed in seconds. @@ -348,17 +348,17 @@ def delete_container( Marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection. - :param ~azure.storage.blob.lease.LeaseClient lease: + :param ~azure.storage.blob.LeaseClient lease: If specified, delete_container only succeeds if the container's lease is active and matches this ID. Required if the container has an active lease. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -421,13 +421,13 @@ def acquire_lease( :param str lease_id: Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -445,7 +445,7 @@ def acquire_lease( :param int timeout: The timeout parameter is expressed in seconds. :returns: A LeaseClient object, that can be run in a context manager. - :rtype: ~azure.storage.blob.lease.LeaseClient + :rtype: ~azure.storage.blob.LeaseClient .. admonition:: Example: @@ -483,13 +483,13 @@ def get_container_properties(self, lease=None, timeout=None, **kwargs): """Returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs. - :param ~azure.storage.blob.lease.LeaseClient lease: + :param ~azure.storage.blob.LeaseClient lease: If specified, get_container_properties only succeeds if the container's lease is active and matches this ID. :param int timeout: The timeout parameter is expressed in seconds. :return: Properties for the specified container within a container object. - :rtype: ~azure.storage.blob.models.ContainerProperties + :rtype: ~azure.storage.blob.ContainerProperties .. admonition:: Example: @@ -532,7 +532,7 @@ def set_container_metadata( # type: ignore :param str lease: If specified, set_container_metadata only succeeds if the container's lease is active and matches this ID. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -619,20 +619,20 @@ def set_container_access_policy( A dictionary of access policies to associate with the container. The dictionary may contain up to 5 elements. An empty dictionary will clear the access policies set on the service. - :type signed_identifiers: dict(str, :class:`~azure.storage.blob.models.AccessPolicy`) - :param ~azure.storage.blob.models.PublicAccess public_access: + :type signed_identifiers: dict[str, ~azure.storage.blob.AccessPolicy] + :param ~azure.storage.blob.PublicAccess public_access: Possible values include: container, blob. :param lease: Required if the container has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A datetime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified date/time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A datetime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -696,7 +696,7 @@ def list_blobs(self, name_starts_with=None, include=None, timeout=None, **kwargs :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties] .. admonition:: Example: @@ -748,7 +748,7 @@ def walk_blobs( :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of BlobProperties. - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.BlobProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties] """ if include and not isinstance(include, list): include = [include] @@ -787,8 +787,8 @@ def upload_blob( :param name: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type name: str or ~azure.storage.blob.models.BlobProperties - :param ~azure.storage.blob.models.BlobType blob_type: The type of the blob. This can be + :type name: str or ~azure.storage.blob.BlobProperties + :param ~azure.storage.blob.BlobType blob_type: The type of the blob. This can be either BlockBlob, PageBlob or AppendBlob. The default value is BlockBlob. :param bool overwrite: Whether the blob to be uploaded should overwrite the current data. If True, upload_blob will silently overwrite the existing data. If set to False, the @@ -802,7 +802,7 @@ def upload_blob( :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :param ~azure.storage.blob.models.ContentSettings content_settings: + :param ~azure.storage.blob.ContentSettings content_settings: ContentSettings object used to set blob properties. :param bool validate_content: If true, calculates an MD5 hash for each chunk of the blob. The storage @@ -816,14 +816,14 @@ def upload_blob( :param lease: Required if the container has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :param datetime if_modified_since: + :type lease: ~azure.storage.blob.LeaseClient or str + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -842,11 +842,11 @@ def upload_blob( The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to each call individually. - :param ~azure.storage.blob.models.PremiumPageBlobTier premium_page_blob_tier: + :param ~azure.storage.blob.PremiumPageBlobTier premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :param ~azure.storage.blob.models.StandardBlobTier standard_blob_tier: + :param ~azure.storage.blob.StandardBlobTier standard_blob_tier: A standard blob tier value to set the blob to. For this version of the library, this is only applicable to block blobs on standard storage accounts. :param int maxsize_condition: @@ -858,7 +858,7 @@ def upload_blob( :param int max_concurrency: Maximum number of parallel connections to use when the blob size exceeds 64MB. - :param ~azure.storage.blob.models.CustomerProvidedEncryptionKey cpk: + :param ~azure.storage.blob.CustomerProvidedEncryptionKey cpk: Encrypts the data on the service-side with the given key. Use of customer-provided keys must be done over HTTPS. As the encryption key itself is provided in the request, @@ -919,7 +919,7 @@ def delete_blob( :param blob: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param str delete_snapshots: Required if the blob has associated snapshots. Values include: - "only": Deletes only the blobs snapshots. @@ -927,18 +927,18 @@ def delete_blob( :param lease: Required if the blob has an active lease. Value can be a Lease object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :param str delete_snapshots: Required if the blob has associated snapshots. Values include: - "only": Deletes only the blobs snapshots. - "include": Deletes the blob along with all snapshots. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1043,7 +1043,7 @@ def delete_blobs(self, *blobs, **kwargs): Soft-deleted blob or snapshot can be restored using Undelete API. :param blobs: The blobs with which to interact. - :type blobs: str or ~azure.storage.blob.models.BlobProperties + :type blobs: str or ~azure.storage.blob.BlobProperties :param str delete_snapshots: Required if the blob has associated snapshots. Values include: - "only": Deletes only the blobs snapshots. @@ -1051,18 +1051,18 @@ def delete_blobs(self, *blobs, **kwargs): :param lease: Required if the blob has an active lease. Value can be a Lease object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str + :type lease: ~azure.storage.blob.LeaseClient or str :param str delete_snapshots: Required if the blob has associated snapshots. Values include: - "only": Deletes only the blobs snapshots. - "include": Deletes the blob along with all snapshots. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -1149,7 +1149,7 @@ def set_standard_blob_tier_blobs( This operation does not update the blob's ETag. :param blobs: The blobs with which to interact. - :type blobs: str or ~azure.storage.blob.models.BlobProperties + :type blobs: str or ~azure.storage.blob.BlobProperties :param standard_blob_tier: Indicates the tier to be set on the blob. Options include 'Hot', 'Cool', 'Archive'. The hot tier is optimized for storing data that is accessed @@ -1157,14 +1157,15 @@ def set_standard_blob_tier_blobs( is infrequently accessed and stored for at least a month. The archive tier is optimized for storing data that is rarely accessed and stored for at least six months with flexible latency requirements. - :type standard_blob_tier: str or ~azure.storage.blob.models.StandardBlobTier + :type standard_blob_tier: str or ~azure.storage.blob.StandardBlobTier :param int timeout: The timeout parameter is expressed in seconds. :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :rtype: None + :type lease: ~azure.storage.blob.LeaseClient or str + :return: An iterator of responses, one for each blob in order + :rtype: iterator[~azure.core.pipeline.transport.HttpResponse] """ access_conditions = get_access_conditions(kwargs.pop('lease', None)) if standard_blob_tier is None: @@ -1203,12 +1204,12 @@ def set_premium_page_blob_tier_blobs( """Sets the page blob tiers on the blobs. This API is only supported for page blobs on premium accounts. :param blobs: The blobs with which to interact. - :type blobs: str or ~azure.storage.blob.models.BlobProperties + :type blobs: str or ~azure.storage.blob.BlobProperties :param premium_page_blob_tier: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - :type premium_page_blob_tier: ~azure.storage.blob.models.PremiumPageBlobTier + :type premium_page_blob_tier: ~azure.storage.blob.PremiumPageBlobTier :param int timeout: The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to @@ -1216,8 +1217,9 @@ def set_premium_page_blob_tier_blobs( :param lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.blob.lease.LeaseClient or str - :rtype: None + :type lease: ~azure.storage.blob.LeaseClient or str + :return: An iterator of responses, one for each blob in order + :rtype: iterator[~azure.core.pipeline.transport.HttpResponse] """ access_conditions = get_access_conditions(kwargs.pop('lease', None)) if premium_page_blob_tier is None: @@ -1257,7 +1259,7 @@ def get_blob_client( :param blob: The blob with which to interact. If specified, this value will override a blob value specified in the blob URL. - :type blob: str or ~azure.storage.blob.models.BlobProperties + :type blob: str or ~azure.storage.blob.BlobProperties :param str snapshot: The optional blob snapshot on which to operate. :returns: A BlobClient. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/lease.py b/sdk/storage/azure-storage-blob/azure/storage/blob/lease.py index f4c5b227ded0..924db9b40754 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/lease.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/lease.py @@ -53,7 +53,7 @@ class LeaseClient(object): :param client: The client of the blob or container to lease. :type client: ~azure.storage.blob.blob_client.BlobClient or - ~azure.storage.blob.container_client.ContainerClient + ~azure.storage.blob.ContainerClient :param str lease_id: A string representing the lease ID of an existing lease. This value does not need to be specified in order to acquire a new lease, or break one. @@ -91,13 +91,13 @@ def acquire(self, lease_duration=-1, timeout=None, **kwargs): (-1) for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. Default is -1 (infinite lease). - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -146,13 +146,13 @@ def renew(self, timeout=None, **kwargs): or blob has not been leased again since the expiration of that lease. When you renew a lease, the lease duration clock resets. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -198,13 +198,13 @@ def release(self, timeout=None, **kwargs): that associated with the container or blob. Releasing the lease allows another client to immediately acquire the lease for the container or blob as soon as the release is complete. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -249,13 +249,13 @@ def change(self, proposed_lease_id, timeout=None, **kwargs): :param str proposed_lease_id: Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. @@ -315,13 +315,13 @@ def break_lease(self, lease_break_period=None, timeout=None, **kwargs): period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. - :param datetime if_modified_since: + :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. Specify this header to perform the operation only if the resource has been modified since the specified time. - :param datetime if_unmodified_since: + :param ~datetime.datetime if_unmodified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. If a date is passed in without timezone info, it is assumed to be UTC. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index 807441996650..937226c28189 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -244,7 +244,7 @@ def __init__(self, allowed_origins, allowed_methods, **kwargs): class ContainerProperties(DictMixin): """Blob container's properties class. - :param datetime last_modified: + :param ~datetime.datetime last_modified: A datetime object representing the last time the container was modified. :param str etag: The ETag contains a value that you can use to perform operations @@ -260,8 +260,8 @@ class ContainerProperties(DictMixin): :param dict metadata: A dict with name-value pairs to associate with the container as metadata. - Returned ``ContainerProperties`` instances expose these values through a - dictionary interface, for example: ``container_props["last_modified"]``. + Returned ``ContainerProperties`` instances expose these values through a + dictionary interface, for example: ``container_props["last_modified"]``. Additionally, the container name is available as ``container_props["name"]``. """ @@ -720,7 +720,7 @@ class CopyProperties(DictMixin): Contains the number of bytes copied and the total bytes in the source in the last attempted Copy Blob operation where this blob was the destination blob. Can show between 0 and Content-Length bytes copied. - :param datetime completion_time: + :param ~datetime.datetime completion_time: Conclusion time of the last attempted Copy Blob operation where this blob was the destination blob. This value can specify the time of a completed, aborted, or failed copy attempt. @@ -731,7 +731,7 @@ class CopyProperties(DictMixin): Copies the snapshot of the source page blob to a destination page blob. The snapshot is copied such that only the differential changes between the previously copied snapshot are transferred to the destination - :param datetime destination_snapshot: + :param ~datetime.datetime destination_snapshot: Included if the blob is incremental copy blob or incremental copy snapshot, if x-ms-copy-status is success. Snapshot time of the last successful incremental copy snapshot for this blob. @@ -849,9 +849,9 @@ def __init__(self, permission=None, expiry=None, start=None): class ContainerPermissions(object): """ContainerPermissions class to be used with - :func:`~azure.storage.blob.container_client.ContainerClient.generate_shared_access_signature` API and + :func:`~azure.storage.blob.ContainerClient.generate_shared_access_signature` API and for the AccessPolicies used with - :func:`~azure.storage.blob.container_client.ContainerClient.set_container_access_policy`. + :func:`~azure.storage.blob.ContainerClient.set_container_access_policy`. :cvar ContainerPermissions ContainerPermissions.DELETE: Delete any blob in the container. Note: You cannot grant permissions to From 5b86644ea00adc31c227a00d314876bfe4a78cd2 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 3 Oct 2019 16:28:59 -0700 Subject: [PATCH 2/5] File docstring --- .../file/aio/directory_client_async.py | 14 +++++----- .../storage/file/aio/file_client_async.py | 22 ++++++++-------- .../file/aio/file_service_client_async.py | 16 ++++++------ .../azure/storage/file/aio/models.py | 4 +-- .../storage/file/aio/share_client_async.py | 22 ++++++++-------- .../azure/storage/file/directory_client.py | 16 ++++++------ .../azure/storage/file/file_client.py | 26 +++++++++---------- .../azure/storage/file/file_service_client.py | 16 ++++++------ .../azure/storage/file/models.py | 10 +++---- .../azure/storage/file/share_client.py | 26 +++++++++---------- 10 files changed, 86 insertions(+), 86 deletions(-) diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py index d4cf4760ba9b..d50d4c20be44 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py @@ -64,7 +64,7 @@ class DirectoryClient(AsyncStorageAccountHostsMixin, DirectoryClientBase): or share, in which case the directory and/or share must also be specified. :param share: The share for the directory. If specified, this value will override a share value specified in the directory URL. - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str directory_path: The directory path for the directory with which to interact. If specified, this value will override a directory value specified in the directory URL. @@ -213,7 +213,7 @@ def list_directories_and_files(self, name_starts_with=None, timeout=None, **kwar :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of dict-like DirectoryProperties and FileProperties - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.models.DirectoryProperties] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.DirectoryProperties] .. admonition:: Example: @@ -245,7 +245,7 @@ def list_handles(self, recursive=False, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.storage.file.models.HandlesPaged + :rtype: ~azure.storage.file.HandlesPaged """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -274,7 +274,7 @@ async def close_handles( :param handle: Optionally, a specific handle to close. The default value is '*' which will attempt to close all open handles. - :type handle: str or ~azure.storage.file.models.Handle + :type handle: str or ~azure.storage.file.Handle :param bool recursive: Boolean that specifies if operation should apply to the directory specified by the client, its files, its subdirectories and their files. Default value is False. @@ -317,7 +317,7 @@ async def get_directory_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: DirectoryProperties - :rtype: ~azure.storage.file.models.DirectoryProperties + :rtype: ~azure.storage.file.DirectoryProperties """ try: response = await self._client.directory.get_properties( @@ -373,7 +373,7 @@ async def set_http_headers(self, file_attributes="none", # type: Union[str, NTF The file system attributes for files and directories. If not set, indicates preservation of existing values. Here is an example for when the var type is str: 'Temporary|Archive' - :type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or datetime @@ -495,7 +495,7 @@ async def upload_file( :param metadata: Name-value pairs associated with the file as metadata. :type metadata: dict(str, str) - :param ~azure.storage.file.models.ContentSettings content_settings: + :param ~azure.storage.file.ContentSettings content_settings: ContentSettings object used to set file properties. :param bool validate_content: If true, calculates an MD5 hash for each range of the file. The storage diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py index 062737ef1f36..a3eaf5217834 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py @@ -111,7 +111,7 @@ class FileClient(AsyncStorageAccountHostsMixin, FileClientBase): or share, in which case the file and/or share must also be specified. :param share: The share for the file. If specified, this value will override a share value specified in the file URL. - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str file_path: The file path to the file with which to interact. If specified, this value will override a file value specified in the file URL. @@ -162,7 +162,7 @@ async def create_file( # type: ignore :param int size: Specifies the maximum size for the file, up to 1 TB. - :param ~azure.storage.file.models.ContentSettings content_settings: + :param ~azure.storage.file.ContentSettings content_settings: ContentSettings object used to set file properties. :param metadata: Name-value pairs associated with the file as metadata. @@ -174,7 +174,7 @@ async def create_file( # type: ignore If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or datetime @@ -265,7 +265,7 @@ async def upload_file( :param metadata: Name-value pairs associated with the file as metadata. :type metadata: dict(str, str) - :param ~azure.storage.file.models.ContentSettings content_settings: + :param ~azure.storage.file.ContentSettings content_settings: ContentSettings object used to set file properties. :param bool validate_content: If true, calculates an MD5 hash for each range of the file. The storage @@ -285,7 +285,7 @@ async def upload_file( If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or datetime @@ -406,7 +406,7 @@ async def abort_copy(self, copy_id, timeout=None, **kwargs): :param copy_id: The copy operation to abort. This can be either an ID, or an instance of FileProperties. - :type copy_id: str or ~azure.storage.file.models.FileProperties + :type copy_id: str or ~azure.storage.file.FileProperties :rtype: None """ try: @@ -515,7 +515,7 @@ async def get_file_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: FileProperties - :rtype: ~azure.storage.file.models.FileProperties + :rtype: ~azure.storage.file.FileProperties """ try: file_props = await self._client.file.get_properties( @@ -542,7 +542,7 @@ async def set_http_headers(self, content_settings, # type: ContentSettings # type: (ContentSettings, Optional[int], Optional[Any]) -> Dict[str, Any] """Sets HTTP headers on the file. - :param ~azure.storage.file.models.ContentSettings content_settings: + :param ~azure.storage.file.ContentSettings content_settings: ContentSettings object used to set file properties. :param int timeout: The timeout parameter is expressed in seconds. @@ -550,7 +550,7 @@ async def set_http_headers(self, content_settings, # type: ContentSettings The file system attributes for files and directories. If not set, indicates preservation of existing values. Here is an example for when the var type is str: 'Temporary|Archive' - :type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or datetime @@ -857,7 +857,7 @@ def list_handles(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.models.Handle] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.Handle] """ results_per_page = kwargs.pop("results_per_page", None) command = functools.partial( @@ -885,7 +885,7 @@ async def close_handles( :param handle: Optionally, a specific handle to close. The default value is '*' which will attempt to close all open handles. - :type handle: str or ~azure.storage.file.models.Handle + :type handle: str or ~azure.storage.file.Handle :param int timeout: The timeout parameter is expressed in seconds. :returns: A long-running poller to get operation status. diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_service_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_service_client_async.py index 02e605621a06..5398ed40fc6b 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_service_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_service_client_async.py @@ -130,16 +130,16 @@ async def set_service_properties( :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for files. - :type hour_metrics: ~azure.storage.file.models.Metrics + :type hour_metrics: ~azure.storage.file.Metrics :param minute_metrics: The minute metrics settings provide request statistics for each minute for files. - :type minute_metrics: ~azure.storage.file.models.Metrics + :type minute_metrics: ~azure.storage.file.Metrics :param cors: You can include up to five CorsRule elements in the list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. - :type cors: list(:class:`~azure.storage.file.models.CorsRule`) + :type cors: list(:class:`~azure.storage.file.CorsRule`) :param int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -185,7 +185,7 @@ def list_shares( :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.models.ShareProperties] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.ShareProperties] .. admonition:: Example: @@ -233,7 +233,7 @@ async def create_share( Quota in bytes. :param int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.file.aio.share_client_async.ShareClient + :rtype: ~azure.storage.file.aio.ShareClient .. admonition:: Example: @@ -263,7 +263,7 @@ async def delete_share( :param share_name: The share to delete. This can either be the name of the share, or an instance of ShareProperties. - :type share_name: str or ~azure.storage.file.models.ShareProperties + :type share_name: str or ~azure.storage.file.ShareProperties :param bool delete_snapshots: Indicates if snapshots are to be deleted. :param int timeout: @@ -292,11 +292,11 @@ def get_share_client(self, share, snapshot=None): :param share: The share. This can either be the name of the share, or an instance of ShareProperties. - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str snapshot: An optional share snapshot on which to operate. :returns: A ShareClient. - :rtype: ~azure.storage.file.aio.share_client_async.ShareClient + :rtype: ~azure.storage.file.aio.ShareClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/models.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/models.py index 110e2cd67c74..e5419a5d9135 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/models.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/models.py @@ -31,7 +31,7 @@ class SharePropertiesPaged(AsyncPageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.file.models.ShareProperties) + :vartype current_page: list(~azure.storage.file.ShareProperties) :param callable command: Function to retrieve the next page of items. :param str prefix: Filters the results to return only shares whose names @@ -83,7 +83,7 @@ class HandlesPaged(AsyncPageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.file.models.Handle) + :vartype current_page: list(~azure.storage.file.Handle) :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/share_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/share_client_async.py index f5f6de513d65..2d430ab77b60 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/share_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/share_client_async.py @@ -60,7 +60,7 @@ class ShareClient(AsyncStorageAccountHostsMixin, ShareClientBase): :param str share_url: The full URI to the share. :param share: The share with which to interact. If specified, this value will override a share value specified in the share URL. - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str snapshot: An optional share snapshot on which to operate. :param credential: @@ -253,7 +253,7 @@ async def get_share_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: The share properties. - :rtype: ~azure.storage.file.models.ShareProperties + :rtype: ~azure.storage.file.ShareProperties .. admonition:: Example: @@ -378,7 +378,7 @@ async def set_share_access_policy(self, signed_identifiers=None, timeout=None, * A dictionary of access policies to associate with the share. The dictionary may contain up to 5 elements. An empty dictionary will clear the access policies set on the service. - :type signed_identifiers: dict(str, :class:`~azure.storage.file.models.AccessPolicy`) + :type signed_identifiers: dict(str, :class:`~azure.storage.file.AccessPolicy`) :param int timeout: The timeout parameter is expressed in seconds. :returns: Share-updated property dict (Etag and last modified). @@ -470,8 +470,8 @@ async def create_permission_for_share(self, file_permission, # type: str **kwargs # type: Any ): # type: (...) -> str - """ - Create a permission(a security descriptor) at the share level. + """Create a permission(a security descriptor) at the share level. + This 'permission' can be used for the files/directories in the share. If a 'permission' already exists, it shall return the key of it, else creates a new permission at the share level and return its key. @@ -480,8 +480,8 @@ async def create_permission_for_share(self, file_permission, # type: str File permission, a Portable SDDL :param int timeout: The timeout parameter is expressed in seconds. - :returns a file permission key - :rtype str + :returns: a file permission key + :rtype: str """ options = self._create_permission_for_share_options(file_permission, timeout=timeout, **kwargs) try: @@ -496,16 +496,16 @@ async def get_permission_for_share( # type: ignore **kwargs # type: Any ): # type: (...) -> str - """ - Get a permission(a security descriptor) for a given key. + """Get a permission(a security descriptor) for a given key. + This 'permission' can be used for the files/directories in the share. :param str file_permission_key: Key of the file permission to retrieve :param int timeout: The timeout parameter is expressed in seconds. - :returns a file permission(a portable SDDL) - :rtype str + :returns: a file permission(a portable SDDL) + :rtype: str """ try: return await self._client.share.get_permission( # type: ignore diff --git a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py index 36bbd50c1729..a227e6c18ff4 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py @@ -67,7 +67,7 @@ class DirectoryClient(StorageAccountHostsMixin): or share, in which case the directory and/or share must also be specified. :param share: The share for the directory. If specified, this value will override a share value specified in the directory URL. - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str directory_path: The directory path for the directory with which to interact. If specified, this value will override a directory value specified in the directory URL. @@ -157,7 +157,7 @@ def from_connection_string( A connection string to an Azure Storage account. :param share: The share. This can either be the name of the share, or an instance of ShareProperties - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str directory_path: The directory path. :param credential: @@ -287,7 +287,7 @@ def list_directories_and_files(self, name_starts_with=None, timeout=None, **kwar :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of dict-like DirectoryProperties and FileProperties - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.DirectoryProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.DirectoryProperties] .. admonition:: Example: @@ -319,7 +319,7 @@ def list_handles(self, recursive=False, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handles] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.Handles] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -348,7 +348,7 @@ def close_handles( :param handle: Optionally, a specific handle to close. The default value is '*' which will attempt to close all open handles. - :type handle: str or ~azure.storage.file.models.Handle + :type handle: str or ~azure.storage.file.Handle :param bool recursive: Boolean that specifies if operation should apply to the directory specified by the client, its files, its subdirectories and their files. Default value is False. @@ -391,7 +391,7 @@ def get_directory_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: DirectoryProperties - :rtype: ~azure.storage.file.models.DirectoryProperties + :rtype: ~azure.storage.file.DirectoryProperties """ try: response = self._client.directory.get_properties( @@ -447,7 +447,7 @@ def set_http_headers(self, file_attributes="none", # type: Union[str, NTFSAttri The file system attributes for files and directories. If not set, indicates preservation of existing values. Here is an example for when the var type is str: 'Temporary|Archive' - :type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or datetime @@ -568,7 +568,7 @@ def upload_file( :param metadata: Name-value pairs associated with the file as metadata. :type metadata: dict(str, str) - :param ~azure.storage.file.models.ContentSettings content_settings: + :param ~azure.storage.file.ContentSettings content_settings: ContentSettings object used to set file properties. :param bool validate_content: If true, calculates an MD5 hash for each range of the file. The storage diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py index cb44f35674ef..46d26d8b97f0 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py @@ -118,7 +118,7 @@ class FileClient(StorageAccountHostsMixin): or share, in which case the file and/or share must also be specified. :param share: The share for the file. If specified, this value will override a share value specified in the file URL. - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str file_path: The file path to the file with which to interact. If specified, this value will override a file value specified in the file URL. @@ -213,7 +213,7 @@ def from_connection_string( A connection string to an Azure Storage account. :param share: The share. This can either be the name of the share, or an instance of ShareProperties - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str file_path: The file path. :param str snapshot: @@ -257,7 +257,7 @@ def generate_shared_access_signature( Use the returned signature with the credential parameter of any FileServiceClient, ShareClient, DirectoryClient, or FileClient. - :param ~azure.storage.file.models.FilePermissions permission: + :param ~azure.storage.file.FilePermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Permissions must be ordered read, write, delete, list. @@ -351,7 +351,7 @@ def create_file( # type: ignore :param int size: Specifies the maximum size for the file, up to 1 TB. - :param ~azure.storage.file.models.ContentSettings content_settings: + :param ~azure.storage.file.ContentSettings content_settings: ContentSettings object used to set file properties. :param metadata: Name-value pairs associated with the file as metadata. @@ -363,7 +363,7 @@ def create_file( # type: ignore If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or datetime @@ -453,7 +453,7 @@ def upload_file( :param metadata: Name-value pairs associated with the file as metadata. :type metadata: dict(str, str) - :param ~azure.storage.file.models.ContentSettings content_settings: + :param ~azure.storage.file.ContentSettings content_settings: ContentSettings object used to set file properties. :param bool validate_content: If true, calculates an MD5 hash for each range of the file. The storage @@ -473,7 +473,7 @@ def upload_file( If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or datetime @@ -594,7 +594,7 @@ def abort_copy(self, copy_id, timeout=None, **kwargs): :param copy_id: The copy operation to abort. This can be either an ID, or an instance of FileProperties. - :type copy_id: str or ~azure.storage.file.models.FileProperties + :type copy_id: str or ~azure.storage.file.FileProperties :rtype: None """ try: @@ -702,7 +702,7 @@ def get_file_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: FileProperties - :rtype: ~azure.storage.file.models.FileProperties + :rtype: ~azure.storage.file.FileProperties """ try: file_props = self._client.file.get_properties( @@ -731,7 +731,7 @@ def set_http_headers(self, content_settings, # type: ContentSettings # type: (ContentSettings, Optional[int], Optional[Any]) -> Dict[str, Any] """Sets HTTP headers on the file. - :param ~azure.storage.file.models.ContentSettings content_settings: + :param ~azure.storage.file.ContentSettings content_settings: ContentSettings object used to set file properties. :param int timeout: The timeout parameter is expressed in seconds. @@ -739,7 +739,7 @@ def set_http_headers(self, content_settings, # type: ContentSettings The file system attributes for files and directories. If not set, indicates preservation of existing values. Here is an example for when the var type is str: 'Temporary|Archive' - :type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or datetime @@ -1070,7 +1070,7 @@ def list_handles(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.Handle] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.Handle] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -1097,7 +1097,7 @@ def close_handles( :param handle: Optionally, a specific handle to close. The default value is '*' which will attempt to close all open handles. - :type handle: str or ~azure.storage.file.models.Handle + :type handle: str or ~azure.storage.file.Handle :param int timeout: The timeout parameter is expressed in seconds. :returns: A long-running poller to get operation status. diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py index 4fc335954e2a..205cb481d2dd 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py @@ -247,16 +247,16 @@ def set_service_properties( :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for files. - :type hour_metrics: ~azure.storage.file.models.Metrics + :type hour_metrics: ~azure.storage.file.Metrics :param minute_metrics: The minute metrics settings provide request statistics for each minute for files. - :type minute_metrics: ~azure.storage.file.models.Metrics + :type minute_metrics: ~azure.storage.file.Metrics :param cors: You can include up to five CorsRule elements in the list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. - :type cors: list(:class:`~azure.storage.file.models.CorsRule`) + :type cors: list(:class:`~azure.storage.file.CorsRule`) :param int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -303,7 +303,7 @@ def list_shares( :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.models.ShareProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.ShareProperties] .. admonition:: Example: @@ -351,7 +351,7 @@ def create_share( Quota in bytes. :param int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.file.share_client.ShareClient + :rtype: ~azure.storage.file.ShareClient .. admonition:: Example: @@ -381,7 +381,7 @@ def delete_share( :param share_name: The share to delete. This can either be the name of the share, or an instance of ShareProperties. - :type share_name: str or ~azure.storage.file.models.ShareProperties + :type share_name: str or ~azure.storage.file.ShareProperties :param bool delete_snapshots: Indicates if snapshots are to be deleted. :param int timeout: @@ -410,11 +410,11 @@ def get_share_client(self, share, snapshot=None): :param share: The share. This can either be the name of the share, or an instance of ShareProperties. - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str snapshot: An optional share snapshot on which to operate. :returns: A ShareClient. - :rtype: ~azure.storage.file.share_client.ShareClient + :rtype: ~azure.storage.file.ShareClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/models.py b/sdk/storage/azure-storage-file/azure/storage/file/models.py index 258c6f54b35b..ee7ea7674f31 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/models.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/models.py @@ -37,7 +37,7 @@ class Metrics(GeneratedMetrics): statistics for called API operations. :ivar retention_policy: Required. Determines how long the associated data should persist. - :vartype retention_policy: ~azure.storage.file.models.RetentionPolicy + :vartype retention_policy: ~azure.storage.file.RetentionPolicy """ def __init__(self, **kwargs): @@ -252,7 +252,7 @@ class SharePropertiesPaged(PageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.file.models.ShareProperties) + :vartype current_page: list(~azure.storage.file.ShareProperties) :param callable command: Function to retrieve the next page of items. :param str prefix: Filters the results to return only shares whose names @@ -357,7 +357,7 @@ class HandlesPaged(PageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.file.models.Handle) + :vartype current_page: list(~azure.storage.file.Handle) :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per @@ -523,10 +523,10 @@ class FileProperties(DictMixin): Whether encryption is enabled. :ivar copy: The copy properties. - :vartype copy: ~azure.storage.file.models.CopyProperties + :vartype copy: ~azure.storage.file.CopyProperties :ivar content_settings: The content settings for the file. - :vartype content_settings: ~azure.storage.file.models.ContentSettings + :vartype content_settings: ~azure.storage.file.ContentSettings """ def __init__(self, **kwargs): diff --git a/sdk/storage/azure-storage-file/azure/storage/file/share_client.py b/sdk/storage/azure-storage-file/azure/storage/file/share_client.py index d0e79573fa8f..4e22a8961555 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/share_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/share_client.py @@ -64,7 +64,7 @@ class ShareClient(StorageAccountHostsMixin): :param str share_url: The full URI to the share. :param share: The share with which to interact. If specified, this value will override a share value specified in the share URL. - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str snapshot: An optional share snapshot on which to operate. :param credential: @@ -145,7 +145,7 @@ def from_connection_string( A connection string to an Azure Storage account. :param share: The share. This can either be the name of the share, or an instance of ShareProperties - :type share: str or ~azure.storage.file.models.ShareProperties + :type share: str or ~azure.storage.file.ShareProperties :param str snapshot: The optional share snapshot on which to operate. :param credential: @@ -185,7 +185,7 @@ def generate_shared_access_signature( Use the returned signature with the credential parameter of any FileServiceClient, ShareClient, DirectoryClient, or FileClient. - :param ~azure.storage.file.models.SharePermissions permission: + :param ~azure.storage.file.SharePermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Permissions must be ordered read, create, write, delete, list. @@ -421,7 +421,7 @@ def get_share_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :returns: The share properties. - :rtype: ~azure.storage.file.models.ShareProperties + :rtype: ~azure.storage.file.ShareProperties .. admonition:: Example: @@ -546,7 +546,7 @@ def set_share_access_policy(self, signed_identifiers=None, timeout=None, **kwarg A dictionary of access policies to associate with the share. The dictionary may contain up to 5 elements. An empty dictionary will clear the access policies set on the service. - :type signed_identifiers: dict(str, :class:`~azure.storage.file.models.AccessPolicy`) + :type signed_identifiers: dict(str, :class:`~azure.storage.file.AccessPolicy`) :param int timeout: The timeout parameter is expressed in seconds. :returns: Share-updated property dict (Etag and last modified). @@ -650,8 +650,8 @@ def create_permission_for_share(self, file_permission, # type: str **kwargs # type: Any ): # type: (...) -> str - """ - Create a permission(a security descriptor) at the share level. + """Create a permission(a security descriptor) at the share level. + This 'permission' can be used for the files/directories in the share. If a 'permission' already exists, it shall return the key of it, else creates a new permission at the share level and return its key. @@ -660,8 +660,8 @@ def create_permission_for_share(self, file_permission, # type: str File permission, a Portable SDDL :param int timeout: The timeout parameter is expressed in seconds. - :returns a file permission key - :rtype str + :returns: a file permission key + :rtype: str """ options = self._create_permission_for_share_options(file_permission, timeout=timeout, **kwargs) try: @@ -676,16 +676,16 @@ def get_permission_for_share( # type: ignore **kwargs # type: Any ): # type: (...) -> str - """ - Get a permission(a security descriptor) for a given key. + """Get a permission(a security descriptor) for a given key. + This 'permission' can be used for the files/directories in the share. :param str file_permission_key: Key of the file permission to retrieve :param int timeout: The timeout parameter is expressed in seconds. - :returns a file permission(a portable SDDL) - :rtype str + :returns: a file permission(a portable SDDL) + :rtype: str """ try: return self._client.share.get_permission( # type: ignore From 1af42322e0b99477579e42d00be2824bad3ebfd1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Fri, 4 Oct 2019 09:40:42 -0700 Subject: [PATCH 3/5] Queue docstrings --- .../azure/storage/queue/aio/models.py | 4 +-- .../storage/queue/aio/queue_client_async.py | 22 ++++++++-------- .../queue/aio/queue_service_client_async.py | 16 ++++++------ .../azure/storage/queue/models.py | 8 +++--- .../azure/storage/queue/queue_client.py | 26 +++++++++---------- .../storage/queue/queue_service_client.py | 18 ++++++------- 6 files changed, 47 insertions(+), 47 deletions(-) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/models.py index ec624320a7c5..4fa12459f6ce 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/models.py @@ -20,7 +20,7 @@ class MessagesPaged(AsyncPageIterator): :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.queue.models.QueueMessage) + :vartype current_page: list(~azure.storage.queue.QueueMessage) :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of messages to retrieve per @@ -61,7 +61,7 @@ class QueuePropertiesPaged(AsyncPageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.queue.models.QueueProperties) + :vartype current_page: list(~azure.storage.queue.QueueProperties) :param callable command: Function to retrieve the next page of items. :param str prefix: Filters the results to return only queues whose names diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_client_async.py b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_client_async.py index ab8cfbd450f2..7c338ecffdac 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_client_async.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_client_async.py @@ -78,7 +78,7 @@ class QueueClient(AsyncStorageAccountHostsMixin, QueueClientBase): account, in which case the queue must also be specified. :param queue: The queue. If specified, this value will override a queue value specified in the queue URL. - :type queue: str or ~azure.storage.queue.models.QueueProperties + :type queue: str or ~azure.storage.queue.QueueProperties :param credential: The credentials with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string, and account @@ -193,7 +193,7 @@ async def get_queue_properties(self, timeout=None, **kwargs): # type: ignore :param int timeout: The timeout parameter is expressed in seconds. :return: Properties for the specified container within a container object. - :rtype: ~azure.storage.queue.models.QueueProperties + :rtype: ~azure.storage.queue.QueueProperties .. admonition:: Example: @@ -254,7 +254,7 @@ async def get_queue_access_policy(self, timeout=None, **kwargs): # type: ignore :param int timeout: The server timeout, expressed in seconds. :return: A dictionary of access policies associated with the queue. - :rtype: dict(str, :class:`~azure.storage.queue.models.AccessPolicy`) + :rtype: dict(str, ~azure.storage.queue.AccessPolicy) """ try: _, identifiers = await self._client.queue.get_access_policy( @@ -285,7 +285,7 @@ async def set_queue_access_policy(self, signed_identifiers=None, timeout=None, * A list of SignedIdentifier access policies to associate with the queue. The list may contain up to 5 elements. An empty list will clear the access policies set on the service. - :type signed_identifiers: dict(str, :class:`~azure.storage.queue.models.AccessPolicy`) + :type signed_identifiers: dict(str, ~azure.storage.queue.AccessPolicy) :param int timeout: The server timeout, expressed in seconds. @@ -357,10 +357,10 @@ async def enqueue_message( # type: ignore :param int timeout: The server timeout, expressed in seconds. :return: - A :class:`~azure.storage.queue.models.QueueMessage` object. + A :class:`~azure.storage.queue.QueueMessage` object. This object is also populated with the content although it is not returned from the service. - :rtype: ~azure.storage.queue.models.QueueMessage + :rtype: ~azure.storage.queue.QueueMessage .. admonition:: Example: @@ -427,7 +427,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time The server timeout, expressed in seconds. :return: Returns a message iterator of dict-like Message objects. - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.queue.models.Message] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.queue.Message] .. admonition:: Example: @@ -498,9 +498,9 @@ async def update_message( :param int timeout: The server timeout, expressed in seconds. :return: - A :class:`~azure.storage.queue.models.QueueMessage` object. For convenience, + A :class:`~azure.storage.queue.QueueMessage` object. For convenience, this object is also populated with the content, although it is not returned by the service. - :rtype: ~azure.storage.queue.models.QueueMessage + :rtype: ~azure.storage.queue.QueueMessage .. admonition:: Example: @@ -581,10 +581,10 @@ async def peek_messages(self, max_messages=None, timeout=None, **kwargs): # typ :param int timeout: The server timeout, expressed in seconds. :return: - A list of :class:`~azure.storage.queue.models.QueueMessage` objects. Note that + A list of :class:`~azure.storage.queue.QueueMessage` objects. Note that time_next_visible and pop_receipt will not be populated as peek does not pop the message and can only retrieve already visible messages. - :rtype: list(:class:`~azure.storage.queue.models.QueueMessage`) + :rtype: list(:class:`~azure.storage.queue.QueueMessage`) .. admonition:: Example: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py index 39f6a8781ac7..8e60fc302a1b 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/aio/queue_service_client_async.py @@ -181,20 +181,20 @@ async def set_service_properties( # type: ignore :param logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.queue.models.Logging + :type logging: ~azure.storage.queue.Logging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for queues. - :type hour_metrics: ~azure.storage.queue.models.Metrics + :type hour_metrics: ~azure.storage.queue.Metrics :param minute_metrics: The minute metrics settings provide request statistics for each minute for queues. - :type minute_metrics: ~azure.storage.queue.models.Metrics + :type minute_metrics: ~azure.storage.queue.Metrics :param cors: You can include up to five CorsRule elements in the list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. - :type cors: list(:class:`~azure.storage.queue.models.CorsRule`) + :type cors: list(~azure.storage.queue.CorsRule) :param int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -288,7 +288,7 @@ async def create_queue( # type: ignore :type metadata: dict(str, str) :param int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.queue.aio.queue_client_async.QueueClient + :rtype: ~azure.storage.queue.aio.QueueClient .. admonition:: Example: @@ -325,7 +325,7 @@ async def delete_queue( # type: ignore :param queue: The queue to delete. This can either be the name of the queue, or an instance of QueueProperties. - :type queue: str or ~azure.storage.queue.models.QueueProperties + :type queue: str or ~azure.storage.queue.QueueProperties :param int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -352,9 +352,9 @@ def get_queue_client(self, queue, **kwargs): :param queue: The queue. This can either be the name of the queue, or an instance of QueueProperties. - :type queue: str or ~azure.storage.queue.models.QueueProperties + :type queue: str or ~azure.storage.queue.QueueProperties :returns: A :class:`~azure.core.queue.queue_client.QueueClient` object. - :rtype: ~azure.storage.queue.aio.queue_client_async.QueueClient + :rtype: ~azure.storage.queue.aio.QueueClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py index 64d159271513..90642e45f3d7 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/models.py @@ -29,7 +29,7 @@ class Logging(GeneratedLogging): :ivar bool write: Required. Indicates whether all write requests should be logged. :ivar retention_policy: Required. The retention policy for the metrics. - :vartype retention_policy: ~azure.storage.queue.models.RetentionPolicy + :vartype retention_policy: ~azure.storage.queue.RetentionPolicy """ def __init__(self, **kwargs): @@ -51,7 +51,7 @@ class Metrics(GeneratedMetrics): statistics for called API operations. :ivar retention_policy: Required. The retention policy for the metrics. - :vartype retention_policy: ~azure.storage.queue.models.RetentionPolicy + :vartype retention_policy: ~azure.storage.queue.RetentionPolicy """ def __init__(self, **kwargs): @@ -223,7 +223,7 @@ class MessagesPaged(PageIterator): :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.queue.models.QueueMessage) + :vartype current_page: list(~azure.storage.queue.QueueMessage) :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of messages to retrieve per @@ -289,7 +289,7 @@ class QueuePropertiesPaged(PageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.queue.models.QueueProperties) + :vartype current_page: list(~azure.storage.queue.QueueProperties) :param callable command: Function to retrieve the next page of items. :param str prefix: Filters the results to return only queues whose names diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py index 7a1a1d90547a..5977f8176908 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py @@ -64,7 +64,7 @@ class QueueClient(StorageAccountHostsMixin): account, in which case the queue must also be specified. :param queue: The queue. If specified, this value will override a queue value specified in the queue URL. - :type queue: str or ~azure.storage.queue.models.QueueProperties + :type queue: str or ~azure.storage.queue.QueueProperties :param credential: The credentials with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string, and account @@ -141,7 +141,7 @@ def from_connection_string( A connection string to an Azure Storage account. :param queue: The queue. This can either be the name of the queue, or an instance of QueueProperties. - :type queue: str or ~azure.storage.queue.models.QueueProperties + :type queue: str or ~azure.storage.queue.QueueProperties :param credential: The credentials with which to authenticate. This is optional if the account URL already has a SAS token, or the connection string already has shared @@ -175,7 +175,7 @@ def generate_shared_access_signature( Use the returned signature with the credential parameter of any Queue Service. - :param ~azure.storage.queue.models.QueuePermissions permission: + :param ~azure.storage.queue.QueuePermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Required unless a policy_id is given referencing a stored access policy @@ -315,7 +315,7 @@ def get_queue_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. :return: Properties for the specified container within a container object. - :rtype: ~azure.storage.queue.models.QueueProperties + :rtype: ~azure.storage.queue.QueueProperties .. admonition:: Example: @@ -379,7 +379,7 @@ def get_queue_access_policy(self, timeout=None, **kwargs): :param int timeout: The server timeout, expressed in seconds. :return: A dictionary of access policies associated with the queue. - :rtype: dict(str, :class:`~azure.storage.queue.models.AccessPolicy`) + :rtype: dict(str, ~azure.storage.queue.AccessPolicy) """ try: _, identifiers = self._client.queue.get_access_policy( @@ -411,7 +411,7 @@ def set_queue_access_policy(self, signed_identifiers=None, timeout=None, **kwarg A list of SignedIdentifier access policies to associate with the queue. The list may contain up to 5 elements. An empty list will clear the access policies set on the service. - :type signed_identifiers: dict(str, :class:`~azure.storage.queue.models.AccessPolicy`) + :type signed_identifiers: dict(str, ~azure.storage.queue.AccessPolicy) :param int timeout: The server timeout, expressed in seconds. @@ -484,10 +484,10 @@ def enqueue_message( # type: ignore :param int timeout: The server timeout, expressed in seconds. :return: - A :class:`~azure.storage.queue.models.QueueMessage` object. + A :class:`~azure.storage.queue.QueueMessage` object. This object is also populated with the content although it is not returned from the service. - :rtype: ~azure.storage.queue.models.QueueMessage + :rtype: ~azure.storage.queue.QueueMessage .. admonition:: Example: @@ -552,7 +552,7 @@ def receive_messages(self, messages_per_page=None, visibility_timeout=None, time The server timeout, expressed in seconds. :return: Returns a message iterator of dict-like Message objects. - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.models.Message] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.queue.Message] .. admonition:: Example: @@ -615,9 +615,9 @@ def update_message(self, message, visibility_timeout=None, pop_receipt=None, # t :param int timeout: The server timeout, expressed in seconds. :return: - A :class:`~azure.storage.queue.models.QueueMessage` object. For convenience, + A :class:`~azure.storage.queue.QueueMessage` object. For convenience, this object is also populated with the content, although it is not returned by the service. - :rtype: ~azure.storage.queue.models.QueueMessage + :rtype: ~azure.storage.queue.QueueMessage .. admonition:: Example: @@ -698,10 +698,10 @@ def peek_messages(self, max_messages=None, timeout=None, **kwargs): # type: igno :param int timeout: The server timeout, expressed in seconds. :return: - A list of :class:`~azure.storage.queue.models.QueueMessage` objects. Note that + A list of :class:`~azure.storage.queue.QueueMessage` objects. Note that time_next_visible and pop_receipt will not be populated as peek does not pop the message and can only retrieve already visible messages. - :rtype: list(:class:`~azure.storage.queue.models.QueueMessage`) + :rtype: list(:class:`~azure.storage.queue.QueueMessage`) .. admonition:: Example: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 7c3a7f48e110..ade3328f176a 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -173,14 +173,14 @@ def generate_shared_access_signature( been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type expiry: datetime or str + :type expiry: ~datetime.datetime or str :param start: The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type start: datetime or str + :type start: ~datetime.datetime or str :param str ip: Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address from which the request originates does not match the IP address @@ -281,20 +281,20 @@ def set_service_properties( # type: ignore :param logging: Groups the Azure Analytics Logging settings. - :type logging: ~azure.storage.queue.models.Logging + :type logging: ~azure.storage.queue.Logging :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for queues. - :type hour_metrics: ~azure.storage.queue.models.Metrics + :type hour_metrics: ~azure.storage.queue.Metrics :param minute_metrics: The minute metrics settings provide request statistics for each minute for queues. - :type minute_metrics: ~azure.storage.queue.models.Metrics + :type minute_metrics: ~azure.storage.queue.Metrics :param cors: You can include up to five CorsRule elements in the list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. - :type cors: list(:class:`~azure.storage.queue.models.CorsRule`) + :type cors: list(~azure.storage.queue.CorsRule) :param int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -389,7 +389,7 @@ def create_queue( :type metadata: dict(str, str) :param int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.queue.queue_client.QueueClient + :rtype: ~azure.storage.queue.QueueClient .. admonition:: Example: @@ -426,7 +426,7 @@ def delete_queue( :param queue: The queue to delete. This can either be the name of the queue, or an instance of QueueProperties. - :type queue: str or ~azure.storage.queue.models.QueueProperties + :type queue: str or ~azure.storage.queue.QueueProperties :param int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -453,7 +453,7 @@ def get_queue_client(self, queue, **kwargs): :param queue: The queue. This can either be the name of the queue, or an instance of QueueProperties. - :type queue: str or ~azure.storage.queue.models.QueueProperties + :type queue: str or ~azure.storage.queue.QueueProperties :returns: A :class:`~azure.core.queue.queue_client.QueueClient` object. :rtype: ~azure.core.queue.queue_client.QueueClient From c4bbc5c76cf4218781bbb269394a844dbf9f74ff Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Fri, 4 Oct 2019 11:36:43 -0700 Subject: [PATCH 4/5] More doc fixes --- sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py | 4 +++- .../azure/storage/blob/aio/blob_service_client_async.py | 2 +- .../azure-storage-blob/azure/storage/blob/blob_client.py | 2 +- .../azure/storage/blob/blob_service_client.py | 4 ++-- .../azure-storage-blob/azure/storage/blob/container_client.py | 2 +- .../azure/storage/file/file_service_client.py | 4 ++-- .../azure/storage/queue/queue_service_client.py | 4 ++-- .../tests/test_queue_samples_message_async.py | 2 +- 8 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py index 8bc9c75842a2..83ed38db3479 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py @@ -18,7 +18,8 @@ LocationMode, ResourceTypes, AccountSasPermissions, - StorageErrorCode + StorageErrorCode, + UserDelegationKey ) from .models import ( BlobType, @@ -57,6 +58,7 @@ 'BlobType', 'LeaseClient', 'StorageErrorCode', + 'UserDelegationKey', 'ExponentialRetry', 'LinearRetry', 'NoRetry', diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py index 93bed980d7d6..5c9809a82905 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/blob_service_client_async.py @@ -131,7 +131,7 @@ async def get_user_delegation_key(self, key_start_time, # type: datetime :param int timeout: The timeout parameter is expressed in seconds. :return: The user delegation key. - :rtype: ~azure.storage.blob._shared.models.UserDelegationKey + :rtype: ~azure.storage.blob.UserDelegationKey """ key_info = KeyInfo(start=_to_utc_datetime(key_start_time), expiry=_to_utc_datetime(key_expiry_time)) try: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py index f9da7b367191..6c670c076094 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py @@ -299,7 +299,7 @@ def generate_shared_access_signature( :param str content_type: Response header value for Content-Type when resource is accessed using this shared access signature. - :param ~azure.storage.blob._shared.models.UserDelegationKey user_delegation_key: + :param ~azure.storage.blob.UserDelegationKey user_delegation_key: Instead of an account key, the user could pass in a user delegation key. A user delegation key can be obtained from the service by authenticating with an AAD identity; this can be accomplished by calling get_user_delegation_key. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py index 9d8493f7546f..28adbad3e927 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_service_client.py @@ -247,7 +247,7 @@ def get_user_delegation_key(self, key_start_time, # type: datetime :param int timeout: The timeout parameter is expressed in seconds. :return: The user delegation key. - :rtype: ~azure.storage.blob._shared.models.UserDelegationKey + :rtype: ~azure.storage.blob.UserDelegationKey """ key_info = KeyInfo(start=_to_utc_datetime(key_start_time), expiry=_to_utc_datetime(key_expiry_time)) try: @@ -448,7 +448,7 @@ def list_containers( :param int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ContainerProperties. - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.models.ContainerProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.ContainerProperties] .. admonition:: Example: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py index 51826ef3bda5..a1cd7de22ab0 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py @@ -257,7 +257,7 @@ def generate_shared_access_signature( :param str content_type: Response header value for Content-Type when resource is accessed using this shared access signature. - :param ~azure.storage.blob._shared.models.UserDelegationKey user_delegation_key: + :param ~azure.storage.blob.UserDelegationKey user_delegation_key: Instead of an account key, the user could pass in a user delegation key. A user delegation key can be obtained from the service by authenticating with an AAD identity; this can be accomplished by calling get_user_delegation_key. diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py index f2499d0b8fce..f2d6ee41666a 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_service_client.py @@ -150,9 +150,9 @@ def generate_shared_access_signature( Use the returned signature with the credential parameter of any FileServiceClient, ShareClient, DirectoryClient, or FileClient. - :param ~azure.storage.file._shared.models.ResourceTypes resource_types: + :param ~azure.storage.file.ResourceTypes resource_types: Specifies the resource types that are accessible with the account SAS. - :param ~azure.storage.file._shared.models.AccountSasPermissions permission: + :param ~azure.storage.file.AccountSasPermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Required unless an id is given referencing a stored access policy diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 92837591f6a0..24b032758221 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -161,9 +161,9 @@ def generate_shared_access_signature( Use the returned signature with the credential parameter of any Queue Service. - :param ~azure.storage.queue._shared.models.ResourceTypes resource_types: + :param ~azure.storage.queue.ResourceTypes resource_types: Specifies the resource types that are accessible with the account SAS. - :param ~azure.storage.queue._shared.models.AccountSasPermissions permission: + :param ~azure.storage.queue.AccountSasPermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. :param expiry: diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_samples_message_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_samples_message_async.py index 20d3e3a51cce..2111b8d794c0 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_samples_message_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_samples_message_async.py @@ -245,7 +245,7 @@ async def test_update_message(self, resource_group, location, storage_account, s message, visibility_timeout=0, content=u"updated") - # [END update_message] + # [END async_update_message] assert message.content == "updated" break From 6f4932d81af2812d8da643e3420413bd00464578 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Fri, 4 Oct 2019 12:15:01 -0700 Subject: [PATCH 5/5] More doc fixes --- .../azure/storage/blob/__init__.py | 6 ++++ .../azure/storage/blob/blob_client.py | 9 +++--- .../azure/storage/blob/container_client.py | 5 ++-- .../azure/storage/blob/lease.py | 4 +-- .../azure/storage/blob/models.py | 30 +++++++++---------- .../azure/storage/file/__init__.py | 7 +++-- .../file/aio/directory_client_async.py | 4 +-- .../storage/file/aio/file_client_async.py | 4 +-- .../azure/storage/file/directory_client.py | 9 +++--- .../azure/storage/file/file_client.py | 23 +++++++------- .../azure/storage/file/models.py | 8 ++--- .../azure/storage/file/share_client.py | 8 ++--- .../azure/storage/queue/queue_client.py | 2 +- .../storage/queue/queue_service_client.py | 4 +-- 14 files changed, 65 insertions(+), 58 deletions(-) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py index 83ed38db3479..7332317bee7d 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/__init__.py @@ -21,6 +21,9 @@ StorageErrorCode, UserDelegationKey ) +from ._generated.models import ( + RehydratePriority +) from .models import ( BlobType, BlockState, @@ -46,6 +49,7 @@ AccessPolicy, ContainerSasPermissions, BlobSasPermissions, + CustomerProvidedEncryptionKey, ) __version__ = VERSION @@ -89,6 +93,8 @@ 'ResourceTypes', 'AccountSasPermissions', 'StorageStreamDownloader', + 'CustomerProvidedEncryptionKey', + 'RehydratePriority' ] diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py index 6c670c076094..62ee4b996fc8 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py @@ -262,14 +262,14 @@ def generate_shared_access_signature( been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type expiry: datetime or str + :type expiry: ~datetime.datetime or str :param start: The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type start: datetime or str + :type start: ~datetime.datetime or str :param str policy_id: A unique value up to 64 characters in length that correlates to a stored access policy. To create a stored access policy, use @@ -832,7 +832,6 @@ def get_blob_properties(self, **kwargs): a secure connection must be established to transfer the key. :param int timeout: The timeout parameter is expressed in seconds. - :returns: BlobProperties :rtype: ~azure.storage.blob.BlobProperties .. admonition:: Example: @@ -1525,7 +1524,7 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, :param bool requires_sync: Enforces that the service will not return a response until the copy is complete. :returns: A dictionary of copy properties (etag, last_modified, copy_id, copy_status). - :rtype: Dict[str, Union[str, datetime]] + :rtype: dict[str, str or ~datetime.datetime] .. admonition:: Example: @@ -1666,7 +1665,7 @@ def set_standard_blob_tier(self, standard_blob_tier, **kwargs): tier is optimized for storing data that is rarely accessed and stored for at least six months with flexible latency requirements. :type standard_blob_tier: str or ~azure.storage.blob.StandardBlobTier - :param ~azure.storage.blob._generated.models.RehydratePriority rehydrate_priority: + :param ~azure.storage.blob.RehydratePriority rehydrate_priority: Indicates the priority with which to rehydrate an archived blob :param int timeout: The timeout parameter is expressed in seconds. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py index a1cd7de22ab0..c625cd77e7b1 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/container_client.py @@ -641,6 +641,7 @@ def set_container_access_policy( :param int timeout: The timeout parameter is expressed in seconds. :returns: Container-updated property dict (Etag and last modified). + :rtype: dict[str, str or ~datetime.datetime] .. admonition:: Example: @@ -866,7 +867,7 @@ def upload_blob( :param str encoding: Defaults to UTF-8. :returns: A BlobClient to interact with the newly uploaded blob. - :rtype: ~azure.storage.blob.blob_client.BlobClient + :rtype: ~azure.storage.blob.BlobClient .. admonition:: Example: @@ -1264,7 +1265,7 @@ def get_blob_client( :param str snapshot: The optional blob snapshot on which to operate. :returns: A BlobClient. - :rtype: ~azure.storage.blob.blob_client.BlobClient + :rtype: ~azure.storage.blob.BlobClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/lease.py b/sdk/storage/azure-storage-blob/azure/storage/blob/lease.py index 924db9b40754..1172ba274a4f 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/lease.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/lease.py @@ -46,13 +46,13 @@ class LeaseClient(object): :ivar str etag: The ETag of the lease currently being maintained. This will be `None` if no lease has yet been acquired or modified. - :ivar datetime last_modified: + :ivar ~datetime.datetime last_modified: The last modified timestamp of the lease currently being maintained. This will be `None` if no lease has yet been acquired or modified. :param client: The client of the blob or container to lease. - :type client: ~azure.storage.blob.blob_client.BlobClient or + :type client: ~azure.storage.blob.BlobClient or ~azure.storage.blob.ContainerClient :param str lease_id: A string representing the lease ID of an existing lease. This value does not diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py index 4788792493ea..d0ca60fb11b0 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/models.py @@ -128,7 +128,7 @@ class Logging(GeneratedLogging): :param retention_policy: Determines how long the associated data should persist. If not specified the retention policy will be disabled by default. - :type retention_policy: ~azure.storage.blob.models.RetentionPolicy + :type retention_policy: ~azure.storage.blob.RetentionPolicy """ def __init__(self, **kwargs): @@ -153,7 +153,7 @@ class Metrics(GeneratedMetrics): :param retention_policy: Determines how long the associated data should persist. If not specified the retention policy will be disabled by default. - :type retention_policy: ~azure.storage.blob.models.RetentionPolicy + :type retention_policy: ~azure.storage.blob.RetentionPolicy """ def __init__(self, **kwargs): @@ -253,7 +253,7 @@ class ContainerProperties(DictMixin): :param str etag: The ETag contains a value that you can use to perform operations conditionally. - :param ~azure.storage.blob.models.LeaseProperties lease: + :param ~azure.storage.blob.LeaseProperties lease: Stores all the lease information for the container. :param str public_access: Specifies whether data in the container may be accessed publicly and the level of access. @@ -300,7 +300,7 @@ class ContainerPropertiesPaged(PageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.blob.models.ContainerProperties) + :vartype current_page: list(~azure.storage.blob.ContainerProperties) :param callable command: Function to retrieve the next page of items. :param str prefix: Filters the results to return only containers whose names @@ -362,7 +362,7 @@ class BlobProperties(DictMixin): String indicating this blob's type. :ivar dict metadata: Name-value pairs associated with the blob as metadata. - :ivar datetime last_modified: + :ivar ~datetime.datetime last_modified: A datetime object representing the last time the blob was modified. :ivar str etag: The ETag contains a value that you can use to perform operations @@ -381,31 +381,31 @@ class BlobProperties(DictMixin): concurrent writes. :ivar bool server_encrypted: Set to true if the blob is encrypted on the server. - :ivar ~azure.storage.blob.models.CopyProperties copy: + :ivar ~azure.storage.blob.CopyProperties copy: Stores all the copy properties for the blob. - :ivar ~azure.storage.blob.models.ContentSettings content_settings: + :ivar ~azure.storage.blob.ContentSettings content_settings: Stores all the content settings for the blob. - :ivar ~azure.storage.blob.models.LeaseProperties lease: + :ivar ~azure.storage.blob.LeaseProperties lease: Stores all the lease information for the blob. - :ivar ~azure.storage.blob.models.StandardBlobTier blob_tier: + :ivar ~azure.storage.blob.StandardBlobTier blob_tier: Indicates the access tier of the blob. The hot tier is optimized for storing data that is accessed frequently. The cool storage tier is optimized for storing data that is infrequently accessed and stored for at least a month. The archive tier is optimized for storing data that is rarely accessed and stored for at least six months with flexible latency requirements. - :ivar datetime blob_tier_change_time: + :ivar ~datetime.datetime blob_tier_change_time: Indicates when the access tier was last changed. :ivar bool blob_tier_inferred: Indicates whether the access tier was inferred by the service. If false, it indicates that the tier was set explicitly. :ivar bool deleted: Whether this blob was deleted. - :ivar datetime deleted_time: + :ivar ~datetime.datetime deleted_time: A datetime object representing the time at which the blob was deleted. :ivar int remaining_retention_days: The number of days that the blob will be retained before being permanently deleted by the service. - :ivar datetime creation_time: + :ivar ~datetime.datetime creation_time: Indicates when the blob was created, in UTC. :ivar str archive_status: Archive status of blob. @@ -478,7 +478,7 @@ class BlobPropertiesPaged(PageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.blob.models.BlobProperties) + :vartype current_page: list(~azure.storage.blob.BlobProperties) :ivar str container: The container that the blobs are listed from. :ivar str delimiter: A delimiting character used for hierarchy listing. @@ -566,7 +566,7 @@ class BlobPrefix(ItemPaged, DictMixin): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.blob.models.BlobProperties) + :vartype current_page: list(~azure.storage.blob.BlobProperties) :ivar str container: The container that the blobs are listed from. :ivar str delimiter: A delimiting character used for hierarchy listing. @@ -824,7 +824,7 @@ class AccessPolicy(GenAccessPolicy): Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. - :type permission: str or ~azure.storage.blob.models.ContainerSasPermissions + :type permission: str or ~azure.storage.blob.ContainerSasPermissions :param expiry: The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy diff --git a/sdk/storage/azure-storage-file/azure/storage/file/__init__.py b/sdk/storage/azure-storage-file/azure/storage/file/__init__.py index a780ec20aa30..60ead35414e2 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/__init__.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/__init__.py @@ -31,7 +31,9 @@ ShareSasPermissions, ContentSettings, NTFSAttributes) - +from ._generated.models import ( + HandleItem +) __version__ = VERSION @@ -62,5 +64,6 @@ 'ContentSettings', 'Handle', 'HandlesPaged', - 'NTFSAttributes' + 'NTFSAttributes', + 'HandleItem' ] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py index 9f9904fe06a9..936c64dcce33 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/directory_client_async.py @@ -244,8 +244,8 @@ def list_handles(self, recursive=False, timeout=None, **kwargs): its files, its subdirectories and their files. Default value is False. :param int timeout: The timeout parameter is expressed in seconds. - :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.storage.file.HandlesPaged + :returns: An auto-paging iterable of HandleItem + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.HandleItem] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py index 9b6626ffa624..e66050c24ade 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/aio/file_client_async.py @@ -856,8 +856,8 @@ def list_handles(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. - :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.Handle] + :returns: An auto-paging iterable of HandleItem + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.HandleItem] """ results_per_page = kwargs.pop("results_per_page", None) command = functools.partial( diff --git a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py index 3f4a1a83276f..9b94fffe3804 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/directory_client.py @@ -180,7 +180,7 @@ def get_file_client(self, file_name, **kwargs): :param file_name: The name of the file. :returns: A File Client. - :rtype: ~azure.storage.file.file_client.FileClient + :rtype: ~azure.storage.file.FileClient """ if self.directory_path: file_name = self.directory_path.rstrip('/') + "/" + file_name @@ -318,8 +318,8 @@ def list_handles(self, recursive=False, timeout=None, **kwargs): its files, its subdirectories and their files. Default value is False. :param int timeout: The timeout parameter is expressed in seconds. - :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.Handles] + :returns: An auto-paging iterable of HandleItem + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.HandleItem] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( @@ -390,7 +390,6 @@ def get_directory_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. - :returns: DirectoryProperties :rtype: ~azure.storage.file.DirectoryProperties """ try: @@ -584,7 +583,7 @@ def upload_file( :param str encoding: Defaults to UTF-8. :returns: FileClient - :rtype: ~azure.storage.file.file_client.FileClient + :rtype: ~azure.storage.file.FileClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py index 156561d0bf8c..cf01f9264e37 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/file_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/file_client.py @@ -271,14 +271,14 @@ def generate_shared_access_signature( been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type expiry: datetime or str + :type expiry: ~datetime.datetime or str :param start: The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type start: datetime or str + :type start: ~datetime.datetime or str :param str policy_id: A unique value up to 64 characters in length that correlates to a stored access policy. @@ -366,10 +366,10 @@ def create_file( # type: ignore :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. - :type file_creation_time: str or datetime + :type file_creation_time: str or ~datetime.datetime :param file_last_write_time: Last write time for the file Default value: Now. - :type file_last_write_time: str or datetime + :type file_last_write_time: str or ~datetime.datetime :param file_permission: If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key @@ -473,13 +473,13 @@ def upload_file( If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` + :type file_attributes: str or ~azure.storage.file.NTFSAttributes :param file_creation_time: Creation time for the file Default value: Now. - :type file_creation_time: str or datetime + :type file_creation_time: str or ~datetime.datetime :param file_last_write_time: Last write time for the file Default value: Now. - :type file_last_write_time: str or datetime + :type file_last_write_time: str or ~datetime.datetime :param file_permission: If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key @@ -701,7 +701,6 @@ def get_file_properties(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. - :returns: FileProperties :rtype: ~azure.storage.file.FileProperties """ try: @@ -742,10 +741,10 @@ def set_http_headers(self, content_settings, # type: ContentSettings :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. - :type file_creation_time: str or datetime + :type file_creation_time: str or ~datetime.datetime :param file_last_write_time: Last write time for the file Default value: Now. - :type file_last_write_time: str or datetime + :type file_last_write_time: str or ~datetime.datetime :param file_permission: If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key @@ -1069,8 +1068,8 @@ def list_handles(self, timeout=None, **kwargs): :param int timeout: The timeout parameter is expressed in seconds. - :returns: An auto-paging iterable of HandleItems - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.Handle] + :returns: An auto-paging iterable of HandleItem + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.HandleItem] """ results_per_page = kwargs.pop('results_per_page', None) command = functools.partial( diff --git a/sdk/storage/azure-storage-file/azure/storage/file/models.py b/sdk/storage/azure-storage-file/azure/storage/file/models.py index 35b8f589168a..67aa5967a0e4 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/models.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/models.py @@ -138,14 +138,14 @@ class AccessPolicy(GenAccessPolicy): been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type expiry: datetime or str + :type expiry: ~datetime.datetime or str :param start: The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type start: datetime or str + :type start: ~datetime.datetime or str """ def __init__(self, permission=None, expiry=None, start=None): self.start = start @@ -319,9 +319,9 @@ class Handle(DictMixin): :type client_ip: str :param open_time: Required. Time when the session that previously opened the handle has last been reconnected. (UTC) - :type open_time: datetime + :type open_time: ~datetime.datetime :param last_reconnect_time: Time handle was last connected to (UTC) - :type last_reconnect_time: datetime + :type last_reconnect_time: ~datetime.datetime """ def __init__(self, **kwargs): diff --git a/sdk/storage/azure-storage-file/azure/storage/file/share_client.py b/sdk/storage/azure-storage-file/azure/storage/file/share_client.py index dc092123d0ea..2f5636dc334c 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/share_client.py +++ b/sdk/storage/azure-storage-file/azure/storage/file/share_client.py @@ -199,14 +199,14 @@ def generate_shared_access_signature( been specified in an associated stored access policy. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type expiry: datetime or str + :type expiry: ~datetime.datetime or str :param start: The time at which the shared access signature becomes valid. If omitted, start time for this call is assumed to be the time when the storage service receives the request. Azure will always convert values to UTC. If a date is passed in without timezone info, it is assumed to be UTC. - :type start: datetime or str + :type start: ~datetime.datetime or str :param str policy_id: A unique value up to 64 characters in length that correlates to a stored access policy. To create a stored access policy, use :func:`~set_share_access_policy`. @@ -264,7 +264,7 @@ def get_directory_client(self, directory_path=None): :param str directory_path: Path to the specified directory. :returns: A Directory Client. - :rtype: ~azure.storage.file.directory_client.DirectoryClient + :rtype: ~azure.storage.file.DirectoryClient """ return DirectoryClient( self.url, directory_path=directory_path or "", snapshot=self.snapshot, credential=self.credential, @@ -279,7 +279,7 @@ def get_file_client(self, file_path): :param str file_path: Path to the specified file. :returns: A File Client. - :rtype: ~azure.storage.file.file_client.FileClient + :rtype: ~azure.storage.file.FileClient """ return FileClient( self.url, file_path=file_path, snapshot=self.snapshot, credential=self.credential, _hosts=self._hosts, diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py index bee2816249d6..102625c660cb 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_client.py @@ -251,7 +251,7 @@ def create_queue(self, metadata=None, timeout=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - ~azure.storage.queue._generated.models._models.StorageErrorException + ~azure.storage.queue.StorageErrorException .. admonition:: Example: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py index 24b032758221..7c04e38d4813 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/queue_service_client.py @@ -231,7 +231,7 @@ def get_service_stats(self, timeout=None, **kwargs): # type: ignore :param int timeout: The timeout parameter is expressed in seconds. :return: The queue service stats. - :rtype: ~azure.storage.queue._generated.models._models.StorageServiceStats + :rtype: ~azure.storage.queue.StorageServiceStats """ try: return self._client.service.get_statistics( # type: ignore @@ -247,7 +247,7 @@ def get_service_properties(self, timeout=None, **kwargs): # type: ignore :param int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.queue._generated.models._models.StorageServiceProperties + :rtype: ~azure.storage.queue.StorageServiceProperties .. admonition:: Example: