# Google Cloud Container V1 Client - Class DNSEndpointConfig (2.10.0)

2.10.0 (latest) 2.9.0 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.4 2.2.1 2.1.0 2.0.0 1.33.0 1.32.0 1.31.0 1.30.3 1.24.0 1.23.0 1.22.0 1.21.1 1.20.0 1.19.0 1.18.0 1.17.1 1.16.0 1.15.0 1.14.0 1.13.1 1.12.1 1.10.3 1.9.1 Reference documentation and code samples for the Google Cloud Container V1 Client class DNSEndpointConfig.

Describes the configuration of a DNS endpoint.

Generated from protobuf message `google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig`

## Namespace

Google \\ Cloud \\ Container \\ V1 \\ ControlPlaneEndpointsConfig

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ endpoint` | `string` Output only. The cluster's DNS endpoint configuration. A DNS format address. This is accessible from the public internet. Ex: uid.us-central1.gke.goog. Always present, but the behavior may change according to the value of [DNSEndpointConfig.allow_external_traffic](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ControlPlaneEndpointsConfig.DNSEndpointConfig#_Google_Cloud_Container_V1_ControlPlaneEndpointsConfig_DNSEndpointConfig__getAllowExternalTraffic__). |
| `↳ allow_external_traffic` | `bool` Controls whether user traffic is allowed over this endpoint. Note that Google-managed services may still use the endpoint even if this is false. |
| `↳ enable_k8s_tokens_via_dns` | `bool` Controls whether the k8s token auth is allowed via DNS. |
| `↳ enable_k8s_certs_via_dns` | `bool` Controls whether the k8s certs auth is allowed via DNS. |

### getEndpoint

Output only. The cluster's DNS endpoint configuration.

A DNS format address. This is accessible from the public internet.
Ex: uid.us-central1.gke.goog.
Always present, but the behavior may change according to the value of
[DNSEndpointConfig.allow_external_traffic](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ControlPlaneEndpointsConfig.DNSEndpointConfig#_Google_Cloud_Container_V1_ControlPlaneEndpointsConfig_DNSEndpointConfig__getAllowExternalTraffic__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setEndpoint

Output only. The cluster's DNS endpoint configuration.

A DNS format address. This is accessible from the public internet.
Ex: uid.us-central1.gke.goog.
Always present, but the behavior may change according to the value of
[DNSEndpointConfig.allow_external_traffic](https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.ControlPlaneEndpointsConfig.DNSEndpointConfig#_Google_Cloud_Container_V1_ControlPlaneEndpointsConfig_DNSEndpointConfig__getAllowExternalTraffic__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getAllowExternalTraffic

Controls whether user traffic is allowed over this endpoint. Note that
Google-managed services may still use the endpoint even if this is false.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasAllowExternalTraffic

### clearAllowExternalTraffic

### setAllowExternalTraffic

Controls whether user traffic is allowed over this endpoint. Note that
Google-managed services may still use the endpoint even if this is false.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEnableK8STokensViaDns

Controls whether the k8s token auth is allowed via DNS.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasEnableK8STokensViaDns

### clearEnableK8STokensViaDns

### setEnableK8STokensViaDns

Controls whether the k8s token auth is allowed via DNS.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEnableK8SCertsViaDns

Controls whether the k8s certs auth is allowed via DNS.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasEnableK8SCertsViaDns

### clearEnableK8SCertsViaDns

### setEnableK8SCertsViaDns

Controls whether the k8s certs auth is allowed via DNS.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |