Reference documentation and code samples for the Organization Policy v2 API class OrgPolicy.
An interface for managing organization policies.
The Organization Policy Service provides a simple mechanism for
organizations to restrict the allowed configurations across their entire
resource hierarchy.
You can use a policy to configure restrictions on resources. For
example, you can enforce a policy that restricts which Google
Cloud APIs can be activated in a certain part of your resource
hierarchy, or prevents serial port access to VM instances in a
particular folder.
Policies are inherited down through the resource hierarchy. A policy
applied to a parent resource automatically applies to all its child resources
unless overridden with a policy lower in the hierarchy.
A constraint defines an aspect of a resource's configuration that can be
controlled by an organization's policy administrator. Policies are a
collection of constraints that defines their allowable configuration on a
particular resource and its child resources.
public static void BindService(ServiceBinderBase serviceBinder, OrgPolicy.OrgPolicyBase serviceImpl)
Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
Note: this method is part of an experimental API that can change or be removed without any prior notice.
[[["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\u003eOrgPolicy\u003c/code\u003e class in the Google Cloud Organization Policy v2 API allows for managing organization policies across resource hierarchies.\u003c/p\u003e\n"],["\u003cp\u003ePolicies defined using \u003ccode\u003eOrgPolicy\u003c/code\u003e are inherited by child resources unless overridden, enabling centralized control over resource configurations.\u003c/p\u003e\n"],["\u003cp\u003eConstraints, which are aspects of resource configurations, can be controlled through policies set using \u003ccode\u003eOrgPolicy\u003c/code\u003e to define allowable configurations.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API is 2.7.0, but this documentation is for version 2.4.0 and includes links to previous versions, dating all the way back to 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eBindService\u003c/code\u003e method within the \u003ccode\u003eOrgPolicy\u003c/code\u003e class is used to register the \u003ccode\u003eOrgPolicy\u003c/code\u003e service, which can be called with or without an implementation to customize service binding logic, and is available in two overloads.\u003c/p\u003e\n"]]],[],null,[]]