Organization Policy API Stay organized with collections Save and categorize content based on your preferences.
The Organization Policy API allows users to configure governance rules on their Google Cloud resources across the resource hierarchy.
- REST Resource: v2.folders.constraints
- REST Resource: v2.folders.policies
- REST Resource: v2.organizations.constraints
- REST Resource: v2.organizations.customConstraints
- REST Resource: v2.organizations.policies
- REST Resource: v2.projects.constraints
- REST Resource: v2.projects.policies
Service: orgpolicy.googleapis.com
To call this service, we recommend that you use the Google-providedclient libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.
Discovery document
ADiscovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:
Service endpoint
Aservice endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:
https://orgpolicy.googleapis.com
REST Resource:v2.folders.constraints
| Methods | |
|---|---|
list | GET /v2/{parent=folders/*}/constraintsLists constraints that could be applied on the specified resource. |
REST Resource:v2.folders.policies
| Methods | |
|---|---|
create | POST /v2/{parent=folders/*}/policiesCreates a policy. |
delete | DELETE /v2/{name=folders/*/policies/*}Deletes a policy. |
get | GET /v2/{name=folders/*/policies/*}Gets a policy on a resource. |
get | GET /v2/{name=folders/*/policies/*}:getEffectivePolicyGets the effective policy on a resource. |
list | GET /v2/{parent=folders/*}/policiesRetrieves all of the policies that exist on a particular resource. |
patch | PATCH /v2/{policy.name=folders/*/policies/*}Updates a policy. |
REST Resource:v2.organizations.constraints
| Methods | |
|---|---|
list | GET /v2/{parent=organizations/*}/constraintsLists constraints that could be applied on the specified resource. |
REST Resource:v2.organizations.customConstraints
| Methods | |
|---|---|
create | POST /v2/{parent=organizations/*}/customConstraintsCreates a custom constraint. |
delete | DELETE /v2/{name=organizations/*/customConstraints/*}Deletes a custom constraint. |
get | GET /v2/{name=organizations/*/customConstraints/*}Gets a custom or managed constraint. |
list | GET /v2/{parent=organizations/*}/customConstraintsRetrieves all of the custom constraints that exist on a particular organization resource. |
patch | PATCH /v2/{customConstraint.name=organizations/*/customConstraints/*}Updates a custom constraint. |
REST Resource:v2.organizations.policies
| Methods | |
|---|---|
create | POST /v2/{parent=organizations/*}/policiesCreates a policy. |
delete | DELETE /v2/{name=organizations/*/policies/*}Deletes a policy. |
get | GET /v2/{name=organizations/*/policies/*}Gets a policy on a resource. |
get | GET /v2/{name=organizations/*/policies/*}:getEffectivePolicyGets the effective policy on a resource. |
list | GET /v2/{parent=organizations/*}/policiesRetrieves all of the policies that exist on a particular resource. |
patch | PATCH /v2/{policy.name=organizations/*/policies/*}Updates a policy. |
REST Resource:v2.projects.constraints
| Methods | |
|---|---|
list | GET /v2/{parent=projects/*}/constraintsLists constraints that could be applied on the specified resource. |
REST Resource:v2.projects.policies
| Methods | |
|---|---|
create | POST /v2/{parent=projects/*}/policiesCreates a policy. |
delete | DELETE /v2/{name=projects/*/policies/*}Deletes a policy. |
get | GET /v2/{name=projects/*/policies/*}Gets a policy on a resource. |
get | GET /v2/{name=projects/*/policies/*}:getEffectivePolicyGets the effective policy on a resource. |
list | GET /v2/{parent=projects/*}/policiesRetrieves all of the policies that exist on a particular resource. |
patch | PATCH /v2/{policy.name=projects/*/policies/*}Updates a policy. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-14 UTC.