Closed dalumedic closed 1 month ago
Figured it out.
Updated Example:
let destination = DestinationStorageAccount::new();
let destination_service_client = BlobServiceClient::new(destination.name, destination.creds);
let destination_blob = destination_service_client
.container_client(message.container.clone())
.blob_client(message.blob.clone());
let mut meta_data = Metadata::new();
meta_data.insert("test", "123");
let meta_data_builder: SetMetadataBuilder = destination_blob.set_metadata();
let meta_data_response = meta_data_builder.metadata(meta_data).await?;
Hello
Thanks for the great SDK :-) I did search before posting this but, alas, could find no examples of setting metadata for a blob. I'm am still learning Rust so apologies for missing anything that should be obvious.
I am able to set tags on the blob with the easy to follow API but set_metadata diverges from the pattern and discovery of how to use it is eluding me.
Example:
set_metadata() has no arguments to process the metadata one wishes to set. Where do we actually set the values?
The dotnet SDK has a way to set metadata and tags in the same request via BlobCopyFromUriOptions.