2.13.0 (latest) 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.0.0

    public sealed class MongodbProfile : IMessage<MongodbProfile>, IEquatable<MongodbProfile>, IDeepCloneable<MongodbProfile>, IBufferMessage, IMessage

Reference documentation and code samples for the DataStream v1 API class MongodbProfile.

Profile for connecting to a MongoDB source.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> MongodbProfile

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[MongodbProfile](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.MongodbProfile.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[MongodbProfile](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.MongodbProfile.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[MongodbProfile](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.MongodbProfile.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Datastream.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.md.txt)

## Assembly

Google.Cloud.Datastream.V1.dll

## Constructors

### MongodbProfile()

    public MongodbProfile()

### MongodbProfile(MongodbProfile)

    public MongodbProfile(MongodbProfile other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `MongodbProfile` |

## Properties

### AdditionalOptions

    public MapField<string, string> AdditionalOptions { get; }

Optional. Specifies additional options for the MongoDB connection.

The options should be sent as key-value pairs, for example:
`additional_options =
{"serverSelectionTimeoutMS": "10000", "directConnection": "true"}`.

Keys are case-sensitive and should match the official MongoDB connection
string options:
<https://www.mongodb.com/docs/manual/reference/connection-string-options/>

The server will not modify the values provided by the user.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MapFieldstringstring` |   |

### HostAddresses

    public RepeatedField<HostAddress> HostAddresses { get; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldHostAddress` |   |

### MongodbConnectionFormatCase

    public MongodbProfile.MongodbConnectionFormatOneofCase MongodbConnectionFormatCase { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MongodbProfileMongodbConnectionFormatOneofCase` |   |

### Password

    public string Password { get; set; }

Optional. Password for the MongoDB connection. Mutually exclusive with the
`secret_manager_stored_password` field.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### ReplicaSet

    public string ReplicaSet { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### SecretManagerStoredPassword

    public string SecretManagerStoredPassword { get; set; }

Optional. A reference to a Secret Manager resource name storing the
SQLServer connection password. Mutually exclusive with the `password`
field.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### SrvConnectionFormat

    public SrvConnectionFormat SrvConnectionFormat { get; set; }

Srv connection format.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SrvConnectionFormat` |   |

### SslConfig

    public MongodbSslConfig SslConfig { get; set; }

Optional. SSL configuration for the MongoDB connection.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MongodbSslConfig` |   |

### StandardConnectionFormat

    public StandardConnectionFormat StandardConnectionFormat { get; set; }

Standard connection format.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `StandardConnectionFormat` |   |

### Username

    public string Username { get; set; }

Required. Username for the MongoDB connection.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |