Class: Google::Apis::OsconfigV1alpha::OsPolicyAssignmentReportOsPolicyCompliance

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/osconfig_v1alpha/classes.rb,
lib/google/apis/osconfig_v1alpha/representations.rb,
lib/google/apis/osconfig_v1alpha/representations.rb

Overview

Compliance data for an OS policy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OsPolicyAssignmentReportOsPolicyCompliance

Returns a new instance of OsPolicyAssignmentReportOsPolicyCompliance.



1447
1448
1449
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1447

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#compliance_stateString

The compliance state of the OS policy. Corresponds to the JSON property complianceState

Returns:

  • (String)


1414
1415
1416
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1414

def compliance_state
  @compliance_state
end

#compliance_state_reasonString

The reason for the OS policy to be in an unknown compliance state. This field is always populated when compliance_state is UNKNOWN. If populated, the field can contain one of the following values: * vm-not-running: The VM was not running. * os-policies-not-supported-by-agent: The version of the OS Config agent running on the VM does not support running OS policies. * no- agent-detected: The OS Config agent is not detected for the VM. * resource- execution-errors: The OS Config agent encountered errors while executing one or more resources in the policy. See os_policy_resource_compliances for details. * task-timeout: The task sent to the agent to apply the policy timed out. * unexpected-agent-state: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * internal-service-errors: Internal service errors were encountered while attempting to apply the policy. * os-policy-execution-pending: OS policy was assigned to the given VM, but was not executed yet. Typically this is a transient condition that will go away after the next policy execution cycle. Corresponds to the JSON property complianceStateReason

Returns:

  • (String)


1435
1436
1437
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1435

def compliance_state_reason
  @compliance_state_reason
end

#os_policy_idString

The OS policy id Corresponds to the JSON property osPolicyId

Returns:

  • (String)


1440
1441
1442
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1440

def os_policy_id
  @os_policy_id
end

#os_policy_resource_compliancesArray<Google::Apis::OsconfigV1alpha::OsPolicyAssignmentReportOsPolicyComplianceOsPolicyResourceCompliance>

Compliance data for each resource within the policy that is applied to the VM. Corresponds to the JSON property osPolicyResourceCompliances



1445
1446
1447
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1445

def os_policy_resource_compliances
  @os_policy_resource_compliances
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1452
1453
1454
1455
1456
1457
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 1452

def update!(**args)
  @compliance_state = args[:compliance_state] if args.key?(:compliance_state)
  @compliance_state_reason = args[:compliance_state_reason] if args.key?(:compliance_state_reason)
  @os_policy_id = args[:os_policy_id] if args.key?(:os_policy_id)
  @os_policy_resource_compliances = args[:os_policy_resource_compliances] if args.key?(:os_policy_resource_compliances)
end