1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

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

Reference documentation and code samples for the Network Services v1 API class EndpointPolicy.

EndpointPolicy is a resource that helps apply desired configuration
on the endpoints that match specific criteria.
For example, this resource can be used to apply "authentication config"
an all endpoints that serve on port 8080.

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.NetworkServices.V1.dll

## Constructors

### EndpointPolicy()

    public EndpointPolicy()

### EndpointPolicy(EndpointPolicy)

    public EndpointPolicy(EndpointPolicy other)

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

## Properties

### AuthorizationPolicy

    public string AuthorizationPolicy { get; set; }

Optional. This field specifies the URL of AuthorizationPolicy resource that
applies authorization policies to the inbound traffic at the
matched endpoints. Refer to Authorization. If this field is not
specified, authorization is disabled(no authz checks) for this
endpoint.

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

### AuthorizationPolicyAsAuthorizationPolicyName

    public AuthorizationPolicyName AuthorizationPolicyAsAuthorizationPolicyName { get; set; }

[AuthorizationPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.AuthorizationPolicyName)-typed view over the [AuthorizationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointPolicy#Google_Cloud_NetworkServices_V1_EndpointPolicy_AuthorizationPolicy) resource name
property.

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

### ClientTlsPolicy

    [Obsolete]
    public string ClientTlsPolicy { get; set; }

Optional. Deprecated: This field is not used and is a no-op.
A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set
to specify the authentication for traffic from the proxy to the actual
endpoints. More specifically, it is applied to the outgoing traffic from
the proxy to the endpoint. This is typically used for sidecar model where
the proxy identifies itself as endpoint to the control plane, with the
connection between sidecar and endpoint requiring authentication. If this
field is not set, authentication is disabled(open). Applicable only when
EndpointPolicyType is SIDECAR_PROXY.

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

### ClientTlsPolicyAsClientTlsPolicyName

    [Obsolete]
    public ClientTlsPolicyName ClientTlsPolicyAsClientTlsPolicyName { get; set; }

[ClientTlsPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ClientTlsPolicyName)-typed view over the [ClientTlsPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointPolicy#Google_Cloud_NetworkServices_V1_EndpointPolicy_ClientTlsPolicy) resource name property.

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

### 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; }

Optional. A free-text description of the resource. Max length 1024
characters.

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

### EndpointMatcher

    public EndpointMatcher EndpointMatcher { get; set; }

Required. A matcher that selects endpoints to which the policies should be
applied.

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

### EndpointPolicyName

    public EndpointPolicyName EndpointPolicyName { get; set; }

[EndpointPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointPolicyName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointPolicy#Google_Cloud_NetworkServices_V1_EndpointPolicy_Name) resource name property.

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

### Labels

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

Optional. Set of label tags associated with the EndpointPolicy 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` |   |

### Name

    public string Name { get; set; }

Identifier. Name of the EndpointPolicy resource. It matches pattern
`projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.

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

### ServerTlsPolicy

    public string ServerTlsPolicy { get; set; }

Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is
used to determine the authentication policy to be applied to terminate the
inbound traffic at the identified backends. If this field is not set,
authentication is disabled(open) for this endpoint.

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

### ServerTlsPolicyAsServerTlsPolicyName

    public ServerTlsPolicyName ServerTlsPolicyAsServerTlsPolicyName { get; set; }

[ServerTlsPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.ServerTlsPolicyName)-typed view over the [ServerTlsPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointPolicy#Google_Cloud_NetworkServices_V1_EndpointPolicy_ServerTlsPolicy) resource name property.

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

### TrafficPortSelector

    public TrafficPortSelector TrafficPortSelector { get; set; }

Optional. Port selector for the (matched) endpoints. If no port selector is
provided, the matched config is applied to all ports.

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

### Type

    public EndpointPolicy.Types.EndpointPolicyType Type { get; set; }

Required. The type of endpoint policy. This is primarily used to validate
the configuration.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.EndpointPolicy.Types.EndpointPolicyType` |   |

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