共用方式為


KeyVaultSecretIdentifier.TryCreate(Uri, KeyVaultSecretIdentifier) Method

Definition

Tries to create a new instance of the KeyVaultSecretIdentifier from the given id.

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

Parameters

id
Uri

A Uri to a Key Vault secret with or without a version.

identifier
KeyVaultSecretIdentifier

A KeyVaultSecretIdentifier from the given id if valid; otherwise, an empty structure if invalid.

Returns

True if the Uri contains a VaultUri, Name, and optional Version; otherwise, false.

Remarks

Successfully parsing the given Uri does not guarantee that the id is a valid Key Vault secret identifier: only that it contains the necessary number of path parts that look like a Key Vault secret identifier. If the VaultUri references a valid Key Vault, the service will return an error if the Name and Version do not specify a valid secret.

Applies to