@azure/keyvault-keys 4.4.0-beta.2 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +37 -1
  2. package/README.md +11 -10
  3. package/dist/index.js +332 -295
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js +14 -25
  6. package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js.map +1 -1
  7. package/dist-esm/keyvault-common/src/index.js +1 -0
  8. package/dist-esm/keyvault-common/src/index.js.map +1 -1
  9. package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js +1 -1
  10. package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js.map +1 -1
  11. package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js +52 -0
  12. package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js.map +1 -0
  13. package/dist-esm/keyvault-common/src/tracingHelpers.js +4 -4
  14. package/dist-esm/keyvault-common/src/tracingHelpers.js.map +1 -1
  15. package/dist-esm/keyvault-keys/src/constants.js +1 -1
  16. package/dist-esm/keyvault-keys/src/constants.js.map +1 -1
  17. package/dist-esm/keyvault-keys/src/cryptography/aesCryptographyProvider.js +7 -7
  18. package/dist-esm/keyvault-keys/src/cryptography/aesCryptographyProvider.js.map +1 -1
  19. package/dist-esm/keyvault-keys/src/cryptography/crypto.js +2 -2
  20. package/dist-esm/keyvault-keys/src/cryptography/crypto.js.map +1 -1
  21. package/dist-esm/keyvault-keys/src/cryptography/models.js.map +1 -1
  22. package/dist-esm/keyvault-keys/src/cryptography/remoteCryptographyProvider.js +11 -12
  23. package/dist-esm/keyvault-keys/src/cryptography/remoteCryptographyProvider.js.map +1 -1
  24. package/dist-esm/keyvault-keys/src/cryptography/rsaCryptographyProvider.js +7 -9
  25. package/dist-esm/keyvault-keys/src/cryptography/rsaCryptographyProvider.js.map +1 -1
  26. package/dist-esm/keyvault-keys/src/cryptographyClient.js +10 -11
  27. package/dist-esm/keyvault-keys/src/cryptographyClient.js.map +1 -1
  28. package/dist-esm/keyvault-keys/src/cryptographyClientModels.js +36 -2
  29. package/dist-esm/keyvault-keys/src/cryptographyClientModels.js.map +1 -1
  30. package/dist-esm/keyvault-keys/src/generated/keyVaultClient.js +4 -50
  31. package/dist-esm/keyvault-keys/src/generated/keyVaultClient.js.map +1 -1
  32. package/dist-esm/keyvault-keys/src/generated/keyVaultClientContext.js +2 -2
  33. package/dist-esm/keyvault-keys/src/generated/keyVaultClientContext.js.map +1 -1
  34. package/dist-esm/keyvault-keys/src/generated/models/index.js +6 -21
  35. package/dist-esm/keyvault-keys/src/generated/models/index.js.map +1 -1
  36. package/dist-esm/keyvault-keys/src/generated/models/mappers.js +36 -29
  37. package/dist-esm/keyvault-keys/src/generated/models/mappers.js.map +1 -1
  38. package/dist-esm/keyvault-keys/src/generated/models/parameters.js +4 -16
  39. package/dist-esm/keyvault-keys/src/generated/models/parameters.js.map +1 -1
  40. package/dist-esm/keyvault-keys/src/identifier.js.map +1 -1
  41. package/dist-esm/keyvault-keys/src/index.js +32 -42
  42. package/dist-esm/keyvault-keys/src/index.js.map +1 -1
  43. package/dist-esm/keyvault-keys/src/keysModels.js +5 -2
  44. package/dist-esm/keyvault-keys/src/keysModels.js.map +1 -1
  45. package/dist-esm/keyvault-keys/src/lro/delete/poller.js.map +1 -1
  46. package/dist-esm/keyvault-keys/src/lro/keyVaultKeyPoller.js +1 -1
  47. package/dist-esm/keyvault-keys/src/lro/keyVaultKeyPoller.js.map +1 -1
  48. package/dist-esm/keyvault-keys/src/lro/recover/poller.js.map +1 -1
  49. package/dist-esm/keyvault-keys/src/transformations.js +12 -13
  50. package/dist-esm/keyvault-keys/src/transformations.js.map +1 -1
  51. package/package.json +16 -32
  52. package/types/keyvault-keys.d.ts +93 -36
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/models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E,0BAA0B;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAuB;IACnD,aAAa,EAAE,mBAAmB;IAClC,MAAM,EAAE,uBAAuB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAuB;IACvC,aAAa,EAAE,OAAO;IACtB,MAAM,EAAE,2BAA2B;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA0B;IAC7C,aAAa,EAAE,UAAU;IACzB,MAAM,EAAE;QACN,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,YAAY,EAAE,IAAI;CACnB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-http\";\nimport {\n KeyCreateParameters as KeyCreateParametersMapper,\n KeyImportParameters as KeyImportParametersMapper,\n KeyUpdateParameters as KeyUpdateParametersMapper,\n KeyRestoreParameters as KeyRestoreParametersMapper,\n KeyOperationsParameters as KeyOperationsParametersMapper,\n KeySignParameters as KeySignParametersMapper,\n KeyVerifyParameters as KeyVerifyParametersMapper,\n KeyExportParameters as KeyExportParametersMapper,\n KeyReleaseParameters as KeyReleaseParametersMapper,\n KeyRotationPolicy as KeyRotationPolicyMapper,\n GetRandomBytesRequest as GetRandomBytesRequestMapper\n} from \"../models/mappers\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const kty: OperationParameter = {\n parameterPath: \"kty\",\n mapper: KeyCreateParametersMapper\n};\n\nexport const keySize: OperationParameter = {\n parameterPath: [\"options\", \"keySize\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const publicExponent: OperationParameter = {\n parameterPath: [\"options\", \"publicExponent\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const keyOps: OperationParameter = {\n parameterPath: [\"options\", \"keyOps\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const keyAttributes: OperationParameter = {\n parameterPath: [\"options\", \"keyAttributes\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const tags: OperationParameter = {\n parameterPath: [\"options\", \"tags\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const curve: OperationParameter = {\n parameterPath: [\"options\", \"curve\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const releasePolicy: OperationParameter = {\n parameterPath: [\"options\", \"releasePolicy\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const vaultBaseUrl: OperationURLParameter = {\n parameterPath: \"vaultBaseUrl\",\n mapper: {\n serializedName: \"vaultBaseUrl\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const keyName: OperationURLParameter = {\n parameterPath: \"keyName\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\"^[0-9a-zA-Z-]+$\")\n },\n serializedName: \"key-name\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n serializedName: \"api-version\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const hsm: OperationParameter = {\n parameterPath: [\"options\", \"hsm\"],\n mapper: KeyImportParametersMapper\n};\n\nexport const key: OperationParameter = {\n parameterPath: \"key\",\n mapper: KeyImportParametersMapper\n};\n\nexport const keyAttributes1: OperationParameter = {\n parameterPath: [\"options\", \"keyAttributes\"],\n mapper: KeyImportParametersMapper\n};\n\nexport const tags1: OperationParameter = {\n parameterPath: [\"options\", \"tags\"],\n mapper: KeyImportParametersMapper\n};\n\nexport const releasePolicy1: OperationParameter = {\n parameterPath: [\"options\", \"releasePolicy\"],\n mapper: KeyImportParametersMapper\n};\n\nexport const keyName1: OperationURLParameter = {\n parameterPath: \"keyName\",\n mapper: {\n serializedName: \"key-name\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const keyOps1: OperationParameter = {\n parameterPath: [\"options\", \"keyOps\"],\n mapper: KeyUpdateParametersMapper\n};\n\nexport const keyAttributes2: OperationParameter = {\n parameterPath: [\"options\", \"keyAttributes\"],\n mapper: KeyUpdateParametersMapper\n};\n\nexport const tags2: OperationParameter = {\n parameterPath: [\"options\", \"tags\"],\n mapper: KeyUpdateParametersMapper\n};\n\nexport const releasePolicy2: OperationParameter = {\n parameterPath: [\"options\", \"releasePolicy\"],\n mapper: KeyUpdateParametersMapper\n};\n\nexport const keyVersion: OperationURLParameter = {\n parameterPath: \"keyVersion\",\n mapper: {\n serializedName: \"key-version\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const maxresults: OperationQueryParameter = {\n parameterPath: [\"options\", \"maxresults\"],\n mapper: {\n constraints: {\n InclusiveMaximum: 25,\n InclusiveMinimum: 1\n },\n serializedName: \"maxresults\",\n type: {\n name: \"Number\"\n }\n }\n};\n\nexport const keyBundleBackup: OperationParameter = {\n parameterPath: \"keyBundleBackup\",\n mapper: KeyRestoreParametersMapper\n};\n\nexport const algorithm: OperationParameter = {\n parameterPath: \"algorithm\",\n mapper: KeyOperationsParametersMapper\n};\n\nexport const value: OperationParameter = {\n parameterPath: \"value\",\n mapper: KeyOperationsParametersMapper\n};\n\nexport const iv: OperationParameter = {\n parameterPath: [\"options\", \"iv\"],\n mapper: KeyOperationsParametersMapper\n};\n\nexport const additionalAuthenticatedData: OperationParameter = {\n parameterPath: [\"options\", \"additionalAuthenticatedData\"],\n mapper: KeyOperationsParametersMapper\n};\n\nexport const authenticationTag: OperationParameter = {\n parameterPath: [\"options\", \"authenticationTag\"],\n mapper: KeyOperationsParametersMapper\n};\n\nexport const algorithm1: OperationParameter = {\n parameterPath: \"algorithm\",\n mapper: KeySignParametersMapper\n};\n\nexport const value1: OperationParameter = {\n parameterPath: \"value\",\n mapper: KeySignParametersMapper\n};\n\nexport const algorithm2: OperationParameter = {\n parameterPath: \"algorithm\",\n mapper: KeyVerifyParametersMapper\n};\n\nexport const digest: OperationParameter = {\n parameterPath: \"digest\",\n mapper: KeyVerifyParametersMapper\n};\n\nexport const signature: OperationParameter = {\n parameterPath: \"signature\",\n mapper: KeyVerifyParametersMapper\n};\n\nexport const wrappingKey: OperationParameter = {\n parameterPath: [\"options\", \"wrappingKey\"],\n mapper: KeyExportParametersMapper\n};\n\nexport const wrappingKid: OperationParameter = {\n parameterPath: [\"options\", \"wrappingKid\"],\n mapper: KeyExportParametersMapper\n};\n\nexport const enc: OperationParameter = {\n parameterPath: [\"options\", \"enc\"],\n mapper: KeyExportParametersMapper\n};\n\nexport const target: OperationParameter = {\n parameterPath: \"target\",\n mapper: KeyReleaseParametersMapper\n};\n\nexport const nonce: OperationParameter = {\n parameterPath: [\"options\", \"nonce\"],\n mapper: KeyReleaseParametersMapper\n};\n\nexport const enc1: OperationParameter = {\n parameterPath: [\"options\", \"enc\"],\n mapper: KeyReleaseParametersMapper\n};\n\nexport const keyRotationPolicy: OperationParameter = {\n parameterPath: \"keyRotationPolicy\",\n mapper: KeyRotationPolicyMapper\n};\n\nexport const count: OperationParameter = {\n parameterPath: \"count\",\n mapper: GetRandomBytesRequestMapper\n};\n\nexport const nextLink: OperationURLParameter = {\n parameterPath: \"nextLink\",\n mapper: {\n serializedName: \"nextLink\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n"]}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAO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sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-http\";\nimport {\n KeyCreateParameters as KeyCreateParametersMapper,\n KeyImportParameters as KeyImportParametersMapper,\n KeyUpdateParameters as KeyUpdateParametersMapper,\n KeyRestoreParameters as KeyRestoreParametersMapper,\n KeyOperationsParameters as KeyOperationsParametersMapper,\n KeySignParameters as KeySignParametersMapper,\n KeyVerifyParameters as KeyVerifyParametersMapper,\n KeyReleaseParameters as KeyReleaseParametersMapper,\n KeyRotationPolicy as KeyRotationPolicyMapper,\n GetRandomBytesRequest as GetRandomBytesRequestMapper\n} from \"../models/mappers\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const kty: OperationParameter = {\n parameterPath: \"kty\",\n mapper: KeyCreateParametersMapper\n};\n\nexport const keySize: OperationParameter = {\n parameterPath: [\"options\", \"keySize\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const publicExponent: OperationParameter = {\n parameterPath: [\"options\", \"publicExponent\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const keyOps: OperationParameter = {\n parameterPath: [\"options\", \"keyOps\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const keyAttributes: OperationParameter = {\n parameterPath: [\"options\", \"keyAttributes\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const tags: OperationParameter = {\n parameterPath: [\"options\", \"tags\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const curve: OperationParameter = {\n parameterPath: [\"options\", \"curve\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const releasePolicy: OperationParameter = {\n parameterPath: [\"options\", \"releasePolicy\"],\n mapper: KeyCreateParametersMapper\n};\n\nexport const vaultBaseUrl: OperationURLParameter = {\n parameterPath: \"vaultBaseUrl\",\n mapper: {\n serializedName: \"vaultBaseUrl\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const keyName: OperationURLParameter = {\n parameterPath: \"keyName\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\"^[0-9a-zA-Z-]+$\")\n },\n serializedName: \"key-name\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n serializedName: \"api-version\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const hsm: OperationParameter = {\n parameterPath: [\"options\", \"hsm\"],\n mapper: KeyImportParametersMapper\n};\n\nexport const key: OperationParameter = {\n parameterPath: \"key\",\n mapper: KeyImportParametersMapper\n};\n\nexport const keyAttributes1: OperationParameter = {\n parameterPath: [\"options\", \"keyAttributes\"],\n mapper: KeyImportParametersMapper\n};\n\nexport const tags1: OperationParameter = {\n parameterPath: [\"options\", \"tags\"],\n mapper: KeyImportParametersMapper\n};\n\nexport const releasePolicy1: OperationParameter = {\n parameterPath: [\"options\", \"releasePolicy\"],\n mapper: KeyImportParametersMapper\n};\n\nexport const keyName1: OperationURLParameter = {\n parameterPath: \"keyName\",\n mapper: {\n serializedName: \"key-name\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const keyOps1: OperationParameter = {\n parameterPath: [\"options\", \"keyOps\"],\n mapper: KeyUpdateParametersMapper\n};\n\nexport const keyAttributes2: OperationParameter = {\n parameterPath: [\"options\", \"keyAttributes\"],\n mapper: KeyUpdateParametersMapper\n};\n\nexport const tags2: OperationParameter = {\n parameterPath: [\"options\", \"tags\"],\n mapper: KeyUpdateParametersMapper\n};\n\nexport const releasePolicy2: OperationParameter = {\n parameterPath: [\"options\", \"releasePolicy\"],\n mapper: KeyUpdateParametersMapper\n};\n\nexport const keyVersion: OperationURLParameter = {\n parameterPath: \"keyVersion\",\n mapper: {\n serializedName: \"key-version\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const maxresults: OperationQueryParameter = {\n parameterPath: [\"options\", \"maxresults\"],\n mapper: {\n constraints: {\n InclusiveMaximum: 25,\n InclusiveMinimum: 1\n },\n serializedName: \"maxresults\",\n type: {\n name: \"Number\"\n }\n }\n};\n\nexport const keyBundleBackup: OperationParameter = {\n parameterPath: \"keyBundleBackup\",\n mapper: KeyRestoreParametersMapper\n};\n\nexport const algorithm: OperationParameter = {\n parameterPath: \"algorithm\",\n mapper: KeyOperationsParametersMapper\n};\n\nexport const value: OperationParameter = {\n parameterPath: \"value\",\n mapper: KeyOperationsParametersMapper\n};\n\nexport const iv: OperationParameter = {\n parameterPath: [\"options\", \"iv\"],\n mapper: KeyOperationsParametersMapper\n};\n\nexport const additionalAuthenticatedData: OperationParameter = {\n parameterPath: [\"options\", \"additionalAuthenticatedData\"],\n mapper: KeyOperationsParametersMapper\n};\n\nexport const authenticationTag: OperationParameter = {\n parameterPath: [\"options\", \"authenticationTag\"],\n mapper: KeyOperationsParametersMapper\n};\n\nexport const algorithm1: OperationParameter = {\n parameterPath: \"algorithm\",\n mapper: KeySignParametersMapper\n};\n\nexport const value1: OperationParameter = {\n parameterPath: \"value\",\n mapper: KeySignParametersMapper\n};\n\nexport const algorithm2: OperationParameter = {\n parameterPath: \"algorithm\",\n mapper: KeyVerifyParametersMapper\n};\n\nexport const digest: OperationParameter = {\n parameterPath: \"digest\",\n mapper: KeyVerifyParametersMapper\n};\n\nexport const signature: OperationParameter = {\n parameterPath: \"signature\",\n mapper: KeyVerifyParametersMapper\n};\n\nexport const targetAttestationToken: OperationParameter = {\n parameterPath: \"targetAttestationToken\",\n mapper: KeyReleaseParametersMapper\n};\n\nexport const nonce: OperationParameter = {\n parameterPath: [\"options\", \"nonce\"],\n mapper: KeyReleaseParametersMapper\n};\n\nexport const enc: OperationParameter = {\n parameterPath: [\"options\", \"enc\"],\n mapper: KeyReleaseParametersMapper\n};\n\nexport const keyRotationPolicy: OperationParameter = {\n parameterPath: \"keyRotationPolicy\",\n mapper: KeyRotationPolicyMapper\n};\n\nexport const count: OperationParameter = {\n parameterPath: \"count\",\n mapper: GetRandomBytesRequestMapper\n};\n\nexport const nextLink: OperationURLParameter = {\n parameterPath: \"nextLink\",\n mapper: {\n serializedName: \"nextLink\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../../src/identifier.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AA8BpE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAU;IACnD,MAAM,QAAQ,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE/B,uBACE,QAAQ,EAAE,EAAE,IACT,uBAAuB,CAAC,UAAU,EAAE,EAAE,CAAC,EAC1C;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { parseKeyvaultIdentifier } from \"../../keyvault-common/src\";\n\n/**\n * Represents the segments that compose a Key Vault Key Id.\n */\nexport interface KeyVaultKeyIdentifier {\n /**\n * The complete representation of the Key Vault Key Id. For example:\n *\n * https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\n *\n */\n sourceId: string;\n\n /**\n * The URL of the Azure Key Vault instance to which the Key belongs.\n */\n vaultUrl: string;\n\n /**\n * The version of Key Vault Key. Might be undefined.\n */\n version?: string;\n\n /**\n * The name of the Key Vault Key.\n */\n name: string;\n}\n\n/**\n * Parses the given Key Vault Key Id. An example is:\n *\n * https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\n *\n * On parsing the above Id, this function returns:\n *```ts\n * {\n * sourceId: \"https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\",\n * vaultUrl: \"https://<keyvault-name>.vault.azure.net\",\n * version: \"<unique-version-id>\",\n * name: \"<key-name>\"\n * }\n *```\n * @param id - The Id of the Key Vault Key.\n */\nexport function parseKeyVaultKeyIdentifier(id: string): KeyVaultKeyIdentifier {\n const urlParts = id.split(\"/\");\n const collection = urlParts[3];\n\n return {\n sourceId: id,\n ...parseKeyvaultIdentifier(collection, id)\n };\n}\n"]}
1
+ {"version":3,"file":"identifier.js","sourceRoot":"","sources":["../../../src/identifier.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AA8BpE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAU;IACnD,MAAM,QAAQ,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE/B,uBACE,QAAQ,EAAE,EAAE,IACT,uBAAuB,CAAC,UAAU,EAAE,EAAE,CAAC,EAC1C;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { parseKeyvaultIdentifier } from \"../../keyvault-common/src\";\n\n/**\n * Represents the segments that compose a Key Vault Key Id.\n */\nexport interface KeyVaultKeyIdentifier {\n /**\n * The complete representation of the Key Vault Key Id. For example:\n *\n * https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\n *\n */\n sourceId: string;\n\n /**\n * The URL of the Azure Key Vault instance to which the Key belongs.\n */\n vaultUrl: string;\n\n /**\n * The version of Key Vault Key. Might be undefined.\n */\n version?: string;\n\n /**\n * The name of the Key Vault Key.\n */\n name: string;\n}\n\n/**\n * Parses the given Key Vault Key Id. An example is:\n *\n * https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\n *\n * On parsing the above Id, this function returns:\n *```ts\n * {\n * sourceId: \"https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>\",\n * vaultUrl: \"https://<keyvault-name>.vault.azure.net\",\n * version: \"<unique-version-id>\",\n * name: \"<key-name>\"\n * }\n *```\n * @param id - The Id of the Key Vault Key.\n */\nexport function parseKeyVaultKeyIdentifier(id: string): KeyVaultKeyIdentifier {\n const urlParts = id.split(\"/\");\n const collection = urlParts[3];\n\n return {\n sourceId: id,\n ...parseKeyvaultIdentifier(collection, id),\n };\n}\n"]}
@@ -3,22 +3,22 @@
3
3
  /* eslint @typescript-eslint/member-ordering: 0 */
