你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ShareClient.CreateSnapshot 方法

定义

创建共享的只读快照。

有关详细信息,请参阅 快照共享

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

参数

metadata
IDictionary<String,String>

要为此共享设置的可选自定义元数据。

cancellationToken
CancellationToken

可选 CancellationToken ,用于传播应取消操作的通知。

返回

描述Response<T>新创建的快照。

注解

RequestFailedException如果发生故障,将引发 。

适用于