Class: Google::Apis::OsconfigV1alpha::InstanceOsPoliciesCompliance
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV1alpha::InstanceOsPoliciesCompliance
- 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
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.
Instance Attribute Summary collapse
-
#detailed_state ⇒ String
Output only.
-
#detailed_state_reason ⇒ String
Output only.
-
#instance ⇒ String
Output only.
-
#last_compliance_check_time ⇒ String
Output only.
-
#last_compliance_run_id ⇒ String
Output only.
-
#name ⇒ String
Output only.
-
#os_policy_compliances ⇒ Array<Google::Apis::OsconfigV1alpha::InstanceOsPoliciesComplianceOsPolicyCompliance>
Output only.
-
#state ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ InstanceOsPoliciesCompliance
constructor
A new instance of InstanceOsPoliciesCompliance.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ InstanceOsPoliciesCompliance
Returns a new instance of InstanceOsPoliciesCompliance.
237 238 239 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 237 def initialize(**args) update!(**args) end |
Instance Attribute Details
#detailed_state ⇒ 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. Corresponds to the JSON propertydetailedState
196 197 198 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 196 def detailed_state @detailed_state end |
#detailed_state_reason ⇒ String
Output only. The reason for the detailed_state of the VM (if any).
Corresponds to the JSON property detailedStateReason
201 202 203 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 201 def detailed_state_reason @detailed_state_reason end |
#instance ⇒ String
Output only. The Compute Engine VM instance name.
Corresponds to the JSON property instance
206 207 208 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 206 def instance @instance end |
#last_compliance_check_time ⇒ String
Output only. Timestamp of the last compliance check for the VM.
Corresponds to the JSON property lastComplianceCheckTime
211 212 213 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 211 def last_compliance_check_time @last_compliance_check_time end |
#last_compliance_run_id ⇒ 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.
Corresponds to the JSON property lastComplianceRunId
218 219 220 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 218 def last_compliance_run_id @last_compliance_run_id end |
#name ⇒ String
Output only. The InstanceOSPoliciesCompliance API resource name. Format:
projects/project_number/locations/location/instanceOSPoliciesCompliances/
instance_id`
Corresponds to the JSON propertyname`
225 226 227 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 225 def name @name end |
#os_policy_compliances ⇒ Array<Google::Apis::OsconfigV1alpha::InstanceOsPoliciesComplianceOsPolicyCompliance>
Output only. Compliance data for each OSPolicy that is applied to the VM.
Corresponds to the JSON property osPolicyCompliances
230 231 232 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 230 def os_policy_compliances @os_policy_compliances end |
#state ⇒ String
Output only. Compliance state of the VM.
Corresponds to the JSON property state
235 236 237 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 235 def state @state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
242 243 244 245 246 247 248 249 250 251 |
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 242 def update!(**args) @detailed_state = args[:detailed_state] if args.key?(:detailed_state) @detailed_state_reason = args[:detailed_state_reason] if args.key?(:detailed_state_reason) @instance = args[:instance] if args.key?(:instance) @last_compliance_check_time = args[:last_compliance_check_time] if args.key?(:last_compliance_check_time) @last_compliance_run_id = args[:last_compliance_run_id] if args.key?(:last_compliance_run_id) @name = args[:name] if args.key?(:name) @os_policy_compliances = args[:os_policy_compliances] if args.key?(:os_policy_compliances) @state = args[:state] if args.key?(:state) end |