Skip to content

Commit

Permalink
[Storage] STG90 API View Feedback (Azure#31891)
Browse files Browse the repository at this point in the history
* Queue client changes, blob_client changes

* Fix indent

* PR feedback
  • Loading branch information
vincenttran-msft authored Aug 31, 2023
1 parent 5cf90c9 commit 53f7b80
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ def from_blob_url(
The optional blob snapshot on which to operate. This can be the snapshot ID string
or the response returned from :func:`create_snapshot`. If specified, this will override
the snapshot in the url.
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
specifies the version of the blob to operate on.
:returns: A Blob client.
:rtype: ~azure.storage.blob.BlobClient
"""
Expand Down Expand Up @@ -319,6 +321,8 @@ def from_connection_string(
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
should be the storage account key.
:type credential: Optional[Union[str, Dict[str, str], "AzureNamedKeyCredential", "AzureSasCredential", "TokenCredential"]] # pylint: disable=line-too-long
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
specifies the version of the blob to operate on.
:returns: A Blob client.
:rtype: ~azure.storage.blob.BlobClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,25 +316,22 @@ def get_queue_properties(self, **kwargs):

@distributed_trace
def set_queue_metadata(
self, metadata=None, # type: Optional[Dict[str, Any]]
**kwargs # type: Any
):
# type: (...) -> Dict[str, Any]
self, metadata: Optional[Dict[str, Any]] = None,
**kwargs: Any
) -> Dict[str, Any]:
"""Sets user-defined metadata on the specified queue.
Metadata is associated with the queue as name-value pairs.
:param metadata:
:param Optional[Dict[str, Any]] metadata:
A dict containing name-value pairs to associate with the
queue as metadata.
:type metadata: dict(str, str)
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations.
This value is not tracked or validated on the client. To configure client-side network timesouts
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-queue
#other-client--per-operation-configuration>`_.
:return: A dictionary of response headers.
:rtype: Dict[str, Any]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,22 +210,25 @@ async def get_queue_properties(self, **kwargs):
return response # type: ignore

@distributed_trace_async
async def set_queue_metadata(self, metadata=None, **kwargs):
# type: (Optional[Dict[str, Any]], Optional[Any]) -> None
async def set_queue_metadata(
self, metadata: Optional[Dict[str, Any]] = None,
**kwargs: Any
) -> Dict[str, Any]:
"""Sets user-defined metadata on the specified queue.
Metadata is associated with the queue as name-value pairs.
:param metadata:
:param Optional[Dict[str, Any]] metadata:
A dict containing name-value pairs to associate with the
queue as metadata.
:type metadata: dict(str, str)
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations.
This value is not tracked or validated on the client. To configure client-side network timesouts
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-queue
#other-client--per-operation-configuration>`_.
:return: A dictionary of response headers.
:rtype: Dict[str, Any]
.. admonition:: Example:
Expand Down

0 comments on commit 53f7b80

Please sign in to comment.