Required. List of host addresses for a MongoDB cluster. For SRV connection format, this list must contain exactly one DNS host without a port. For Standard connection format, this list must contain all the required hosts in the cluster with their respective ports.
↳ replica_set
string
Optional. Name of the replica set. Only needed for self hosted replica set type MongoDB cluster. For SRV connection format, this field must be empty. For Standard connection format, this field must be specified.
↳ username
string
Required. Username for the MongoDB connection.
↳ password
string
Optional. Password for the MongoDB connection. Mutually exclusive with thesecret_manager_stored_passwordfield.
↳ secret_manager_stored_password
string
Optional. A reference to a Secret Manager resource name storing the SQLServer connection password. Mutually exclusive with thepasswordfield.
Required. List of host addresses for a MongoDB cluster.
For SRV connection format, this list must contain exactly one DNS host
without a port. For Standard connection format, this list must contain all
the required hosts in the cluster with their respective ports.
Required. List of host addresses for a MongoDB cluster.
For SRV connection format, this list must contain exactly one DNS host
without a port. For Standard connection format, this list must contain all
the required hosts in the cluster with their respective ports.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Datastream V1 Client - Class MongodbProfile (2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/php/docs/reference/cloud-datastream/latest/V1.MongodbProfile)\n- [2.3.1](/php/docs/reference/cloud-datastream/2.3.1/V1.MongodbProfile)\n- [2.2.0](/php/docs/reference/cloud-datastream/2.2.0/V1.MongodbProfile)\n- [2.1.1](/php/docs/reference/cloud-datastream/2.1.1/V1.MongodbProfile)\n- [2.0.1](/php/docs/reference/cloud-datastream/2.0.1/V1.MongodbProfile)\n- [1.5.5](/php/docs/reference/cloud-datastream/1.5.5/V1.MongodbProfile)\n- [1.4.2](/php/docs/reference/cloud-datastream/1.4.2/V1.MongodbProfile)\n- [1.3.0](/php/docs/reference/cloud-datastream/1.3.0/V1.MongodbProfile)\n- [1.2.1](/php/docs/reference/cloud-datastream/1.2.1/V1.MongodbProfile)\n- [1.1.0](/php/docs/reference/cloud-datastream/1.1.0/V1.MongodbProfile)\n- [1.0.5](/php/docs/reference/cloud-datastream/1.0.5/V1.MongodbProfile) \nReference documentation and code samples for the Google Cloud Datastream V1 Client class MongodbProfile.\n\nMongoDB profile.\n\nGenerated from protobuf message `google.cloud.datastream.v1.MongodbProfile`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Datastream \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getHostAddresses\n\nRequired. List of host addresses for a MongoDB cluster.\n\nFor SRV connection format, this list must contain exactly one DNS host\nwithout a port. For Standard connection format, this list must contain all\nthe required hosts in the cluster with their respective ports.\n\n### setHostAddresses\n\nRequired. List of host addresses for a MongoDB cluster.\n\nFor SRV connection format, this list must contain exactly one DNS host\nwithout a port. For Standard connection format, this list must contain all\nthe required hosts in the cluster with their respective ports.\n\n### getReplicaSet\n\nOptional. Name of the replica set. Only needed for self hosted replica set\ntype MongoDB cluster. For SRV connection format, this field must be empty.\n\nFor Standard connection format, this field must be specified.\n\n### setReplicaSet\n\nOptional. Name of the replica set. Only needed for self hosted replica set\ntype MongoDB cluster. For SRV connection format, this field must be empty.\n\nFor Standard connection format, this field must be specified.\n\n### getUsername\n\nRequired. Username for the MongoDB connection.\n\n### setUsername\n\nRequired. Username for the MongoDB connection.\n\n### getPassword\n\nOptional. Password for the MongoDB connection. Mutually exclusive with the\n`secret_manager_stored_password` field.\n\n### setPassword\n\nOptional. Password for the MongoDB connection. Mutually exclusive with the\n`secret_manager_stored_password` field.\n\n### getSecretManagerStoredPassword\n\nOptional. A reference to a Secret Manager resource name storing the\nSQLServer connection password. Mutually exclusive with the `password`\nfield.\n\n### setSecretManagerStoredPassword\n\nOptional. A reference to a Secret Manager resource name storing the\nSQLServer connection password. Mutually exclusive with the `password`\nfield.\n\n### getSslConfig\n\nOptional. SSL configuration for the MongoDB connection.\n\n### hasSslConfig\n\n### clearSslConfig\n\n### setSslConfig\n\nOptional. SSL configuration for the MongoDB connection.\n\n### getSrvConnectionFormat\n\nSrv connection format.\n\n### hasSrvConnectionFormat\n\n### setSrvConnectionFormat\n\nSrv connection format.\n\n### getStandardConnectionFormat\n\nStandard connection format.\n\n### hasStandardConnectionFormat\n\n### setStandardConnectionFormat\n\nStandard connection format.\n\n### getMongodbConnectionFormat"]]