Reference documentation and code samples for the Google Cloud Org Policy V2 Client class ListConstraint.
A constraint type that allows or disallows a list of string values, which
are configured in the
PolicyRule.
Generated from protobuf message google.cloud.orgpolicy.v2.Constraint.ListConstraint
Namespace
Google \ Cloud \ OrgPolicy \ V2 \ Constraint
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ supports_in
bool
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.
↳ supports_under
bool
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.
getSupportsIn
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.
Returns
Type
Description
bool
setSupportsIn
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.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getSupportsUnder
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.
Returns
Type
Description
bool
setSupportsUnder
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Org Policy V2 Client - Class ListConstraint (1.2.2)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.2 (latest)](/php/docs/reference/cloud-org-policy/latest/V2.Constraint.ListConstraint)\n- [1.2.1](/php/docs/reference/cloud-org-policy/1.2.1/V2.Constraint.ListConstraint)\n- [1.1.3](/php/docs/reference/cloud-org-policy/1.1.3/V2.Constraint.ListConstraint)\n- [1.0.0](/php/docs/reference/cloud-org-policy/1.0.0/V2.Constraint.ListConstraint)\n- [0.7.0](/php/docs/reference/cloud-org-policy/0.7.0/V2.Constraint.ListConstraint)\n- [0.6.5](/php/docs/reference/cloud-org-policy/0.6.5/V2.Constraint.ListConstraint)\n- [0.5.3](/php/docs/reference/cloud-org-policy/0.5.3/V2.Constraint.ListConstraint)\n- [0.4.2](/php/docs/reference/cloud-org-policy/0.4.2/V2.Constraint.ListConstraint)\n- [0.3.7](/php/docs/reference/cloud-org-policy/0.3.7/V2.Constraint.ListConstraint) \nReference documentation and code samples for the Google Cloud Org Policy V2 Client class ListConstraint.\n\nA constraint type that allows or disallows a list of string values, which\nare configured in the\n[`PolicyRule`](/php/docs/reference/cloud-org-policy/latest/V2.PolicySpec.PolicyRule).\n\nGenerated from protobuf message `google.cloud.orgpolicy.v2.Constraint.ListConstraint`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ OrgPolicy \\\\ V2 \\\\ Constraint\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSupportsIn\n\nIndicates whether values grouped into categories can be used in\n`Policy.allowed_values` and `Policy.denied_values`. For example,\n`\"in:Python\"` would match any value in the 'Python' group.\n\n### setSupportsIn\n\nIndicates whether values grouped into categories can be used in\n`Policy.allowed_values` and `Policy.denied_values`. For example,\n`\"in:Python\"` would match any value in the 'Python' group.\n\n### getSupportsUnder\n\nIndicates whether subtrees of the Resource Manager resource hierarchy\ncan be used in `Policy.allowed_values` and `Policy.denied_values`. For\nexample, `\"under:folders/123\"` would match any resource under the\n'folders/123' folder.\n\n### setSupportsUnder\n\nIndicates whether subtrees of the Resource Manager resource hierarchy\ncan be used in `Policy.allowed_values` and `Policy.denied_values`. For\nexample, `\"under:folders/123\"` would match any resource under the\n'folders/123' folder."]]