EffectiveMongoDBUri Property

General info

Label

Effective MongoDB URI

Description

The actual MongoDB URI used for current connection.

Data type

String

Type

Regular

Code

6530

Symbolic name

MODEL_PROP_EFFECTIVEMONGODBURI

Lua access code

syslib.model.properties.EffectiveMongoDBUri

Available since

1.54

Parent properties

MongoDBConnection

Attributes

Name Tooltip
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs.
PROP_VOLATILE The property exists during runtime of the service only and is not saved to the image.

Examples

Read from or write to the EffectiveMongoDBUri property.

  • Lua

  • C#

-- Read from the EffectiveMongoDBUri
syslib.getvalue("<OBJECT FULL PATH>.LocalCoreSettings.LogStoreSettings.MongoDBConnection.EffectiveMongoDBUri")

-- Write to the EffectiveMongoDBUri
syslib.setvalue("<OBJECT FULL PATH>.LocalCoreSettings.LogStoreSettings.MongoDBConnection.EffectiveMongoDBUri", "new value")
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the EffectiveMongoDBUri
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.LocalCoreSettings.LogStoreSettings.MongoDBConnection.EffectiveMongoDBUri"));
// Write to the EffectiveMongoDBUri
Result result = sli.WriteValue(sc, new WriteItem("new value", "<OBJECT FULL PATH>.LocalCoreSettings.LogStoreSettings.MongoDBConnection.EffectiveMongoDBUri"));