Google Cloud OsConfig V1 Client - Class OSPolicyResourceCompliance (1.0.5)

Reference documentation and code samples for the Google Cloud OsConfig V1 Client class OSPolicyResourceCompliance.

Compliance data for an OS policy resource.

Generated from protobuf message google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ os_policy_resource_id string

The ID of the OS policy resource.

↳ config_steps array<Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep>

Ordered list of configuration completed by the agent for the OS policy resource.

↳ compliance_state int

The compliance state of the resource.

↳ compliance_state_reason string

A reason for the resource to be in the given compliance state. This field is always populated when compliance_state is UNKNOWN. The following values are supported when compliance_state == UNKNOWN * execution-errors: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined. * execution-skipped-by-agent: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * os-policy-execution-attempt-failed: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined.

↳ exec_resource_output Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput

ExecResource specific output.

getOsPolicyResourceId

The ID of the OS policy resource.

Returns
TypeDescription
string

setOsPolicyResourceId

The ID of the OS policy resource.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getConfigSteps

Ordered list of configuration completed by the agent for the OS policy resource.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setConfigSteps

Ordered list of configuration completed by the agent for the OS policy resource.

Parameter
NameDescription
var array<Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep>
Returns
TypeDescription
$this

getComplianceState

The compliance state of the resource.

Returns
TypeDescription
int

setComplianceState

The compliance state of the resource.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getComplianceStateReason

A reason for the resource to be in the given compliance state.

This field is always populated when compliance_state is UNKNOWN. The following values are supported when compliance_state == UNKNOWN

  • execution-errors: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined.
  • execution-skipped-by-agent: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy.
  • os-policy-execution-attempt-failed: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined.
Returns
TypeDescription
string

setComplianceStateReason

A reason for the resource to be in the given compliance state.

This field is always populated when compliance_state is UNKNOWN. The following values are supported when compliance_state == UNKNOWN

  • execution-errors: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined.
  • execution-skipped-by-agent: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy.
  • os-policy-execution-attempt-failed: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined.
Parameter
NameDescription
var string
Returns
TypeDescription
$this

getExecResourceOutput

ExecResource specific output.

Returns
TypeDescription
Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput|null

hasExecResourceOutput

setExecResourceOutput

ExecResource specific output.

Parameter
NameDescription
var Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput
Returns
TypeDescription
$this

getOutput

Returns
TypeDescription
string