An opaque tag indicating the current version of the Policy, used for
concurrency control.
When the Policy is returned from either a GetPolicy or a
ListOrgPolicy request, this etag indicates the version of the current
Policy to use when executing a read-modify-write loop.
When the Policy is returned from a GetEffectivePolicy request, the
etag will be unset.
When the Policy is used in a SetOrgPolicy method, use the etag value
that was returned from a GetOrgPolicy request as part of a
read-modify-write loop for concurrency control. Not setting the etagin a
SetOrgPolicy request will result in an unconditional write of the
Policy.
The time stamp the Policy was previously updated. This is set by the
server, not specified by the caller, and represents the last time a call to
SetOrgPolicy was made for that Policy. Any value set by the client will
be ignored.
[[["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 \u003ccode\u003ePolicy\u003c/code\u003e class in the \u003ccode\u003eGoogle.Cloud.OrgPolicy.V1\u003c/code\u003e namespace is used to define constraints for configurations of Google Cloud Platform resources, with the latest version being 3.2.0.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePolicy\u003c/code\u003e class offers constructors for creating new instances and for cloning existing ones, allowing for easy manipulation and duplication.\u003c/p\u003e\n"],["\u003cp\u003eKey properties within the \u003ccode\u003ePolicy\u003c/code\u003e class include \u003ccode\u003eBooleanPolicy\u003c/code\u003e, \u003ccode\u003eConstraint\u003c/code\u003e, \u003ccode\u003eEtag\u003c/code\u003e, \u003ccode\u003eListPolicy\u003c/code\u003e, \u003ccode\u003eRestoreDefault\u003c/code\u003e, \u003ccode\u003eUpdateTime\u003c/code\u003e, and \u003ccode\u003eVersion\u003c/code\u003e, each playing a specific role in defining and managing the policy's configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe class can be configured to either enforce or not enforce a constraint, set lists of allowed or disallowed values, and restore default behavior, offering flexibility to its configuration.\u003c/p\u003e\n"]]],[],null,["# Google.Cloud.OrgPolicy.V1 - Class Policy (3.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1.Policy)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/3.1.0/Google.Cloud.OrgPolicy.V1.Policy)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/3.0.0/Google.Cloud.OrgPolicy.V1.Policy)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/2.2.0/Google.Cloud.OrgPolicy.V1.Policy) \n\n public sealed class Policy : IMessage\u003cPolicy\u003e, IEquatable\u003cPolicy\u003e, IDeepCloneable\u003cPolicy\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google.Cloud.OrgPolicy.V1 class Policy.\n\nDefines a Cloud Organization `Policy` which is used to specify `Constraints`\nfor configurations of Cloud Platform resources. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Policy \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Policy](/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1.Policy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Policy](/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1.Policy), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Policy](/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1.Policy), [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.OrgPolicy.V1](/dotnet/docs/reference/Google.Cloud.OrgPolicy.V1/latest/Google.Cloud.OrgPolicy.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.OrgPolicy.V1.dll\n\nConstructors\n------------\n\n### Policy()\n\n public Policy()\n\n### Policy(Policy)\n\n public Policy(Policy other)\n\nProperties\n----------\n\n### BooleanPolicy\n\n public Policy.Types.BooleanPolicy BooleanPolicy { get; set; }\n\nFor boolean `Constraints`, whether to enforce the `Constraint` or not.\n\n### Constraint\n\n public string Constraint { get; set; }\n\nThe name of the `Constraint` the `Policy` is configuring, for example,\n`constraints/serviceuser.services`.\n\nImmutable after creation.\n\n### Etag\n\n public ByteString Etag { get; set; }\n\nAn opaque tag indicating the current version of the `Policy`, used for\nconcurrency control.\n\nWhen the `Policy` is returned from either a `GetPolicy` or a\n`ListOrgPolicy` request, this `etag` indicates the version of the current\n`Policy` to use when executing a read-modify-write loop.\n\nWhen the `Policy` is returned from a `GetEffectivePolicy` request, the\n`etag` will be unset.\n\nWhen the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value\nthat was returned from a `GetOrgPolicy` request as part of a\nread-modify-write loop for concurrency control. Not setting the `etag`in a\n`SetOrgPolicy` request will result in an unconditional write of the\n`Policy`.\n\n### ListPolicy\n\n public Policy.Types.ListPolicy ListPolicy { get; set; }\n\nList of values either allowed or disallowed.\n\n### PolicyTypeCase\n\n public Policy.PolicyTypeOneofCase PolicyTypeCase { get; }\n\n### RestoreDefault\n\n public Policy.Types.RestoreDefault RestoreDefault { get; set; }\n\nRestores the default behavior of the constraint; independent of\n`Constraint` type.\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nThe time stamp the `Policy` was previously updated. This is set by the\nserver, not specified by the caller, and represents the last time a call to\n`SetOrgPolicy` was made for that `Policy`. Any value set by the client will\nbe ignored.\n\n### Version\n\n public int Version { get; set; }\n\nVersion of the `Policy`. Default version is 0;"]]