str
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.
Refer to the field `compliance_state_reason` to learn the
exact reason for the policy to be in this compliance state.
COMPLIANT (1):
Policy is compliant.
The policy is compliant if all the underlying
resources are also compliant.
NON_COMPLIANT (2):
Policy is non-compliant.
The policy is non-compliant if one or more
underlying resources are non-compliant.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-11 UTC."],[],[],null,["# Class OSPolicyCompliance (1.21.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.21.0 (latest)](/python/docs/reference/osconfig/latest/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.20.2](/python/docs/reference/osconfig/1.20.2/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.19.0](/python/docs/reference/osconfig/1.19.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.18.1](/python/docs/reference/osconfig/1.18.1/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.17.5](/python/docs/reference/osconfig/1.17.5/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.16.0](/python/docs/reference/osconfig/1.16.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.15.3](/python/docs/reference/osconfig/1.15.3/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.14.1](/python/docs/reference/osconfig/1.14.1/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.13.0](/python/docs/reference/osconfig/1.13.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.12.4](/python/docs/reference/osconfig/1.12.4/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.11.2](/python/docs/reference/osconfig/1.11.2/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.10.0](/python/docs/reference/osconfig/1.10.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.9.0](/python/docs/reference/osconfig/1.9.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.8.0](/python/docs/reference/osconfig/1.8.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.7.1](/python/docs/reference/osconfig/1.7.1/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.6.0](/python/docs/reference/osconfig/1.6.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.5.2](/python/docs/reference/osconfig/1.5.2/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.4.0](/python/docs/reference/osconfig/1.4.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.3.2](/python/docs/reference/osconfig/1.3.2/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.2.0](/python/docs/reference/osconfig/1.2.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.1.0](/python/docs/reference/osconfig/1.1.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [1.0.0](/python/docs/reference/osconfig/1.0.0/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance)\n- [0.1.2](/python/docs/reference/osconfig/0.1.2/google.cloud.osconfig_v1.types.OSPolicyAssignmentReport.OSPolicyCompliance) \n\n OSPolicyCompliance(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nCompliance data for an OS policy\n\nClasses\n-------\n\n### ComplianceState\n\n ComplianceState(value)\n\nPossible compliance states for an os policy. \n\n Refer to the field `compliance_state_reason` to learn the\n exact reason for the policy to be in this compliance state.\n COMPLIANT (1):\n Policy is compliant.\n\n The policy is compliant if all the underlying\n resources are also compliant.\n NON_COMPLIANT (2):\n Policy is non-compliant.\n\n The policy is non-compliant if one or more\n underlying resources are non-compliant.\n\n### OSPolicyResourceCompliance\n\n OSPolicyResourceCompliance(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nCompliance data for an OS policy resource.\n\n.. _oneof: \u003chttps://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields\u003e"]]