PYTHON-3599 Fix create_data_key/key_alt_names docs example (#1151)

This commit is contained in:
Shane Harvey 2023-02-09 11:39:04 -08:00 committed by GitHub
parent 2e6e9a8507
commit 5635ef9ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -706,9 +706,9 @@ class ClientEncryption(Generic[_DocumentType]):
name instead of by ``key_id``. The following example shows creating
and referring to a data key by alternate name::
client_encryption.create_data_key("local", keyAltNames=["name1"])
client_encryption.create_data_key("local", key_alt_names=["name1"])
# reference the key with the alternate name
client_encryption.encrypt("457-55-5462", keyAltName="name1",
client_encryption.encrypt("457-55-5462", key_alt_name="name1",
algorithm=Algorithm.AEAD_AES_256_CBC_HMAC_SHA_512_Random)
- `key_material` (optional): Sets the custom key material to be used
by the data key for encryption and decryption.