Megosztás a következőn keresztül:


ShareClient.SetMetadata Method

Definition

The SetMetadata(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 Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo> SetMetadata (System.Collections.Generic.IDictionary<string,string> metadata, Azure.Storage.Files.Shares.Models.ShareFileRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetMetadata : System.Collections.Generic.IDictionary<string, string> * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>
override this.SetMetadata : System.Collections.Generic.IDictionary<string, string> * Azure.Storage.Files.Shares.Models.ShareFileRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Files.Shares.Models.ShareInfo>
Public Overridable Function SetMetadata (metadata As IDictionary(Of String, String), Optional conditions As ShareFileRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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