Skip to content

Commit

Permalink
[Storage] Fix metadata typehint in file-share (#35505)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenttran-msft authored May 7, 2024
1 parent 34795f5 commit 4e51ac6
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,9 @@ def create_directory(self, **kwargs):
This parameter was introduced in API version '2021-06-08'.
:paramtype file_change_time: str or ~datetime.datetime
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the directory as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down Expand Up @@ -858,8 +859,9 @@ def create_subdirectory(
:param str directory_name:
The name of the subdirectory.
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the subdirectory as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down Expand Up @@ -932,8 +934,9 @@ def upload_file(
:type data: Union[bytes, str, Iterable[AnyStr], IO[AnyStr]]
:param int length:
Length of the file in bytes. Specify its maximum size, up to 1 TiB.
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the file as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword ~azure.storage.fileshare.ContentSettings content_settings:
ContentSettings object used to set file properties. Used to set content type, encoding,
language, disposition, md5, and cache control.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,9 @@ def create_file( # type: ignore
:keyword ~azure.storage.fileshare.ContentSettings content_settings:
ContentSettings object used to set file properties. Used to set content type, encoding,
language, disposition, md5, and cache control.
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the file as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword lease:
Required if the file has an active lease. Value can be a ShareLeaseClient object
or the lease ID as a string.
Expand Down Expand Up @@ -547,8 +548,9 @@ def upload_file(
This parameter was introduced in API version '2021-06-08'.
:paramtype file_change_time: str or ~datetime.datetime
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the file as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword ~azure.storage.fileshare.ContentSettings content_settings:
ContentSettings object used to set file properties. Used to set content type, encoding,
language, disposition, md5, and cache control.
Expand Down Expand Up @@ -718,7 +720,7 @@ def start_copy_from_url(self, source_url, **kwargs):
:keyword metadata:
Name-value pairs associated with the file as metadata.
:paramtype metadata: dict[str, str]
:paramtype metadata: Optional[dict[str, str]]
:keyword lease:
Required if the file has an active lease. Value can be a ShareLeaseClient object
or the lease ID as a string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def create_share(self, **kwargs):
:keyword metadata:
Name-value pairs associated with the share as metadata.
:paramtype metadata: dict[str, str]
:paramtype metadata: Optional[dict[str, str]]
:keyword int quota:
The quota to be allotted.
:keyword access_tier:
Expand Down Expand Up @@ -431,7 +431,7 @@ def create_snapshot( # type: ignore
:keyword metadata:
Name-value pairs associated with the share as metadata.
:paramtype metadata: dict[str, str]
:paramtype metadata: Optional[dict[str, str]]
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down Expand Up @@ -682,7 +682,7 @@ def set_share_metadata(self, metadata, **kwargs):
:param metadata:
Name-value pairs associated with the share as metadata.
:type metadata: dict[str, Any]
: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/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down Expand Up @@ -982,7 +982,7 @@ def create_directory(self, directory_name, **kwargs):
The name of the directory.
:keyword metadata:
Name-value pairs associated with the directory as metadata.
:paramtype metadata: dict[str, str]
:paramtype metadata: Optional[dict[str, str]]
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@ def create_share(
which to interact with the newly created share.
:param str share_name: The name of the share to create.
:keyword dict[str, str] metadata:
:keyword metadata:
A dict with name_value pairs to associate with the
share as metadata. Example:{'Category':'test'}
:paramtype metadata: Optional[dict[str, str]]
:keyword int quota:
Quota in bytes.
:keyword int timeout:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ async def create_directory(self, **kwargs):
This parameter was introduced in API version '2021-06-08'.
:paramtype file_change_time: str or ~datetime.datetime
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the directory as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down Expand Up @@ -731,8 +732,9 @@ async def create_subdirectory(
:param str directory_name:
The name of the subdirectory.
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the subdirectory as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down Expand Up @@ -805,8 +807,9 @@ async def upload_file(
:type data: Union[bytes, str, Iterable[AnyStr], AsyncIterable[AnyStr], IO[AnyStr]]
:param int length:
Length of the file in bytes. Specify its maximum size, up to 1 TiB.
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the file as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword ~azure.storage.fileshare.ContentSettings content_settings:
ContentSettings object used to set file properties. Used to set content type, encoding,
language, disposition, md5, and cache control.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ async def create_file( # type: ignore
:keyword ~azure.storage.fileshare.ContentSettings content_settings:
ContentSettings object used to set file properties. Used to set content type, encoding,
language, disposition, md5, and cache control.
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the file as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword lease:
Required if the file has an active lease. Value can be a ShareLeaseClient object
or the lease ID as a string.
Expand Down Expand Up @@ -404,8 +405,9 @@ async def upload_file(
This parameter was introduced in API version '2021-06-08'.
:paramtype file_change_time: str or ~datetime.datetime
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the file as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword ~azure.storage.fileshare.ContentSettings content_settings:
ContentSettings object used to set file properties. Used to set content type, encoding,
language, disposition, md5, and cache control.
Expand Down Expand Up @@ -578,7 +580,7 @@ async def start_copy_from_url(self, source_url, **kwargs):
:keyword metadata:
Name-value pairs associated with the file as metadata.
:paramtype metadata: dict[str, str]
:paramtype metadata: Optional[dict[str, str]]
:keyword lease:
Required if the file has an active lease. Value can be a ShareLeaseClient object
or the lease ID as a string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ async def create_share(self, **kwargs):
:keyword metadata:
Name-value pairs associated with the share as metadata.
:paramtype metadata: dict[str, str]
:paramtype metadata: Optional[dict[str, str]]
:keyword int quota:
The quota to be allotted.
:keyword access_tier:
Expand Down Expand Up @@ -289,7 +289,7 @@ async def create_snapshot( # type: ignore
:keyword metadata:
Name-value pairs associated with the share as metadata.
:paramtype metadata: dict[str, str]
:paramtype metadata: Optional[dict[str, str]]
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down Expand Up @@ -539,7 +539,7 @@ async def set_share_metadata(self, metadata, **kwargs):
:param metadata:
Name-value pairs associated with the share as metadata.
:type metadata: dict[str, Any]
: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/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down Expand Up @@ -826,8 +826,9 @@ async def create_directory(self, directory_name, **kwargs):
:param str directory_name:
The name of the directory.
:keyword dict[str, str] metadata:
:keyword metadata:
Name-value pairs associated with the directory as metadata.
:paramtype metadata: Optional[dict[str, str]]
:keyword int timeout:
Sets the server-side timeout for the operation in seconds. For more details see
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-file-service-operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,10 @@ async def create_share(
which to interact with the newly created share.
:param str share_name: The name of the share to create.
:keyword dict[str, str] metadata:
:keyword metadata:
A dict with name_value pairs to associate with the
share as metadata. Example:{'Category':'test'}
:paramtype metadata: Optional[dict[str, str]]
:keyword int quota:
Quota in bytes.
:keyword int timeout:
Expand Down

0 comments on commit 4e51ac6

Please sign in to comment.