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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003ePolicyController\u003c/code\u003e class within the GKE Hub v1 API is 2.5.0, with documentation available for versions back to 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePolicyController\u003c/code\u003e class, found in the \u003ccode\u003eGoogle.Cloud.GkeHub.V1.ConfigManagement\u003c/code\u003e namespace, is used for configuring Policy Controller within GKE Hub and inherits from object while implementing several interfaces.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of \u003ccode\u003ePolicyController\u003c/code\u003e include \u003ccode\u003eEnabled\u003c/code\u003e to enable or disable Policy Controller installation, \u003ccode\u003eAuditIntervalSeconds\u003c/code\u003e to set audit scan intervals, and \u003ccode\u003eExemptableNamespaces\u003c/code\u003e for excluding namespaces from checks.\u003c/p\u003e\n"],["\u003cp\u003eOther boolean properties include \u003ccode\u003eLogDeniesEnabled\u003c/code\u003e, \u003ccode\u003eReferentialRulesEnabled\u003c/code\u003e, and \u003ccode\u003eTemplateLibraryInstalled\u003c/code\u003e, to respectively enable logging of denials, referencing of other objects, and installation of a default template library.\u003c/p\u003e\n"]]],[],null,["# GKE Hub v1 API - Class PolicyController (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.4.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.3.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.2.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.1.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/2.0.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.2.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.1.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/1.0.0/Google.Cloud.GkeHub.V1.ConfigManagement.PolicyController) \n\n public sealed class PolicyController : IMessage\u003cPolicyController\u003e, IEquatable\u003cPolicyController\u003e, IDeepCloneable\u003cPolicyController\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the GKE Hub v1 API class PolicyController.\n\nConfiguration for Policy Controller \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PolicyController \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PolicyController](/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](/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](/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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.GkeHub.V1.ConfigManagement](/dotnet/docs/reference/Google.Cloud.GkeHub.V1/latest/Google.Cloud.GkeHub.V1.ConfigManagement)\n\nAssembly\n--------\n\nGoogle.Cloud.GkeHub.V1.dll\n\nConstructors\n------------\n\n### PolicyController()\n\n public PolicyController()\n\n### PolicyController(PolicyController)\n\n public PolicyController(PolicyController other)\n\nProperties\n----------\n\n### AuditIntervalSeconds\n\n public long AuditIntervalSeconds { get; set; }\n\nSets the interval for Policy Controller Audit Scans (in seconds).\nWhen set to 0, this disables audit functionality altogether.\n\n### Enabled\n\n public bool Enabled { get; set; }\n\nEnables the installation of Policy Controller.\nIf false, the rest of PolicyController fields take no\neffect.\n\n### ExemptableNamespaces\n\n public RepeatedField\u003cstring\u003e ExemptableNamespaces { get; }\n\nThe set of namespaces that are excluded from Policy Controller checks.\nNamespaces do not need to currently exist on the cluster.\n\n### HasAuditIntervalSeconds\n\n public bool HasAuditIntervalSeconds { get; }\n\nGets whether the \"audit_interval_seconds\" field is set\n\n### HasTemplateLibraryInstalled\n\n public bool HasTemplateLibraryInstalled { get; }\n\nGets whether the \"template_library_installed\" field is set\n\n### LogDeniesEnabled\n\n public bool LogDeniesEnabled { get; set; }\n\nLogs all denies and dry run failures.\n\n### ReferentialRulesEnabled\n\n public bool ReferentialRulesEnabled { get; set; }\n\nEnables the ability to use Constraint Templates that reference to objects\nother than the object currently being evaluated.\n\n### TemplateLibraryInstalled\n\n public bool TemplateLibraryInstalled { get; set; }\n\nInstalls the default template library along with Policy Controller."]]