MongoDB\Driver\ClientEncryption::removeKeyAltName

Removes an alternate name from a key document

&reftitle.description; final public ``object``null```MongoDB\Driver\ClientEncryption::removeKeyAltName` `MongoDB\BSON\Binary` `keyId` `string` `keyAltName`

Removes `keyAltName` from the set of alternate names for the key document with the given UUID `keyId`.

&reftitle.parameters;

`keyId`

- A `MongoDB\BSON\Binary` instance with subtype 4 (UUID) identifying the key document.

`keyAltName`

- Alternate name to remove from the key document.

&reftitle.returnvalues;

Returns the previous version of the key document, or &null; if no document matched.

&reftitle.errors;

&mongodb.throws.std;
- Throws `MongoDB\Driver\Exception\RuntimeException` on other errors.

&reftitle.seealso;

- `MongoDB\Driver\ClientEncryption::addKeyAltName`
- `MongoDB\Driver\ClientEncryption::getKeyByAltName`