---
title: "GET /v2/organizations/{organizationsId}/constraints"
method: GET
path: "/v2/organizations/{organizationsId}/constraints"
tags: ["organizations"]
---

# GET /v2/organizations/{organizationsId}/constraints

`GET /v2/organizations/{organizationsId}/constraints`

## Request

- Base URL: `https://orgpolicy.googleapis.com`
- URL: `https://orgpolicy.googleapis.com/v2/organizations/{organizationsId}/constraints`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/organizationpolicy`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/organizationpolicy`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/organizationpolicy.readonly`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/organizationpolicy.readonly`

Lists constraints that could be applied on the specified resource.

## Path parameters

- `organizationsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string
- `pageSize` integer
- `pageToken` string

## Response `200`

Successful response

- GoogleCloudOrgpolicyV2ListConstraintsResponse: The response returned from the ListConstraints method.
  - `constraints` GoogleCloudOrgpolicyV2Constraint[]: The collection of constraints that are available on the targeted resource.
    - `booleanConstraint` GoogleCloudOrgpolicyV2ConstraintBooleanConstraint: A constraint type is enforced or not enforced, which is configured in the `PolicyRule`. If `customConstraintDefinition` is defined, this constraint is a managed constraint.
      - `customConstraintDefinition` GoogleCloudOrgpolicyV2ConstraintCustomConstraintDefinition: Custom constraint definition. Defines this as a managed constraint.
        - `actionType` 'ACTION_TYPE_UNSPECIFIED' | 'ALLOW' | 'DENY': Allow or deny type.
        - `condition` string: Org policy condition/expression. For example: `resource.instanceName.matches("(production|test)_(.+_)?[\d]+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1,500 characters.
        - `methodTypes` string[]: All the operations being applied for this constraint.
        - `parameters` object: Stores the structure of `Parameters` used by the constraint condition. The key of `map` represents the name of the parameter.
        - `resourceTypes` string[]: The resource instance type that this policy applies to, in the format `/`. Example: * `compute.googleapis.com/Instance`.
    - `constraintDefault` 'CONSTRAINT_DEFAULT_UNSPECIFIED' | 'ALLOW' | 'DENY': The evaluation behavior of this constraint in the absence of a policy.
    - `description` string: Detailed description of what this constraint controls as well as how and where it is enforced. Mutable.
    - `displayName` string: The human readable name. Mutable.
    - `equivalentConstraint` string: Defines the equivalent constraint name, if it exists. Managed constraints can have an equivalent legacy managed constraint, and legacy managed constraints can have an equivalent managed constraint. For example, "constraints/iam.disableServiceAccountKeyUpload" is equivalent to "constraints/iam.managed.disableServiceAccountKeyUpload".
    - `listConstraint` GoogleCloudOrgpolicyV2ConstraintListConstraint: A constraint type that allows or disallows a list of string values, which are configured in the `PolicyRule`.
      - `supportsIn` boolean: Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"in:Python"` would match any value in the 'Python' group.
      - `supportsUnder` boolean: Indicates whether subtrees of the Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `"under:folders/123"` would match any resource under the 'folders/123' folder.
    - `name` string: Immutable. The resource name of the constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` * `folders/{folder_number}/constraints/{constraint_name}` * `organizations/{organization_number}/constraints/{constraint_name}` For example, "/projects/123/constraints/compute.disableSerialPortAccess".
    - `supportsDryRun` boolean: Shows if dry run is supported for this constraint or not.
    - `supportsSimulation` boolean: Shows if simulation is supported for this constraint or not.
  - `nextPageToken` string: Page token used to retrieve the next page. This is not used.

## Changes

- **2026-11-23** `373057a726d5`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/organizationpolicy.readonly` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/organizationpolicy.readonly` was removed from the endpoint's security scheme `Oauth2c`

[Operation history](https://skmtc.dev/google/apis/orgpolicy/changes/v2/organizations/:organizationsId/constraints/get.md)

---

[API](https://skmtc.dev/google/apis/orgpolicy.md) - [All operations](https://skmtc.dev/google/apis/orgpolicy/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/orgpolicy/revisions/373057a726d5?raw)