4
4
  /// <reference lib="esnext.asynciterable" />
5
5
  import { __asyncGenerator, __asyncValues, __await, __rest } from "tslib";
6
- import { createPipelineFromOptions, isTokenCredential, signingPolicy } from "@azure/core-http";
6
+ import { createPipelineFromOptions, isTokenCredential, signingPolicy, } from "@azure/core-http";
7
7
  import { logger } from "./log";
8
8
  import "@azure/core-paging";
9
- import { KnownDeletionRecoveryLevel, KnownJsonWebKeyType } from "./generated/models";
9
+ import { KnownDeletionRecoveryLevel, KnownJsonWebKeyType, } from "./generated/models";
10
10
  import { KeyVaultClient } from "./generated/keyVaultClient";
11
11
  import { SDK_VERSION } from "./constants";
12
12
  import { challengeBasedAuthenticationPolicy } from "../../keyvault-common/src";
13
13
  import { DeleteKeyPoller } from "./lro/delete/poller";
14
14
  import { RecoverDeletedKeyPoller } from "./lro/recover/poller";
15
- import { KnownKeyOperations, KnownKeyTypes, LATEST_API_VERSION } from "./keysModels";
15
+ import { KnownKeyOperations, KnownKeyTypes, KnownKeyExportEncryptionAlgorithm, LATEST_API_VERSION, } from "./keysModels";
16
16
  import { CryptographyClient } from "./cryptographyClient";
17
- import { KnownKeyCurveNames, KnownEncryptionAlgorithms, KnownSignatureAlgorithms } from "./cryptographyClientModels";
17
+ import { KnownKeyCurveNames, KnownEncryptionAlgorithms, KnownSignatureAlgorithms, } from "./cryptographyClientModels";
18
18
  import { parseKeyVaultKeyIdentifier } from "./identifier";
19
- import { getDeletedKeyFromDeletedKeyItem, getKeyFromKeyBundle, getKeyPropertiesFromKeyItem, keyRotationTransformations } from "./transformations";
19
+ import { getDeletedKeyFromDeletedKeyItem, getKeyFromKeyBundle, getKeyPropertiesFromKeyItem, keyRotationTransformations, } from "./transformations";
20
20
  import { createTraceFunction } from "../../keyvault-common/src";
21
- export { CryptographyClient, KnownDeletionRecoveryLevel, KnownKeyCurveNames, KnownEncryptionAlgorithms, KnownKeyOperations, KnownKeyTypes, KnownSignatureAlgorithms, parseKeyVaultKeyIdentifier, logger };
21
+ export { CryptographyClient, KnownDeletionRecoveryLevel, KnownKeyCurveNames, KnownKeyExportEncryptionAlgorithm, KnownEncryptionAlgorithms, KnownKeyOperations, KnownKeyTypes, KnownSignatureAlgorithms, parseKeyVaultKeyIdentifier, logger, };
22
22
  const withTrace = createTraceFunction("Azure.KeyVault.Keys.KeyClient");
23
23
  /**
24
24
  * The KeyClient provides methods to manage {@link KeyVaultKey} in the
@@ -52,7 +52,7 @@ export class KeyClient {
52
52
  pipelineOptions.userAgentOptions = {
53
53
  userAgentPrefix: userAgentOptions && userAgentOptions.userAgentPrefix
54
54
  ? `${userAgentOptions.userAgentPrefix} ${libInfo}`
55
- : libInfo
55
+ : libInfo,
56
56
  };
57
57
  const authPolicy = isTokenCredential(credential)
58
58
  ? challengeBasedAuthenticationPolicy(credential)
@@ -62,8 +62,8 @@ export class KeyClient {
62
62
  allowedHeaderNames: [
63
63
  "x-ms-keyvault-region",
64
64
  "x-ms-keyvault-network-info",
65
- "x-ms-keyvault-service-version"
66
- ]
65
+ "x-ms-keyvault-service-version",
66
+ ],
67
67
  } });
68
68
  this.credential = credential;
69
69
  this.client = new KeyVaultClient(pipelineOptions.serviceVersion || LATEST_API_VERSION, createPipelineFromOptions(internalPipelineOptions, authPolicy));
@@ -92,7 +92,7 @@ export class KeyClient {
92
92
  enabled,
93
93
  notBefore,
94
94
  expires,
95
- exportable
95
+ exportable,
96
96
  } });
97
97
  }
98
98
  return withTrace("createKey", unflattenedOptions, async (updatedOptions) => {
@@ -180,7 +180,7 @@ export class KeyClient {
180
180
  notBefore,
181
181
  expires,
182
182
  hsm,
183
- exportable
183
+ exportable,
184
184
  } });
185
185
  }
186
186
  return withTrace(`importKey`, unflattenedOptions, async (updatedOptions) => {
@@ -208,7 +208,7 @@ export class KeyClient {
208
208
  // In order to avoid publicly exposing the pipeline we will pass in the underlying client as an undocumented
209
209
  // property to the constructor so that crypto providers downstream can use it.
210
210
  const constructorOptions = {
211
- generatedClient: this.client
211
+ generatedClient: this.client,
212
212
  };
213
213
  const cryptoClient = new CryptographyClient(keyUrl.toString(), this.credential, constructorOptions);
214
214
  return cryptoClient;
@@ -247,7 +247,7 @@ export class KeyClient {
247
247
  client: this.client,
248
248
  intervalInMs: options.intervalInMs,
249
249
  resumeFrom: options.resumeFrom,
250
- operationOptions: options
250
+ operationOptions: options,
251
251
  });
252
252
  // This will initialize the poller's operation (the deletion of the key).
253
253
  await poller.poll();
@@ -260,7 +260,7 @@ export class KeyClient {
260
260
  const unflattenedOptions = Object.assign(Object.assign({}, remainingOptions), { keyAttributes: {
261
261
  enabled,
262
262
  notBefore,
263
- expires
263
+ expires,
264
264
  } });
265
265
  const response = await this.client.updateKey(this.vaultUrl, name, keyVersion, unflattenedOptions);
266
266
  return getKeyFromKeyBundle(response);
@@ -271,7 +271,6 @@ export class KeyClient {
271
271
  *
272
272
  * @param args - The arguments collection.
273
273
  * @returns - The standardized arguments collection.
274
- * @internal
275
274
  */
