Google Cloud Policy Simulator V1 Client - Class OrgPolicyViolation (1.2.0)

Reference documentation and code samples for the Google Cloud Policy Simulator V1 Client class OrgPolicyViolation.

OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.

Generated from protobuf message google.cloud.policysimulator.v1.OrgPolicyViolation

Namespace

Google \ Cloud \ PolicySimulator \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

The name of the OrgPolicyViolation. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`

↳ resource ResourceContext

The resource violating the constraint.

↳ custom_constraint Google\Cloud\OrgPolicy\V2\CustomConstraint

The custom constraint being violated.

↳ error Google\Rpc\Status

Any error encountered during the evaluation.

getName

The name of the OrgPolicyViolation. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`

Returns
Type Description
string

setName

The name of the OrgPolicyViolation. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`

Parameter
Name Description
var string
Returns
Type Description
$this

getResource

The resource violating the constraint.

Returns
Type Description
ResourceContext|null

hasResource

clearResource

setResource

The resource violating the constraint.

Parameter
Name Description
var ResourceContext
Returns
Type Description
$this

getCustomConstraint

The custom constraint being violated.

Returns
Type Description
Google\Cloud\OrgPolicy\V2\CustomConstraint|null

hasCustomConstraint

clearCustomConstraint

setCustomConstraint

The custom constraint being violated.

Parameter
Name Description
var Google\Cloud\OrgPolicy\V2\CustomConstraint
Returns
Type Description
$this

getError

Any error encountered during the evaluation.

Returns
Type Description
Google\Rpc\Status|null

hasError

clearError

setError

Any error encountered during the evaluation.

Parameter
Name Description
var Google\Rpc\Status
Returns
Type Description
$this