@azure/keyvault-keys 4.4.0-beta.4 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0aH,4EAA4E;AAC5E,MAAM,CAAN,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IAClC,gCAAgC;IAChC,yDAA6B,CAAA;AAC/B,CAAC,EAHW,wBAAwB,KAAxB,wBAAwB,QAGnC;AAWD,uEAAuE;AACvE,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC7B,sBAAsB;IACtB,gCAAS,CAAA;IACT,oEAAoE;IACpE,uCAAgB,CAAA;IAChB,gDAAgD;IAChD,kCAAW,CAAA;IACX,yDAAyD;IACzD,yCAAkB,CAAA;IAClB,wDAAwD;IACxD,kCAAW,CAAA;IACX,iFAAiF;IACjF,yCAAkB,CAAA;AACpB,CAAC,EAbW,mBAAmB,KAAnB,mBAAmB,QAa9B;AAgBD,4EAA4E;AAC5E,MAAM,CAAN,IAAY,wBASX;AATD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,+CAAmB,CAAA;IACnB,yCAAa,CAAA;IACb,6CAAiB,CAAA;IACjB,+CAAmB,CAAA;IACnB,mDAAuB,CAAA;IACvB,6CAAiB,CAAA;IACjB,6CAAiB,CAAA;AACnB,CAAC,EATW,wBAAwB,KAAxB,wBAAwB,QASnC;AAkBD,8EAA8E;AAC9E,MAAM,CAAN,IAAY,0BAeX;AAfD,WAAY,0BAA0B;IACpC,gVAAgV;IAChV,qDAAuB,CAAA;IACvB,sXAAsX;IACtX,4EAA8C,CAAA;IAC9C,8VAA8V;IAC9V,yDAA2B,CAAA;IAC3B,0TAA0T;IAC1T,oGAAsE,CAAA;IACtE,mVAAmV;IACnV,gGAAkE,CAAA;IAClE,2TAA2T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AAC,EAvBW,iCAAiC,KAAjC,iCAAiC,QAuB5C;AAqBD,+EAA+E;AAC/E,MAAM,CAAN,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACrC,wEAAyC,CAAA;IACzC,wEAAyC,CAAA;IACzC,wEAAyC,CAAA;AAC3C,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,QAItC","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 * as coreHttp from \"@azure/core-http\";\n\n/** The key create parameters. */\nexport interface KeyCreateParameters {\n /** The type of key to create. For valid values, see JsonWebKeyType. */\n kty: JsonWebKeyType;\n /** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */\n keySize?: number;\n /** The public exponent for a RSA key. */\n publicExponent?: number;\n keyOps?: JsonWebKeyOperation[];\n /** The attributes of a key managed by the key vault service. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */\n curve?: JsonWebKeyCurveName;\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** The object attributes managed by the KeyVault service. */\nexport interface Attributes {\n /** Determines whether the object is enabled. */\n enabled?: boolean;\n /** Not before date in UTC. */\n notBefore?: Date;\n /** Expiry date in UTC. */\n expires?: Date;\n /**\n * Creation time in UTC.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly created?: Date;\n /**\n * Last updated time in UTC.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly updated?: Date;\n}\n\nexport interface KeyReleasePolicy {\n /** Content type and version of key release policy */\n contentType?: string;\n /** Defines the mutability state of the policy. Once marked immutable, this flag cannot be reset and the policy cannot be changed under any circumstances. */\n immutable?: boolean;\n /** Blob encoding the policy rules under which the key can be released. */\n encodedPolicy?: Uint8Array;\n}\n\n/** A KeyBundle consisting of a WebKey plus its attributes. */\nexport interface KeyBundle {\n /** The Json web key. */\n key?: JsonWebKey;\n /** The key management attributes. */\n attributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /**\n * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly managed?: boolean;\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 */\nexport interface JsonWebKey {\n /** Key identifier. */\n kid?: string;\n /** JsonWebKey Key Type (kty), as defined in https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. */\n kty?: JsonWebKeyType;\n keyOps?: string[];\n /** RSA modulus. */\n n?: Uint8Array;\n /** RSA public exponent. */\n e?: Uint8Array;\n /** RSA private exponent, or the D component of an EC private key. */\n d?: Uint8Array;\n /** RSA private key parameter. */\n dp?: Uint8Array;\n /** RSA private key parameter. */\n dq?: Uint8Array;\n /** RSA private key parameter. */\n qi?: Uint8Array;\n /** RSA secret prime. */\n p?: Uint8Array;\n /** RSA secret prime, with p < q. */\n q?: Uint8Array;\n /** Symmetric key. */\n k?: Uint8Array;\n /** Protected Key, used with 'Bring Your Own Key'. */\n t?: Uint8Array;\n /** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */\n crv?: JsonWebKeyCurveName;\n /** X component of an EC public key. */\n x?: Uint8Array;\n /** Y component of an EC public key. */\n y?: Uint8Array;\n}\n\n/** The key vault error exception. */\nexport interface KeyVaultError {\n /**\n * The key vault server error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly error?: ErrorModel;\n}\n\n/** The key vault server error. */\nexport interface ErrorModel {\n /**\n * The error code.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly code?: string;\n /**\n * The error message.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly message?: string;\n /**\n * The key vault server error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly innerError?: ErrorModel;\n}\n\n/** The key import parameters. */\nexport interface KeyImportParameters {\n /** Whether to import as a hardware key (HSM) or software key. */\n hsm?: boolean;\n /** The Json web key */\n key: JsonWebKey;\n /** The key management attributes. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** The key update parameters. */\nexport interface KeyUpdateParameters {\n /** Json web key operations. For more information on possible key operations, see JsonWebKeyOperation. */\n keyOps?: JsonWebKeyOperation[];\n /** The attributes of a key managed by the key vault service. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** The key list result. */\nexport interface KeyListResult {\n /**\n * A response message containing a list of keys in the key vault along with a link to the next page of keys.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: KeyItem[];\n /**\n * The URL to get the next set of keys.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly nextLink?: string;\n}\n\n/** The key item containing key metadata. */\nexport interface KeyItem {\n /** Key identifier. */\n kid?: string;\n /** The key management attributes. */\n attributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /**\n * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly managed?: boolean;\n}\n\n/** The backup key result, containing the backup blob. */\nexport interface BackupKeyResult {\n /**\n * The backup blob containing the backed up key.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: Uint8Array;\n}\n\n/** The key restore parameters. */\nexport interface KeyRestoreParameters {\n /** The backup blob associated with a key bundle. */\n keyBundleBackup: Uint8Array;\n}\n\n/** The key operations parameters. */\nexport interface KeyOperationsParameters {\n /** algorithm identifier */\n algorithm: JsonWebKeyEncryptionAlgorithm;\n value: Uint8Array;\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** The key operation result. */\nexport interface KeyOperationResult {\n /**\n * Key identifier\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly kid?: string;\n /** NOTE: This property will not be serialized. It can only be populated by the server. */\n readonly result?: Uint8Array;\n /** NOTE: This property will not be serialized. It can only be populated by the server. */\n readonly iv?: Uint8Array;\n /** NOTE: This property will not be serialized. It can only be populated by the server. */\n readonly authenticationTag?: Uint8Array;\n /** NOTE: This property will not be serialized. It can only be populated by the server. */\n readonly additionalAuthenticatedData?: Uint8Array;\n}\n\n/** The key operations parameters. */\nexport interface KeySignParameters {\n /** The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. */\n algorithm: JsonWebKeySignatureAlgorithm;\n value: Uint8Array;\n}\n\n/** The key verify parameters. */\nexport interface KeyVerifyParameters {\n /** The signing/verification algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. */\n algorithm: JsonWebKeySignatureAlgorithm;\n /** The digest used for signing. */\n digest: Uint8Array;\n /** The signature to be verified. */\n signature: Uint8Array;\n}\n\n/** The key verify result. */\nexport interface KeyVerifyResult {\n /**\n * True if the signature is verified, otherwise false.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: boolean;\n}\n\n/** The release key parameters. */\nexport interface KeyReleaseParameters {\n /** The attestation assertion for the target of the key release. */\n targetAttestationToken: string;\n /** A client provided nonce for freshness. */\n nonce?: string;\n /** The encryption algorithm to use to protected the exported key material */\n enc?: KeyEncryptionAlgorithm;\n}\n\n/** The release result, containing the released key. */\nexport interface KeyReleaseResult {\n /**\n * A signed object containing the released key.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: string;\n}\n\n/** A list of keys that have been deleted in this vault. */\nexport interface DeletedKeyListResult {\n /**\n * A response message containing a list of deleted keys in the vault along with a link to the next page of deleted keys\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: DeletedKeyItem[];\n /**\n * The URL to get the next set of deleted keys.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly nextLink?: string;\n}\n\n/** Management policy for a key. */\nexport interface KeyRotationPolicy {\n /**\n * The key policy id.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly id?: string;\n /** Actions that will be performed by Key Vault over the lifetime of a key. For preview, lifetimeActions can only have two items at maximum: one for rotate, one for notify. Notification time would be default to 30 days before expiry and it is not configurable. */\n lifetimeActions?: LifetimeActions[];\n /** The key rotation policy attributes. */\n attributes?: KeyRotationPolicyAttributes;\n}\n\n/** Action and its trigger that will be performed by Key Vault over the lifetime of a key. */\nexport interface LifetimeActions {\n /** The condition that will execute the action. */\n trigger?: LifetimeActionsTrigger;\n /** The action that will be executed. */\n action?: LifetimeActionsType;\n}\n\n/** A condition to be satisfied for an action to be executed. */\nexport interface LifetimeActionsTrigger {\n /** Time after creation to attempt to rotate. It only applies to rotate. It will be in ISO 8601 duration format. Example: 90 days : \"P90D\" */\n timeAfterCreate?: string;\n /** Time before expiry to attempt to rotate or notify. It will be in ISO 8601 duration format. Example: 90 days : \"P90D\" */\n timeBeforeExpiry?: string;\n}\n\n/** The action that will be executed. */\nexport interface LifetimeActionsType {\n /** The type of the action. */\n type?: ActionType;\n}\n\n/** The key rotation policy attributes. */\nexport interface KeyRotationPolicyAttributes {\n /** The expiryTime will be applied on the new key version. It should be at least 28 days. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 hours: PT48H, 1 year and 10 days: P1Y10D */\n expiryTime?: string;\n /**\n * The key rotation policy created time in UTC.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly created?: Date;\n /**\n * The key rotation policy's last updated time in UTC.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly updated?: Date;\n}\n\n/** The get random bytes request object. */\nexport interface GetRandomBytesRequest {\n /** The requested number of random bytes. */\n count: number;\n}\n\n/** The get random bytes response object containing the bytes. */\nexport interface RandomBytes {\n /** The bytes encoded as a base64url string. */\n value: Uint8Array;\n}\n\n/** Properties of the key pair backing a certificate. */\nexport interface KeyProperties {\n /** Indicates if the private key can be exported. */\n exportable?: boolean;\n /** The type of key pair to be used for the certificate. */\n keyType?: JsonWebKeyType;\n /** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */\n keySize?: number;\n /** Indicates if the same key pair will be used on certificate renewal. */\n reuseKey?: boolean;\n /** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */\n curve?: JsonWebKeyCurveName;\n}\n\n/** The export key parameters. */\nexport interface KeyExportParameters {\n /** The export key encryption Json web key. This key MUST be a RSA key that supports encryption. */\n wrappingKey?: JsonWebKey;\n /** The export key encryption key identifier. This key MUST be a RSA key that supports encryption. */\n wrappingKid?: string;\n /** The encryption algorithm to use to protected the exported key material */\n enc?: KeyEncryptionAlgorithm;\n}\n\n/** The attributes of a key managed by the key vault service. */\nexport type KeyAttributes = Attributes & {\n /**\n * softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly recoverableDays?: number;\n /**\n * Reflects the deletion recovery level currently in effect for keys in the current vault. If it contains 'Purgeable' the key can be permanently deleted by a privileged user; otherwise, only the system can purge the key, at the end of the retention interval.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly recoveryLevel?: DeletionRecoveryLevel;\n /** Indicates if the private key can be exported. */\n exportable?: boolean;\n};\n\n/** A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info */\nexport type DeletedKeyBundle = KeyBundle & {\n /** The url of the recovery object, used to identify and recover the deleted key. */\n recoveryId?: string;\n /**\n * The time when the key is scheduled to be purged, in UTC\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly scheduledPurgeDate?: Date;\n /**\n * The time when the key was deleted, in UTC\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly deletedDate?: Date;\n};\n\n/** The deleted key item containing the deleted key metadata and information about deletion. */\nexport type DeletedKeyItem = KeyItem & {\n /** The url of the recovery object, used to identify and recover the deleted key. */\n recoveryId?: string;\n /**\n * The time when the key is scheduled to be purged, in UTC\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly scheduledPurgeDate?: Date;\n /**\n * The time when the key was deleted, in UTC\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly deletedDate?: Date;\n};\n\n/** Known values of {@link ApiVersion73Preview} that the service accepts. */\nexport enum KnownApiVersion73Preview {\n /** Api Version '7.3-preview' */\n Seven3Preview = \"7.3-preview\"\n}\n\n/**\n * Defines values for ApiVersion73Preview. \\\n * {@link KnownApiVersion73Preview} can be used interchangeably with ApiVersion73Preview,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **7.3-preview**: Api Version '7.3-preview'\n */\nexport type ApiVersion73Preview = string;\n\n/** Known values of {@link JsonWebKeyType} that the service accepts. */\nexport enum KnownJsonWebKeyType {\n /** Elliptic Curve. */\n EC = \"EC\",\n /** Elliptic Curve with a private key which is stored in the HSM. */\n ECHSM = \"EC-HSM\",\n /** RSA (https://tools.ietf.org/html/rfc3447) */\n RSA = \"RSA\",\n /** RSA with a private key which is stored in the HSM. */\n RSAHSM = \"RSA-HSM\",\n /** Octet sequence (used to represent symmetric keys) */\n Oct = \"oct\",\n /** Octet sequence (used to represent symmetric keys) which is stored the HSM. */\n OctHSM = \"oct-HSM\"\n}\n\n/**\n * Defines values for JsonWebKeyType. \\\n * {@link KnownJsonWebKeyType} can be used interchangeably with JsonWebKeyType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **EC**: Elliptic Curve. \\\n * **EC-HSM**: Elliptic Curve with a private key which is stored in the HSM. \\\n * **RSA**: RSA (https:\\/\\/tools.ietf.org\\/html\\/rfc3447) \\\n * **RSA-HSM**: RSA with a private key which is stored in the HSM. \\\n * **oct**: Octet sequence (used to represent symmetric keys) \\\n * **oct-HSM**: Octet sequence (used to represent symmetric keys) which is stored the HSM.\n */\nexport type JsonWebKeyType = string;\n\n/** Known values of {@link JsonWebKeyOperation} that the service accepts. */\nexport enum KnownJsonWebKeyOperation {\n Encrypt = \"encrypt\",\n Decrypt = \"decrypt\",\n Sign = \"sign\",\n Verify = \"verify\",\n WrapKey = \"wrapKey\",\n UnwrapKey = \"unwrapKey\",\n Import = \"import\",\n Export = \"export\"\n}\n\n/**\n * Defines values for JsonWebKeyOperation. \\\n * {@link KnownJsonWebKeyOperation} can be used interchangeably with JsonWebKeyOperation,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **encrypt** \\\n * **decrypt** \\\n * **sign** \\\n * **verify** \\\n * **wrapKey** \\\n * **unwrapKey** \\\n * **import** \\\n * **export**\n */\nexport type JsonWebKeyOperation = string;\n\n/** Known values of {@link DeletionRecoveryLevel} that the service accepts. */\nexport enum KnownDeletionRecoveryLevel {\n /** Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) */\n Purgeable = \"Purgeable\",\n /** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered */\n RecoverablePurgeable = \"Recoverable+Purgeable\",\n /** Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered */\n Recoverable = \"Recoverable\",\n /** Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered */\n RecoverableProtectedSubscription = \"Recoverable+ProtectedSubscription\",\n /** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled. */\n CustomizedRecoverablePurgeable = \"CustomizedRecoverable+Purgeable\",\n /** Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available. */\n CustomizedRecoverable = \"CustomizedRecoverable\",\n /** Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7<= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled. */\n CustomizedRecoverableProtectedSubscription = \"CustomizedRecoverable+ProtectedSubscription\"\n}\n\n/**\n * Defines values for DeletionRecoveryLevel. \\\n * {@link KnownDeletionRecoveryLevel} can be used interchangeably with DeletionRecoveryLevel,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Purgeable**: Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) \\\n * **Recoverable+Purgeable**: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered \\\n * **Recoverable**: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered \\\n * **Recoverable+ProtectedSubscription**: Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered \\\n * **CustomizedRecoverable+Purgeable**: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled. \\\n * **CustomizedRecoverable**: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available. \\\n * **CustomizedRecoverable+ProtectedSubscription**: Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7<= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled.\n */\nexport type DeletionRecoveryLevel = string;\n\n/** Known values of {@link JsonWebKeyCurveName} that the service accepts. */\nexport enum KnownJsonWebKeyCurveName {\n /** The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. */\n P256 = \"P-256\",\n /** The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. */\n P384 = \"P-384\",\n /** The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. */\n P521 = \"P-521\",\n /** The SECG SECP256K1 elliptic curve. */\n P256K = \"P-256K\"\n}\n\n/**\n * Defines values for JsonWebKeyCurveName. \\\n * {@link KnownJsonWebKeyCurveName} can be used interchangeably with JsonWebKeyCurveName,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **P-256**: The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. \\\n * **P-384**: The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. \\\n * **P-521**: The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. \\\n * **P-256K**: The SECG SECP256K1 elliptic curve. \\\n * **Ed25519**: The Ed25519 Edwards curve.\n */\nexport type JsonWebKeyCurveName = string;\n\n/** Known values of {@link JsonWebKeyEncryptionAlgorithm} that the service accepts. */\nexport enum KnownJsonWebKeyEncryptionAlgorithm {\n RSAOaep = \"RSA-OAEP\",\n RSAOaep256 = \"RSA-OAEP-256\",\n RSA15 = \"RSA1_5\",\n A128GCM = \"A128GCM\",\n A192GCM = \"A192GCM\",\n A256GCM = \"A256GCM\",\n A128KW = \"A128KW\",\n A192KW = \"A192KW\",\n A256KW = \"A256KW\",\n A128CBC = \"A128CBC\",\n A192CBC = \"A192CBC\",\n A256CBC = \"A256CBC\",\n A128Cbcpad = \"A128CBCPAD\",\n A192Cbcpad = \"A192CBCPAD\",\n A256Cbcpad = \"A256CBCPAD\"\n}\n\n/**\n * Defines values for JsonWebKeyEncryptionAlgorithm. \\\n * {@link KnownJsonWebKeyEncryptionAlgorithm} can be used interchangeably with JsonWebKeyEncryptionAlgorithm,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **RSA-OAEP** \\\n * **RSA-OAEP-256** \\\n * **RSA1_5** \\\n * **A128GCM** \\\n * **A192GCM** \\\n * **A256GCM** \\\n * **A128KW** \\\n * **A192KW** \\\n * **A256KW** \\\n * **A128CBC** \\\n * **A192CBC** \\\n * **A256CBC** \\\n * **A128CBCPAD** \\\n * **A192CBCPAD** \\\n * **A256CBCPAD**\n */\nexport type JsonWebKeyEncryptionAlgorithm = string;\n\n/** Known values of {@link JsonWebKeySignatureAlgorithm} that the service accepts. */\nexport enum KnownJsonWebKeySignatureAlgorithm {\n /** RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in https://tools.ietf.org/html/rfc7518 */\n PS256 = \"PS256\",\n /** RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in https://tools.ietf.org/html/rfc7518 */\n PS384 = \"PS384\",\n /** RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in https://tools.ietf.org/html/rfc7518 */\n PS512 = \"PS512\",\n /** RSASSA-PKCS1-v1_5 using SHA-256, as described in https://tools.ietf.org/html/rfc7518 */\n RS256 = \"RS256\",\n /** RSASSA-PKCS1-v1_5 using SHA-384, as described in https://tools.ietf.org/html/rfc7518 */\n RS384 = \"RS384\",\n /** RSASSA-PKCS1-v1_5 using SHA-512, as described in https://tools.ietf.org/html/rfc7518 */\n RS512 = \"RS512\",\n /** Reserved */\n Rsnull = \"RSNULL\",\n /** ECDSA using P-256 and SHA-256, as described in https://tools.ietf.org/html/rfc7518. */\n ES256 = \"ES256\",\n /** ECDSA using P-384 and SHA-384, as described in https://tools.ietf.org/html/rfc7518 */\n ES384 = \"ES384\",\n /** ECDSA using P-521 and SHA-512, as described in https://tools.ietf.org/html/rfc7518 */\n ES512 = \"ES512\",\n /** ECDSA using P-256K and SHA-256, as described in https://tools.ietf.org/html/rfc7518 */\n ES256K = \"ES256K\"\n}\n\n/**\n * Defines values for JsonWebKeySignatureAlgorithm. \\\n * {@link KnownJsonWebKeySignatureAlgorithm} can be used interchangeably with JsonWebKeySignatureAlgorithm,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **PS256**: RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **PS384**: RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **PS512**: RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **RS256**: RSASSA-PKCS1-v1_5 using SHA-256, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **RS384**: RSASSA-PKCS1-v1_5 using SHA-384, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **RS512**: RSASSA-PKCS1-v1_5 using SHA-512, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **RSNULL**: Reserved \\\n * **ES256**: ECDSA using P-256 and SHA-256, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518. \\\n * **ES384**: ECDSA using P-384 and SHA-384, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **ES512**: ECDSA using P-521 and SHA-512, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **ES256K**: ECDSA using P-256K and SHA-256, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518\n */\nexport type JsonWebKeySignatureAlgorithm = string;\n\n/** Known values of {@link KeyEncryptionAlgorithm} that the service accepts. */\nexport enum KnownKeyEncryptionAlgorithm {\n CKMRSAAESKEYWrap = \"CKM_RSA_AES_KEY_WRAP\",\n RSAAESKEYWrap256 = \"RSA_AES_KEY_WRAP_256\",\n RSAAESKEYWrap384 = \"RSA_AES_KEY_WRAP_384\"\n}\n\n/**\n * Defines values for KeyEncryptionAlgorithm. \\\n * {@link KnownKeyEncryptionAlgorithm} can be used interchangeably with KeyEncryptionAlgorithm,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **CKM_RSA_AES_KEY_WRAP** \\\n * **RSA_AES_KEY_WRAP_256** \\\n * **RSA_AES_KEY_WRAP_384**\n */\nexport type KeyEncryptionAlgorithm = string;\n/** Defines values for ActionType. */\nexport type ActionType = \"Rotate\" | \"Notify\";\n\n/** Optional parameters. */\nexport interface CreateKeyOptionalParams extends coreHttp.OperationOptions {\n /** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */\n keySize?: number;\n /** The public exponent for a RSA key. */\n publicExponent?: number;\n /** Array of JsonWebKeyOperation */\n keyOps?: JsonWebKeyOperation[];\n /** The attributes of a key managed by the key vault service. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */\n curve?: JsonWebKeyCurveName;\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** Contains response data for the createKey operation. */\nexport type CreateKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface RotateKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the rotateKey operation. */\nexport type RotateKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface ImportKeyOptionalParams extends coreHttp.OperationOptions {\n /** Whether to import as a hardware key (HSM) or software key. */\n hsm?: boolean;\n /** The key management attributes. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** Contains response data for the importKey operation. */\nexport type ImportKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface DeleteKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the deleteKey operation. */\nexport type DeleteKeyResponse = DeletedKeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: DeletedKeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface UpdateKeyOptionalParams extends coreHttp.OperationOptions {\n /** Json web key operations. For more information on possible key operations, see JsonWebKeyOperation. */\n keyOps?: JsonWebKeyOperation[];\n /** The attributes of a key managed by the key vault service. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** Contains response data for the updateKey operation. */\nexport type UpdateKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the getKey operation. */\nexport type GetKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeyVersionsOptionalParams\n extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getKeyVersions operation. */\nexport type GetKeyVersionsResponse = KeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeysOptionalParams extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getKeys operation. */\nexport type GetKeysResponse = KeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface BackupKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the backupKey operation. */\nexport type BackupKeyResponse = BackupKeyResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: BackupKeyResult;\n };\n};\n\n/** Optional parameters. */\nexport interface RestoreKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the restoreKey operation. */\nexport type RestoreKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface EncryptOptionalParams extends coreHttp.OperationOptions {\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** Contains response data for the encrypt operation. */\nexport type EncryptResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface DecryptOptionalParams extends coreHttp.OperationOptions {\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** Contains response data for the decrypt operation. */\nexport type DecryptResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface SignOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the sign operation. */\nexport type SignResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface VerifyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the verify operation. */\nexport type VerifyResponse = KeyVerifyResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyVerifyResult;\n };\n};\n\n/** Optional parameters. */\nexport interface WrapKeyOptionalParams extends coreHttp.OperationOptions {\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** Contains response data for the wrapKey operation. */\nexport type WrapKeyResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface UnwrapKeyOptionalParams extends coreHttp.OperationOptions {\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** Contains response data for the unwrapKey operation. */\nexport type UnwrapKeyResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface ReleaseOptionalParams extends coreHttp.OperationOptions {\n /** A client provided nonce for freshness. */\n nonce?: string;\n /** The encryption algorithm to use to protected the exported key material */\n enc?: KeyEncryptionAlgorithm;\n}\n\n/** Contains response data for the release operation. */\nexport type ReleaseResponse = KeyReleaseResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyReleaseResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetDeletedKeysOptionalParams\n extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getDeletedKeys operation. */\nexport type GetDeletedKeysResponse = DeletedKeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: DeletedKeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetDeletedKeyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the getDeletedKey operation. */\nexport type GetDeletedKeyResponse = DeletedKeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: DeletedKeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface PurgeDeletedKeyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Optional parameters. */\nexport interface RecoverDeletedKeyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the recoverDeletedKey operation. */\nexport type RecoverDeletedKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeyRotationPolicyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the getKeyRotationPolicy operation. */\nexport type GetKeyRotationPolicyResponse = KeyRotationPolicy & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyRotationPolicy;\n };\n};\n\n/** Optional parameters. */\nexport interface UpdateKeyRotationPolicyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the updateKeyRotationPolicy operation. */\nexport type UpdateKeyRotationPolicyResponse = KeyRotationPolicy & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyRotationPolicy;\n };\n};\n\n/** Optional parameters. */\nexport interface GetRandomBytesOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the getRandomBytes operation. */\nexport type GetRandomBytesResponse = RandomBytes & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: RandomBytes;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeyVersionsNextOptionalParams\n extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getKeyVersionsNext operation. */\nexport type GetKeyVersionsNextResponse = KeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeysNextOptionalParams extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getKeysNext operation. */\nexport type GetKeysNextResponse = KeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetDeletedKeysNextOptionalParams\n extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getDeletedKeysNext operation. */\nexport type GetDeletedKeysNextResponse = DeletedKeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: DeletedKeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface KeyVaultClientOptionalParams\n extends coreHttp.ServiceClientOptions {\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0aH,qEAAqE;AACrE,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wBAAwB;IACxB,mCAAc,CAAA;AAChB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAWD,uEAAuE;AACvE,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC7B,sBAAsB;IACtB,gCAAS,CAAA;IACT,oEAAoE;IACpE,uCAAgB,CAAA;IAChB,gDAAgD;IAChD,kCAAW,CAAA;IACX,yDAAyD;IACzD,yCAAkB,CAAA;IAClB,wDAAwD;IACxD,kCAAW,CAAA;IACX,iFAAiF;IACjF,yCAAkB,CAAA;AACpB,CAAC,EAbW,mBAAmB,KAAnB,mBAAmB,QAa9B;AAgBD,4EAA4E;AAC5E,MAAM,CAAN,IAAY,wBASX;AATD,WAAY,wBAAwB;IACl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C,kCAAkC,QAgB7C;AAyBD,qFAAqF;AACrF,MAAM,CAAN,IAAY,iCAuBX;AAvBD,WAAY,iCAAiC;IAC3C,0GAA0G;IAC1G,oDAAe,CAAA;IACf,0GAA0G;IAC1G,oDAAe,CAAA;IACf,0GAA0G;IAC1G,oDAAe,CAAA;IACf,2FAA2F;IAC3F,oDAAe,CAAA;IACf,2FAA2F;IAC3F,oDAAe,CAAA;IACf,2FAA2F;IAC3F,oDAAe,CAAA;IACf,eAAe;IACf,sDAAiB,CAAA;IACjB,0FAA0F;IAC1F,oDAAe,CAAA;IACf,yFAAyF;IACzF,oDAAe,CAAA;IACf,yFAAyF;IACzF,oDAAe,CAAA;IACf,0FAA0F;IAC1F,sDAAiB,CAAA;AACnB,CAAC,EAvBW,iCAAiC,KAAjC,iCAAiC,QAuB5C;AAqBD,+EAA+E;AAC/E,MAAM,CAAN,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACrC,wEAAyC,CAAA;IACzC,wEAAyC,CAAA;IACzC,wEAAyC,CAAA;AAC3C,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,QAItC","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 * as coreHttp from \"@azure/core-http\";\n\n/** The key create parameters. */\nexport interface KeyCreateParameters {\n /** The type of key to create. For valid values, see JsonWebKeyType. */\n kty: JsonWebKeyType;\n /** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */\n keySize?: number;\n /** The public exponent for a RSA key. */\n publicExponent?: number;\n keyOps?: JsonWebKeyOperation[];\n /** The attributes of a key managed by the key vault service. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */\n curve?: JsonWebKeyCurveName;\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** The object attributes managed by the KeyVault service. */\nexport interface Attributes {\n /** Determines whether the object is enabled. */\n enabled?: boolean;\n /** Not before date in UTC. */\n notBefore?: Date;\n /** Expiry date in UTC. */\n expires?: Date;\n /**\n * Creation time in UTC.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly created?: Date;\n /**\n * Last updated time in UTC.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly updated?: Date;\n}\n\nexport interface KeyReleasePolicy {\n /** Content type and version of key release policy */\n contentType?: string;\n /** Defines the mutability state of the policy. Once marked immutable, this flag cannot be reset and the policy cannot be changed under any circumstances. */\n immutable?: boolean;\n /** Blob encoding the policy rules under which the key can be released. */\n encodedPolicy?: Uint8Array;\n}\n\n/** A KeyBundle consisting of a WebKey plus its attributes. */\nexport interface KeyBundle {\n /** The Json web key. */\n key?: JsonWebKey;\n /** The key management attributes. */\n attributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /**\n * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly managed?: boolean;\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 */\nexport interface JsonWebKey {\n /** Key identifier. */\n kid?: string;\n /** JsonWebKey Key Type (kty), as defined in https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. */\n kty?: JsonWebKeyType;\n keyOps?: string[];\n /** RSA modulus. */\n n?: Uint8Array;\n /** RSA public exponent. */\n e?: Uint8Array;\n /** RSA private exponent, or the D component of an EC private key. */\n d?: Uint8Array;\n /** RSA private key parameter. */\n dp?: Uint8Array;\n /** RSA private key parameter. */\n dq?: Uint8Array;\n /** RSA private key parameter. */\n qi?: Uint8Array;\n /** RSA secret prime. */\n p?: Uint8Array;\n /** RSA secret prime, with p < q. */\n q?: Uint8Array;\n /** Symmetric key. */\n k?: Uint8Array;\n /** Protected Key, used with 'Bring Your Own Key'. */\n t?: Uint8Array;\n /** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */\n crv?: JsonWebKeyCurveName;\n /** X component of an EC public key. */\n x?: Uint8Array;\n /** Y component of an EC public key. */\n y?: Uint8Array;\n}\n\n/** The key vault error exception. */\nexport interface KeyVaultError {\n /**\n * The key vault server error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly error?: ErrorModel;\n}\n\n/** The key vault server error. */\nexport interface ErrorModel {\n /**\n * The error code.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly code?: string;\n /**\n * The error message.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly message?: string;\n /**\n * The key vault server error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly innerError?: ErrorModel;\n}\n\n/** The key import parameters. */\nexport interface KeyImportParameters {\n /** Whether to import as a hardware key (HSM) or software key. */\n hsm?: boolean;\n /** The Json web key */\n key: JsonWebKey;\n /** The key management attributes. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** The key update parameters. */\nexport interface KeyUpdateParameters {\n /** Json web key operations. For more information on possible key operations, see JsonWebKeyOperation. */\n keyOps?: JsonWebKeyOperation[];\n /** The attributes of a key managed by the key vault service. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** The key list result. */\nexport interface KeyListResult {\n /**\n * A response message containing a list of keys in the key vault along with a link to the next page of keys.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: KeyItem[];\n /**\n * The URL to get the next set of keys.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly nextLink?: string;\n}\n\n/** The key item containing key metadata. */\nexport interface KeyItem {\n /** Key identifier. */\n kid?: string;\n /** The key management attributes. */\n attributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /**\n * True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly managed?: boolean;\n}\n\n/** The backup key result, containing the backup blob. */\nexport interface BackupKeyResult {\n /**\n * The backup blob containing the backed up key.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: Uint8Array;\n}\n\n/** The key restore parameters. */\nexport interface KeyRestoreParameters {\n /** The backup blob associated with a key bundle. */\n keyBundleBackup: Uint8Array;\n}\n\n/** The key operations parameters. */\nexport interface KeyOperationsParameters {\n /** algorithm identifier */\n algorithm: JsonWebKeyEncryptionAlgorithm;\n value: Uint8Array;\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** The key operation result. */\nexport interface KeyOperationResult {\n /**\n * Key identifier\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly kid?: string;\n /** NOTE: This property will not be serialized. It can only be populated by the server. */\n readonly result?: Uint8Array;\n /** NOTE: This property will not be serialized. It can only be populated by the server. */\n readonly iv?: Uint8Array;\n /** NOTE: This property will not be serialized. It can only be populated by the server. */\n readonly authenticationTag?: Uint8Array;\n /** NOTE: This property will not be serialized. It can only be populated by the server. */\n readonly additionalAuthenticatedData?: Uint8Array;\n}\n\n/** The key operations parameters. */\nexport interface KeySignParameters {\n /** The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. */\n algorithm: JsonWebKeySignatureAlgorithm;\n value: Uint8Array;\n}\n\n/** The key verify parameters. */\nexport interface KeyVerifyParameters {\n /** The signing/verification algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. */\n algorithm: JsonWebKeySignatureAlgorithm;\n /** The digest used for signing. */\n digest: Uint8Array;\n /** The signature to be verified. */\n signature: Uint8Array;\n}\n\n/** The key verify result. */\nexport interface KeyVerifyResult {\n /**\n * True if the signature is verified, otherwise false.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: boolean;\n}\n\n/** The release key parameters. */\nexport interface KeyReleaseParameters {\n /** The attestation assertion for the target of the key release. */\n targetAttestationToken: string;\n /** A client provided nonce for freshness. */\n nonce?: string;\n /** The encryption algorithm to use to protected the exported key material */\n enc?: KeyEncryptionAlgorithm;\n}\n\n/** The release result, containing the released key. */\nexport interface KeyReleaseResult {\n /**\n * A signed object containing the released key.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: string;\n}\n\n/** A list of keys that have been deleted in this vault. */\nexport interface DeletedKeyListResult {\n /**\n * A response message containing a list of deleted keys in the vault along with a link to the next page of deleted keys\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly value?: DeletedKeyItem[];\n /**\n * The URL to get the next set of deleted keys.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly nextLink?: string;\n}\n\n/** Management policy for a key. */\nexport interface KeyRotationPolicy {\n /**\n * The key policy id.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly id?: string;\n /** Actions that will be performed by Key Vault over the lifetime of a key. For preview, lifetimeActions can only have two items at maximum: one for rotate, one for notify. Notification time would be default to 30 days before expiry and it is not configurable. */\n lifetimeActions?: LifetimeActions[];\n /** The key rotation policy attributes. */\n attributes?: KeyRotationPolicyAttributes;\n}\n\n/** Action and its trigger that will be performed by Key Vault over the lifetime of a key. */\nexport interface LifetimeActions {\n /** The condition that will execute the action. */\n trigger?: LifetimeActionsTrigger;\n /** The action that will be executed. */\n action?: LifetimeActionsType;\n}\n\n/** A condition to be satisfied for an action to be executed. */\nexport interface LifetimeActionsTrigger {\n /** Time after creation to attempt to rotate. It only applies to rotate. It will be in ISO 8601 duration format. Example: 90 days : \"P90D\" */\n timeAfterCreate?: string;\n /** Time before expiry to attempt to rotate or notify. It will be in ISO 8601 duration format. Example: 90 days : \"P90D\" */\n timeBeforeExpiry?: string;\n}\n\n/** The action that will be executed. */\nexport interface LifetimeActionsType {\n /** The type of the action. */\n type?: ActionType;\n}\n\n/** The key rotation policy attributes. */\nexport interface KeyRotationPolicyAttributes {\n /** The expiryTime will be applied on the new key version. It should be at least 28 days. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 hours: PT48H, 1 year and 10 days: P1Y10D */\n expiryTime?: string;\n /**\n * The key rotation policy created time in UTC.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly created?: Date;\n /**\n * The key rotation policy's last updated time in UTC.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly updated?: Date;\n}\n\n/** The get random bytes request object. */\nexport interface GetRandomBytesRequest {\n /** The requested number of random bytes. */\n count: number;\n}\n\n/** The get random bytes response object containing the bytes. */\nexport interface RandomBytes {\n /** The bytes encoded as a base64url string. */\n value: Uint8Array;\n}\n\n/** Properties of the key pair backing a certificate. */\nexport interface KeyProperties {\n /** Indicates if the private key can be exported. */\n exportable?: boolean;\n /** The type of key pair to be used for the certificate. */\n keyType?: JsonWebKeyType;\n /** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */\n keySize?: number;\n /** Indicates if the same key pair will be used on certificate renewal. */\n reuseKey?: boolean;\n /** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */\n curve?: JsonWebKeyCurveName;\n}\n\n/** The export key parameters. */\nexport interface KeyExportParameters {\n /** The export key encryption Json web key. This key MUST be a RSA key that supports encryption. */\n wrappingKey?: JsonWebKey;\n /** The export key encryption key identifier. This key MUST be a RSA key that supports encryption. */\n wrappingKid?: string;\n /** The encryption algorithm to use to protected the exported key material */\n enc?: KeyEncryptionAlgorithm;\n}\n\n/** The attributes of a key managed by the key vault service. */\nexport type KeyAttributes = Attributes & {\n /**\n * softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly recoverableDays?: number;\n /**\n * Reflects the deletion recovery level currently in effect for keys in the current vault. If it contains 'Purgeable' the key can be permanently deleted by a privileged user; otherwise, only the system can purge the key, at the end of the retention interval.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly recoveryLevel?: DeletionRecoveryLevel;\n /** Indicates if the private key can be exported. */\n exportable?: boolean;\n};\n\n/** A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info */\nexport type DeletedKeyBundle = KeyBundle & {\n /** The url of the recovery object, used to identify and recover the deleted key. */\n recoveryId?: string;\n /**\n * The time when the key is scheduled to be purged, in UTC\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly scheduledPurgeDate?: Date;\n /**\n * The time when the key was deleted, in UTC\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly deletedDate?: Date;\n};\n\n/** The deleted key item containing the deleted key metadata and information about deletion. */\nexport type DeletedKeyItem = KeyItem & {\n /** The url of the recovery object, used to identify and recover the deleted key. */\n recoveryId?: string;\n /**\n * The time when the key is scheduled to be purged, in UTC\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly scheduledPurgeDate?: Date;\n /**\n * The time when the key was deleted, in UTC\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly deletedDate?: Date;\n};\n\n/** Known values of {@link ApiVersion73} that the service accepts. */\nexport enum KnownApiVersion73 {\n /** Api Version '7.3' */\n Seven3 = \"7.3\"\n}\n\n/**\n * Defines values for ApiVersion73. \\\n * {@link KnownApiVersion73} can be used interchangeably with ApiVersion73,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **7.3**: Api Version '7.3'\n */\nexport type ApiVersion73 = string;\n\n/** Known values of {@link JsonWebKeyType} that the service accepts. */\nexport enum KnownJsonWebKeyType {\n /** Elliptic Curve. */\n EC = \"EC\",\n /** Elliptic Curve with a private key which is stored in the HSM. */\n ECHSM = \"EC-HSM\",\n /** RSA (https://tools.ietf.org/html/rfc3447) */\n RSA = \"RSA\",\n /** RSA with a private key which is stored in the HSM. */\n RSAHSM = \"RSA-HSM\",\n /** Octet sequence (used to represent symmetric keys) */\n Oct = \"oct\",\n /** Octet sequence (used to represent symmetric keys) which is stored the HSM. */\n OctHSM = \"oct-HSM\"\n}\n\n/**\n * Defines values for JsonWebKeyType. \\\n * {@link KnownJsonWebKeyType} can be used interchangeably with JsonWebKeyType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **EC**: Elliptic Curve. \\\n * **EC-HSM**: Elliptic Curve with a private key which is stored in the HSM. \\\n * **RSA**: RSA (https:\\/\\/tools.ietf.org\\/html\\/rfc3447) \\\n * **RSA-HSM**: RSA with a private key which is stored in the HSM. \\\n * **oct**: Octet sequence (used to represent symmetric keys) \\\n * **oct-HSM**: Octet sequence (used to represent symmetric keys) which is stored the HSM.\n */\nexport type JsonWebKeyType = string;\n\n/** Known values of {@link JsonWebKeyOperation} that the service accepts. */\nexport enum KnownJsonWebKeyOperation {\n Encrypt = \"encrypt\",\n Decrypt = \"decrypt\",\n Sign = \"sign\",\n Verify = \"verify\",\n WrapKey = \"wrapKey\",\n UnwrapKey = \"unwrapKey\",\n Import = \"import\",\n Export = \"export\"\n}\n\n/**\n * Defines values for JsonWebKeyOperation. \\\n * {@link KnownJsonWebKeyOperation} can be used interchangeably with JsonWebKeyOperation,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **encrypt** \\\n * **decrypt** \\\n * **sign** \\\n * **verify** \\\n * **wrapKey** \\\n * **unwrapKey** \\\n * **import** \\\n * **export**\n */\nexport type JsonWebKeyOperation = string;\n\n/** Known values of {@link DeletionRecoveryLevel} that the service accepts. */\nexport enum KnownDeletionRecoveryLevel {\n /** Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) */\n Purgeable = \"Purgeable\",\n /** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered */\n RecoverablePurgeable = \"Recoverable+Purgeable\",\n /** Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered */\n Recoverable = \"Recoverable\",\n /** Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered */\n RecoverableProtectedSubscription = \"Recoverable+ProtectedSubscription\",\n /** Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled. */\n CustomizedRecoverablePurgeable = \"CustomizedRecoverable+Purgeable\",\n /** Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available. */\n CustomizedRecoverable = \"CustomizedRecoverable\",\n /** Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7<= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled. */\n CustomizedRecoverableProtectedSubscription = \"CustomizedRecoverable+ProtectedSubscription\"\n}\n\n/**\n * Defines values for DeletionRecoveryLevel. \\\n * {@link KnownDeletionRecoveryLevel} can be used interchangeably with DeletionRecoveryLevel,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Purgeable**: Denotes a vault state in which deletion is an irreversible operation, without the possibility for recovery. This level corresponds to no protection being available against a Delete operation; the data is irretrievably lost upon accepting a Delete operation at the entity level or higher (vault, resource group, subscription etc.) \\\n * **Recoverable+Purgeable**: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval (90 days), unless a Purge operation is requested, or the subscription is cancelled. System wil permanently delete it after 90 days, if not recovered \\\n * **Recoverable**: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge). This level guarantees the recoverability of the deleted entity during the retention interval(90 days) and while the subscription is still available. System wil permanently delete it after 90 days, if not recovered \\\n * **Recoverable+ProtectedSubscription**: Denotes a vault and subscription state in which deletion is recoverable within retention interval (90 days), immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled. System wil permanently delete it after 90 days, if not recovered \\\n * **CustomizedRecoverable+Purgeable**: Denotes a vault state in which deletion is recoverable, and which also permits immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90). This level guarantees the recoverability of the deleted entity during the retention interval, unless a Purge operation is requested, or the subscription is cancelled. \\\n * **CustomizedRecoverable**: Denotes a vault state in which deletion is recoverable without the possibility for immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the deleted entity during the retention interval and while the subscription is still available. \\\n * **CustomizedRecoverable+ProtectedSubscription**: Denotes a vault and subscription state in which deletion is recoverable, immediate and permanent deletion (i.e. purge) is not permitted, and in which the subscription itself cannot be permanently canceled when 7<= SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the deleted entity during the retention interval, and also reflects the fact that the subscription itself cannot be cancelled.\n */\nexport type DeletionRecoveryLevel = string;\n\n/** Known values of {@link JsonWebKeyCurveName} that the service accepts. */\nexport enum KnownJsonWebKeyCurveName {\n /** The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. */\n P256 = \"P-256\",\n /** The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. */\n P384 = \"P-384\",\n /** The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. */\n P521 = \"P-521\",\n /** The SECG SECP256K1 elliptic curve. */\n P256K = \"P-256K\"\n}\n\n/**\n * Defines values for JsonWebKeyCurveName. \\\n * {@link KnownJsonWebKeyCurveName} can be used interchangeably with JsonWebKeyCurveName,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **P-256**: The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. \\\n * **P-384**: The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. \\\n * **P-521**: The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. \\\n * **P-256K**: The SECG SECP256K1 elliptic curve.\n */\nexport type JsonWebKeyCurveName = string;\n\n/** Known values of {@link JsonWebKeyEncryptionAlgorithm} that the service accepts. */\nexport enum KnownJsonWebKeyEncryptionAlgorithm {\n RSAOaep = \"RSA-OAEP\",\n RSAOaep256 = \"RSA-OAEP-256\",\n RSA15 = \"RSA1_5\",\n A128GCM = \"A128GCM\",\n A192GCM = \"A192GCM\",\n A256GCM = \"A256GCM\",\n A128KW = \"A128KW\",\n A192KW = \"A192KW\",\n A256KW = \"A256KW\",\n A128CBC = \"A128CBC\",\n A192CBC = \"A192CBC\",\n A256CBC = \"A256CBC\",\n A128Cbcpad = \"A128CBCPAD\",\n A192Cbcpad = \"A192CBCPAD\",\n A256Cbcpad = \"A256CBCPAD\"\n}\n\n/**\n * Defines values for JsonWebKeyEncryptionAlgorithm. \\\n * {@link KnownJsonWebKeyEncryptionAlgorithm} can be used interchangeably with JsonWebKeyEncryptionAlgorithm,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **RSA-OAEP** \\\n * **RSA-OAEP-256** \\\n * **RSA1_5** \\\n * **A128GCM** \\\n * **A192GCM** \\\n * **A256GCM** \\\n * **A128KW** \\\n * **A192KW** \\\n * **A256KW** \\\n * **A128CBC** \\\n * **A192CBC** \\\n * **A256CBC** \\\n * **A128CBCPAD** \\\n * **A192CBCPAD** \\\n * **A256CBCPAD**\n */\nexport type JsonWebKeyEncryptionAlgorithm = string;\n\n/** Known values of {@link JsonWebKeySignatureAlgorithm} that the service accepts. */\nexport enum KnownJsonWebKeySignatureAlgorithm {\n /** RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in https://tools.ietf.org/html/rfc7518 */\n PS256 = \"PS256\",\n /** RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in https://tools.ietf.org/html/rfc7518 */\n PS384 = \"PS384\",\n /** RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in https://tools.ietf.org/html/rfc7518 */\n PS512 = \"PS512\",\n /** RSASSA-PKCS1-v1_5 using SHA-256, as described in https://tools.ietf.org/html/rfc7518 */\n RS256 = \"RS256\",\n /** RSASSA-PKCS1-v1_5 using SHA-384, as described in https://tools.ietf.org/html/rfc7518 */\n RS384 = \"RS384\",\n /** RSASSA-PKCS1-v1_5 using SHA-512, as described in https://tools.ietf.org/html/rfc7518 */\n RS512 = \"RS512\",\n /** Reserved */\n Rsnull = \"RSNULL\",\n /** ECDSA using P-256 and SHA-256, as described in https://tools.ietf.org/html/rfc7518. */\n ES256 = \"ES256\",\n /** ECDSA using P-384 and SHA-384, as described in https://tools.ietf.org/html/rfc7518 */\n ES384 = \"ES384\",\n /** ECDSA using P-521 and SHA-512, as described in https://tools.ietf.org/html/rfc7518 */\n ES512 = \"ES512\",\n /** ECDSA using P-256K and SHA-256, as described in https://tools.ietf.org/html/rfc7518 */\n ES256K = \"ES256K\"\n}\n\n/**\n * Defines values for JsonWebKeySignatureAlgorithm. \\\n * {@link KnownJsonWebKeySignatureAlgorithm} can be used interchangeably with JsonWebKeySignatureAlgorithm,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **PS256**: RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **PS384**: RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **PS512**: RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **RS256**: RSASSA-PKCS1-v1_5 using SHA-256, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **RS384**: RSASSA-PKCS1-v1_5 using SHA-384, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **RS512**: RSASSA-PKCS1-v1_5 using SHA-512, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **RSNULL**: Reserved \\\n * **ES256**: ECDSA using P-256 and SHA-256, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518. \\\n * **ES384**: ECDSA using P-384 and SHA-384, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **ES512**: ECDSA using P-521 and SHA-512, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518 \\\n * **ES256K**: ECDSA using P-256K and SHA-256, as described in https:\\/\\/tools.ietf.org\\/html\\/rfc7518\n */\nexport type JsonWebKeySignatureAlgorithm = string;\n\n/** Known values of {@link KeyEncryptionAlgorithm} that the service accepts. */\nexport enum KnownKeyEncryptionAlgorithm {\n CKMRSAAESKEYWrap = \"CKM_RSA_AES_KEY_WRAP\",\n RSAAESKEYWrap256 = \"RSA_AES_KEY_WRAP_256\",\n RSAAESKEYWrap384 = \"RSA_AES_KEY_WRAP_384\"\n}\n\n/**\n * Defines values for KeyEncryptionAlgorithm. \\\n * {@link KnownKeyEncryptionAlgorithm} can be used interchangeably with KeyEncryptionAlgorithm,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **CKM_RSA_AES_KEY_WRAP** \\\n * **RSA_AES_KEY_WRAP_256** \\\n * **RSA_AES_KEY_WRAP_384**\n */\nexport type KeyEncryptionAlgorithm = string;\n/** Defines values for ActionType. */\nexport type ActionType = \"Rotate\" | \"Notify\";\n\n/** Optional parameters. */\nexport interface CreateKeyOptionalParams extends coreHttp.OperationOptions {\n /** The key size in bits. For example: 2048, 3072, or 4096 for RSA. */\n keySize?: number;\n /** The public exponent for a RSA key. */\n publicExponent?: number;\n /** Array of JsonWebKeyOperation */\n keyOps?: JsonWebKeyOperation[];\n /** The attributes of a key managed by the key vault service. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** Elliptic curve name. For valid values, see JsonWebKeyCurveName. */\n curve?: JsonWebKeyCurveName;\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** Contains response data for the createKey operation. */\nexport type CreateKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface RotateKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the rotateKey operation. */\nexport type RotateKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface ImportKeyOptionalParams extends coreHttp.OperationOptions {\n /** Whether to import as a hardware key (HSM) or software key. */\n hsm?: boolean;\n /** The key management attributes. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** Contains response data for the importKey operation. */\nexport type ImportKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface DeleteKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the deleteKey operation. */\nexport type DeleteKeyResponse = DeletedKeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: DeletedKeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface UpdateKeyOptionalParams extends coreHttp.OperationOptions {\n /** Json web key operations. For more information on possible key operations, see JsonWebKeyOperation. */\n keyOps?: JsonWebKeyOperation[];\n /** The attributes of a key managed by the key vault service. */\n keyAttributes?: KeyAttributes;\n /** Application specific metadata in the form of key-value pairs. */\n tags?: { [propertyName: string]: string };\n /** The policy rules under which the key can be exported. */\n releasePolicy?: KeyReleasePolicy;\n}\n\n/** Contains response data for the updateKey operation. */\nexport type UpdateKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the getKey operation. */\nexport type GetKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeyVersionsOptionalParams\n extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getKeyVersions operation. */\nexport type GetKeyVersionsResponse = KeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeysOptionalParams extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getKeys operation. */\nexport type GetKeysResponse = KeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface BackupKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the backupKey operation. */\nexport type BackupKeyResponse = BackupKeyResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: BackupKeyResult;\n };\n};\n\n/** Optional parameters. */\nexport interface RestoreKeyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the restoreKey operation. */\nexport type RestoreKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface EncryptOptionalParams extends coreHttp.OperationOptions {\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** Contains response data for the encrypt operation. */\nexport type EncryptResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface DecryptOptionalParams extends coreHttp.OperationOptions {\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** Contains response data for the decrypt operation. */\nexport type DecryptResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface SignOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the sign operation. */\nexport type SignResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface VerifyOptionalParams extends coreHttp.OperationOptions {}\n\n/** Contains response data for the verify operation. */\nexport type VerifyResponse = KeyVerifyResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyVerifyResult;\n };\n};\n\n/** Optional parameters. */\nexport interface WrapKeyOptionalParams extends coreHttp.OperationOptions {\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** Contains response data for the wrapKey operation. */\nexport type WrapKeyResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface UnwrapKeyOptionalParams extends coreHttp.OperationOptions {\n /** Initialization vector for symmetric algorithms. */\n iv?: Uint8Array;\n /** Additional data to authenticate but not encrypt/decrypt when using authenticated crypto algorithms. */\n additionalAuthenticatedData?: Uint8Array;\n /** The tag to authenticate when performing decryption with an authenticated algorithm. */\n authenticationTag?: Uint8Array;\n}\n\n/** Contains response data for the unwrapKey operation. */\nexport type UnwrapKeyResponse = KeyOperationResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyOperationResult;\n };\n};\n\n/** Optional parameters. */\nexport interface ReleaseOptionalParams extends coreHttp.OperationOptions {\n /** A client provided nonce for freshness. */\n nonce?: string;\n /** The encryption algorithm to use to protected the exported key material */\n enc?: KeyEncryptionAlgorithm;\n}\n\n/** Contains response data for the release operation. */\nexport type ReleaseResponse = KeyReleaseResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyReleaseResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetDeletedKeysOptionalParams\n extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getDeletedKeys operation. */\nexport type GetDeletedKeysResponse = DeletedKeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: DeletedKeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetDeletedKeyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the getDeletedKey operation. */\nexport type GetDeletedKeyResponse = DeletedKeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: DeletedKeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface PurgeDeletedKeyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Optional parameters. */\nexport interface RecoverDeletedKeyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the recoverDeletedKey operation. */\nexport type RecoverDeletedKeyResponse = KeyBundle & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyBundle;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeyRotationPolicyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the getKeyRotationPolicy operation. */\nexport type GetKeyRotationPolicyResponse = KeyRotationPolicy & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyRotationPolicy;\n };\n};\n\n/** Optional parameters. */\nexport interface UpdateKeyRotationPolicyOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the updateKeyRotationPolicy operation. */\nexport type UpdateKeyRotationPolicyResponse = KeyRotationPolicy & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyRotationPolicy;\n };\n};\n\n/** Optional parameters. */\nexport interface GetRandomBytesOptionalParams\n extends coreHttp.OperationOptions {}\n\n/** Contains response data for the getRandomBytes operation. */\nexport type GetRandomBytesResponse = RandomBytes & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: RandomBytes;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeyVersionsNextOptionalParams\n extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getKeyVersionsNext operation. */\nexport type GetKeyVersionsNextResponse = KeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetKeysNextOptionalParams extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getKeysNext operation. */\nexport type GetKeysNextResponse = KeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: KeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface GetDeletedKeysNextOptionalParams\n extends coreHttp.OperationOptions {\n /** Maximum number of results to return in a page. If not specified the service will return up to 25 results. */\n maxresults?: number;\n}\n\n/** Contains response data for the getDeletedKeysNext operation. */\nexport type GetDeletedKeysNextResponse = DeletedKeyListResult & {\n /** The underlying HTTP response. */\n _response: coreHttp.HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: DeletedKeyListResult;\n };\n};\n\n/** Optional parameters. */\nexport interface KeyVaultClientOptionalParams\n extends coreHttp.ServiceClientOptions {\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
@@ -492,12 +492,12 @@ export class KeyClient {
492
492
  * let result = await client.getKeyRotationPolicy("myKey");
493
493
  * ```
494
494
  *
495
- * @param name - The name of the key.
495
+ * @param keyName - The name of the key.
496
496
  * @param options - The optional parameters.
497
497
  */
498
- getKeyRotationPolicy(name, options = {}) {
498
+ getKeyRotationPolicy(keyName, options = {}) {
499
499
  return withTrace("getKeyRotationPolicy", options, async () => {
500
- const policy = await this.client.getKeyRotationPolicy(this.vaultUrl, name);
500
+ const policy = await this.client.getKeyRotationPolicy(this.vaultUrl, keyName);
501
501
  return keyRotationTransformations.generatedToPublic(policy);
502
502
  });
503
503
  }
@@ -511,13 +511,13 @@ export class KeyClient {
511
511
  * const setPolicy = await client.updateKeyRotationPolicy("MyKey", myPolicy);
512
512
  * ```
513
513
  *
514
- * @param name - The name of the key.
514
+ * @param keyName - The name of the key.
515
515
  * @param policyProperties - The {@link KeyRotationPolicyProperties} for the policy.
516
516
  * @param options - The optional parameters.
517
517
  */
518
- updateKeyRotationPolicy(name, policy, options = {}) {
518
+ updateKeyRotationPolicy(keyName, policy, options = {}) {
519
519
  return withTrace("updateKeyRotationPolicy", options, async (updatedOptions) => {
520
- 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);
521
521
  return keyRotationTransformations.generatedToPublic(result);
522
522
  });
523
523
  }
@@ -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,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,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AE,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 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 * 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 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 * 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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;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,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"]}
@@ -5,7 +5,7 @@ export { KnownKeyTypes };
5
5
  /**
6
6
  * The latest supported Key Vault service API version
7
7
  */
8
- export const LATEST_API_VERSION = "7.3-preview";
8
+ export const LATEST_API_VERSION = "7.3";
9
9
  /** Known values of {@link KeyOperation} that the service accepts. */
10
10
  export var KnownKeyOperations;
11
11
  (function (KnownKeyOperations) {