# Datastream V1 API - Class Google::Cloud::Datastream::V1::MongodbProfile (v1.7.0)

1.7.0 (latest) 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.1 1.0.0 0.13.0 0.12.0 0.11.0 0.10.1 0.9.2 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Datastream V1 API class Google::Cloud::Datastream::V1::MongodbProfile.

MongoDB profile.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #host_addresses

    def host_addresses() -> ::Array<::Google::Cloud::Datastream::V1::HostAddress>

**Returns**

- (::Array\<[::Google::Cloud::Datastream::V1::HostAddress](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-HostAddress)\>) --- 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.

### #host_addresses=

    def host_addresses=(value) -> ::Array<::Google::Cloud::Datastream::V1::HostAddress>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Datastream::V1::HostAddress](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-HostAddress)\>) --- 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.
**Returns**

- (::Array\<[::Google::Cloud::Datastream::V1::HostAddress](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-HostAddress)\>) --- 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.

### #password

    def password() -> ::String

**Returns**

- (::String) --- Optional. Password for the MongoDB connection. Mutually exclusive with the `secret_manager_stored_password` field.

### #password=

    def password=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Password for the MongoDB connection. Mutually exclusive with the `secret_manager_stored_password` field.
**Returns**

- (::String) --- Optional. Password for the MongoDB connection. Mutually exclusive with the `secret_manager_stored_password` field.

### #replica_set

    def replica_set() -> ::String

**Returns**

- (::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.

### #replica_set=

    def replica_set=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #secret_manager_stored_password

    def secret_manager_stored_password() -> ::String

**Returns**

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

### #secret_manager_stored_password=

    def secret_manager_stored_password=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. A reference to a Secret Manager resource name storing the SQLServer connection password. Mutually exclusive with the `password` field.
**Returns**

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

### #srv_connection_format

    def srv_connection_format() -> ::Google::Cloud::Datastream::V1::SrvConnectionFormat

**Returns**

- ([::Google::Cloud::Datastream::V1::SrvConnectionFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-SrvConnectionFormat)) --- Srv connection format.


  Note: The following fields are mutually exclusive: `srv_connection_format`, `standard_connection_format`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #srv_connection_format=

    def srv_connection_format=(value) -> ::Google::Cloud::Datastream::V1::SrvConnectionFormat

**Parameter**

- **value** ([::Google::Cloud::Datastream::V1::SrvConnectionFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-SrvConnectionFormat)) --- Srv connection format.


  Note: The following fields are mutually exclusive: `srv_connection_format`, `standard_connection_format`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Datastream::V1::SrvConnectionFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-SrvConnectionFormat)) --- Srv connection format.


  Note: The following fields are mutually exclusive: `srv_connection_format`, `standard_connection_format`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #ssl_config

    def ssl_config() -> ::Google::Cloud::Datastream::V1::MongodbSslConfig

**Returns**

- ([::Google::Cloud::Datastream::V1::MongodbSslConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-MongodbSslConfig)) --- Optional. SSL configuration for the MongoDB connection.

### #ssl_config=

    def ssl_config=(value) -> ::Google::Cloud::Datastream::V1::MongodbSslConfig

**Parameter**

- **value** ([::Google::Cloud::Datastream::V1::MongodbSslConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-MongodbSslConfig)) --- Optional. SSL configuration for the MongoDB connection.
**Returns**

- ([::Google::Cloud::Datastream::V1::MongodbSslConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-MongodbSslConfig)) --- Optional. SSL configuration for the MongoDB connection.

### #standard_connection_format

    def standard_connection_format() -> ::Google::Cloud::Datastream::V1::StandardConnectionFormat

**Returns**

- ([::Google::Cloud::Datastream::V1::StandardConnectionFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-StandardConnectionFormat)) --- Standard connection format.


  Note: The following fields are mutually exclusive: `standard_connection_format`, `srv_connection_format`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #standard_connection_format=

    def standard_connection_format=(value) -> ::Google::Cloud::Datastream::V1::StandardConnectionFormat

**Parameter**

- **value** ([::Google::Cloud::Datastream::V1::StandardConnectionFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-StandardConnectionFormat)) --- Standard connection format.


  Note: The following fields are mutually exclusive: `standard_connection_format`, `srv_connection_format`. If a field in that set is populated, all other fields in the set will automatically be cleared.
**Returns**

- ([::Google::Cloud::Datastream::V1::StandardConnectionFormat](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-datastream-v1/latest/Google-Cloud-Datastream-V1-StandardConnectionFormat)) --- Standard connection format.


  Note: The following fields are mutually exclusive: `standard_connection_format`, `srv_connection_format`. If a field in that set is populated, all other fields in the set will automatically be cleared.

### #username

    def username() -> ::String

**Returns**

- (::String) --- Required. Username for the MongoDB connection.

### #username=

    def username=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. Username for the MongoDB connection.
**Returns**

- (::String) --- Required. Username for the MongoDB connection.