# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::EndpointPolicy (v2.10.1)

2.10.1 (latest) 2.10.0 2.9.0 2.8.0 2.7.0 2.6.1 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.1 1.2.0 1.1.0 1.0.1 0.2.0 0.1.0 Reference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::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.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #authorization_policy

    def authorization_policy() -> ::String

**Returns**

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

### #authorization_policy=

    def authorization_policy=(value) -> ::String

**Parameter**

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

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

### #client_tls_policy

    def client_tls_policy() -> ::String

**Returns**

- (::String) --- Optional. 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.

### #client_tls_policy=

    def client_tls_policy=(value) -> ::String

**Parameter**

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

- (::String) --- Optional. 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.

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The timestamp when the resource was created.

### #description

    def description() -> ::String

**Returns**

- (::String) --- Optional. A free-text description of the resource. Max length 1024 characters.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. A free-text description of the resource. Max length 1024 characters.
**Returns**

- (::String) --- Optional. A free-text description of the resource. Max length 1024 characters.

### #endpoint_matcher

    def endpoint_matcher() -> ::Google::Cloud::NetworkServices::V1::EndpointMatcher

**Returns**

- ([::Google::Cloud::NetworkServices::V1::EndpointMatcher](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher)) --- Required. A matcher that selects endpoints to which the policies should be applied.

### #endpoint_matcher=

    def endpoint_matcher=(value) -> ::Google::Cloud::NetworkServices::V1::EndpointMatcher

**Parameter**

- **value** ([::Google::Cloud::NetworkServices::V1::EndpointMatcher](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher)) --- Required. A matcher that selects endpoints to which the policies should be applied.
**Returns**

- ([::Google::Cloud::NetworkServices::V1::EndpointMatcher](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointMatcher)) --- Required. A matcher that selects endpoints to which the policies should be applied.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Set of label tags associated with the EndpointPolicy resource.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Set of label tags associated with the EndpointPolicy resource.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. Set of label tags associated with the EndpointPolicy resource.

### #name

    def name() -> ::String

**Returns**

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

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
**Returns**

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

### #server_tls_policy

    def server_tls_policy() -> ::String

**Returns**

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

### #server_tls_policy=

    def server_tls_policy=(value) -> ::String

**Parameter**

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

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

### #traffic_port_selector

    def traffic_port_selector() -> ::Google::Cloud::NetworkServices::V1::TrafficPortSelector

**Returns**

- ([::Google::Cloud::NetworkServices::V1::TrafficPortSelector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-TrafficPortSelector)) --- Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports.

### #traffic_port_selector=

    def traffic_port_selector=(value) -> ::Google::Cloud::NetworkServices::V1::TrafficPortSelector

**Parameter**

- **value** ([::Google::Cloud::NetworkServices::V1::TrafficPortSelector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-TrafficPortSelector)) --- Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports.
**Returns**

- ([::Google::Cloud::NetworkServices::V1::TrafficPortSelector](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-TrafficPortSelector)) --- Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports.

### #type

    def type() -> ::Google::Cloud::NetworkServices::V1::EndpointPolicy::EndpointPolicyType

**Returns**

- ([::Google::Cloud::NetworkServices::V1::EndpointPolicy::EndpointPolicyType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointPolicy-EndpointPolicyType)) --- Required. The type of endpoint policy. This is primarily used to validate the configuration.

### #type=

    def type=(value) -> ::Google::Cloud::NetworkServices::V1::EndpointPolicy::EndpointPolicyType

**Parameter**

- **value** ([::Google::Cloud::NetworkServices::V1::EndpointPolicy::EndpointPolicyType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointPolicy-EndpointPolicyType)) --- Required. The type of endpoint policy. This is primarily used to validate the configuration.
**Returns**

- ([::Google::Cloud::NetworkServices::V1::EndpointPolicy::EndpointPolicyType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-EndpointPolicy-EndpointPolicyType)) --- Required. The type of endpoint policy. This is primarily used to validate the configuration.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The timestamp when the resource was updated.