createLink

On this page

Creates a named connection link to a MongoDB® instance for use in data ingest.

Syntax

db.runCommand({
createLink: <string>,
uri: <string>,
})

Option

Type

Description

createLink

String

Specifies the name of the link.

uri

String

The URI for the remote MongoDB® instance, in mongodb://<user>:<password>@host:27017 format. For MongoDB® Atlas instances, use the mongodb+srv:// scheme.

Example

The following example defines a link named lnkExample:

db.runCommand({
createLink: "lnkExample",
uri: "mongodb://admin:pa55w0rd@svchost:27017",
});

Last modified: January 4, 2024

Was this article helpful?