[[["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\u003eThis webpage provides documentation for the \u003ccode\u003ePolicyRule\u003c/code\u003e class, a core component of the Google Cloud Identity and Access Management (IAM) v2 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePolicyRule\u003c/code\u003e class represents a single rule within an IAM policy and is part of the \u003ccode\u003eGoogle.Cloud.Iam.V2\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThere are four versions of the \u003ccode\u003ePolicyRule\u003c/code\u003e API documented: 1.3.0 (latest), 1.2.0, 1.1.0, and 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and has properties such as \u003ccode\u003eDenyRule\u003c/code\u003e and \u003ccode\u003eDescription\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePolicyRule\u003c/code\u003e has a constructor that allows creating a new instance or cloning an existing one.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Identity and Access Management (IAM) v2 API - Class PolicyRule (1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/dotnet/docs/reference/Google.Cloud.Iam.V2/latest/Google.Cloud.Iam.V2.PolicyRule)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Iam.V2/1.2.0/Google.Cloud.Iam.V2.PolicyRule)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Iam.V2/1.1.0/Google.Cloud.Iam.V2.PolicyRule)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Iam.V2/1.0.0/Google.Cloud.Iam.V2.PolicyRule) \n\n public sealed class PolicyRule : IMessage\u003cPolicyRule\u003e, IEquatable\u003cPolicyRule\u003e, IDeepCloneable\u003cPolicyRule\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Identity and Access Management (IAM) v2 API class PolicyRule.\n\nA single rule in a `Policy`. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PolicyRule \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PolicyRule](/dotnet/docs/reference/Google.Cloud.Iam.V2/latest/Google.Cloud.Iam.V2.PolicyRule), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PolicyRule](/dotnet/docs/reference/Google.Cloud.Iam.V2/latest/Google.Cloud.Iam.V2.PolicyRule), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PolicyRule](/dotnet/docs/reference/Google.Cloud.Iam.V2/latest/Google.Cloud.Iam.V2.PolicyRule), [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.Iam.V2](/dotnet/docs/reference/Google.Cloud.Iam.V2/latest/Google.Cloud.Iam.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Iam.V2.dll\n\nConstructors\n------------\n\n### PolicyRule()\n\n public PolicyRule()\n\n### PolicyRule(PolicyRule)\n\n public PolicyRule(PolicyRule other)\n\nProperties\n----------\n\n### DenyRule\n\n public DenyRule DenyRule { get; set; }\n\nA rule for a deny policy.\n\n### Description\n\n public string Description { get; set; }\n\nA user-specified description of the rule. This value can be up to 256\ncharacters.\n\n### KindCase\n\n public PolicyRule.KindOneofCase KindCase { get; }"]]