MongoDB\Driver\ClientEncryption::__construct
PHP function
Edit on GitHub ✎
(mongodb >=1.14.0)
Create a new ClientEncryption object
Description
MongoDB\Driver\ClientEncryption::__construct(array $options)
Constructs a new MongoDB\Driver\ClientEncryption object with the specified options.
Parameters
optionsOption Type Description keyVaultClient MongoDB\Driver\ManagerThe Manager used to route data key queries. This option is required (unlike with MongoDB\Driver\Manager::createClientEncryption()).
Errors/Exceptions
- Throws
MongoDB\Driver\Exception\RuntimeExceptionif the extension was compiled without libmongocrypt support
Changelog
| Version | Description |
|---|---|
| PECL mongodb 1.16.0 | The AWS KMS provider for client-side encryption now accepts a "sessionToken" option, which can be used to authenticate with temporary AWS credentials.Added "tlsDisableOCSPEndpointCheck" to the "tlsOptions" option.If an empty document is specified for the "azure" or "gcp" KMS provider, the driver will attempt to configure the provider using Automatic Credentials. |
| PECL mongodb 1.15.0 | If an empty document is specified for the "aws" KMS provider, the driver will attempt to configure the provider using Automatic Credentials. |
See Also
MongoDB\Driver\Manager::createClientEncryption()- Explicit (Manual) Client-Side Field Level Encryption in the MongoDB manual