<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 344035 $ -->

<refentry xml:id="mongodb-driver-clientencryption.addkeyaltname" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 <refnamediv>
  <refname>MongoDB\Driver\ClientEncryption::addKeyAltName</refname>
  <refpurpose>Adds an alternate name to a key document</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <modifier>final</modifier> <modifier>public</modifier> <type class="union"><type>object</type><type>null</type></type><methodname>MongoDB\Driver\ClientEncryption::addKeyAltName</methodname>
   <methodparam><type>MongoDB\BSON\Binary</type><parameter>keyId</parameter></methodparam>
   <methodparam><type>string</type><parameter>keyAltName</parameter></methodparam>
  </methodsynopsis>
  <para>
   Adds <parameter>keyAltName</parameter> to the set of alternate names for the
   key document with the given UUID <parameter>keyId</parameter>.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <variablelist>
   <varlistentry>
    <term><parameter>keyId</parameter></term>
    <listitem>
     <para>
      A <classname>MongoDB\BSON\Binary</classname> instance with subtype 4
      (UUID) identifying the key document.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><parameter>keyAltName</parameter></term>
    <listitem>
     <para>
      Alternate name to add to the key document.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns the previous version of the key document, or &null; if no document
   matched.
  </para>
 </refsect1>

 <refsect1 role="errors">
  &reftitle.errors;
  <simplelist>
   &mongodb.throws.std;
   <member>Throws <classname>MongoDB\Driver\Exception\RuntimeException</classname> on other errors.</member>
  </simplelist>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <simplelist>
   <member><function>MongoDB\Driver\ClientEncryption::getKeyByAltName</function></member>
   <member><function>MongoDB\Driver\ClientEncryption::removeKeyAltName</function></member>
  </simplelist>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
