// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { parseKeyVaultIdentifier } from "@azure/keyvault-common"; /** * Parses the given Key Vault Key Id. An example is: * * https://.vault.azure.net/keys// * * On parsing the above Id, this function returns: *```ts * { * sourceId: "https://.vault.azure.net/keys//", * vaultUrl: "https://.vault.azure.net", * version: "", * name: "" * } *``` * @param id - The Id of the Key Vault Key. */ export function parseKeyVaultKeyIdentifier(id) { const urlParts = id.split("/"); const collection = urlParts[3]; return Object.assign({ sourceId: id }, parseKeyVaultIdentifier(collection, id)); } //# sourceMappingURL=identifier.js.map