Google Cloud Asset V1 Client - Class OrgPolicyResult (2.0.1)

Reference documentation and code samples for the Google Cloud Asset V1 Client class OrgPolicyResult.

The organization policy result to the query.

Generated from protobuf message google.cloud.asset.v1.AnalyzeOrgPoliciesResponse.OrgPolicyResult

Namespace

Google \ Cloud \ Asset \ V1 \ AnalyzeOrgPoliciesResponse

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ consolidated_policy Google\Cloud\Asset\V1\AnalyzerOrgPolicy

The consolidated organization policy for the analyzed resource. The consolidated organization policy is computed by merging and evaluating AnalyzeOrgPoliciesResponse.policy_bundle. The evaluation will respect the organization policy hierarchy rules.

↳ policy_bundle array<Google\Cloud\Asset\V1\AnalyzerOrgPolicy>

The ordered list of all organization policies from the AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource. to the scope specified in the request. If the constraint is defined with default policy, it will also appear in the list.

↳ project string

The project that this consolidated policy belongs to, in the format of projects/{PROJECT_NUMBER}. This field is available when the consolidated policy belongs to a project.

↳ folders array

The folder(s) that this consolidated policy belongs to, in the format of folders/{FOLDER_NUMBER}. This field is available when the consolidated policy belongs (directly or cascadingly) to one or more folders.

↳ organization string

The organization that this consolidated policy belongs to, in the format of organizations/{ORGANIZATION_NUMBER}. This field is available when the consolidated policy belongs (directly or cascadingly) to an organization.

getConsolidatedPolicy

The consolidated organization policy for the analyzed resource. The consolidated organization policy is computed by merging and evaluating AnalyzeOrgPoliciesResponse.policy_bundle.

The evaluation will respect the organization policy hierarchy rules.

Returns
Type Description
Google\Cloud\Asset\V1\AnalyzerOrgPolicy|null

hasConsolidatedPolicy

clearConsolidatedPolicy

setConsolidatedPolicy

The consolidated organization policy for the analyzed resource. The consolidated organization policy is computed by merging and evaluating AnalyzeOrgPoliciesResponse.policy_bundle.

The evaluation will respect the organization policy hierarchy rules.

Parameter
Name Description
var Google\Cloud\Asset\V1\AnalyzerOrgPolicy
Returns
Type Description
$this

getPolicyBundle

The ordered list of all organization policies from the AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource.

to the scope specified in the request. If the constraint is defined with default policy, it will also appear in the list.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setPolicyBundle

The ordered list of all organization policies from the AnalyzeOrgPoliciesResponse.OrgPolicyResult.consolidated_policy.attached_resource.

to the scope specified in the request. If the constraint is defined with default policy, it will also appear in the list.

Parameter
Name Description
var array<Google\Cloud\Asset\V1\AnalyzerOrgPolicy>
Returns
Type Description
$this

getProject

The project that this consolidated policy belongs to, in the format of projects/{PROJECT_NUMBER}. This field is available when the consolidated policy belongs to a project.

Returns
Type Description
string

setProject

The project that this consolidated policy belongs to, in the format of projects/{PROJECT_NUMBER}. This field is available when the consolidated policy belongs to a project.

Parameter
Name Description
var string
Returns
Type Description
$this

getFolders

The folder(s) that this consolidated policy belongs to, in the format of folders/{FOLDER_NUMBER}. This field is available when the consolidated policy belongs (directly or cascadingly) to one or more folders.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setFolders

The folder(s) that this consolidated policy belongs to, in the format of folders/{FOLDER_NUMBER}. This field is available when the consolidated policy belongs (directly or cascadingly) to one or more folders.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getOrganization

The organization that this consolidated policy belongs to, in the format of organizations/{ORGANIZATION_NUMBER}. This field is available when the consolidated policy belongs (directly or cascadingly) to an organization.

Returns
Type Description
string

setOrganization

The organization that this consolidated policy belongs to, in the format of organizations/{ORGANIZATION_NUMBER}. This field is available when the consolidated policy belongs (directly or cascadingly) to an organization.

Parameter
Name Description
var string
Returns
Type Description
$this