diff --git a/pymongo/asynchronous/encryption.py b/pymongo/asynchronous/encryption.py index eca189a526..e4f91294a4 100644 --- a/pymongo/asynchronous/encryption.py +++ b/pymongo/asynchronous/encryption.py @@ -1176,12 +1176,11 @@ async def rewrap_many_data_key( client_encryption.rewrap_many_data_key( filter={"keyAltNames": "optional filter for which keys you want to update"}, + provider="azure", # replace with your cloud provider master_key={ - "provider": "azure", # replace with your cloud provider - "master_key": { - # put the rest of your master_key options here - "key": "" - }, + # put the rest of your master_key options here + "keyVaultEndpoint": "", + "keyName": "", }, ) diff --git a/pymongo/synchronous/encryption.py b/pymongo/synchronous/encryption.py index 1d9fae5888..1626c16f58 100644 --- a/pymongo/synchronous/encryption.py +++ b/pymongo/synchronous/encryption.py @@ -1169,12 +1169,11 @@ def rewrap_many_data_key( client_encryption.rewrap_many_data_key( filter={"keyAltNames": "optional filter for which keys you want to update"}, + provider="azure", # replace with your cloud provider master_key={ - "provider": "azure", # replace with your cloud provider - "master_key": { - # put the rest of your master_key options here - "key": "" - }, + # put the rest of your master_key options here + "keyVaultEndpoint": "", + "keyName": "", }, )