Skip to main content

constraints

Creates, updates, deletes, gets or lists a constraints resource.

Overview

Nameconstraints
TypeResource
Idgoogle.orgpolicy.constraints

Fields

NameDatatypeDescription
namestringImmutable. The resource name of the constraint. Must be in one of the following forms: projects/{project_number}/constraints/{constraint_name} folders/{folder_id}/constraints/{constraint_name} * organizations/{organization_id}/constraints/{constraint_name} For example, "/projects/123/constraints/compute.disableSerialPortAccess".
descriptionstringDetailed description of what this constraint controls as well as how and where it is enforced. Mutable.
booleanConstraintobjectA constraint that is either enforced or not. For example, a constraint constraints/compute.disableSerialPortAccess. If it is enforced on a VM instance, serial port connections will not be opened to that instance.
constraintDefaultstringThe evaluation behavior of this constraint in the absence of a policy.
displayNamestringThe human readable name. Mutable.
listConstraintobjectA constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy.
supportsDryRunbooleanShows if dry run is supported for this constraint or not.

Methods

NameAccessible byRequired ParamsDescription
folders_constraints_listSELECTfoldersIdLists constraints that could be applied on the specified resource.
organizations_constraints_listSELECTorganizationsIdLists constraints that could be applied on the specified resource.
projects_constraints_listSELECTprojectsIdLists constraints that could be applied on the specified resource.

SELECT examples

Lists constraints that could be applied on the specified resource.

SELECT
name,
description,
booleanConstraint,
constraintDefault,
displayName,
listConstraint,
supportsDryRun
FROM google.orgpolicy.constraints
WHERE foldersId = '{{ foldersId }}';