'What is the proper search syntax for BlobServiceClient.FindBlobsByTags?
I'm attempting find blobs in a container on my local dev machine, using Azurite, with BlobServiceClient.FindBlobsByTags but cannot figure out the proper syntax for the search clause. Below is the code I'm using.
#r "nuget: Azure.Storage.Blobs"
open Azure.Storage.Blobs
open System
let connectionString = Environment.GetEnvironmentVariable("AzureWebJobsStorage")
let serviceClient = BlobServiceClient(connectionString)
let searchClause = "@container = 'reports'"
// returns a 400 error
let results = serviceClient.FindBlobsByTags(searchClause)
Here's the error I get back from the repl:
> results;;
val it: Azure.Pageable<Models.TaggedBlobItem> =
Error: Service request failed.
Status: 400 (Bad Request)
Headers:
Server: Azurite-Blob/3.15.0
Date: Fri, 28 Jan 2022 15:48:50 GMT
Connection: keep-alive
Keep-Alive: REDACTED
Content-Length: 0
I can successfully list containers when I run the BlobServiceClient.GetBlobContainers method.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
