1MONGOC_URI_SET_MECHANISM_PROPERTIES(l3i)bmonMgOoNcGOC_URI_SET_MECHANISM_PROPERTIES(3)
2
3
4

NAME

6       mongoc_uri_set_mechanism_properties  - mongoc_uri_set_mechanism_proper‐
7       ties()
8

SYNOPSIS

10          bool
11          mongoc_uri_set_mechanism_properties (mongoc_uri_t *uri,
12                                               const bson_t *properties);
13

PARAMETERS

15uri: A mongoc_uri_t.
16
17properties: A bson_t .
18

DESCRIPTION

20       Replaces all the options in URI's "authMechanismProperties"  after  the
21       URI has been parsed from a string.
22

RETURNS

24       Returns false if the option cannot be set, for example if properties is
25       not valid BSON data.
26

EXAMPLE

28          mongoc_uri_t *uri;
29          bson_t props = BSON_INITIALIZER;
30
31          uri = mongoc_uri_new (
32             "mongodb://user%40DOMAIN.COM:password@localhost/?authMechanism=GSSAPI"
33             "&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true");
34
35          /* replace all options: replace service name "other" with "my_service", unset
36           * "CANONICALIZE_HOST_NAME" and accept its default.
37           */
38          BSON_APPEND_UTF8 (&props, "SERVICE_NAME", "my_service");
39          mongoc_uri_set_mechanism_properties (uri, &props);
40
41          bson_destroy (&props);
42

AUTHOR

44       MongoDB, Inc
45
47       2017-present, MongoDB, Inc
48
49
50
51
521.21.1                           Mar 02,M2O0N2G2OC_URI_SET_MECHANISM_PROPERTIES(3)
Impressum