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

ArmStorageModelFactory.LegalHold 方法

定义

初始化 LegalHold 的新实例。

public static Azure.ResourceManager.Storage.Models.LegalHold LegalHold (bool? hasLegalHold = default, System.Collections.Generic.IEnumerable<string> tags = default, bool? allowProtectedAppendWritesAll = default);
static member LegalHold : Nullable<bool> * seq<string> * Nullable<bool> -> Azure.ResourceManager.Storage.Models.LegalHold
Public Shared Function LegalHold (Optional hasLegalHold As Nullable(Of Boolean) = Nothing, Optional tags As IEnumerable(Of String) = Nothing, Optional allowProtectedAppendWritesAll As Nullable(Of Boolean) = Nothing) As LegalHold

参数

hasLegalHold
Nullable<Boolean>

如果至少有一个现有标记,则 SRP 将 hasLegalHold 公共属性设置为 true。 如果清除所有现有的法定保留标记,则 SRP 将 hasLegalHold 公共属性设置为 false。对于给定帐户,最多可以有 1000 个具有 hasLegalHold=true 的 Blob 容器。

tags
IEnumerable<String>

每个标记应包含 3 到 23 个字母数字字符,并在 SRP 中规范化为小写。

allowProtectedAppendWritesAll
Nullable<Boolean>

启用后,可将新块写入“追加 Blob 和 Bock Blob”,同时保持法定保留保护和合规性。 只能添加新块,而不能修改或删除任何现有块。

返回

用于模拟的新 LegalHold 实例。

适用于