Reference documentation and code samples for the Google Cloud Asset V1 Client class AnalyzerOrgPolicy.
This organization policy message is a modified version of the one defined in
the Organization Policy system. This message contains several fields defined
in the original organization policy with some new fields for analysis
purpose.
Generated from protobuf messagegoogle.cloud.asset.v1.AnalyzerOrgPolicy
Namespace
Google \ Cloud \ Asset \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ attached_resource
string
Thefull resource nameof an organization/folder/project resource where this organization policy is set. Notice that some type of constraints are defined with default policy. This field will be empty for them.
↳ applied_resource
string
Thefull resource nameof an organization/folder/project resource where this organization policy applies to. For any user defined org policies, this field has the same value as the [attached_resource] field. Only for default policy, this field has the different value.
Ifinherit_from_parentis true, Rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the effective root for evaluation.
↳ reset
bool
Ignores policies set above this resource and restores the default behavior of the constraint at this resource. This field can be set in policies for either list or boolean constraints. If set,rulesmust be empty andinherit_from_parentmust be set to false.
getAttachedResource
Thefull resource nameof
an organization/folder/project resource where this organization policy is
set.
Notice that some type of constraints are defined with default policy. This
field will be empty for them.
Returns
Type
Description
string
setAttachedResource
Thefull resource nameof
an organization/folder/project resource where this organization policy is
set.
Notice that some type of constraints are defined with default policy. This
field will be empty for them.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getAppliedResource
Thefull resource nameof
an organization/folder/project resource where this organization policy
applies to.
For any user defined org policies, this field has the same value as
the [attached_resource] field. Only for default policy, this field has
the different value.
Returns
Type
Description
string
setAppliedResource
Thefull resource nameof
an organization/folder/project resource where this organization policy
applies to.
For any user defined org policies, this field has the same value as
the [attached_resource] field. Only for default policy, this field has
the different value.
Ifinherit_from_parentis true, Rules set higher up in the
hierarchy (up to the closest root) are inherited and present in the
effective policy. If it is false, then no rules are inherited, and this
policy becomes the effective root for evaluation.
Returns
Type
Description
bool
setInheritFromParent
Ifinherit_from_parentis true, Rules set higher up in the
hierarchy (up to the closest root) are inherited and present in the
effective policy. If it is false, then no rules are inherited, and this
policy becomes the effective root for evaluation.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getReset
Ignores policies set above this resource and restores the default behavior
of the constraint at this resource.
This field can be set in policies for either list or boolean
constraints. If set,rulesmust be empty andinherit_from_parentmust be set to false.
Returns
Type
Description
bool
setReset
Ignores policies set above this resource and restores the default behavior
of the constraint at this resource.
This field can be set in policies for either list or boolean
constraints. If set,rulesmust be empty andinherit_from_parentmust be set to false.
[[["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-09 UTC."],[],[],null,["# Google Cloud Asset V1 Client - Class AnalyzerOrgPolicy (2.2.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.2.3 (latest)](/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicy)\n- [2.2.2](/php/docs/reference/cloud-asset/2.2.2/V1.AnalyzerOrgPolicy)\n- [2.1.3](/php/docs/reference/cloud-asset/2.1.3/V1.AnalyzerOrgPolicy)\n- [2.0.1](/php/docs/reference/cloud-asset/2.0.1/V1.AnalyzerOrgPolicy)\n- [1.16.4](/php/docs/reference/cloud-asset/1.16.4/V1.AnalyzerOrgPolicy)\n- [1.14.1](/php/docs/reference/cloud-asset/1.14.1/V1.AnalyzerOrgPolicy)\n- [1.13.2](/php/docs/reference/cloud-asset/1.13.2/V1.AnalyzerOrgPolicy)\n- [1.12.2](/php/docs/reference/cloud-asset/1.12.2/V1.AnalyzerOrgPolicy)\n- [1.11.3](/php/docs/reference/cloud-asset/1.11.3/V1.AnalyzerOrgPolicy)\n- [1.10.2](/php/docs/reference/cloud-asset/1.10.2/V1.AnalyzerOrgPolicy)\n- [1.9.2](/php/docs/reference/cloud-asset/1.9.2/V1.AnalyzerOrgPolicy) \nReference documentation and code samples for the Google Cloud Asset V1 Client class AnalyzerOrgPolicy.\n\nThis organization policy message is a modified version of the one defined in\nthe Organization Policy system. This message contains several fields defined\nin the original organization policy with some new fields for analysis\npurpose.\n\nGenerated from protobuf message `google.cloud.asset.v1.AnalyzerOrgPolicy`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Asset \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getAttachedResource\n\nThe [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format) of\nan organization/folder/project resource where this organization policy is\nset.\n\nNotice that some type of constraints are defined with default policy. This\nfield will be empty for them.\n\n### setAttachedResource\n\nThe [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format) of\nan organization/folder/project resource where this organization policy is\nset.\n\nNotice that some type of constraints are defined with default policy. This\nfield will be empty for them.\n\n### getAppliedResource\n\nThe [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format) of\nan organization/folder/project resource where this organization policy\napplies to.\n\nFor any user defined org policies, this field has the same value as\nthe \\[attached_resource\\] field. Only for default policy, this field has\nthe different value.\n\n### setAppliedResource\n\nThe [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format) of\nan organization/folder/project resource where this organization policy\napplies to.\n\nFor any user defined org policies, this field has the same value as\nthe \\[attached_resource\\] field. Only for default policy, this field has\nthe different value.\n\n### getRules\n\nList of rules for this organization policy.\n\n### setRules\n\nList of rules for this organization policy.\n\n### getInheritFromParent\n\nIf `inherit_from_parent` is true, Rules set higher up in the\nhierarchy (up to the closest root) are inherited and present in the\neffective policy. If it is false, then no rules are inherited, and this\npolicy becomes the effective root for evaluation.\n\n### setInheritFromParent\n\nIf `inherit_from_parent` is true, Rules set higher up in the\nhierarchy (up to the closest root) are inherited and present in the\neffective policy. If it is false, then no rules are inherited, and this\npolicy becomes the effective root for evaluation.\n\n### getReset\n\nIgnores policies set above this resource and restores the default behavior\nof the constraint at this resource.\n\nThis field can be set in policies for either list or boolean\nconstraints. If set, `rules` must be empty and `inherit_from_parent`\nmust be set to false.\n\n### setReset\n\nIgnores policies set above this resource and restores the default behavior\nof the constraint at this resource.\n\nThis field can be set in policies for either list or boolean\nconstraints. If set, `rules` must be empty and `inherit_from_parent`\nmust be set to false."]]