Skip to content

Commit 8a51915

Browse files
[Storage] set_properties for BlobClient (Azure#2466)
1 parent 719958f commit 8a51915

File tree

9 files changed

+246
-203
lines changed

9 files changed

+246
-203
lines changed

sdk/storage/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "rust",
4-
"Tag": "rust/azure_storage_blob_0fb4b4b381",
4+
"Tag": "rust/azure_storage_blob_b0c9247ca1",
55
"TagPrefix": "rust/azure_storage_blob"
66
}

sdk/storage/azure_storage_blob/src/clients/blob_client.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ use crate::{
1111
models::{BlockList, BlockListType, BlockLookupList},
1212
pipeline::StorageHeadersPolicy,
1313
BlobClientDeleteOptions, BlobClientDownloadOptions, BlobClientGetPropertiesOptions,
14-
BlobClientOptions, BlobClientSetMetadataOptions, BlockBlobClientCommitBlockListOptions,
15-
BlockBlobClientGetBlockListOptions, BlockBlobClientStageBlockOptions,
16-
BlockBlobClientUploadOptions,
14+
BlobClientOptions, BlobClientSetMetadataOptions, BlobClientSetPropertiesOptions,
15+
BlockBlobClientCommitBlockListOptions, BlockBlobClientGetBlockListOptions,
16+
BlockBlobClientStageBlockOptions, BlockBlobClientUploadOptions,
1717
};
1818
use azure_core::{
1919
credentials::TokenCredential,
@@ -107,11 +107,22 @@ impl BlobClient {
107107
Ok(response)
108108
}
109109

110-
/// Downloads a blob from the service, including its metadata and properties.
110+
/// Sets system properties on the blob.
111111
///
112112
/// # Arguments
113113
///
114114
/// * `options` - Optional configuration for the request.
115+
pub async fn set_properties(
116+
&self,
117+
options: Option<BlobClientSetPropertiesOptions<'_>>,
118+
) -> Result<Response<()>> {
119+
let response = self.client.set_properties(options).await?;
120+
Ok(response)
121+
}
122+
123+
/// Downloads a blob from the service, including its metadata and properties.
124+
///
125+
/// * `options` - Optional configuration for the request.
115126
pub async fn download(
116127
&self,
117128
options: Option<BlobClientDownloadOptions<'_>>,

sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs

Lines changed: 77 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs

Lines changed: 26 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)