Google Cloud Policy Simulator V1 Client - Class ExplainedAccess (0.2.5)

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

Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.

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

Namespace

Google \ Cloud \ PolicySimulator \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ access_state int

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

↳ policies array<Google\Cloud\PolicySimulator\V1\ExplainedPolicy>

If the AccessState is UNKNOWN, this field contains the policies that led to that result. If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

↳ errors array<Google\Rpc\Status>

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN. If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

getAccessState

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

Returns
Type Description
int

setAccessState

Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.

Parameter
Name Description
var int
Returns
Type Description
$this

getPolicies

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setPolicies

If the AccessState is UNKNOWN, this field contains the policies that led to that result.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

Parameter
Name Description
var array<Google\Cloud\PolicySimulator\V1\ExplainedPolicy>
Returns
Type Description
$this

getErrors

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setErrors

If the AccessState is UNKNOWN, this field contains a list of errors explaining why the result is UNKNOWN.

If the AccessState is GRANTED or NOT_GRANTED, this field is omitted.

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