php8.5
Home/ Manual/ driver / clientencryption/ MongoDB\Driver\ClientEncryption::deleteKey

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

keyId

A MongoDB\BSON\Binary instance 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\RuntimeException on other errors.

Source: reference/mongodb/mongodb/driver/clientencryption/deletekey.xml · from the official PHP manual (php/doc-en)