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

KeyVaultKeyIdentifier.TryCreate(Uri, KeyVaultKeyIdentifier) 方法

定义

尝试从给定 id创建 的新KeyVaultKeyIdentifier实例。

public static bool TryCreate (Uri id, out Azure.Security.KeyVault.Keys.KeyVaultKeyIdentifier identifier);
static member TryCreate : Uri * KeyVaultKeyIdentifier -> bool
Public Shared Function TryCreate (id As Uri, ByRef identifier As KeyVaultKeyIdentifier) As Boolean

参数

id
Uri

Uri密钥保管库或带或不带版本的托管 HSM 密钥的 。

identifier
KeyVaultKeyIdentifier

KeyVaultKeyIdentifier如果有效,则为来自给定id的 ;如果无效,则为空结构。

返回

如果 包含 VaultUri、 和 可选 VersionNameUri为 True;否则为 false。

注解

成功分析给定Uri的 并不保证 id 是有效的 密钥保管库 或托管 HSM 密钥标识符:仅保证它包含看起来像密钥保管库密钥标识符的必需路径部分。 VaultUri如果 引用有效的 密钥保管库 或托管 HSM,则当 和 Version 未指定有效密钥时,Name服务将返回错误。

适用于