<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.mongodb-driver-clientencryption.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'mongodb-driver-clientencryption.rewrapmanydatakey.php',
    1 => 'MongoDB\\Driver\\ClientEncryption::rewrapManyDataKey',
    2 => 'Rewraps data keys',
  ),
  'up' => 
  array (
    0 => 'class.mongodb-driver-clientencryption.php',
    1 => 'MongoDB\\Driver\\ClientEncryption',
  ),
  'prev' => 
  array (
    0 => 'mongodb-driver-clientencryption.removekeyaltname.php',
    1 => 'MongoDB\\Driver\\ClientEncryption::removeKeyAltName',
  ),
  'next' => 
  array (
    0 => 'class.mongodb-driver-serverapi.php',
    1 => 'MongoDB\\Driver\\ServerApi',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mongodb/mongodb/driver/clientencryption/rewrapmanydatakey.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="mongodb-driver-clientencryption.rewrapmanydatakey" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoDB\Driver\ClientEncryption::rewrapManyDataKey</h1>
  <p class="verinfo">(mongodb &gt;=1.15.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\ClientEncryption::rewrapManyDataKey</span> &mdash; <span class="dc-title">Rewraps data keys</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mongodb-driver-clientencryption.rewrapmanydatakey-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">final</span> <span class="modifier">public</span> <span class="methodname"><strong>MongoDB\Driver\ClientEncryption::rewrapManyDataKey</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.object.php" class="type object">object</a></span></span> <code class="parameter">$filter</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.array.php" class="type array">array</a></span></span> <code class="parameter">$options</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.object.php" class="type object">object</a></span></div>

  <p class="simpara">
   Rewraps (i.e. decrypts and re-encrypts) zero or more data keys in the key
   vault collection that match the given <code class="parameter">filter</code>.
  </p>
  <p class="simpara">
   If the <code class="literal">&quot;provider&quot;</code> option is not specified, matching data
   keys will be rewrapped with their current KMS provider. Otherwise, matching
   data keys will be re-encrypted according to the specified
   <code class="literal">&quot;provider&quot;</code> and <code class="literal">&quot;masterKey&quot;</code> options.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-mongodb-driver-clientencryption.rewrapmanydatakey-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
   
    <dt><code class="parameter">filter</code> (<span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.object.php" class="type object">object</a></span></span>)</dt>
    <dd>
     <p class="para">
      Das <a href="https://www.mongodb.com/docs/manual/tutorial/query-documents/" class="link external">&raquo;&nbsp;Abfrage-Prädikat</a>.
      Ein leeres Prädikat passt auf alle Dokumente in der Sammlung.
     </p>
     <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
      <span class="simpara">
       Bei der Auswertung von Abfragekriterien vergleicht MongoDB Typen und Werte gemäß seiner eigenen
       <a href="https://www.mongodb.com/docs/manual/reference/bson-type-comparison-order/" class="link external">&raquo;&nbsp;Vergleichsregeln für BSON-Typen</a>, die sich von PHPs Regeln für <a href="types.comparisons.php" class="link">Typenvergleich</a> und <a href="language.types.type-juggling.php" class="link">Typen-Jonglage</a> unterscheidet. Wenn es eine Übereinstimmung mit einem speziellen BSON-Typ gibt, sollten die Abfragekriterien die entsprechende <a href="mongodb.bson.php" class="link">BSON-Klasse</a> verwenden (z. B. <span class="classname"><a href="class.mongodb-bson-objectid.php" class="classname">MongoDB\BSON\ObjectId</a></span>, um auf eine <a href="https://www.mongodb.com/docs/manual/reference/bson-types/#objectid" class="link external">&raquo;&nbsp;ObjectId</a> zu passen).
      </span>
     </p></blockquote>
    </dd>
   

   
    <dt><code class="parameter">options</code></dt>
    <dd>
     <p class="para">
      <table class="doctable table">
       <caption><strong>RewrapManyDataKey options</strong></caption>
       
        <thead>
         <tr>
          <th>Option</th>
          <th>Type</th>
          <th>Description</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>provider</td>
          <td><span class="type"><a href="language.types.string.php" class="type string">string</a></span></td>
          <td>
           <span class="simpara">
            The KMS provider (e.g. <code class="literal">&quot;local&quot;</code>,
            <code class="literal">&quot;aws&quot;</code>) that will be used to re-encrypt the
            matched data keys.
           </span>
           <span class="simpara">
            If a KMS provider is not specified, matched data keys will be
            re-encrypted with their current KMS provider.
           </span>
          </td>
         </tr>

         <tr>
          <td>masterKey</td>
          <td><span class="type"><a href="language.types.array.php" class="type array">array</a></span></td>
          <td>
           <span class="simpara">
            The masterKey identifies a KMS-specific key used to encrypt the new
            data key. This option should not be specified without the
            <code class="literal">&quot;provider&quot;</code> option. This option is required if
            <code class="literal">&quot;provider&quot;</code> is specified and not
            <code class="literal">&quot;local&quot;</code>.
           </span>
           
  <p class="para">
   <table class="doctable table">
    <caption><strong><code class="literal">&quot;aws&quot;</code>-Provider-Optionen</strong></caption>
    
     <thead>
      <tr>
       <th>Option</th>
       <th>Typ</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>region</td>
       <td>string</td>
       <td>Erforderlich</td>
      </tr>

      <tr>
       <td>key</td>
       <td>string</td>
       <td>Erforderlich; der Amazon-Ressourcenname (ARN) für den AWS-Kundenhauptschlüssel (CMK).</td>
      </tr>

      <tr>
       <td>endpoint</td>
       <td>string</td>
       <td>Optional; ein alternativer Host-Bezeichner, an den KMS-Anfragen gesendet werden; kann die Portnummer enthalten.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong><code class="literal">&quot;azure&quot;</code>-Provider-Optionen</strong></caption>
    
     <thead>
      <tr>
       <th>Option</th>
       <th>Typ</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>keyVaultEndpoint</td>
       <td>string</td>
       <td>Erforderlich; der Host mit optionalem Port (z. B. &quot;example.vault.azure.net&quot;).</td>
      </tr>

      <tr>
       <td>keyName</td>
       <td>string</td>
       <td>Erforderlich</td>
      </tr>

      <tr>
       <td>keyVersion</td>
       <td>string</td>
       <td>Optional; eine bestimmte Version des genannten Schlüssels. Standardmäßig wird die primäre Version des Schlüssels verwendet.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong><code class="literal">&quot;gcp&quot;</code>-Provider-Optionen</strong></caption>
    
     <thead>
      <tr>
       <th>Option</th>
       <th>Typ</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>projectId</td>
       <td>string</td>
       <td>Erforderlich</td>
      </tr>

      <tr>
       <td>location</td>
       <td>string</td>
       <td>Erforderlich</td>
      </tr>

      <tr>
       <td>keyRing</td>
       <td>string</td>
       <td>Erforderlich</td>
      </tr>

      <tr>
       <td>keyName</td>
       <td>string</td>
       <td>Erforderlich</td>
      </tr>

      <tr>
       <td>keyVersion</td>
       <td>string</td>
       <td>Optional; eine bestimmte Version des genannten Schlüssels. Standardmäßig wird die primäre Version des Schlüssels verwendet.</td>
      </tr>

      <tr>
       <td>endpoint</td>
       <td>string</td>
       <td>Optional; der Host mit optionalem Port. Der Standardwert ist &quot;cloudkms.googleapis.com&quot;.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong><code class="literal">&quot;kmip&quot;</code>-Provider-Optionen</strong></caption>
    
     <thead>
      <tr>
       <th>Option</th>
       <th>Typ</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>keyId</td>
       <td>string</td>
       <td>Optional; der eindeutige Bezeichner für ein 96 Byte großes, verwaltetes geheimes KMIP-Datenobjekt. Wenn nicht angegeben, erstellt der Treiber ein zufälliges geheimes KMIP-Datenobjekt mit 96 Byte.</td>
      </tr>

      <tr>
       <td>endpoint</td>
       <td>string</td>
       <td>Optional; der Host mit optionalem Port.</td>
      </tr>

      <tr>
       <td>delegated</td>
       <td>bool</td>
       <td>Optional; wenn true, soll dieser Schlüssel vom KMIP-Server entschlüsselt werden.</td>
      </tr>

     </tbody>
    
   </table>

  </p>

          </td>
         </tr>

        </tbody>
       
      </table>

     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongodb-driver-clientencryption.rewrapmanydatakey-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Returns an object, which will have an optional
   <code class="literal">bulkWriteResult</code> property containing the result of the
   internal <code class="literal">bulkWrite</code> operation as an object. If no data keys
   matched the filter or the write was unacknowledged, the
   <code class="literal">bulkWriteResult</code> property will be <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mongodb-driver-clientencryption.rewrapmanydatakey-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <ul class="simplelist">
   <li>Wirft eine <span class="classname"><a href="class.mongodb-driver-exception-invalidargumentexception.php" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a></span>, wenn beim Analysieren von Argumenten ein Fehler auftritt.</li><li>Wirft eine <span class="classname"><a href="class.mongodb-driver-exception-connectionexception.php" class="classname">MongoDB\Driver\Exception\ConnectionException</a></span>, wenn der Aufbau einer Verbindung zum Server fehlschlägt (aus einem anderen Grund als der Authentifizierung).</li><li>Wirft eine <span class="classname"><a href="class.mongodb-driver-exception-authenticationexception.php" class="classname">MongoDB\Driver\Exception\AuthenticationException</a></span>, wenn eine Authentifizierung erforderlich ist und fehlschlägt.</li>
   <li>Throws <span class="classname"><a href="class.mongodb-driver-exception-encryptionexception.php" class="classname">MongoDB\Driver\Exception\EncryptionException</a></span> if an error occurs while decrypting or re-encrypting a data key.</li>
   <li>Throws <span class="classname"><a href="class.mongodb-driver-exception-runtimeexception.php" class="classname">MongoDB\Driver\Exception\RuntimeException</a></span> on other errors.</li>
  </ul>
 </div>


 <div class="refsect1 changelog" id="refsect1-mongodb-driver-clientencryption.rewrapmanydatakey-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>PECL mongodb 1.20.0</td>
      <td>
       Added <code class="literal">&quot;delegated&quot;</code> to the KMIP provider masterKey options.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

</div><?php manual_footer($setup); ?>