Google Cloud OsConfig V1 Client - Class OSPolicyResourceCompliance (2.0.0-RC1)

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

Namespace

Google \ Cloud \ OsConfig \ V1 \ OSPolicyAssignmentReport \ OSPolicyCompliance

Methods

__construct

Constructor.

Parameters
Name Description
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
Type Description
string

setOsPolicyResourceId

The ID of the OS policy resource.

Parameter
Name Description
var string
Returns
Type Description
$this

getConfigSteps

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

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setConfigSteps

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

Parameter
Name Description
var array<Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep>
Returns
Type Description
$this

getComplianceState

The compliance state of the resource.

Returns
Type Description
int

setComplianceState

The compliance state of the resource.

Parameter
Name Description
var int
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$this

getExecResourceOutput

ExecResource specific output.

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

hasExecResourceOutput

setExecResourceOutput

ExecResource specific output.

Parameter
Name Description
var Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput
Returns
Type Description
$this

getOutput

Returns
Type Description
string