MongoDB\Driver\ClientEncryption::deleteKey
PHP function
Edit on GitHub ✎
(mongodb >=1.15.0)
Deletes a key document
Description
MongoDB\Driver\ClientEncryption::deleteKey(MongoDB\BSON\Binary $keyId): object
Removes the key document with the given UUID keyId from the key vault collection.
Parameters
keyIdA
MongoDB\BSON\Binaryinstance with subtype 4 (UUID) identifying the key document.
Return Values
Returns the result of the internal deleteOne operation on the key vault collection.
Errors/Exceptions
- Throws
MongoDB\Driver\Exception\RuntimeExceptionon other errors.