Cloud OS Config V1alpha API - Class Google::Cloud::OsConfig::V1alpha::InstanceOSPoliciesCompliance (v0.6.0)

Reference documentation and code samples for the Cloud OS Config V1alpha API class Google::Cloud::OsConfig::V1alpha::InstanceOSPoliciesCompliance.

This API resource represents the OS policies compliance data for a Compute Engine virtual machine (VM) instance at a given point in time.

A Compute Engine VM can have multiple OS policy assignments, and each assignment can have multiple OS policies. As a result, multiple OS policies could be applied to a single VM.

You can use this API resource to determine both the compliance state of your VM as well as the compliance state of an individual OS policy.

For more information, see View compliance.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#detailed_state

def detailed_state() -> ::String
Returns
  • (::String) —

    Output only. Detailed compliance state of the VM. This field is populated only when compliance state is UNKNOWN.

    It may contain one of the following values:

    • no-compliance-data: Compliance data is not available for this VM.
    • no-agent-detected: OS Config agent is not detected for this VM.
    • config-not-supported-by-agent: The version of the OS Config agent running on this VM does not support configuration management.
    • inactive: VM is not running.
    • internal-service-errors: There were internal service errors encountered while enforcing compliance.
    • agent-errors: OS config agent encountered errors while enforcing compliance.

#detailed_state_reason

def detailed_state_reason() -> ::String
Returns
  • (::String) — Output only. The reason for the detailed_state of the VM (if any).

#instance

def instance() -> ::String
Returns
  • (::String) — Output only. The Compute Engine VM instance name.

#last_compliance_check_time

def last_compliance_check_time() -> ::Google::Protobuf::Timestamp
Returns

#last_compliance_run_id

def last_compliance_run_id() -> ::String
Returns
  • (::String) — Output only. Unique identifier for the last compliance run. This id will be logged by the OS config agent during a compliance run and can be used for debugging and tracing purpose.

#name

def name() -> ::String
Returns
  • (::String) — Output only. The InstanceOSPoliciesCompliance API resource name.

    Format: projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}

#os_policy_compliances

def os_policy_compliances() -> ::Array<::Google::Cloud::OsConfig::V1alpha::InstanceOSPoliciesCompliance::OSPolicyCompliance>
Returns

#state

def state() -> ::Google::Cloud::OsConfig::V1alpha::OSPolicyComplianceState
Returns