276
275
  disambiguateUpdateKeyPropertiesArgs(args) {
277
276
  if (typeof args[1] === "string") {
@@ -378,7 +377,7 @@ export class KeyClient {
378
377
  client: this.client,
379
378
  intervalInMs: options.intervalInMs,
380
379
  resumeFrom: options.resumeFrom,
381
- operationOptions: options
380
+ operationOptions: options,
382
381
  });
383
382
  // This will initialize the poller's operation (the deletion of the key).
384
383
  await poller.poll();
@@ -426,6 +425,7 @@ export class KeyClient {
426
425
  }
427
426
  /**
428
427
  * Gets the requested number of bytes containing random values from a managed HSM.
428
+ * This operation requires the managedHsm/rng permission.
429
429
  *
430
430
  * Example usage:
431
431
  * ```ts
@@ -438,7 +438,7 @@ export class KeyClient {
438
438
  getRandomBytes(count, options = {}) {
439
439
  return withTrace("getRandomBytes", options, async (updatedOptions) => {
440
440
  const response = await this.client.getRandomBytes(this.vaultUrl, count, updatedOptions);
441
- return { bytes: response.value };
441
+ return response.value;
442
442
  });
443
443
  }
444
444
  /**
@@ -471,37 +471,39 @@ export class KeyClient {
471
471
  * ```
472
472
  *
473
473
  * @param name - The name of the key.
474
- * @param target - The attestation assertion for the target of the key release.
474
+ * @param targetAttestationToken - The attestation assertion for the target of the key release.
475
475
  * @param options - The optional parameters.
476
476
  */
477
- releaseKey(name, target, options = {}) {
477
+ releaseKey(name, targetAttestationToken, options = {}) {
478
478
  return withTrace("releaseKey", options, async (updatedOptions) => {
479
479
  const { nonce, algorithm } = updatedOptions, rest = __rest(updatedOptions, ["nonce", "algorithm"]);
480
- const result = await this.client.release(this.vaultUrl, name, (options === null || options === void 0 ? void 0 : options.version) || "", target, Object.assign({ enc: algorithm, nonce }, rest));
480
+ const result = await this.client.release(this.vaultUrl, name, (options === null || options === void 0 ? void 0 : options.version) || "", targetAttestationToken, Object.assign({ enc: algorithm, nonce }, rest));
481
481
  return { value: result.value };
482
482
  });
483
483
  }
484
484
  /**
485
485
  * Gets the rotation policy of a Key Vault Key.
486
+ * By default, all keys have a policy that will notify 30 days before expiry.
486
487
  *
488
+ * This operation requires the keys/get permission.
487
489
  * Example usage:
488
490
  * ```ts
489
491
  * let client = new KeyClient(vaultUrl, credentials);
490
- * await client.updateKeyRotationPolicy("MyKey", myPolicy);
491
492
  * let result = await client.getKeyRotationPolicy("myKey");
492
493
  * ```
493
494
  *
494
- * @param name - The name of the key.
495
+ * @param keyName - The name of the key.
495
496
  * @param options - The optional parameters.
496
497
  */
497
- getKeyRotationPolicy(name, options = {}) {
498
+ getKeyRotationPolicy(keyName, options = {}) {
498
499
  return withTrace("getKeyRotationPolicy", options, async () => {
499
- const policy = await this.client.getKeyRotationPolicy(this.vaultUrl, name);
500
+ const policy = await this.client.getKeyRotationPolicy(this.vaultUrl, keyName);
500
501
  return keyRotationTransformations.generatedToPublic(policy);
501
502
  });
502
503
  }
503
504
  /**
504
505
  * Updates the rotation policy of a Key Vault Key.
506
+ * This operation requires the keys/update permission.
505
507
  *
506
508
  * Example usage:
507
509
  * ```ts
@@ -509,19 +511,17 @@ export class KeyClient {
509
511
  * const setPolicy = await client.updateKeyRotationPolicy("MyKey", myPolicy);
510
512
  * ```
511
513
  *
512
- * @param name - The name of the key.
514
+ * @param keyName - The name of the key.
513
515
  * @param policyProperties - The {@link KeyRotationPolicyProperties} for the policy.
514
516
  * @param options - The optional parameters.
515
517
  */
516
- updateKeyRotationPolicy(name, policy, options = {}) {
518
+ updateKeyRotationPolicy(keyName, policy, options = {}) {
517
519
  return withTrace("updateKeyRotationPolicy", options, async (updatedOptions) => {
518
- const result = await this.client.updateKeyRotationPolicy(this.vaultUrl, name, keyRotationTransformations.propertiesToGenerated(policy), updatedOptions);
520
+ const result = await this.client.updateKeyRotationPolicy(this.vaultUrl, keyName, keyRotationTransformations.propertiesToGenerated(policy), updatedOptions);
519
521
  return keyRotationTransformations.generatedToPublic(result);
520
522
  });
521
523
  }
522
524
  /**
523
- * @internal
524
- * @hidden
525
525
  * Deals with the pagination of {@link listPropertiesOfKeyVersions}.
526
526
  * @param name - The name of the Key Vault Key.
527
527
  * @param continuationState - An object that indicates the position of the paginated request.
@@ -550,8 +550,6 @@ export class KeyClient {
550
550
  });
551
551
  }
552
552
  /**
553
- * @internal
554
- * @hidden
555
553
  * Deals with the iteration of all the available results of {@link listPropertiesOfKeyVersions}.
556
554
  * @param name - The name of the Key Vault Key.
557
555
  * @param options - Common options for the iterative endpoints.
@@ -601,12 +599,10 @@ export class KeyClient {
601
599
  [Symbol.asyncIterator]() {
602
600
  return this;
603
601
  },
604
- byPage: (settings = {}) => this.listPropertiesOfKeyVersionsPage(name, settings, options)
602
+ byPage: (settings = {}) => this.listPropertiesOfKeyVersionsPage(name, settings, options),
605
603
  };
606
604
  }
607
605
  /**
608
- * @internal
609
- * @hidden
610
606
  * Deals with the pagination of {@link listPropertiesOfKeys}.
611
607
  * @param continuationState - An object that indicates the position of the paginated request.
612
608
  * @param options - Common options for the iterative endpoints.
@@ -634,8 +630,6 @@ export class KeyClient {
634
630
  });
635
631
  }
636
632
  /**
637
- * @internal
638
- * @hidden
639
633
  * Deals with the iteration of all the available results of {@link listPropertiesOfKeys}.
640
634
  * @param options - Common options for the iterative endpoints.
641
635
  */
@@ -684,12 +678,10 @@ export class KeyClient {
684
678
  [Symbol.asyncIterator]() {
685
679
  return this;
686
680
  },
687
- byPage: (settings = {}) => this.listPropertiesOfKeysPage(settings, options)
681
+ byPage: (settings = {}) => this.listPropertiesOfKeysPage(settings, options),
688
682
  };
689
683
  }
690
684
  /**
691
- * @internal
692
- * @hidden
693
685
  * Deals with the pagination of {@link listDeletedKeys}.
694
686
  * @param continuationState - An object that indicates the position of the paginated request.
695
687
  * @param options - Common options for the iterative endpoints.
@@ -717,8 +709,6 @@ export class KeyClient {
717
709
  });
718
710
  }
719
711
  /**
720
- * @internal
721
- * @hidden
722
712
  * Deals with the iteration of all the available results of {@link listDeletedKeys}.
723
713
  * @param options - Common options for the iterative endpoints.
724
714
  */
@@ -766,7 +756,7 @@ export class KeyClient {
766
756
  [Symbol.asyncIterator]() {
767
757
  return this;
768
758
  },
769
- byPage: (settings = {}) => this.listDeletedKeysPage(settings, options)
759
+ byPage: (settings = {}) => this.listDeletedKeysPage(settings, options),
770
760
  };
771
761
  }
772
762
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,kDAAkD;AAClD,4CAA4C;;AAE5C,OAAO,EAGL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,oBAAoB,CAAC;AAI5B,OAAO,EAEL,0BAA0B,EAE1B,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,kCAAkC,EAAE,MAAM,2BAA2B,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAYL,kBAAkB,EAGlB,aAAa,EAab,kBAAkB,EAgBnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAGL,kBAAkB,EAElB,yBAAyB,EAEzB,wBAAwB,EAyBzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAyB,0BAA0B,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EACL,+BAA+B,EAC/B,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAQL,kBAAkB,EAalB,0BAA0B,EAc1B,kBAAkB,EAElB,yBAAyB,EAEzB,kBAAkB,EAElB,aAAa,EAMb,wBAAwB,EASxB,0BAA0B,EA4B1B,MAAM,E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,GAAG,EAAE,CAAC;;gBAEb,KAAyB,IAAA,KAAA,cAAA,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA,IAAA;oBAAlD,MAAM,IAAI,WAAA,CAAA;oBACnB,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;wBACvB,oBAAM,IAAI,CAAA,CAAC;qBACZ;iBACF;;;;;;;;;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;OAaG;IACI,eAAe,CACpB,UAAkC,EAAE;QAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAE9C,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,WAAyB,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC;SACrF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* eslint @typescript-eslint/member-ordering: 0 */\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n PipelineOptions,\n TokenCredential,\n createPipelineFromOptions,\n isTokenCredential,\n signingPolicy\n} from \"@azure/core-http\";\n\nimport { logger } from \"./log\";\n\nimport \"@azure/core-paging\";\nimport { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { PollerLike, PollOperationState } from \"@azure/core-lro\";\n\nimport {\n DeletionRecoveryLevel,\n KnownDeletionRecoveryLevel,\n KeyVaultClientGetKeysOptionalParams,\n KnownJsonWebKeyType\n} from \"./generated/models\";\nimport { KeyVaultClient } from \"./generated/keyVaultClient\";\nimport { SDK_VERSION } from \"./constants\";\nimport { challengeBasedAuthenticationPolicy } from \"../../keyvault-common/src\";\n\nimport { DeleteKeyPoller } from \"./lro/delete/poller\";\nimport { RecoverDeletedKeyPoller } from \"./lro/recover/poller\";\n\nimport {\n BackupKeyOptions,\n CreateEcKeyOptions,\n CreateKeyOptions,\n CreateRsaKeyOptions,\n CryptographyOptions,\n DeletedKey,\n GetDeletedKeyOptions,\n GetKeyOptions,\n ImportKeyOptions,\n JsonWebKey,\n KeyOperation,\n KnownKeyOperations,\n KeyPollerOptions,\n KeyType,\n KnownKeyTypes,\n BeginDeleteKeyOptions,\n BeginRecoverDeletedKeyOptions,\n KeyProperties,\n KeyVaultKey,\n ListPropertiesOfKeysOptions,\n ListPropertiesOfKeyVersionsOptions,\n ListDeletedKeysOptions,\n PurgeDeletedKeyOptions,\n RestoreKeyBackupOptions,\n UpdateKeyPropertiesOptions,\n KeyClientOptions,\n CryptographyClientOptions,\n LATEST_API_VERSION,\n CreateOctKeyOptions,\n GetRandomBytesOptions,\n ReleaseKeyOptions,\n ReleaseKeyResult,\n KeyReleasePolicy,\n KeyExportEncryptionAlgorithm,\n RandomBytes,\n GetCryptographyClientOptions,\n RotateKeyOptions,\n UpdateKeyRotationPolicyOptions,\n GetKeyRotationPolicyOptions,\n KeyRotationLifetimeAction,\n KeyRotationPolicy,\n KeyRotationPolicyProperties,\n KeyRotationPolicyAction\n} from \"./keysModels\";\n\nimport { CryptographyClient } from \"./cryptographyClient\";\n\nimport {\n DecryptResult,\n KeyCurveName,\n KnownKeyCurveNames,\n EncryptionAlgorithm,\n KnownEncryptionAlgorithms,\n SignatureAlgorithm,\n KnownSignatureAlgorithms,\n KeyWrapAlgorithm,\n SignResult,\n UnwrapResult,\n VerifyResult,\n WrapResult,\n EncryptResult,\n DecryptOptions,\n EncryptOptions,\n SignOptions,\n UnwrapKeyOptions,\n VerifyOptions,\n WrapKeyOptions,\n EncryptParameters,\n DecryptParameters,\n RsaEncryptionAlgorithm,\n RsaEncryptParameters,\n AesGcmEncryptionAlgorithm,\n AesCbcEncryptionAlgorithm,\n AesCbcEncryptParameters,\n AesGcmEncryptParameters,\n AesCbcDecryptParameters,\n AesGcmDecryptParameters,\n RsaDecryptParameters,\n VerifyDataOptions\n} from \"./cryptographyClientModels\";\n\nimport { KeyVaultKeyIdentifier, parseKeyVaultKeyIdentifier } from \"./identifier\";\nimport {\n getDeletedKeyFromDeletedKeyItem,\n getKeyFromKeyBundle,\n getKeyPropertiesFromKeyItem,\n keyRotationTransformations\n} from \"./transformations\";\nimport { createTraceFunction } from \"../../keyvault-common/src\";\n\nexport {\n CryptographyClientOptions,\n KeyClientOptions,\n BackupKeyOptions,\n CreateEcKeyOptions,\n CreateKeyOptions,\n CreateRsaKeyOptions,\n CreateOctKeyOptions,\n CryptographyClient,\n CryptographyOptions,\n RsaEncryptionAlgorithm,\n RsaDecryptParameters,\n AesGcmEncryptionAlgorithm,\n AesGcmDecryptParameters,\n AesCbcEncryptionAlgorithm,\n AesCbcDecryptParameters,\n DecryptParameters,\n DecryptOptions,\n DecryptResult,\n DeletedKey,\n DeletionRecoveryLevel,\n KnownDeletionRecoveryLevel,\n RsaEncryptParameters,\n AesGcmEncryptParameters,\n AesCbcEncryptParameters,\n EncryptParameters,\n EncryptOptions,\n EncryptResult,\n GetDeletedKeyOptions,\n GetKeyOptions,\n GetRandomBytesOptions,\n RandomBytes,\n ImportKeyOptions,\n JsonWebKey,\n KeyCurveName,\n KnownKeyCurveNames,\n EncryptionAlgorithm,\n KnownEncryptionAlgorithms,\n KeyOperation,\n KnownKeyOperations,\n KeyType,\n KnownKeyTypes,\n KeyPollerOptions,\n BeginDeleteKeyOptions,\n BeginRecoverDeletedKeyOptions,\n KeyProperties,\n SignatureAlgorithm,\n KnownSignatureAlgorithms,\n KeyVaultKey,\n KeyWrapAlgorithm,\n ListPropertiesOfKeysOptions,\n ListPropertiesOfKeyVersionsOptions,\n ListDeletedKeysOptions,\n PageSettings,\n PagedAsyncIterableIterator,\n KeyVaultKeyIdentifier,\n parseKeyVaultKeyIdentifier,\n PipelineOptions,\n PollOperationState,\n PollerLike,\n PurgeDeletedKeyOptions,\n RestoreKeyBackupOptions,\n RotateKeyOptions,\n SignOptions,\n SignResult,\n UnwrapKeyOptions,\n UnwrapResult,\n UpdateKeyPropertiesOptions,\n VerifyOptions,\n VerifyDataOptions,\n VerifyResult,\n WrapKeyOptions,\n WrapResult,\n ReleaseKeyOptions,\n ReleaseKeyResult,\n KeyReleasePolicy,\n KeyExportEncryptionAlgorithm,\n GetCryptographyClientOptions,\n KeyRotationPolicyAction,\n KeyRotationPolicyProperties,\n KeyRotationPolicy,\n KeyRotationLifetimeAction,\n UpdateKeyRotationPolicyOptions,\n GetKeyRotationPolicyOptions,\n logger\n};\n\nconst withTrace = createTraceFunction(\"Azure.KeyVault.Keys.KeyClient\");\n\n/**\n * The KeyClient provides methods to manage {@link KeyVaultKey} in the\n * Azure Key Vault. The client supports creating, retrieving, updating,\n * deleting, purging, backing up, restoring and listing KeyVaultKeys. The\n * client also supports listing {@link DeletedKey} for a soft-delete enabled Azure Key\n * Vault.\n */\nexport class KeyClient {\n /**\n * The base URL to the vault\n */\n public readonly vaultUrl: string;\n\n /**\n * @internal\n * @hidden\n * A reference to the auto-generated Key Vault HTTP client.\n */\n private readonly client: KeyVaultClient;\n\n /**\n * @internal\n * A reference to the credential that was used to construct this client.\n * Later used to instantiate a {@link CryptographyClient} with the same credential.\n */\n private readonly credential: TokenCredential;\n\n /**\n * Creates an instance of KeyClient.\n *\n * Example usage:\n * ```ts\n * import { KeyClient } from \"@azure/keyvault-keys\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * let vaultUrl = `https://<MY KEYVAULT HERE>.vault.azure.net`;\n * let credentials = new DefaultAzureCredential();\n *\n * let client = new KeyClient(vaultUrl, credentials);\n * ```\n * @param vaultUrl - the URL of the Key Vault. It should have this shape: `https://${your-key-vault-name}.vault.azure.net`\n * @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param pipelineOptions - Pipeline options used to configure Key Vault API requests. Omit this parameter to use the default pipeline configuration.\n */\n constructor(\n vaultUrl: string,\n credential: TokenCredential,\n pipelineOptions: KeyClientOptions = {}\n ) {\n this.vaultUrl = vaultUrl;\n\n const libInfo = `azsdk-js-keyvault-keys/${SDK_VERSION}`;\n\n const userAgentOptions = pipelineOptions.userAgentOptions;\n\n pipelineOptions.userAgentOptions = {\n userAgentPrefix:\n userAgentOptions && userAgentOptions.userAgentPrefix\n ? `${userAgentOptions.userAgentPrefix} ${libInfo}`\n : libInfo\n };\n\n const authPolicy = isTokenCredential(credential)\n ? challengeBasedAuthenticationPolicy(credential)\n : signingPolicy(credential);\n\n const internalPipelineOptions = {\n ...pipelineOptions,\n loggingOptions: {\n logger: logger.info,\n allowedHeaderNames: [\n \"x-ms-keyvault-region\",\n \"x-ms-keyvault-network-info\",\n \"x-ms-keyvault-service-version\"\n ]\n }\n };\n\n this.credential = credential;\n this.client = new KeyVaultClient(\n pipelineOptions.serviceVersion || LATEST_API_VERSION,\n createPipelineFromOptions(internalPipelineOptions, authPolicy)\n );\n }\n\n /**\n * The create key operation can be used to create any key type in Azure Key Vault. If the named key\n * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create\n * permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * // Create an elliptic-curve key:\n * let result = await client.createKey(\"MyKey\", \"EC\");\n * ```\n * Creates a new key, stores it, then returns key parameters and properties to the client.\n * @param name - The name of the key.\n * @param keyType - The type of the key. One of the following: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'.\n * @param options - The optional parameters.\n */\n public createKey(\n name: string,\n keyType: KeyType,\n options?: CreateKeyOptions\n ): Promise<KeyVaultKey> {\n let unflattenedOptions = {};\n\n if (options) {\n const { enabled, notBefore, expiresOn: expires, exportable, ...remainingOptions } = options;\n unflattenedOptions = {\n ...remainingOptions,\n keyAttributes: {\n enabled,\n notBefore,\n expires,\n exportable\n }\n };\n }\n return withTrace(\"createKey\", unflattenedOptions, async (updatedOptions) => {\n const response = await this.client.createKey(this.vaultUrl, name, keyType, updatedOptions);\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * The createEcKey method creates a new elliptic curve key in Azure Key Vault. If the named key\n * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create\n * permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let result = await client.createEcKey(\"MyKey\", { curve: \"P-256\" });\n * ```\n * Creates a new key, stores it, then returns key parameters and properties to the client.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public async createEcKey(name: string, options?: CreateEcKeyOptions): Promise<KeyVaultKey> {\n const keyType = options?.hsm ? KnownJsonWebKeyType.ECHSM : KnownJsonWebKeyType.EC;\n return this.createKey(name, keyType, options);\n }\n\n /**\n * The createRSAKey method creates a new RSA key in Azure Key Vault. If the named key\n * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create\n * permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let result = await client.createRsaKey(\"MyKey\", { keySize: 2048 });\n * ```\n * Creates a new key, stores it, then returns key parameters and properties to the client.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public async createRsaKey(name: string, options?: CreateRsaKeyOptions): Promise<KeyVaultKey> {\n const keyType = options?.hsm ? KnownJsonWebKeyType.RSAHSM : KnownJsonWebKeyType.RSA;\n return this.createKey(name, keyType, options);\n }\n\n /**\n * The createOctKey method creates a new OCT key in Azure Key Vault. If the named key\n * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create\n * permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let result = await client.createOctKey(\"MyKey\", { hsm: true });\n * ```\n * Creates a new key, stores it, then returns key parameters and properties to the client.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public async createOctKey(name: string, options?: CreateOctKeyOptions): Promise<KeyVaultKey> {\n const keyType = options?.hsm ? KnownJsonWebKeyType.OctHSM : KnownJsonWebKeyType.Oct;\n return this.createKey(name, keyType, options);\n }\n\n /**\n * The import key operation may be used to import any key type into an Azure Key Vault. If the\n * named key already exists, Azure Key Vault creates a new version of the key. This operation\n * requires the keys/import permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * // Key contents in myKeyContents\n * let result = await client.importKey(\"MyKey\", myKeyContents);\n * ```\n * Imports an externally created key, stores it, and returns key parameters and properties\n * to the client.\n * @param name - Name for the imported key.\n * @param key - The JSON web key.\n * @param options - The optional parameters.\n */\n public importKey(\n name: string,\n key: JsonWebKey,\n options?: ImportKeyOptions\n ): Promise<KeyVaultKey> {\n let unflattenedOptions = {};\n\n if (options) {\n const {\n enabled,\n notBefore,\n exportable,\n expiresOn: expires,\n hardwareProtected: hsm,\n ...remainingOptions\n } = options;\n unflattenedOptions = {\n ...remainingOptions,\n keyAttributes: {\n enabled,\n notBefore,\n expires,\n hsm,\n exportable\n }\n };\n }\n\n return withTrace(`importKey`, unflattenedOptions, async (updatedOptions) => {\n const response = await this.client.importKey(this.vaultUrl, name, key, updatedOptions);\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * Gets a {@link CryptographyClient} for the given key.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * // get a cryptography client for a given key\n * let cryptographyClient = client.getCryptographyClient(\"MyKey\");\n * ```\n * @param name - The name of the key used to perform cryptographic operations.\n * @param version - Optional version of the key used to perform cryptographic operations.\n * @returns - A {@link CryptographyClient} using the same options, credentials, and http client as this {@link KeyClient}\n */\n public getCryptographyClient(\n keyName: string,\n options?: GetCryptographyClientOptions\n ): CryptographyClient {\n const keyUrl = new URL(\n [\"keys\", keyName, options?.keyVersion].filter(Boolean).join(\"/\"),\n this.vaultUrl\n );\n\n // The goals of this method are discoverability and performance (by sharing a client and pipeline).\n // The existing cryptography client does not accept a pipeline as an argument, nor does it expose it.\n // In order to avoid publicly exposing the pipeline we will pass in the underlying client as an undocumented\n // property to the constructor so that crypto providers downstream can use it.\n const constructorOptions: CryptographyClientOptions & { generatedClient: KeyVaultClient } = {\n generatedClient: this.client\n };\n const cryptoClient = new CryptographyClient(\n keyUrl.toString(),\n this.credential,\n constructorOptions\n );\n return cryptoClient;\n }\n\n /**\n * The delete operation applies to any key stored in Azure Key Vault. Individual versions\n * of a key can not be deleted, only all versions of a given key at once.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the key is deleted.\n *\n * This operation requires the keys/delete permission.\n *\n * Example usage:\n * ```ts\n * const client = new KeyClient(url, credentials);\n * await client.createKey(\"MyKey\", \"EC\");\n * const poller = await client.beginDeleteKey(\"MyKey\");\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n * // A new poller can be created with:\n * // await client.beginDeleteKey(\"MyKey\", { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const deletedKey = await poller.pollUntilDone();\n * console.log(deletedKey);\n * ```\n * Deletes a key from a specified key vault.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public async beginDeleteKey(\n name: string,\n options: BeginDeleteKeyOptions = {}\n ): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>> {\n const poller = new DeleteKeyPoller({\n name,\n vaultUrl: this.vaultUrl,\n client: this.client,\n intervalInMs: options.intervalInMs,\n resumeFrom: options.resumeFrom,\n operationOptions: options\n });\n\n // This will initialize the poller's operation (the deletion of the key).\n await poller.poll();\n\n return poller;\n }\n\n /**\n * The updateKeyProperties method changes specified properties of an existing stored key. Properties that\n * are not specified in the request are left unchanged. The value of a key itself cannot be\n * changed. This operation requires the keys/set permission.\n *\n * Example usage:\n * ```ts\n * let keyName = \"MyKey\";\n * let client = new KeyClient(vaultUrl, credentials);\n * let key = await client.getKey(keyName);\n * let result = await client.updateKeyProperties(keyName, key.properties.version, { enabled: false });\n * ```\n * Updates the properties associated with a specified key in a given key vault.\n * @param name - The name of the key.\n * @param keyVersion - The version of the key.\n * @param options - The optional parameters.\n */\n public updateKeyProperties(\n name: string,\n keyVersion: string,\n options?: UpdateKeyPropertiesOptions\n ): Promise<KeyVaultKey>;\n /**\n * The updateKeyProperties method changes specified properties of the latest version of an existing stored key. Properties that\n * are not specified in the request are left unchanged. The value of a key itself cannot be\n * changed. This operation requires the keys/set permission.\n *\n * Example usage:\n * ```ts\n * let keyName = \"MyKey\";\n * let client = new KeyClient(vaultUrl, credentials);\n * let key = await client.getKey(keyName);\n * let result = await client.updateKeyProperties(keyName, { enabled: false });\n * ```\n * Updates the properties associated with a specified key in a given key vault.\n * @param name - The name of the key.\n * @param keyVersion - The version of the key.\n * @param options - The optional parameters.\n */\n public updateKeyProperties(\n name: string,\n options?: UpdateKeyPropertiesOptions\n ): Promise<KeyVaultKey>;\n public updateKeyProperties(\n ...args: [string, string, UpdateKeyPropertiesOptions?] | [string, UpdateKeyPropertiesOptions?]\n ): Promise<KeyVaultKey> {\n const [name, keyVersion, options] = this.disambiguateUpdateKeyPropertiesArgs(args);\n return withTrace(`updateKeyProperties`, options, async (updatedOptions) => {\n const { enabled, notBefore, expiresOn: expires, ...remainingOptions } = updatedOptions;\n const unflattenedOptions = {\n ...remainingOptions,\n keyAttributes: {\n enabled,\n notBefore,\n expires\n }\n };\n const response = await this.client.updateKey(\n this.vaultUrl,\n name,\n keyVersion,\n unflattenedOptions\n );\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * Standardizes an overloaded arguments collection for the updateKeyProperties method.\n *\n * @param args - The arguments collection.\n * @returns - The standardized arguments collection.\n * @internal\n */\n private disambiguateUpdateKeyPropertiesArgs(\n args: [string, string, UpdateKeyPropertiesOptions?] | [string, UpdateKeyPropertiesOptions?]\n ): [string, string, UpdateKeyPropertiesOptions] {\n if (typeof args[1] === \"string\") {\n // [name, keyVersion, options?] => [name, keyVersion, options || {}]\n return [args[0], args[1], args[2] || {}];\n } else {\n // [name, options?] => [name , \"\", options || {}]\n return [args[0], \"\", args[1] || {}];\n }\n }\n\n /**\n * The getKey method gets a specified key and is applicable to any key stored in Azure Key Vault.\n * This operation requires the keys/get permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let key = await client.getKey(\"MyKey\");\n * ```\n * Get a specified key from a given key vault.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public getKey(name: string, options: GetKeyOptions = {}): Promise<KeyVaultKey> {\n return withTrace(`getKey`, options, async (updatedOptions) => {\n const response = await this.client.getKey(\n this.vaultUrl,\n name,\n options && options.version ? options.version : \"\",\n updatedOptions\n );\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * The getDeletedKey method returns the specified deleted key along with its properties.\n * This operation requires the keys/get permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let key = await client.getDeletedKey(\"MyDeletedKey\");\n * ```\n * Gets the specified deleted key.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public getDeletedKey(name: string, options: GetDeletedKeyOptions = {}): Promise<DeletedKey> {\n return withTrace(`getDeletedKey`, options, async (updatedOptions) => {\n const response = await this.client.getDeletedKey(this.vaultUrl, name, updatedOptions);\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * The purge deleted key operation removes the key permanently, without the possibility of\n * recovery. This operation can only be enabled on a soft-delete enabled vault. This operation\n * requires the keys/purge permission.\n *\n * Example usage:\n * ```ts\n * const client = new KeyClient(url, credentials);\n * const deletePoller = await client.beginDeleteKey(\"MyKey\")\n * await deletePoller.pollUntilDone();\n * await client.purgeDeletedKey(\"MyKey\");\n * ```\n * Permanently deletes the specified key.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public purgeDeletedKey(name: string, options: PurgeDeletedKeyOptions = {}): Promise<void> {\n return withTrace(`purgeDeletedKey`, options, async (updatedOptions) => {\n await this.client.purgeDeletedKey(this.vaultUrl, name, updatedOptions);\n });\n }\n\n /**\n * Recovers the deleted key in the specified vault. This operation can only be performed on a\n * soft-delete enabled vault.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the deleted key is recovered.\n *\n * This operation requires the keys/recover permission.\n *\n * Example usage:\n * ```ts\n * const client = new KeyClient(url, credentials);\n * await client.createKey(\"MyKey\", \"EC\");\n * const deletePoller = await client.beginDeleteKey(\"MyKey\");\n * await deletePoller.pollUntilDone();\n * const poller = await client.beginRecoverDeletedKey(\"MyKey\");\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n * // A new poller can be created with:\n * // await client.beginRecoverDeletedKey(\"MyKey\", { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const key = await poller.pollUntilDone();\n * console.log(key);\n * ```\n * Recovers the deleted key to the latest version.\n * @param name - The name of the deleted key.\n * @param options - The optional parameters.\n */\n public async beginRecoverDeletedKey(\n name: string,\n options: BeginRecoverDeletedKeyOptions = {}\n ): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>> {\n const poller = new RecoverDeletedKeyPoller({\n name,\n vaultUrl: this.vaultUrl,\n client: this.client,\n intervalInMs: options.intervalInMs,\n resumeFrom: options.resumeFrom,\n operationOptions: options\n });\n // This will initialize the poller's operation (the deletion of the key).\n await poller.poll();\n return poller;\n }\n\n /**\n * Requests that a backup of the specified key be downloaded to the client. All versions of the\n * key will be downloaded. This operation requires the keys/backup permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let backupContents = await client.backupKey(\"MyKey\");\n * ```\n * Backs up the specified key.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public backupKey(name: string, options: BackupKeyOptions = {}): Promise<Uint8Array | undefined> {\n return withTrace(`backupKey`, options, async (updatedOptions) => {\n const response = await this.client.backupKey(this.vaultUrl, name, updatedOptions);\n return response.value;\n });\n }\n\n /**\n * Restores a backed up key, and all its versions, to a vault. This operation requires the\n * keys/restore permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let backupContents = await client.backupKey(\"MyKey\");\n * // ...\n * let key = await client.restoreKeyBackup(backupContents);\n * ```\n * Restores a backed up key to a vault.\n * @param backup - The backup blob associated with a key bundle.\n * @param options - The optional parameters.\n */\n public async restoreKeyBackup(\n backup: Uint8Array,\n options: RestoreKeyBackupOptions = {}\n ): Promise<KeyVaultKey> {\n return withTrace(`restoreKeyBackup`, options, async (updatedOptions) => {\n const response = await this.client.restoreKey(this.vaultUrl, backup, updatedOptions);\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * Gets the requested number of bytes containing random values from a managed HSM.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * let { bytes } = await client.getRandomBytes(10);\n * ```\n * @param count - The number of bytes to generate between 1 and 128 inclusive.\n * @param options - The optional parameters.\n */\n public getRandomBytes(count: number, options: GetRandomBytesOptions = {}): Promise<RandomBytes> {\n return withTrace(\"getRandomBytes\", options, async (updatedOptions) => {\n const response = await this.client.getRandomBytes(this.vaultUrl, count, updatedOptions);\n return { bytes: response.value! };\n });\n }\n\n /**\n * Rotates the key based on the key policy by generating a new version of the key. This operation requires the keys/rotate permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * let key = await client.rotateKey(\"MyKey\");\n * ```\n *\n * @param name - The name of the key to rotate.\n * @param options - The optional parameters.\n */\n public rotateKey(name: string, options: RotateKeyOptions = {}): Promise<KeyVaultKey> {\n return withTrace(\"rotateKey\", options, async (updatedOptions) => {\n const key = await this.client.rotateKey(this.vaultUrl, name, updatedOptions);\n return getKeyFromKeyBundle(key);\n });\n }\n\n /**\n * Releases a key from a managed HSM.\n *\n * The release key operation is applicable to all key types. The operation requires the key to be marked exportable and the keys/release permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * let result = await client.releaseKey(\"myKey\", target)\n * ```\n *\n * @param name - The name of the key.\n * @param target - The attestation assertion for the target of the key release.\n * @param options - The optional parameters.\n */\n public releaseKey(\n name: string,\n target: string,\n options: ReleaseKeyOptions = {}\n ): Promise<ReleaseKeyResult> {\n return withTrace(\"releaseKey\", options, async (updatedOptions) => {\n const { nonce, algorithm, ...rest } = updatedOptions;\n const result = await this.client.release(\n this.vaultUrl,\n name,\n options?.version || \"\",\n target,\n {\n enc: algorithm,\n nonce,\n ...rest\n }\n );\n\n return { value: result.value! };\n });\n }\n\n /**\n * Gets the rotation policy of a Key Vault Key.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * await client.updateKeyRotationPolicy(\"MyKey\", myPolicy);\n * let result = await client.getKeyRotationPolicy(\"myKey\");\n * ```\n *\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public getKeyRotationPolicy(\n name: string,\n options: GetKeyRotationPolicyOptions = {}\n ): Promise<KeyRotationPolicy> {\n return withTrace(\"getKeyRotationPolicy\", options, async () => {\n const policy = await this.client.getKeyRotationPolicy(this.vaultUrl, name);\n return keyRotationTransformations.generatedToPublic(policy);\n });\n }\n\n /**\n * Updates the rotation policy of a Key Vault Key.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * const setPolicy = await client.updateKeyRotationPolicy(\"MyKey\", myPolicy);\n * ```\n *\n * @param name - The name of the key.\n * @param policyProperties - The {@link KeyRotationPolicyProperties} for the policy.\n * @param options - The optional parameters.\n */\n public updateKeyRotationPolicy(\n name: string,\n policy: KeyRotationPolicyProperties,\n options: UpdateKeyRotationPolicyOptions = {}\n ): Promise<KeyRotationPolicy> {\n return withTrace(\"updateKeyRotationPolicy\", options, async (updatedOptions) => {\n const result = await this.client.updateKeyRotationPolicy(\n this.vaultUrl,\n name,\n keyRotationTransformations.propertiesToGenerated(policy),\n updatedOptions\n );\n return keyRotationTransformations.generatedToPublic(result);\n });\n }\n\n /**\n * @internal\n * @hidden\n * Deals with the pagination of {@link listPropertiesOfKeyVersions}.\n * @param name - The name of the Key Vault Key.\n * @param continuationState - An object that indicates the position of the paginated request.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listPropertiesOfKeyVersionsPage(\n name: string,\n continuationState: PageSettings,\n options?: ListPropertiesOfKeyVersionsOptions\n ): AsyncIterableIterator<KeyProperties[]> {\n if (continuationState.continuationToken == null) {\n const optionsComplete: KeyVaultClientGetKeysOptionalParams = {\n maxresults: continuationState.maxPageSize,\n ...options\n };\n const currentSetResponse = await withTrace(\n \"listPropertiesOfKeyVersionsPage\",\n optionsComplete,\n async (updatedOptions) => this.client.getKeyVersions(this.vaultUrl, name, updatedOptions)\n );\n\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this);\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = await withTrace(\n \"listPropertiesOfKeyVersionsPage\",\n options || {},\n async (updatedOptions) =>\n this.client.getKeyVersions(continuationState.continuationToken!, name, updatedOptions)\n );\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this);\n } else {\n break;\n }\n }\n }\n\n /**\n * @internal\n * @hidden\n * Deals with the iteration of all the available results of {@link listPropertiesOfKeyVersions}.\n * @param name - The name of the Key Vault Key.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listPropertiesOfKeyVersionsAll(\n name: string,\n options?: ListPropertiesOfKeyVersionsOptions\n ): AsyncIterableIterator<KeyProperties> {\n const f = {};\n\n for await (const page of this.listPropertiesOfKeyVersionsPage(name, f, options)) {\n for (const item of page) {\n yield item;\n }\n }\n }\n\n /**\n * Iterates all versions of the given key in the vault. The full key identifier, properties, and tags are provided\n * in the response. This operation requires the keys/list permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * for await (const keyProperties of client.listPropertiesOfKeyVersions(\"MyKey\")) {\n * const key = await client.getKey(keyProperties.name);\n * console.log(\"key version: \", key);\n * }\n * ```\n * @param name - Name of the key to fetch versions for\n * @param options - The optional parameters.\n */\n public listPropertiesOfKeyVersions(\n name: string,\n options: ListPropertiesOfKeyVersionsOptions = {}\n ): PagedAsyncIterableIterator<KeyProperties> {\n const iter = this.listPropertiesOfKeyVersionsAll(name, options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) =>\n this.listPropertiesOfKeyVersionsPage(name, settings, options)\n };\n }\n\n /**\n * @internal\n * @hidden\n * Deals with the pagination of {@link listPropertiesOfKeys}.\n * @param continuationState - An object that indicates the position of the paginated request.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listPropertiesOfKeysPage(\n continuationState: PageSettings,\n options?: ListPropertiesOfKeysOptions\n ): AsyncIterableIterator<KeyProperties[]> {\n if (continuationState.continuationToken == null) {\n const optionsComplete: KeyVaultClientGetKeysOptionalParams = {\n maxresults: continuationState.maxPageSize,\n ...options\n };\n const currentSetResponse = await withTrace(\n \"listPropertiesOfKeysPage\",\n optionsComplete,\n async (updatedOptions) => this.client.getKeys(this.vaultUrl, updatedOptions)\n );\n\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this);\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = await withTrace(\n \"KeysClient.listPropertiesOfKeysPage\",\n options || {},\n async (updatedOptions) =>\n this.client.getKeys(continuationState.continuationToken!, updatedOptions)\n );\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this);\n } else {\n break;\n }\n }\n }\n\n /**\n * @internal\n * @hidden\n * Deals with the iteration of all the available results of {@link listPropertiesOfKeys}.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listPropertiesOfKeysAll(\n options?: ListPropertiesOfKeysOptions\n ): AsyncIterableIterator<KeyProperties> {\n const f = {};\n\n for await (const page of this.listPropertiesOfKeysPage(f, options)) {\n for (const item of page) {\n yield item;\n }\n }\n }\n\n /**\n * Iterates the latest version of all keys in the vault. The full key identifier and properties are provided\n * in the response. No values are returned for the keys. This operations requires the keys/list permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * for await (const keyProperties of client.listPropertiesOfKeys()) {\n * const key = await client.getKey(keyProperties.name);\n * console.log(\"key: \", key);\n * }\n * ```\n * List all keys in the vault\n * @param options - The optional parameters.\n */\n public listPropertiesOfKeys(\n options: ListPropertiesOfKeysOptions = {}\n ): PagedAsyncIterableIterator<KeyProperties> {\n const iter = this.listPropertiesOfKeysAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => this.listPropertiesOfKeysPage(settings, options)\n };\n }\n\n /**\n * @internal\n * @hidden\n * Deals with the pagination of {@link listDeletedKeys}.\n * @param continuationState - An object that indicates the position of the paginated request.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listDeletedKeysPage(\n continuationState: PageSettings,\n options?: ListDeletedKeysOptions\n ): AsyncIterableIterator<DeletedKey[]> {\n if (continuationState.continuationToken == null) {\n const optionsComplete: KeyVaultClientGetKeysOptionalParams = {\n maxresults: continuationState.maxPageSize,\n ...options\n };\n const currentSetResponse = await withTrace(\n \"listDeletedKeysPage\",\n optionsComplete,\n async (updatedOptions) => this.client.getDeletedKeys(this.vaultUrl, updatedOptions)\n );\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getDeletedKeyFromDeletedKeyItem, this);\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = await withTrace(\n \"listDeletedKeysPage\",\n options || {},\n async (updatedOptions) =>\n this.client.getDeletedKeys(continuationState.continuationToken!, updatedOptions)\n );\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getDeletedKeyFromDeletedKeyItem, this);\n } else {\n break;\n }\n }\n }\n\n /**\n * @internal\n * @hidden\n * Deals with the iteration of all the available results of {@link listDeletedKeys}.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listDeletedKeysAll(\n options?: ListDeletedKeysOptions\n ): AsyncIterableIterator<DeletedKey> {\n const f = {};\n\n for await (const page of this.listDeletedKeysPage(f, options)) {\n for (const item of page) {\n yield item;\n }\n }\n }\n\n /**\n * Iterates the deleted keys in the vault. The full key identifier and properties are provided\n * in the response. No values are returned for the keys. This operations requires the keys/list permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * for await (const deletedKey of client.listDeletedKeys()) {\n * console.log(\"deleted key: \", deletedKey);\n * }\n * ```\n * List all keys in the vault\n * @param options - The optional parameters.\n */\n public listDeletedKeys(\n options: ListDeletedKeysOptions = {}\n ): PagedAsyncIterableIterator<DeletedKey> {\n const iter = this.listDeletedKeysAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => this.listDeletedKeysPage(settings, options)\n };\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,kDAAkD;AAClD,4CAA4C;;AAE5C,OAAO,EAGL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,oBAAoB,CAAC;AAI5B,OAAO,EAEL,0BAA0B,EAE1B,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,kCAAkC,EAAE,MAAM,2BAA2B,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAYL,kBAAkB,EAGlB,aAAa,EACb,iCAAiC,EAajC,kBAAkB,GAenB,MAAM,cAAc,CAAC;A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,EACrB,OAAO,IAAI,EAAE,EACb,KAAK,EAAE,cAAc,EAAE,EAAE,CACvB,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,iBAAiB,CAAC,iBAAkB,EAAE,cAAc,CAAC,CACnF,CAAA,CAAC;gBACF,iBAAiB,CAAC,iBAAiB,GAAG,kBAAkB,CAAC,QAAQ,CAAC;gBAClE,IAAI,kBAAkB,CAAC,KAAK,EAAE;oBAC5B,oBAAM,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,+BAA+B,EAAE,IAAI,CAAC,CAAA,CAAC;iBAC3E;qBAAM;oBACL,MAAM;iBACP;aACF;QACH,CAAC;KAAA;IAED;;;OAGG;IACY,kBAAkB,CAC/B,OAAgC;;;YAEhC,MAAM,CAAC,GAAG,EAAE,CAAC;;gBAEb,KAAyB,IAAA,KAAA,cAAA,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA,IAAA;oBAAlD,MAAM,IAAI,WAAA,CAAA;oBACnB,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;wBACvB,oBAAM,IAAI,CAAA,CAAC;qBACZ;iBACF;;;;;;;;;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;OAaG;IACI,eAAe,CACpB,UAAkC,EAAE;QAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAE9C,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,WAAyB,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC;SACrF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/* eslint @typescript-eslint/member-ordering: 0 */\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n PipelineOptions,\n TokenCredential,\n createPipelineFromOptions,\n isTokenCredential,\n signingPolicy,\n} from \"@azure/core-http\";\n\nimport { logger } from \"./log\";\n\nimport \"@azure/core-paging\";\nimport { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { PollerLike, PollOperationState } from \"@azure/core-lro\";\n\nimport {\n DeletionRecoveryLevel,\n KnownDeletionRecoveryLevel,\n GetKeysOptionalParams,\n KnownJsonWebKeyType,\n} from \"./generated/models\";\nimport { KeyVaultClient } from \"./generated/keyVaultClient\";\nimport { SDK_VERSION } from \"./constants\";\nimport { challengeBasedAuthenticationPolicy } from \"../../keyvault-common/src\";\n\nimport { DeleteKeyPoller } from \"./lro/delete/poller\";\nimport { RecoverDeletedKeyPoller } from \"./lro/recover/poller\";\n\nimport {\n BackupKeyOptions,\n CreateEcKeyOptions,\n CreateKeyOptions,\n CreateRsaKeyOptions,\n CryptographyOptions,\n DeletedKey,\n GetDeletedKeyOptions,\n GetKeyOptions,\n ImportKeyOptions,\n JsonWebKey,\n KeyOperation,\n KnownKeyOperations,\n KeyPollerOptions,\n KeyType,\n KnownKeyTypes,\n KnownKeyExportEncryptionAlgorithm,\n BeginDeleteKeyOptions,\n BeginRecoverDeletedKeyOptions,\n KeyProperties,\n KeyVaultKey,\n ListPropertiesOfKeysOptions,\n ListPropertiesOfKeyVersionsOptions,\n ListDeletedKeysOptions,\n PurgeDeletedKeyOptions,\n RestoreKeyBackupOptions,\n UpdateKeyPropertiesOptions,\n KeyClientOptions,\n CryptographyClientOptions,\n LATEST_API_VERSION,\n CreateOctKeyOptions,\n GetRandomBytesOptions,\n ReleaseKeyOptions,\n ReleaseKeyResult,\n KeyReleasePolicy,\n KeyExportEncryptionAlgorithm,\n GetCryptographyClientOptions,\n RotateKeyOptions,\n UpdateKeyRotationPolicyOptions,\n GetKeyRotationPolicyOptions,\n KeyRotationLifetimeAction,\n KeyRotationPolicy,\n KeyRotationPolicyProperties,\n KeyRotationPolicyAction,\n} from \"./keysModels\";\n\nimport { CryptographyClient } from \"./cryptographyClient\";\n\nimport {\n DecryptResult,\n KeyCurveName,\n KnownKeyCurveNames,\n EncryptionAlgorithm,\n KnownEncryptionAlgorithms,\n SignatureAlgorithm,\n KnownSignatureAlgorithms,\n KeyWrapAlgorithm,\n SignResult,\n UnwrapResult,\n VerifyResult,\n WrapResult,\n EncryptResult,\n DecryptOptions,\n EncryptOptions,\n SignOptions,\n UnwrapKeyOptions,\n VerifyOptions,\n WrapKeyOptions,\n EncryptParameters,\n DecryptParameters,\n RsaEncryptionAlgorithm,\n RsaEncryptParameters,\n AesGcmEncryptionAlgorithm,\n AesCbcEncryptionAlgorithm,\n AesCbcEncryptParameters,\n AesGcmEncryptParameters,\n AesCbcDecryptParameters,\n AesGcmDecryptParameters,\n RsaDecryptParameters,\n VerifyDataOptions,\n} from \"./cryptographyClientModels\";\n\nimport { KeyVaultKeyIdentifier, parseKeyVaultKeyIdentifier } from \"./identifier\";\nimport {\n getDeletedKeyFromDeletedKeyItem,\n getKeyFromKeyBundle,\n getKeyPropertiesFromKeyItem,\n keyRotationTransformations,\n} from \"./transformations\";\nimport { createTraceFunction } from \"../../keyvault-common/src\";\n\nexport {\n CryptographyClientOptions,\n KeyClientOptions,\n BackupKeyOptions,\n CreateEcKeyOptions,\n CreateKeyOptions,\n CreateRsaKeyOptions,\n CreateOctKeyOptions,\n CryptographyClient,\n CryptographyOptions,\n RsaEncryptionAlgorithm,\n RsaDecryptParameters,\n AesGcmEncryptionAlgorithm,\n AesGcmDecryptParameters,\n AesCbcEncryptionAlgorithm,\n AesCbcDecryptParameters,\n DecryptParameters,\n DecryptOptions,\n DecryptResult,\n DeletedKey,\n DeletionRecoveryLevel,\n KnownDeletionRecoveryLevel,\n RsaEncryptParameters,\n AesGcmEncryptParameters,\n AesCbcEncryptParameters,\n EncryptParameters,\n EncryptOptions,\n EncryptResult,\n GetDeletedKeyOptions,\n GetKeyOptions,\n GetRandomBytesOptions,\n ImportKeyOptions,\n JsonWebKey,\n KeyCurveName,\n KnownKeyCurveNames,\n KnownKeyExportEncryptionAlgorithm,\n EncryptionAlgorithm,\n KnownEncryptionAlgorithms,\n KeyOperation,\n KnownKeyOperations,\n KeyType,\n KnownKeyTypes,\n KeyPollerOptions,\n BeginDeleteKeyOptions,\n BeginRecoverDeletedKeyOptions,\n KeyProperties,\n SignatureAlgorithm,\n KnownSignatureAlgorithms,\n KeyVaultKey,\n KeyWrapAlgorithm,\n ListPropertiesOfKeysOptions,\n ListPropertiesOfKeyVersionsOptions,\n ListDeletedKeysOptions,\n PageSettings,\n PagedAsyncIterableIterator,\n KeyVaultKeyIdentifier,\n parseKeyVaultKeyIdentifier,\n PipelineOptions,\n PollOperationState,\n PollerLike,\n PurgeDeletedKeyOptions,\n RestoreKeyBackupOptions,\n RotateKeyOptions,\n SignOptions,\n SignResult,\n UnwrapKeyOptions,\n UnwrapResult,\n UpdateKeyPropertiesOptions,\n VerifyOptions,\n VerifyDataOptions,\n VerifyResult,\n WrapKeyOptions,\n WrapResult,\n ReleaseKeyOptions,\n ReleaseKeyResult,\n KeyReleasePolicy,\n KeyExportEncryptionAlgorithm,\n GetCryptographyClientOptions,\n KeyRotationPolicyAction,\n KeyRotationPolicyProperties,\n KeyRotationPolicy,\n KeyRotationLifetimeAction,\n UpdateKeyRotationPolicyOptions,\n GetKeyRotationPolicyOptions,\n logger,\n};\n\nconst withTrace = createTraceFunction(\"Azure.KeyVault.Keys.KeyClient\");\n\n/**\n * The KeyClient provides methods to manage {@link KeyVaultKey} in the\n * Azure Key Vault. The client supports creating, retrieving, updating,\n * deleting, purging, backing up, restoring and listing KeyVaultKeys. The\n * client also supports listing {@link DeletedKey} for a soft-delete enabled Azure Key\n * Vault.\n */\nexport class KeyClient {\n /**\n * The base URL to the vault\n */\n public readonly vaultUrl: string;\n\n /**\n * A reference to the auto-generated Key Vault HTTP client.\n */\n private readonly client: KeyVaultClient;\n\n /**\n * A reference to the credential that was used to construct this client.\n * Later used to instantiate a {@link CryptographyClient} with the same credential.\n */\n private readonly credential: TokenCredential;\n\n /**\n * Creates an instance of KeyClient.\n *\n * Example usage:\n * ```ts\n * import { KeyClient } from \"@azure/keyvault-keys\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * let vaultUrl = `https://<MY KEYVAULT HERE>.vault.azure.net`;\n * let credentials = new DefaultAzureCredential();\n *\n * let client = new KeyClient(vaultUrl, credentials);\n * ```\n * @param vaultUrl - the URL of the Key Vault. It should have this shape: `https://${your-key-vault-name}.vault.azure.net`\n * @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param pipelineOptions - Pipeline options used to configure Key Vault API requests. Omit this parameter to use the default pipeline configuration.\n */\n constructor(\n vaultUrl: string,\n credential: TokenCredential,\n pipelineOptions: KeyClientOptions = {}\n ) {\n this.vaultUrl = vaultUrl;\n\n const libInfo = `azsdk-js-keyvault-keys/${SDK_VERSION}`;\n\n const userAgentOptions = pipelineOptions.userAgentOptions;\n\n pipelineOptions.userAgentOptions = {\n userAgentPrefix:\n userAgentOptions && userAgentOptions.userAgentPrefix\n ? `${userAgentOptions.userAgentPrefix} ${libInfo}`\n : libInfo,\n };\n\n const authPolicy = isTokenCredential(credential)\n ? challengeBasedAuthenticationPolicy(credential)\n : signingPolicy(credential);\n\n const internalPipelineOptions = {\n ...pipelineOptions,\n loggingOptions: {\n logger: logger.info,\n allowedHeaderNames: [\n \"x-ms-keyvault-region\",\n \"x-ms-keyvault-network-info\",\n \"x-ms-keyvault-service-version\",\n ],\n },\n };\n\n this.credential = credential;\n this.client = new KeyVaultClient(\n pipelineOptions.serviceVersion || LATEST_API_VERSION,\n createPipelineFromOptions(internalPipelineOptions, authPolicy)\n );\n }\n\n /**\n * The create key operation can be used to create any key type in Azure Key Vault. If the named key\n * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create\n * permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * // Create an elliptic-curve key:\n * let result = await client.createKey(\"MyKey\", \"EC\");\n * ```\n * Creates a new key, stores it, then returns key parameters and properties to the client.\n * @param name - The name of the key.\n * @param keyType - The type of the key. One of the following: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct'.\n * @param options - The optional parameters.\n */\n public createKey(\n name: string,\n keyType: KeyType,\n options?: CreateKeyOptions\n ): Promise<KeyVaultKey> {\n let unflattenedOptions = {};\n\n if (options) {\n const { enabled, notBefore, expiresOn: expires, exportable, ...remainingOptions } = options;\n unflattenedOptions = {\n ...remainingOptions,\n keyAttributes: {\n enabled,\n notBefore,\n expires,\n exportable,\n },\n };\n }\n return withTrace(\"createKey\", unflattenedOptions, async (updatedOptions) => {\n const response = await this.client.createKey(this.vaultUrl, name, keyType, updatedOptions);\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * The createEcKey method creates a new elliptic curve key in Azure Key Vault. If the named key\n * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create\n * permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let result = await client.createEcKey(\"MyKey\", { curve: \"P-256\" });\n * ```\n * Creates a new key, stores it, then returns key parameters and properties to the client.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public async createEcKey(name: string, options?: CreateEcKeyOptions): Promise<KeyVaultKey> {\n const keyType = options?.hsm ? KnownJsonWebKeyType.ECHSM : KnownJsonWebKeyType.EC;\n return this.createKey(name, keyType, options);\n }\n\n /**\n * The createRSAKey method creates a new RSA key in Azure Key Vault. If the named key\n * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create\n * permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let result = await client.createRsaKey(\"MyKey\", { keySize: 2048 });\n * ```\n * Creates a new key, stores it, then returns key parameters and properties to the client.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public async createRsaKey(name: string, options?: CreateRsaKeyOptions): Promise<KeyVaultKey> {\n const keyType = options?.hsm ? KnownJsonWebKeyType.RSAHSM : KnownJsonWebKeyType.RSA;\n return this.createKey(name, keyType, options);\n }\n\n /**\n * The createOctKey method creates a new OCT key in Azure Key Vault. If the named key\n * already exists, Azure Key Vault creates a new version of the key. It requires the keys/create\n * permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let result = await client.createOctKey(\"MyKey\", { hsm: true });\n * ```\n * Creates a new key, stores it, then returns key parameters and properties to the client.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public async createOctKey(name: string, options?: CreateOctKeyOptions): Promise<KeyVaultKey> {\n const keyType = options?.hsm ? KnownJsonWebKeyType.OctHSM : KnownJsonWebKeyType.Oct;\n return this.createKey(name, keyType, options);\n }\n\n /**\n * The import key operation may be used to import any key type into an Azure Key Vault. If the\n * named key already exists, Azure Key Vault creates a new version of the key. This operation\n * requires the keys/import permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * // Key contents in myKeyContents\n * let result = await client.importKey(\"MyKey\", myKeyContents);\n * ```\n * Imports an externally created key, stores it, and returns key parameters and properties\n * to the client.\n * @param name - Name for the imported key.\n * @param key - The JSON web key.\n * @param options - The optional parameters.\n */\n public importKey(\n name: string,\n key: JsonWebKey,\n options?: ImportKeyOptions\n ): Promise<KeyVaultKey> {\n let unflattenedOptions = {};\n\n if (options) {\n const {\n enabled,\n notBefore,\n exportable,\n expiresOn: expires,\n hardwareProtected: hsm,\n ...remainingOptions\n } = options;\n unflattenedOptions = {\n ...remainingOptions,\n keyAttributes: {\n enabled,\n notBefore,\n expires,\n hsm,\n exportable,\n },\n };\n }\n\n return withTrace(`importKey`, unflattenedOptions, async (updatedOptions) => {\n const response = await this.client.importKey(this.vaultUrl, name, key, updatedOptions);\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * Gets a {@link CryptographyClient} for the given key.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * // get a cryptography client for a given key\n * let cryptographyClient = client.getCryptographyClient(\"MyKey\");\n * ```\n * @param name - The name of the key used to perform cryptographic operations.\n * @param version - Optional version of the key used to perform cryptographic operations.\n * @returns - A {@link CryptographyClient} using the same options, credentials, and http client as this {@link KeyClient}\n */\n public getCryptographyClient(\n keyName: string,\n options?: GetCryptographyClientOptions\n ): CryptographyClient {\n const keyUrl = new URL(\n [\"keys\", keyName, options?.keyVersion].filter(Boolean).join(\"/\"),\n this.vaultUrl\n );\n\n // The goals of this method are discoverability and performance (by sharing a client and pipeline).\n // The existing cryptography client does not accept a pipeline as an argument, nor does it expose it.\n // In order to avoid publicly exposing the pipeline we will pass in the underlying client as an undocumented\n // property to the constructor so that crypto providers downstream can use it.\n const constructorOptions: CryptographyClientOptions & { generatedClient: KeyVaultClient } = {\n generatedClient: this.client,\n };\n const cryptoClient = new CryptographyClient(\n keyUrl.toString(),\n this.credential,\n constructorOptions\n );\n return cryptoClient;\n }\n\n /**\n * The delete operation applies to any key stored in Azure Key Vault. Individual versions\n * of a key can not be deleted, only all versions of a given key at once.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the key is deleted.\n *\n * This operation requires the keys/delete permission.\n *\n * Example usage:\n * ```ts\n * const client = new KeyClient(url, credentials);\n * await client.createKey(\"MyKey\", \"EC\");\n * const poller = await client.beginDeleteKey(\"MyKey\");\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n * // A new poller can be created with:\n * // await client.beginDeleteKey(\"MyKey\", { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const deletedKey = await poller.pollUntilDone();\n * console.log(deletedKey);\n * ```\n * Deletes a key from a specified key vault.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public async beginDeleteKey(\n name: string,\n options: BeginDeleteKeyOptions = {}\n ): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>> {\n const poller = new DeleteKeyPoller({\n name,\n vaultUrl: this.vaultUrl,\n client: this.client,\n intervalInMs: options.intervalInMs,\n resumeFrom: options.resumeFrom,\n operationOptions: options,\n });\n\n // This will initialize the poller's operation (the deletion of the key).\n await poller.poll();\n\n return poller;\n }\n\n /**\n * The updateKeyProperties method changes specified properties of an existing stored key. Properties that\n * are not specified in the request are left unchanged. The value of a key itself cannot be\n * changed. This operation requires the keys/set permission.\n *\n * Example usage:\n * ```ts\n * let keyName = \"MyKey\";\n * let client = new KeyClient(vaultUrl, credentials);\n * let key = await client.getKey(keyName);\n * let result = await client.updateKeyProperties(keyName, key.properties.version, { enabled: false });\n * ```\n * Updates the properties associated with a specified key in a given key vault.\n * @param name - The name of the key.\n * @param keyVersion - The version of the key.\n * @param options - The optional parameters.\n */\n public updateKeyProperties(\n name: string,\n keyVersion: string,\n options?: UpdateKeyPropertiesOptions\n ): Promise<KeyVaultKey>;\n /**\n * The updateKeyProperties method changes specified properties of the latest version of an existing stored key. Properties that\n * are not specified in the request are left unchanged. The value of a key itself cannot be\n * changed. This operation requires the keys/set permission.\n *\n * Example usage:\n * ```ts\n * let keyName = \"MyKey\";\n * let client = new KeyClient(vaultUrl, credentials);\n * let key = await client.getKey(keyName);\n * let result = await client.updateKeyProperties(keyName, { enabled: false });\n * ```\n * Updates the properties associated with a specified key in a given key vault.\n * @param name - The name of the key.\n * @param keyVersion - The version of the key.\n * @param options - The optional parameters.\n */\n public updateKeyProperties(\n name: string,\n options?: UpdateKeyPropertiesOptions\n ): Promise<KeyVaultKey>;\n public updateKeyProperties(\n ...args: [string, string, UpdateKeyPropertiesOptions?] | [string, UpdateKeyPropertiesOptions?]\n ): Promise<KeyVaultKey> {\n const [name, keyVersion, options] = this.disambiguateUpdateKeyPropertiesArgs(args);\n return withTrace(`updateKeyProperties`, options, async (updatedOptions) => {\n const { enabled, notBefore, expiresOn: expires, ...remainingOptions } = updatedOptions;\n const unflattenedOptions = {\n ...remainingOptions,\n keyAttributes: {\n enabled,\n notBefore,\n expires,\n },\n };\n const response = await this.client.updateKey(\n this.vaultUrl,\n name,\n keyVersion,\n unflattenedOptions\n );\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * Standardizes an overloaded arguments collection for the updateKeyProperties method.\n *\n * @param args - The arguments collection.\n * @returns - The standardized arguments collection.\n */\n private disambiguateUpdateKeyPropertiesArgs(\n args: [string, string, UpdateKeyPropertiesOptions?] | [string, UpdateKeyPropertiesOptions?]\n ): [string, string, UpdateKeyPropertiesOptions] {\n if (typeof args[1] === \"string\") {\n // [name, keyVersion, options?] => [name, keyVersion, options || {}]\n return [args[0], args[1], args[2] || {}];\n } else {\n // [name, options?] => [name , \"\", options || {}]\n return [args[0], \"\", args[1] || {}];\n }\n }\n\n /**\n * The getKey method gets a specified key and is applicable to any key stored in Azure Key Vault.\n * This operation requires the keys/get permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let key = await client.getKey(\"MyKey\");\n * ```\n * Get a specified key from a given key vault.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public getKey(name: string, options: GetKeyOptions = {}): Promise<KeyVaultKey> {\n return withTrace(`getKey`, options, async (updatedOptions) => {\n const response = await this.client.getKey(\n this.vaultUrl,\n name,\n options && options.version ? options.version : \"\",\n updatedOptions\n );\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * The getDeletedKey method returns the specified deleted key along with its properties.\n * This operation requires the keys/get permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let key = await client.getDeletedKey(\"MyDeletedKey\");\n * ```\n * Gets the specified deleted key.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public getDeletedKey(name: string, options: GetDeletedKeyOptions = {}): Promise<DeletedKey> {\n return withTrace(`getDeletedKey`, options, async (updatedOptions) => {\n const response = await this.client.getDeletedKey(this.vaultUrl, name, updatedOptions);\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * The purge deleted key operation removes the key permanently, without the possibility of\n * recovery. This operation can only be enabled on a soft-delete enabled vault. This operation\n * requires the keys/purge permission.\n *\n * Example usage:\n * ```ts\n * const client = new KeyClient(url, credentials);\n * const deletePoller = await client.beginDeleteKey(\"MyKey\")\n * await deletePoller.pollUntilDone();\n * await client.purgeDeletedKey(\"MyKey\");\n * ```\n * Permanently deletes the specified key.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public purgeDeletedKey(name: string, options: PurgeDeletedKeyOptions = {}): Promise<void> {\n return withTrace(`purgeDeletedKey`, options, async (updatedOptions) => {\n await this.client.purgeDeletedKey(this.vaultUrl, name, updatedOptions);\n });\n }\n\n /**\n * Recovers the deleted key in the specified vault. This operation can only be performed on a\n * soft-delete enabled vault.\n *\n * This function returns a Long Running Operation poller that allows you to wait indefinitely until the deleted key is recovered.\n *\n * This operation requires the keys/recover permission.\n *\n * Example usage:\n * ```ts\n * const client = new KeyClient(url, credentials);\n * await client.createKey(\"MyKey\", \"EC\");\n * const deletePoller = await client.beginDeleteKey(\"MyKey\");\n * await deletePoller.pollUntilDone();\n * const poller = await client.beginRecoverDeletedKey(\"MyKey\");\n *\n * // Serializing the poller\n * const serialized = poller.toString();\n * // A new poller can be created with:\n * // await client.beginRecoverDeletedKey(\"MyKey\", { resumeFrom: serialized });\n *\n * // Waiting until it's done\n * const key = await poller.pollUntilDone();\n * console.log(key);\n * ```\n * Recovers the deleted key to the latest version.\n * @param name - The name of the deleted key.\n * @param options - The optional parameters.\n */\n public async beginRecoverDeletedKey(\n name: string,\n options: BeginRecoverDeletedKeyOptions = {}\n ): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>> {\n const poller = new RecoverDeletedKeyPoller({\n name,\n vaultUrl: this.vaultUrl,\n client: this.client,\n intervalInMs: options.intervalInMs,\n resumeFrom: options.resumeFrom,\n operationOptions: options,\n });\n // This will initialize the poller's operation (the deletion of the key).\n await poller.poll();\n return poller;\n }\n\n /**\n * Requests that a backup of the specified key be downloaded to the client. All versions of the\n * key will be downloaded. This operation requires the keys/backup permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let backupContents = await client.backupKey(\"MyKey\");\n * ```\n * Backs up the specified key.\n * @param name - The name of the key.\n * @param options - The optional parameters.\n */\n public backupKey(name: string, options: BackupKeyOptions = {}): Promise<Uint8Array | undefined> {\n return withTrace(`backupKey`, options, async (updatedOptions) => {\n const response = await this.client.backupKey(this.vaultUrl, name, updatedOptions);\n return response.value;\n });\n }\n\n /**\n * Restores a backed up key, and all its versions, to a vault. This operation requires the\n * keys/restore permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * let backupContents = await client.backupKey(\"MyKey\");\n * // ...\n * let key = await client.restoreKeyBackup(backupContents);\n * ```\n * Restores a backed up key to a vault.\n * @param backup - The backup blob associated with a key bundle.\n * @param options - The optional parameters.\n */\n public async restoreKeyBackup(\n backup: Uint8Array,\n options: RestoreKeyBackupOptions = {}\n ): Promise<KeyVaultKey> {\n return withTrace(`restoreKeyBackup`, options, async (updatedOptions) => {\n const response = await this.client.restoreKey(this.vaultUrl, backup, updatedOptions);\n return getKeyFromKeyBundle(response);\n });\n }\n\n /**\n * Gets the requested number of bytes containing random values from a managed HSM.\n * This operation requires the managedHsm/rng permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * let { bytes } = await client.getRandomBytes(10);\n * ```\n * @param count - The number of bytes to generate between 1 and 128 inclusive.\n * @param options - The optional parameters.\n */\n public getRandomBytes(count: number, options: GetRandomBytesOptions = {}): Promise<Uint8Array> {\n return withTrace(\"getRandomBytes\", options, async (updatedOptions) => {\n const response = await this.client.getRandomBytes(this.vaultUrl, count, updatedOptions);\n return response.value!;\n });\n }\n\n /**\n * Rotates the key based on the key policy by generating a new version of the key. This operation requires the keys/rotate permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * let key = await client.rotateKey(\"MyKey\");\n * ```\n *\n * @param name - The name of the key to rotate.\n * @param options - The optional parameters.\n */\n public rotateKey(name: string, options: RotateKeyOptions = {}): Promise<KeyVaultKey> {\n return withTrace(\"rotateKey\", options, async (updatedOptions) => {\n const key = await this.client.rotateKey(this.vaultUrl, name, updatedOptions);\n return getKeyFromKeyBundle(key);\n });\n }\n\n /**\n * Releases a key from a managed HSM.\n *\n * The release key operation is applicable to all key types. The operation requires the key to be marked exportable and the keys/release permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * let result = await client.releaseKey(\"myKey\", target)\n * ```\n *\n * @param name - The name of the key.\n * @param targetAttestationToken - The attestation assertion for the target of the key release.\n * @param options - The optional parameters.\n */\n public releaseKey(\n name: string,\n targetAttestationToken: string,\n options: ReleaseKeyOptions = {}\n ): Promise<ReleaseKeyResult> {\n return withTrace(\"releaseKey\", options, async (updatedOptions) => {\n const { nonce, algorithm, ...rest } = updatedOptions;\n const result = await this.client.release(\n this.vaultUrl,\n name,\n options?.version || \"\",\n targetAttestationToken,\n {\n enc: algorithm,\n nonce,\n ...rest,\n }\n );\n\n return { value: result.value! };\n });\n }\n\n /**\n * Gets the rotation policy of a Key Vault Key.\n * By default, all keys have a policy that will notify 30 days before expiry.\n *\n * This operation requires the keys/get permission.\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * let result = await client.getKeyRotationPolicy(\"myKey\");\n * ```\n *\n * @param keyName - The name of the key.\n * @param options - The optional parameters.\n */\n public getKeyRotationPolicy(\n keyName: string,\n options: GetKeyRotationPolicyOptions = {}\n ): Promise<KeyRotationPolicy> {\n return withTrace(\"getKeyRotationPolicy\", options, async () => {\n const policy = await this.client.getKeyRotationPolicy(this.vaultUrl, keyName);\n return keyRotationTransformations.generatedToPublic(policy);\n });\n }\n\n /**\n * Updates the rotation policy of a Key Vault Key.\n * This operation requires the keys/update permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(vaultUrl, credentials);\n * const setPolicy = await client.updateKeyRotationPolicy(\"MyKey\", myPolicy);\n * ```\n *\n * @param keyName - The name of the key.\n * @param policyProperties - The {@link KeyRotationPolicyProperties} for the policy.\n * @param options - The optional parameters.\n */\n public updateKeyRotationPolicy(\n keyName: string,\n policy: KeyRotationPolicyProperties,\n options: UpdateKeyRotationPolicyOptions = {}\n ): Promise<KeyRotationPolicy> {\n return withTrace(\"updateKeyRotationPolicy\", options, async (updatedOptions) => {\n const result = await this.client.updateKeyRotationPolicy(\n this.vaultUrl,\n keyName,\n keyRotationTransformations.propertiesToGenerated(policy),\n updatedOptions\n );\n return keyRotationTransformations.generatedToPublic(result);\n });\n }\n\n /**\n * Deals with the pagination of {@link listPropertiesOfKeyVersions}.\n * @param name - The name of the Key Vault Key.\n * @param continuationState - An object that indicates the position of the paginated request.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listPropertiesOfKeyVersionsPage(\n name: string,\n continuationState: PageSettings,\n options?: ListPropertiesOfKeyVersionsOptions\n ): AsyncIterableIterator<KeyProperties[]> {\n if (continuationState.continuationToken == null) {\n const optionsComplete: GetKeysOptionalParams = {\n maxresults: continuationState.maxPageSize,\n ...options,\n };\n const currentSetResponse = await withTrace(\n \"listPropertiesOfKeyVersionsPage\",\n optionsComplete,\n async (updatedOptions) => this.client.getKeyVersions(this.vaultUrl, name, updatedOptions)\n );\n\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this);\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = await withTrace(\n \"listPropertiesOfKeyVersionsPage\",\n options || {},\n async (updatedOptions) =>\n this.client.getKeyVersions(continuationState.continuationToken!, name, updatedOptions)\n );\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this);\n } else {\n break;\n }\n }\n }\n\n /**\n * Deals with the iteration of all the available results of {@link listPropertiesOfKeyVersions}.\n * @param name - The name of the Key Vault Key.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listPropertiesOfKeyVersionsAll(\n name: string,\n options?: ListPropertiesOfKeyVersionsOptions\n ): AsyncIterableIterator<KeyProperties> {\n const f = {};\n\n for await (const page of this.listPropertiesOfKeyVersionsPage(name, f, options)) {\n for (const item of page) {\n yield item;\n }\n }\n }\n\n /**\n * Iterates all versions of the given key in the vault. The full key identifier, properties, and tags are provided\n * in the response. This operation requires the keys/list permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * for await (const keyProperties of client.listPropertiesOfKeyVersions(\"MyKey\")) {\n * const key = await client.getKey(keyProperties.name);\n * console.log(\"key version: \", key);\n * }\n * ```\n * @param name - Name of the key to fetch versions for\n * @param options - The optional parameters.\n */\n public listPropertiesOfKeyVersions(\n name: string,\n options: ListPropertiesOfKeyVersionsOptions = {}\n ): PagedAsyncIterableIterator<KeyProperties> {\n const iter = this.listPropertiesOfKeyVersionsAll(name, options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) =>\n this.listPropertiesOfKeyVersionsPage(name, settings, options),\n };\n }\n\n /**\n * Deals with the pagination of {@link listPropertiesOfKeys}.\n * @param continuationState - An object that indicates the position of the paginated request.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listPropertiesOfKeysPage(\n continuationState: PageSettings,\n options?: ListPropertiesOfKeysOptions\n ): AsyncIterableIterator<KeyProperties[]> {\n if (continuationState.continuationToken == null) {\n const optionsComplete: GetKeysOptionalParams = {\n maxresults: continuationState.maxPageSize,\n ...options,\n };\n const currentSetResponse = await withTrace(\n \"listPropertiesOfKeysPage\",\n optionsComplete,\n async (updatedOptions) => this.client.getKeys(this.vaultUrl, updatedOptions)\n );\n\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this);\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = await withTrace(\n \"KeysClient.listPropertiesOfKeysPage\",\n options || {},\n async (updatedOptions) =>\n this.client.getKeys(continuationState.continuationToken!, updatedOptions)\n );\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getKeyPropertiesFromKeyItem, this);\n } else {\n break;\n }\n }\n }\n\n /**\n * Deals with the iteration of all the available results of {@link listPropertiesOfKeys}.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listPropertiesOfKeysAll(\n options?: ListPropertiesOfKeysOptions\n ): AsyncIterableIterator<KeyProperties> {\n const f = {};\n\n for await (const page of this.listPropertiesOfKeysPage(f, options)) {\n for (const item of page) {\n yield item;\n }\n }\n }\n\n /**\n * Iterates the latest version of all keys in the vault. The full key identifier and properties are provided\n * in the response. No values are returned for the keys. This operations requires the keys/list permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * for await (const keyProperties of client.listPropertiesOfKeys()) {\n * const key = await client.getKey(keyProperties.name);\n * console.log(\"key: \", key);\n * }\n * ```\n * List all keys in the vault\n * @param options - The optional parameters.\n */\n public listPropertiesOfKeys(\n options: ListPropertiesOfKeysOptions = {}\n ): PagedAsyncIterableIterator<KeyProperties> {\n const iter = this.listPropertiesOfKeysAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => this.listPropertiesOfKeysPage(settings, options),\n };\n }\n\n /**\n * Deals with the pagination of {@link listDeletedKeys}.\n * @param continuationState - An object that indicates the position of the paginated request.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listDeletedKeysPage(\n continuationState: PageSettings,\n options?: ListDeletedKeysOptions\n ): AsyncIterableIterator<DeletedKey[]> {\n if (continuationState.continuationToken == null) {\n const optionsComplete: GetKeysOptionalParams = {\n maxresults: continuationState.maxPageSize,\n ...options,\n };\n const currentSetResponse = await withTrace(\n \"listDeletedKeysPage\",\n optionsComplete,\n async (updatedOptions) => this.client.getDeletedKeys(this.vaultUrl, updatedOptions)\n );\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getDeletedKeyFromDeletedKeyItem, this);\n }\n }\n while (continuationState.continuationToken) {\n const currentSetResponse = await withTrace(\n \"listDeletedKeysPage\",\n options || {},\n async (updatedOptions) =>\n this.client.getDeletedKeys(continuationState.continuationToken!, updatedOptions)\n );\n continuationState.continuationToken = currentSetResponse.nextLink;\n if (currentSetResponse.value) {\n yield currentSetResponse.value.map(getDeletedKeyFromDeletedKeyItem, this);\n } else {\n break;\n }\n }\n }\n\n /**\n * Deals with the iteration of all the available results of {@link listDeletedKeys}.\n * @param options - Common options for the iterative endpoints.\n */\n private async *listDeletedKeysAll(\n options?: ListDeletedKeysOptions\n ): AsyncIterableIterator<DeletedKey> {\n const f = {};\n\n for await (const page of this.listDeletedKeysPage(f, options)) {\n for (const item of page) {\n yield item;\n }\n }\n }\n\n /**\n * Iterates the deleted keys in the vault. The full key identifier and properties are provided\n * in the response. No values are returned for the keys. This operations requires the keys/list permission.\n *\n * Example usage:\n * ```ts\n * let client = new KeyClient(url, credentials);\n * for await (const deletedKey of client.listDeletedKeys()) {\n * console.log(\"deleted key: \", deletedKey);\n * }\n * ```\n * List all keys in the vault\n * @param options - The optional parameters.\n */\n public listDeletedKeys(\n options: ListDeletedKeysOptions = {}\n ): PagedAsyncIterableIterator<DeletedKey> {\n const iter = this.listDeletedKeysAll(options);\n\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => this.listDeletedKeysPage(settings, options),\n };\n }\n}\n"]}