# GKE Hub v1 API - Class PolicyController (2.8.0)

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

- [2.8.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.7.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.6.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.5.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.4.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.3.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.2.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.1.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.0.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.2.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.1.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.0.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)

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

Reference documentation and code samples for the GKE Hub v1 API class PolicyController.

Configuration for Policy Controller

## Inheritance

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

## Implements

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

## Assembly

Google.Cloud.GkeHub.V1.dll

## Constructors

### PolicyController()

    public PolicyController()

### PolicyController(PolicyController)

    public PolicyController(PolicyController other)

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

## Properties

### AuditIntervalSeconds

    public long AuditIntervalSeconds { get; set; }

Sets the interval for Policy Controller Audit Scans (in seconds).
When set to 0, this disables audit functionality altogether.

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

### Enabled

    public bool Enabled { get; set; }

Enables the installation of Policy Controller.
If false, the rest of PolicyController fields take no
effect.

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

### ExemptableNamespaces

    public RepeatedField<string> ExemptableNamespaces { get; }

The set of namespaces that are excluded from Policy Controller checks.
Namespaces do not need to currently exist on the cluster.

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

### HasAuditIntervalSeconds

    public bool HasAuditIntervalSeconds { get; }

Gets whether the "audit_interval_seconds" field is set

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

### HasTemplateLibraryInstalled

    public bool HasTemplateLibraryInstalled { get; }

Gets whether the "template_library_installed" field is set

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

### LogDeniesEnabled

    public bool LogDeniesEnabled { get; set; }

Logs all denies and dry run failures.

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

### ReferentialRulesEnabled

    public bool ReferentialRulesEnabled { get; set; }

Enables the ability to use Constraint Templates that reference to objects
other than the object currently being evaluated.

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

### TemplateLibraryInstalled

    public bool TemplateLibraryInstalled { get; set; }

Installs the default template library along with Policy Controller.

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