.\" Man page generated from reStructuredText. . .TH "MONGOC_CLIENT_ENCRYPTION_DATAKEY_OPTS_SET_MASTERKEY" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_client_encryption_datakey_opts_set_masterkey \- mongoc_client_encryption_datakey_opts_set_masterkey() . .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 .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C void mongoc_client_encryption_datakey_opts_set_masterkey ( mongoc_client_encryption_datakey_opts_t *opts, const bson_t *masterkey); .ft P .fi .UNINDENT .UNINDENT .sp Identifies the masterkey for the Key Management Service (KMS) provider used to encrypt a new data key. .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBopts\fP: A \fBmongoc_client_encryption_datakey_opts_t\fP .IP \(bu 2 \fBmasterkey\fP: A \fI\%bson_t\fP document describing the KMS provider specific masterkey. .UNINDENT .SH DESCRIPTION .sp Setting the masterkey is required if using AWS KMS, and \fBmasterkey\fP must have the form: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C { region: , // Required. key: , // Required. The Amazon Resource Name (ARN) to the AWS customer master key (CMK). endpoint: // Optional. An alternate host identifier to send KMS requests to. May include port number. } .ft P .fi .UNINDENT .UNINDENT .sp The value of "endpoint" is a host name with optional port number separated by a colon. E.g. "kms.us\-east\-1.amazonaws.com" or "kms.us\-east\-1.amazonaws.com:443" .sp This function is only applicable for the "aws" KMS provider. It is not applicable for creating data keys with the "local" KMS provider (as configured in \fBmongoc_client_encryption_opts_set_kms_providers()\fP). .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .