.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "MONGOC_AUTO_ENCRYPTION_OPTS_SET_KMS_PROVIDERS" "3" "Apr 14, 2025" "1.30.3" "libmongoc"
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
.sp
.EX
void
mongoc_auto_encryption_opts_set_kms_providers (
   mongoc_auto_encryption_opts_t *opts, const bson_t *kms_providers);
.EE
.UNINDENT
.UNINDENT
.SH PARAMETERS
.INDENT 0.0
.IP \(bu 2
\fBopts\fP: The \fI\%mongoc_auto_encryption_opts_t\fP
.IP \(bu 2
\fBkms_providers\fP: A \X'tty: link https://www.mongoc.org/libbson/current/bson_t.html'\fI\%bson_t\fP\X'tty: link' containing configuration for an external Key Management Service (KMS).
.UNINDENT
.sp
\fBkms_providers\fP is a BSON document containing configuration for each KMS provider.
.sp
KMS providers are specified as a string of the form \fB<KMS provider type>\fP or \fB<KMS provider type>:<KMS provider name>\fP\&.
The supported KMS provider types are \fBaws\fP, \fBazure\fP, \fBgcp\fP, \fBlocal\fP, and \fBkmip\fP\&. The optional name enables configuring multiple KMS providers with the same KMS provider type (e.g. \fBaws:name1\fP and \fBaws:name2\fP can refer to different AWS accounts).
At least one KMS provider must be specified.
.sp
The format for the KMS provider type \fBaws\fP is as follows:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
aws: {
   accessKeyId: String,
   secretAccessKey: String
}
.EE
.UNINDENT
.UNINDENT
.sp
The format for the KMS provider type \fBlocal\fP is as follows:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
local: {
   key: <96 byte BSON binary of subtype 0> or String /* The master key used to encrypt/decrypt data keys. May be passed as a base64 encoded string. */
}
.EE
.UNINDENT
.UNINDENT
.sp
The format for the KMS provider type \fBazure\fP is as follows:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
azure: {
   tenantId: String,
   clientId: String,
   clientSecret: String,
   identityPlatformEndpoint: Optional<String> /* Defaults to login.microsoftonline.com */
}
.EE
.UNINDENT
.UNINDENT
.sp
The format for the KMS provider type \fBgcp\fP is as follows:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
gcp: {
   email: String,
   privateKey: byte[] or String, /* May be passed as a base64 encoded string. */
   endpoint: Optional<String> /* Defaults to oauth2.googleapis.com */
}
.EE
.UNINDENT
.UNINDENT
.sp
The format for the KMS provider type \fBkmip\fP is as follows:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
kmip: {
   endpoint: String
}
.EE
.UNINDENT
.UNINDENT
.sp
KMS providers may include an optional name suffix separate with a colon. This enables configuring multiple KMS providers with the same KMS provider type. Example:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
\(dqaws:name1\(dq: {
   accessKeyId: String,
   secretAccessKey: String
},
\(dqaws:name2\(dq: {
   accessKeyId: String,
   secretAccessKey: String
}
.EE
.UNINDENT
.UNINDENT
.sp
\fBSEE ALSO:\fP
.INDENT 0.0
.INDENT 3.5
.nf
\fI\%mongoc_client_enable_auto_encryption()\fP
.fi
.sp
.nf
\X'tty: link https://www.mongodb.com/docs/languages/c/c-driver/current/libmongoc/guides/in-use-encryption/'\fI\%In\-Use Encryption\fP\X'tty: link'
.fi
.sp
.UNINDENT
.UNINDENT
.SH AUTHOR
MongoDB, Inc
.SH COPYRIGHT
2009-present, MongoDB, Inc.
.\" Generated by docutils manpage writer.
.