共用方式為


ShareClient.SetMetadataAsync Method

Definition

The SetMetadataAsync(IDictionary<String,String>, ShareFileRequestConditions, CancellationToken) operation sets user-defined metadata for the specified share as one or more name-value pairs.

For more information, see Set Share Metadata.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>> SetMetadataAsync (System.Collections.Generic.IDictionary<string,string> metadata, Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetMetadataAsync : System.Collections.Generic.IDictionary<string, string> * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>>
override this.SetMetadataAsync : System.Collections.Generic.IDictionary<string, string> * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>>
Public Overridable Function SetMetadataAsync (metadata As IDictionary(Of String, String), Optional conditions As ShareFileRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ShareInfo))

Parameters

metadata
IDictionary<String,String>

Custom metadata to set for this share.

conditions
ShareFileRequestConditions

Optional ShareFileRequestConditions to add conditions on setting share metadata.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T> describing the updated share.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to