.\" Man page generated from reStructuredText. . .TH "MONGOC_URI_GET_MECHANISM_PROPERTIES" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_uri_get_mechanism_properties \- mongoc_uri_get_mechanism_properties() . .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 bool mongoc_uri_get_mechanism_properties (const mongoc_uri_t *uri, bson_t *properties /* OUT */); .ft P .fi .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBuri\fP: A \fBmongoc_uri_t\fP\&. .IP \(bu 2 \fBproperties\fP: An uninitialized \fI\%bson_t\fP\&. .UNINDENT .SH DESCRIPTION .sp Fetches the "authMechanismProperties" options set on this \fBmongoc_uri_t\fP\&. The out\-parameter \fBproperties\fP should be an uninitialized, stack\-allocated \fI\%bson_t\fP\&. It is statically initialized with \fI\%bson_init_static()\fP to point to the internal data of \fBuri\fP, so its contents must not be modified and it becomes invalid after \fBuri\fP is destroyed. .SH RETURNS .sp If no "authMechanismProperties" have been set on \fBuri\fP, this functions returns false and \fBproperties\fP remains uninitialized. .SH EXAMPLE .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C mongoc_uri_t *uri; bson_t props; uri = mongoc_uri_new ( "mongodb://user%40DOMAIN.COM:password@localhost/?authMechanism=GSSAPI" "&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true"); if (mongoc_uri_get_mechanism_properties (uri, &props)) { char *json = bson_as_canonical_extended_json (&props, NULL); printf ("%s\en", json); bson_free (json); } else { printf ("No authMechanismProperties.\en"); } .ft P .fi .UNINDENT .UNINDENT .sp This code produces the output: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C { "SERVICE_NAME" : "other", "CANONICALIZE_HOST_NAME" : "true" } .ft P .fi .UNINDENT .UNINDENT .SH SEE ALSO .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .