# Network Security v1beta1 API - Class ServerTlsPolicy (2.0.0-beta08)

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

- [2.0.0-beta08 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy)
- [2.0.0-beta07](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/2.0.0-beta07/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy)
- [1.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/1.0.0-beta02/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy)

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

Reference documentation and code samples for the Network Security v1beta1 API class ServerTlsPolicy.

ServerTlsPolicy is a resource that specifies how a server should authenticate
incoming requests. This resource itself does not affect configuration unless
it is attached to a target https proxy or endpoint config selector resource.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ServerTlsPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ServerTlsPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ServerTlsPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy), [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.NetworkSecurity.V1Beta1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1)

## Assembly

Google.Cloud.NetworkSecurity.V1Beta1.dll

## Constructors

### ServerTlsPolicy()

    public ServerTlsPolicy()

### ServerTlsPolicy(ServerTlsPolicy)

    public ServerTlsPolicy(ServerTlsPolicy other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy` |

## Properties

### AllowOpen

    public bool AllowOpen { get; set; }

Determines if server allows plaintext connections. If set to true, server
allows plain text connections. By default, it is set to false. This setting
is not exclusive of other encryption modes. For example, if `allow_open`
and `mtls_policy` are set, server allows both plain text and mTLS
connections. See documentation of other encryption modes to confirm
compatibility.

Consider using it if you wish to upgrade in place your deployment to TLS
while having mixed TLS and non-TLS traffic reaching port :80.

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

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The timestamp when the resource was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Description

    public string Description { get; set; }

Free-text description of the resource.

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

### Labels

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

Set of label tags associated with the resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### MtlsPolicy

    public ServerTlsPolicy.Types.MTLSPolicy MtlsPolicy { get; set; }

Defines a mechanism to provision peer validation certificates for peer to
peer authentication (Mutual TLS - mTLS). If not specified, client
certificate will not be requested. The connection is treated as TLS and not
mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain
text and mTLS connections.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy.Types.MTLSPolicy` |   |

### Name

    public string Name { get; set; }

Required. Name of the ServerTlsPolicy resource. It matches the pattern
`projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`

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

### ServerCertificate

    public CertificateProvider ServerCertificate { get; set; }

Defines a mechanism to provision server identity (public and private keys).
Cannot be combined with `allow_open` as a permissive mode that allows both
plain text and TLS is not supported.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.CertificateProvider` |   |

### ServerTlsPolicyName

    public ServerTlsPolicyName ServerTlsPolicyName { get; set; }

[ServerTlsPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicyName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicy#Google_Cloud_NetworkSecurity_V1Beta1_ServerTlsPolicy_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.ServerTlsPolicyName` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The timestamp when the resource was updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |