# DataStream v1 API - Class PostgresqlProfile (2.12.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.12.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.11.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.10.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.9.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.8.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.7.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.6.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.5.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.4.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.3.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.2.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.1.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.0.0/Google.Cloud.Datastream.V1.PostgresqlProfile)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/1.0.0/Google.Cloud.Datastream.V1.PostgresqlProfile)

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

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

PostgreSQL database profile.

## Inheritance

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

## Implements

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

## 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)

## Assembly

Google.Cloud.Datastream.V1.dll

## Constructors

### PostgresqlProfile()

    public PostgresqlProfile()

### PostgresqlProfile(PostgresqlProfile)

    public PostgresqlProfile(PostgresqlProfile other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlProfile` |

## Properties

### Database

    public string Database { get; set; }

Required. Database for the PostgreSQL connection.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Hostname

    public string Hostname { get; set; }

Required. Hostname for the PostgreSQL connection.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Password

    public string Password { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Port

    public int Port { get; set; }

Port for the PostgreSQL connection, default value is 5432.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### SecretManagerStoredPassword

    public string SecretManagerStoredPassword { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SslConfig

    public PostgresqlSslConfig SslConfig { get; set; }

Optional. SSL configuration for the PostgreSQL connection.
In case PostgresqlSslConfig is not set, the connection will use the default
SSL mode, which is `prefer` (i.e. this mode will only use encryption if
enabled from database side, otherwise will use unencrypted communication)

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig` |   |

### Username

    public string Username { get; set; }

Required. Username for the PostgreSQL connection.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |