@@ -260,23 +260,19 @@ def close(self):
260260
261261
262262class RewrapManyDataKeyResult (object ):
263- def __init__ (self , bulk_write_result : Optional [BulkWriteResult ] = None ) -> None :
264- """Result object returned by a ``rewrap_many_data_key`` operation.
263+ """Result object returned by a :meth:`~ClientEncryption.rewrap_many_data_key` operation.
265264
266- :Parameters:
267- - `bulk_write_result`: The result of the bulk write operation used to
268- update the key vault collection with one or more rewrapped data keys.
269- If ``rewrap_many_data_key()`` does not find any matching keys to
270- rewrap, no bulk write operation will be executed and this field will
271- be ``None``.
272- """
265+ .. versionadded:: 4.2
266+ """
267+
268+ def __init__ (self , bulk_write_result : Optional [BulkWriteResult ] = None ) -> None :
273269 self ._bulk_write_result = bulk_write_result
274270
275271 @property
276272 def bulk_write_result (self ) -> Optional [BulkWriteResult ]:
277273 """The result of the bulk write operation used to update the key vault
278274 collection with one or more rewrapped data keys. If
279- `` rewrap_many_data_key()` ` does not find any matching keys to rewrap,
275+ :meth:`~ClientEncryption. rewrap_many_data_key` does not find any matching keys to rewrap,
280276 no bulk write operation will be executed and this field will be
281277 ``None``.
282278 """
@@ -717,6 +713,8 @@ def get_key(self, id: Binary) -> Optional[RawBSONDocument]:
717713
718714 :Returns:
719715 The key document.
716+
717+ .. versionadded:: 4.2
720718 """
721719 self ._check_closed ()
722720 return self ._key_vault_coll .find_one ({"_id" : id })
@@ -727,6 +725,8 @@ def get_keys(self) -> Cursor[RawBSONDocument]:
727725 :Returns:
728726 An instance of :class:`~pymongo.cursor.Cursor` over the data key
729727 documents.
728+
729+ .. versionadded:: 4.2
730730 """
731731 self ._check_closed ()
732732 return self ._key_vault_coll .find ({})
@@ -741,6 +741,8 @@ def delete_key(self, id: Binary) -> DeleteResult:
741741
742742 :Returns:
743743 The delete result.
744+
745+ .. versionadded:: 4.2
744746 """
745747 self ._check_closed ()
746748 return self ._key_vault_coll .delete_one ({"_id" : id })
@@ -756,6 +758,8 @@ def add_key_alt_name(self, id: Binary, key_alt_name: str) -> Any:
756758
757759 :Returns:
758760 The previous version of the key document.
761+
762+ .. versionadded:: 4.2
759763 """
760764 self ._check_closed ()
761765 update = {"$addToSet" : {"keyAltNames" : key_alt_name }}
@@ -769,6 +773,8 @@ def get_key_by_alt_name(self, key_alt_name: str) -> Optional[RawBSONDocument]:
769773
770774 :Returns:
771775 The key document.
776+
777+ .. versionadded:: 4.2
772778 """
773779 self ._check_closed ()
774780 return self ._key_vault_coll .find_one ({"keyAltNames" : key_alt_name })
@@ -786,6 +792,8 @@ def remove_key_alt_name(self, id: Binary, key_alt_name: str) -> Optional[RawBSON
786792
787793 :Returns:
788794 Returns the previous version of the key document.
795+
796+ .. versionadded:: 4.2
789797 """
790798 self ._check_closed ()
791799 pipeline = [
@@ -825,6 +833,8 @@ def rewrap_many_data_key(
825833
826834 :Returns:
827835 A :class:`RewrapManyDataKeyResult`.
836+
837+ .. versionadded:: 4.2
828838 """
829839 self ._check_closed ()
830840 with _wrap_encryption_errors ():
0 commit comments