Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[azure-storage] adjusts storage literalincludes for msft docs #7599

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ class BlobClient(AsyncStorageAccountHostsMixin, BlobClientBase): # pylint: disa
shared access key, or an instance of a TokenCredentials class from azure.identity.
If the URL already has a SAS token, specifying an explicit credential will take priority.

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_authentication_async.py
:start-after: [START create_blob_client]
:end-before: [END create_blob_client]
Expand Down Expand Up @@ -229,7 +230,8 @@ async def upload_blob(
:returns: Blob-updated property dict (Etag and last modified)
:rtype: dict[str, Any]

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_hello_world_async.py
:start-after: [START upload_a_blob]
:end-before: [END upload_a_blob]
Expand Down Expand Up @@ -310,7 +312,8 @@ async def download_blob(self, offset=None, length=None, validate_content=False,
:returns: A iterable data generator (stream)
:rtype: ~azure.storage.blob._blob_utils.StorageStreamDownloader

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_hello_world_async.py
:start-after: [START download_a_blob]
:end-before: [END download_a_blob]
Expand Down Expand Up @@ -380,7 +383,8 @@ async def delete_blob(self, delete_snapshots=False, **kwargs):
The timeout parameter is expressed in seconds.
:rtype: None

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_hello_world_async.py
:start-after: [START delete_blob]
:end-before: [END delete_blob]
Expand All @@ -406,7 +410,8 @@ async def undelete_blob(self, **kwargs):
The timeout parameter is expressed in seconds.
:rtype: None

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_common_async.py
:start-after: [START undelete_blob]
:end-before: [END undelete_blob]
Expand Down Expand Up @@ -460,7 +465,8 @@ async def get_blob_properties(self, **kwargs):
:returns: BlobProperties
:rtype: ~azure.storage.blob.models.BlobProperties

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_common_async.py
:start-after: [START get_blob_properties]
:end-before: [END get_blob_properties]
Expand Down Expand Up @@ -772,7 +778,8 @@ async def create_snapshot(self, metadata=None, **kwargs):
:returns: Blob-updated property dict (Snapshot ID, Etag, and last modified).
:rtype: dict[str, Any]

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_common_async.py
:start-after: [START create_blob_snapshot]
:end-before: [END create_blob_snapshot]
Expand Down Expand Up @@ -923,7 +930,8 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy=
:returns: A dictionary of copy properties (etag, last_modified, copy_id, copy_status).
:rtype: Dict[str, Union[str, datetime]]

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_common_async.py
:start-after: [START copy_blob_from_url]
:end-before: [END copy_blob_from_url]
Expand Down Expand Up @@ -957,7 +965,8 @@ async def abort_copy(self, copy_id, **kwargs):
:type copy_id: str or ~azure.storage.blob.models.BlobProperties
:rtype: None

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_common_async.py
:start-after: [START abort_copy_blob_from_url]
:end-before: [END abort_copy_blob_from_url]
Expand Down Expand Up @@ -1014,7 +1023,8 @@ async def acquire_lease(self, lease_duration=-1, lease_id=None, **kwargs):
:returns: A LeaseClient object.
:rtype: ~azure.storage.blob.aio.lease_async.LeaseClient

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_common_async.py
:start-after: [START acquire_lease_on_blob]
:end-before: [END acquire_lease_on_blob]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ class BlobServiceClient(AsyncStorageAccountHostsMixin, BlobServiceClientBase):
shared access key, or an instance of a TokenCredentials class from azure.identity.
If the URL already has a SAS token, specifying an explicit credential will take priority.

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_authentication_async.py
:start-after: [START create_blob_service_client]
:end-before: [END create_blob_service_client]
Expand Down Expand Up @@ -153,7 +154,8 @@ async def get_account_information(self, **kwargs): # type: ignore
:returns: A dict of account information (SKU and account type).
:rtype: dict(str, str)

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START get_blob_service_account_info]
:end-before: [END get_blob_service_account_info]
Expand Down Expand Up @@ -192,7 +194,8 @@ async def get_service_stats(self, timeout=None, **kwargs): # type: ignore
:return: The blob service stats.
:rtype: ~azure.storage.blob._generated.models.StorageServiceStats

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START get_blob_service_stats]
:end-before: [END get_blob_service_stats]
Expand All @@ -216,7 +219,8 @@ async def get_service_properties(self, timeout=None, **kwargs):
The timeout parameter is expressed in seconds.
:rtype: ~azure.storage.blob._generated.models.StorageServiceProperties

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START get_blob_service_properties]
:end-before: [END get_blob_service_properties]
Expand Down Expand Up @@ -284,7 +288,8 @@ async def set_service_properties(
The timeout parameter is expressed in seconds.
:rtype: None

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START set_blob_service_properties]
:end-before: [END set_blob_service_properties]
Expand Down Expand Up @@ -334,7 +339,8 @@ def list_containers(
:returns: An iterable (auto-paging) of ContainerProperties.
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.models.ContainerProperties]

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START bsc_list_containers]
:end-before: [END bsc_list_containers]
Expand Down Expand Up @@ -383,7 +389,8 @@ async def create_container(
The timeout parameter is expressed in seconds.
:rtype: ~azure.storage.blob.aio.container_client_async.ContainerClient

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START bsc_create_container]
:end-before: [END bsc_create_container]
Expand Down Expand Up @@ -443,7 +450,8 @@ async def delete_container(
The timeout parameter is expressed in seconds.
:rtype: None

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START bsc_delete_container]
:end-before: [END bsc_delete_container]
Expand Down Expand Up @@ -471,7 +479,8 @@ def get_container_client(self, container):
:returns: A ContainerClient.
:rtype: ~azure.core.blob.aio.container_client_async.ContainerClient

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START bsc_get_container_client]
:end-before: [END bsc_get_container_client]
Expand Down Expand Up @@ -512,7 +521,8 @@ def get_blob_client(
:returns: A BlobClient.
:rtype: ~azure.storage.blob.aio.blob_client_async.BlobClient

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_service_async.py
:start-after: [START bsc_get_blob_client]
:end-before: [END bsc_get_blob_client]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ class ContainerClient(AsyncStorageAccountHostsMixin, ContainerClientBase):
shared access key, or an instance of a TokenCredentials class from azure.identity.
If the URL already has a SAS token, specifying an explicit credential will take priority.

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START create_container_client_from_service]
:end-before: [END create_container_client_from_service]
Expand Down Expand Up @@ -135,7 +136,8 @@ async def create_container(self, metadata=None, public_access=None, timeout=None
The timeout parameter is expressed in seconds.
:rtype: None

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START create_container]
:end-before: [END create_container]
Expand Down Expand Up @@ -195,7 +197,8 @@ async def delete_container(
The timeout parameter is expressed in seconds.
:rtype: None

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START delete_container]
:end-before: [END delete_container]
Expand Down Expand Up @@ -264,7 +267,8 @@ async def acquire_lease(
:returns: A LeaseClient object, that can be run in a context manager.
:rtype: ~azure.storage.blob.aio.lease_async.LeaseClient

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START acquire_lease_on_container]
:end-before: [END acquire_lease_on_container]
Expand Down Expand Up @@ -307,7 +311,8 @@ async def get_container_properties(self, lease=None, timeout=None, **kwargs):
:return: Properties for the specified container within a container object.
:rtype: ~azure.storage.blob.models.ContainerProperties

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START get_container_properties]
:end-before: [END get_container_properties]
Expand Down Expand Up @@ -357,7 +362,8 @@ async def set_container_metadata( # type: ignore
The timeout parameter is expressed in seconds.
:returns: Container-updated property dict (Etag and last modified).

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START set_container_metadata]
:end-before: [END set_container_metadata]
Expand Down Expand Up @@ -394,7 +400,8 @@ async def get_container_access_policy(self, lease=None, timeout=None, **kwargs):
:returns: Access policy information in a dict.
:rtype: dict[str, str]

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START get_container_access_policy]
:end-before: [END get_container_access_policy]
Expand Down Expand Up @@ -455,7 +462,8 @@ async def set_container_access_policy(
The timeout parameter is expressed in seconds.
:returns: Container-updated property dict (Etag and last modified).

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START set_container_access_policy]
:end-before: [END set_container_access_policy]
Expand Down Expand Up @@ -510,7 +518,8 @@ def list_blobs(self, name_starts_with=None, include=None, timeout=None, **kwargs
:returns: An iterable (auto-paging) response of BlobProperties.
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.blob.models.BlobProperties]

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START list_blobs_in_container]
:end-before: [END list_blobs_in_container]
Expand Down Expand Up @@ -682,7 +691,8 @@ async def upload_blob(
:returns: A BlobClient to interact with the newly uploaded blob.
:rtype: ~azure.storage.blob.aio.blob_client_async.BlobClient

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START upload_blob_to_container]
:end-before: [END upload_blob_to_container]
Expand Down Expand Up @@ -990,7 +1000,8 @@ def get_blob_client(
:returns: A BlobClient.
:rtype: ~azure.storage.blob.aio.blob_client_async.BlobClient

Example:
.. admonition:: Example:

.. literalinclude:: ../tests/test_blob_samples_containers_async.py
:start-after: [START get_blob_client]
:end-before: [END get_blob_client]
Expand Down
Loading