Repository: PrefectHQ/prefect
Issue category: Feature Request

Add `AzureBlobStorageContainer.list_blobs` method
### Use case
It could be useful to be able to list the blobs to potentially perform actions on folders and blobs in my code, where I don't know the exact name of a file but I can write code to upload/download things from certain blobs.

### Example
```python
from prefect_azure import AzureBlobStorageCredentials
from prefect_azure.blob_storage import AzureBlobStorageContainer

my_connection_string = "mysecretstring"
existing_container = "testing314"

credentials = AzureBlobStorageCredentials(
    connection_string=my_connection_string,
)
container = AzureBlobStorageContainer(
    container_name=existing_container,
    credentials=credentials,
)

container.list_blobs()

# upload things to certain blobs
```


Functions to edit:
src/integrations/prefect-azure/prefect_azure/blob_storage.py:AzureBlobStorageContainer
Functions added: src/integrations/prefect-azure/prefect_azure/blob_storage.py:AzureBlobStorageContainer.list_blobs

Patch:
diff --git a/src/integrations/prefect-azure/prefect_azure/blob_storage.py b/src/integrations/prefect-azure/prefect_azure/blob_storage.py
index 57da7c71d074..7a6edb5af999 100644
--- a/src/integrations/prefect-azure/prefect_azure/blob_storage.py
+++ b/src/integrations/prefect-azure/prefect_azure/blob_storage.py
@@ -704,3 +704,43 @@ async def write_path(self, path: str, content: bytes) -> None:
             content: The content to be written.
         """
         await self.upload_from_file_object(BytesIO(content), path)
+
+    @sync_compatible
+    async def list_blobs(self) -> List[str]:
+        """
+        Lists blobs available within the specified Azure container.
+
+        Used to introspect your containers.
+
+        Returns:
+            A list of the blobs within your container.
+
+        Example:
+            List the blobs associated with a container.
+            ```python
+            from prefect_azure import AzureBlobStorageCredentials
+            from prefect_azure.blob_storage import AzureBlobStorageContainer
+
+            credentials = AzureBlobStorageCredentials(
+                connection_string="connection_string",
+            )
+            block = AzureBlobStorageContainer(
+                container_name="container",
+                credentials=credentials,
+            )
+            block.list_blobs()
+            ```
+        """
+        self.logger.info(
+            "Listing the blobs within container %s",
+            self.container_name,
+        )
+
+        async with self.credentials.get_container_client(
+            self.container_name
+        ) as container_client:
+            blobs = container_client.list_blobs()
+            filenames = []
+            async for blob in blobs:
+                filenames.append(blob.name)
+        return filenames

Test patch: diff --git a/src/integrations/prefect-azure/tests/test_blob_storage.py b/src/integrations/prefect-azure/tests/test_blob_storage.py
index f146fe3e6ec7..c0d2fdf45d69 100644
--- a/src/integrations/prefect-azure/tests/test_blob_storage.py
+++ b/src/integrations/prefect-azure/tests/test_blob_storage.py
@@ -311,3 +311,13 @@ async def test_blob_storage_write_path(self, mock_blob_storage_credentials):
         result = await container.read_path("prefect-write-path.txt")
 
         assert result == b"write_path_works"
+
+    async def test_list_blobs(self, mock_blob_storage_credentials):
+        blob_container = AzureBlobStorageContainer(
+            container_name="container",
+            credentials=mock_blob_storage_credentials,
+        )
+
+        blob_result = await blob_container.list_blobs()
+
+        assert sorted(blob_result) == ["folder/prefect.txt"]