Class: Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/osconfig/v1/os_policy_assignment_reports.rb

Overview

A report of the OS policy assignment status for a given instance.

Defined Under Namespace

Classes: OSPolicyCompliance

Instance Attribute Summary collapse

Instance Attribute Details

#instance::String

Returns The Compute Engine VM instance name.

Returns:

  • (::String)

    The Compute Engine VM instance name.



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'proto_docs/google/cloud/osconfig/v1/os_policy_assignment_reports.rb', line 128

class OSPolicyAssignmentReport
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Compliance data for an OS policy
  # @!attribute [rw] os_policy_id
  #   @return [::String]
  #     The OS policy id
  # @!attribute [rw] compliance_state
  #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::ComplianceState]
  #     The compliance state of the OS policy.
  # @!attribute [rw] compliance_state_reason
  #   @return [::String]
  #     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.
  # @!attribute [rw] os_policy_resource_compliances
  #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance>]
  #     Compliance data for each resource within the policy that is applied to
  #     the VM.
  class OSPolicyCompliance
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Compliance data for an OS policy resource.
    # @!attribute [rw] os_policy_resource_id
    #   @return [::String]
    #     The ID of the OS policy resource.
    # @!attribute [rw] config_steps
    #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep>]
    #     Ordered list of configuration completed by the agent for the OS policy
    #     resource.
    # @!attribute [rw] compliance_state
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ComplianceState]
    #     The compliance state of the resource.
    # @!attribute [rw] compliance_state_reason
    #   @return [::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.
    # @!attribute [rw] exec_resource_output
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ExecResourceOutput]
    #     ExecResource specific output.
    class OSPolicyResourceCompliance
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Step performed by the OS Config agent for configuring an
      # `OSPolicy` resource to its desired state.
      # @!attribute [rw] type
      #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep::Type]
      #     Configuration step type.
      # @!attribute [rw] error_message
      #   @return [::String]
      #     An error message recorded during the execution of this step.
      #     Only populated if errors were encountered during this step execution.
      class OSPolicyResourceConfigStep
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Supported configuration step types
        module Type
          # Default value. This value is unused.
          TYPE_UNSPECIFIED = 0

          # Checks for resource conflicts such as schema errors.
          VALIDATION = 1

          # Checks the current status of the desired state for a resource.
          DESIRED_STATE_CHECK = 2

          # Enforces the desired state for a resource that is not in desired
          # state.
          DESIRED_STATE_ENFORCEMENT = 3

          # Re-checks the status of the desired state. This check is done
          # for a resource after the enforcement of all OS policies.
          #
          # This step is used to determine the final desired state status for
          # the resource. It accounts for any resources that might have drifted
          # from their desired state due to side effects from executing other
          # resources.
          DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4
        end
      end

      # ExecResource specific output.
      # @!attribute [rw] enforcement_output
      #   @return [::String]
      #     Output from enforcement phase output file (if run).
      #     Output size is limited to 100K bytes.
      class ExecResourceOutput
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Possible compliance states for a resource.
      module ComplianceState
        # The resource is in an unknown compliance state.
        #
        # To get more details about why the policy is in this state, review
        # the output of the `compliance_state_reason` field.
        UNKNOWN = 0

        # Resource is compliant.
        COMPLIANT = 1

        # Resource is non-compliant.
        NON_COMPLIANT = 2
      end
    end

    # Possible compliance states for an os policy.
    module ComplianceState
      # The policy is in an unknown compliance state.
      #
      # Refer to the field `compliance_state_reason` to learn the exact reason
      # for the policy to be in this compliance state.
      UNKNOWN = 0

      # Policy is compliant.
      #
      # The policy is compliant if all the underlying resources are also
      # compliant.
      COMPLIANT = 1

      # Policy is non-compliant.
      #
      # The policy is non-compliant if one or more underlying resources are
      # non-compliant.
      NON_COMPLIANT = 2
    end
  end
end

#last_run_id::String

Returns Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM.

This ID is logged by the OS Config agent while applying the OS policies associated with this assignment on the VM. NOTE: If the service is unable to successfully connect to the agent for this run, then this id will not be available in the agent logs.

Returns:

  • (::String)

    Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM.

    This ID is logged by the OS Config agent while applying the OS policies associated with this assignment on the VM. NOTE: If the service is unable to successfully connect to the agent for this run, then this id will not be available in the agent logs.



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'proto_docs/google/cloud/osconfig/v1/os_policy_assignment_reports.rb', line 128

class OSPolicyAssignmentReport
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Compliance data for an OS policy
  # @!attribute [rw] os_policy_id
  #   @return [::String]
  #     The OS policy id
  # @!attribute [rw] compliance_state
  #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::ComplianceState]
  #     The compliance state of the OS policy.
  # @!attribute [rw] compliance_state_reason
  #   @return [::String]
  #     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.
  # @!attribute [rw] os_policy_resource_compliances
  #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance>]
  #     Compliance data for each resource within the policy that is applied to
  #     the VM.
  class OSPolicyCompliance
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Compliance data for an OS policy resource.
    # @!attribute [rw] os_policy_resource_id
    #   @return [::String]
    #     The ID of the OS policy resource.
    # @!attribute [rw] config_steps
    #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep>]
    #     Ordered list of configuration completed by the agent for the OS policy
    #     resource.
    # @!attribute [rw] compliance_state
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ComplianceState]
    #     The compliance state of the resource.
    # @!attribute [rw] compliance_state_reason
    #   @return [::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.
    # @!attribute [rw] exec_resource_output
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ExecResourceOutput]
    #     ExecResource specific output.
    class OSPolicyResourceCompliance
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Step performed by the OS Config agent for configuring an
      # `OSPolicy` resource to its desired state.
      # @!attribute [rw] type
      #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep::Type]
      #     Configuration step type.
      # @!attribute [rw] error_message
      #   @return [::String]
      #     An error message recorded during the execution of this step.
      #     Only populated if errors were encountered during this step execution.
      class OSPolicyResourceConfigStep
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Supported configuration step types
        module Type
          # Default value. This value is unused.
          TYPE_UNSPECIFIED = 0

          # Checks for resource conflicts such as schema errors.
          VALIDATION = 1

          # Checks the current status of the desired state for a resource.
          DESIRED_STATE_CHECK = 2

          # Enforces the desired state for a resource that is not in desired
          # state.
          DESIRED_STATE_ENFORCEMENT = 3

          # Re-checks the status of the desired state. This check is done
          # for a resource after the enforcement of all OS policies.
          #
          # This step is used to determine the final desired state status for
          # the resource. It accounts for any resources that might have drifted
          # from their desired state due to side effects from executing other
          # resources.
          DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4
        end
      end

      # ExecResource specific output.
      # @!attribute [rw] enforcement_output
      #   @return [::String]
      #     Output from enforcement phase output file (if run).
      #     Output size is limited to 100K bytes.
      class ExecResourceOutput
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Possible compliance states for a resource.
      module ComplianceState
        # The resource is in an unknown compliance state.
        #
        # To get more details about why the policy is in this state, review
        # the output of the `compliance_state_reason` field.
        UNKNOWN = 0

        # Resource is compliant.
        COMPLIANT = 1

        # Resource is non-compliant.
        NON_COMPLIANT = 2
      end
    end

    # Possible compliance states for an os policy.
    module ComplianceState
      # The policy is in an unknown compliance state.
      #
      # Refer to the field `compliance_state_reason` to learn the exact reason
      # for the policy to be in this compliance state.
      UNKNOWN = 0

      # Policy is compliant.
      #
      # The policy is compliant if all the underlying resources are also
      # compliant.
      COMPLIANT = 1

      # Policy is non-compliant.
      #
      # The policy is non-compliant if one or more underlying resources are
      # non-compliant.
      NON_COMPLIANT = 2
    end
  end
end

#name::String

Returns The OSPolicyAssignmentReport API resource name.

Format: projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report.

Returns:

  • (::String)

    The OSPolicyAssignmentReport API resource name.

    Format: projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'proto_docs/google/cloud/osconfig/v1/os_policy_assignment_reports.rb', line 128

class OSPolicyAssignmentReport
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Compliance data for an OS policy
  # @!attribute [rw] os_policy_id
  #   @return [::String]
  #     The OS policy id
  # @!attribute [rw] compliance_state
  #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::ComplianceState]
  #     The compliance state of the OS policy.
  # @!attribute [rw] compliance_state_reason
  #   @return [::String]
  #     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.
  # @!attribute [rw] os_policy_resource_compliances
  #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance>]
  #     Compliance data for each resource within the policy that is applied to
  #     the VM.
  class OSPolicyCompliance
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Compliance data for an OS policy resource.
    # @!attribute [rw] os_policy_resource_id
    #   @return [::String]
    #     The ID of the OS policy resource.
    # @!attribute [rw] config_steps
    #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep>]
    #     Ordered list of configuration completed by the agent for the OS policy
    #     resource.
    # @!attribute [rw] compliance_state
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ComplianceState]
    #     The compliance state of the resource.
    # @!attribute [rw] compliance_state_reason
    #   @return [::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.
    # @!attribute [rw] exec_resource_output
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ExecResourceOutput]
    #     ExecResource specific output.
    class OSPolicyResourceCompliance
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Step performed by the OS Config agent for configuring an
      # `OSPolicy` resource to its desired state.
      # @!attribute [rw] type
      #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep::Type]
      #     Configuration step type.
      # @!attribute [rw] error_message
      #   @return [::String]
      #     An error message recorded during the execution of this step.
      #     Only populated if errors were encountered during this step execution.
      class OSPolicyResourceConfigStep
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Supported configuration step types
        module Type
          # Default value. This value is unused.
          TYPE_UNSPECIFIED = 0

          # Checks for resource conflicts such as schema errors.
          VALIDATION = 1

          # Checks the current status of the desired state for a resource.
          DESIRED_STATE_CHECK = 2

          # Enforces the desired state for a resource that is not in desired
          # state.
          DESIRED_STATE_ENFORCEMENT = 3

          # Re-checks the status of the desired state. This check is done
          # for a resource after the enforcement of all OS policies.
          #
          # This step is used to determine the final desired state status for
          # the resource. It accounts for any resources that might have drifted
          # from their desired state due to side effects from executing other
          # resources.
          DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4
        end
      end

      # ExecResource specific output.
      # @!attribute [rw] enforcement_output
      #   @return [::String]
      #     Output from enforcement phase output file (if run).
      #     Output size is limited to 100K bytes.
      class ExecResourceOutput
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Possible compliance states for a resource.
      module ComplianceState
        # The resource is in an unknown compliance state.
        #
        # To get more details about why the policy is in this state, review
        # the output of the `compliance_state_reason` field.
        UNKNOWN = 0

        # Resource is compliant.
        COMPLIANT = 1

        # Resource is non-compliant.
        NON_COMPLIANT = 2
      end
    end

    # Possible compliance states for an os policy.
    module ComplianceState
      # The policy is in an unknown compliance state.
      #
      # Refer to the field `compliance_state_reason` to learn the exact reason
      # for the policy to be in this compliance state.
      UNKNOWN = 0

      # Policy is compliant.
      #
      # The policy is compliant if all the underlying resources are also
      # compliant.
      COMPLIANT = 1

      # Policy is non-compliant.
      #
      # The policy is non-compliant if one or more underlying resources are
      # non-compliant.
      NON_COMPLIANT = 2
    end
  end
end

#os_policy_assignment::String

Returns Reference to the OSPolicyAssignment API resource that the OSPolicy belongs to.

Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}.

Returns:

  • (::String)

    Reference to the OSPolicyAssignment API resource that the OSPolicy belongs to.

    Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'proto_docs/google/cloud/osconfig/v1/os_policy_assignment_reports.rb', line 128

class OSPolicyAssignmentReport
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Compliance data for an OS policy
  # @!attribute [rw] os_policy_id
  #   @return [::String]
  #     The OS policy id
  # @!attribute [rw] compliance_state
  #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::ComplianceState]
  #     The compliance state of the OS policy.
  # @!attribute [rw] compliance_state_reason
  #   @return [::String]
  #     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.
  # @!attribute [rw] os_policy_resource_compliances
  #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance>]
  #     Compliance data for each resource within the policy that is applied to
  #     the VM.
  class OSPolicyCompliance
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Compliance data for an OS policy resource.
    # @!attribute [rw] os_policy_resource_id
    #   @return [::String]
    #     The ID of the OS policy resource.
    # @!attribute [rw] config_steps
    #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep>]
    #     Ordered list of configuration completed by the agent for the OS policy
    #     resource.
    # @!attribute [rw] compliance_state
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ComplianceState]
    #     The compliance state of the resource.
    # @!attribute [rw] compliance_state_reason
    #   @return [::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.
    # @!attribute [rw] exec_resource_output
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ExecResourceOutput]
    #     ExecResource specific output.
    class OSPolicyResourceCompliance
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Step performed by the OS Config agent for configuring an
      # `OSPolicy` resource to its desired state.
      # @!attribute [rw] type
      #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep::Type]
      #     Configuration step type.
      # @!attribute [rw] error_message
      #   @return [::String]
      #     An error message recorded during the execution of this step.
      #     Only populated if errors were encountered during this step execution.
      class OSPolicyResourceConfigStep
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Supported configuration step types
        module Type
          # Default value. This value is unused.
          TYPE_UNSPECIFIED = 0

          # Checks for resource conflicts such as schema errors.
          VALIDATION = 1

          # Checks the current status of the desired state for a resource.
          DESIRED_STATE_CHECK = 2

          # Enforces the desired state for a resource that is not in desired
          # state.
          DESIRED_STATE_ENFORCEMENT = 3

          # Re-checks the status of the desired state. This check is done
          # for a resource after the enforcement of all OS policies.
          #
          # This step is used to determine the final desired state status for
          # the resource. It accounts for any resources that might have drifted
          # from their desired state due to side effects from executing other
          # resources.
          DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4
        end
      end

      # ExecResource specific output.
      # @!attribute [rw] enforcement_output
      #   @return [::String]
      #     Output from enforcement phase output file (if run).
      #     Output size is limited to 100K bytes.
      class ExecResourceOutput
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Possible compliance states for a resource.
      module ComplianceState
        # The resource is in an unknown compliance state.
        #
        # To get more details about why the policy is in this state, review
        # the output of the `compliance_state_reason` field.
        UNKNOWN = 0

        # Resource is compliant.
        COMPLIANT = 1

        # Resource is non-compliant.
        NON_COMPLIANT = 2
      end
    end

    # Possible compliance states for an os policy.
    module ComplianceState
      # The policy is in an unknown compliance state.
      #
      # Refer to the field `compliance_state_reason` to learn the exact reason
      # for the policy to be in this compliance state.
      UNKNOWN = 0

      # Policy is compliant.
      #
      # The policy is compliant if all the underlying resources are also
      # compliant.
      COMPLIANT = 1

      # Policy is non-compliant.
      #
      # The policy is non-compliant if one or more underlying resources are
      # non-compliant.
      NON_COMPLIANT = 2
    end
  end
end

#os_policy_compliances::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance>

Returns Compliance data for each OSPolicy that is applied to the VM.

Returns:



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'proto_docs/google/cloud/osconfig/v1/os_policy_assignment_reports.rb', line 128

class OSPolicyAssignmentReport
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Compliance data for an OS policy
  # @!attribute [rw] os_policy_id
  #   @return [::String]
  #     The OS policy id
  # @!attribute [rw] compliance_state
  #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::ComplianceState]
  #     The compliance state of the OS policy.
  # @!attribute [rw] compliance_state_reason
  #   @return [::String]
  #     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.
  # @!attribute [rw] os_policy_resource_compliances
  #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance>]
  #     Compliance data for each resource within the policy that is applied to
  #     the VM.
  class OSPolicyCompliance
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Compliance data for an OS policy resource.
    # @!attribute [rw] os_policy_resource_id
    #   @return [::String]
    #     The ID of the OS policy resource.
    # @!attribute [rw] config_steps
    #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep>]
    #     Ordered list of configuration completed by the agent for the OS policy
    #     resource.
    # @!attribute [rw] compliance_state
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ComplianceState]
    #     The compliance state of the resource.
    # @!attribute [rw] compliance_state_reason
    #   @return [::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.
    # @!attribute [rw] exec_resource_output
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ExecResourceOutput]
    #     ExecResource specific output.
    class OSPolicyResourceCompliance
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Step performed by the OS Config agent for configuring an
      # `OSPolicy` resource to its desired state.
      # @!attribute [rw] type
      #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep::Type]
      #     Configuration step type.
      # @!attribute [rw] error_message
      #   @return [::String]
      #     An error message recorded during the execution of this step.
      #     Only populated if errors were encountered during this step execution.
      class OSPolicyResourceConfigStep
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Supported configuration step types
        module Type
          # Default value. This value is unused.
          TYPE_UNSPECIFIED = 0

          # Checks for resource conflicts such as schema errors.
          VALIDATION = 1

          # Checks the current status of the desired state for a resource.
          DESIRED_STATE_CHECK = 2

          # Enforces the desired state for a resource that is not in desired
          # state.
          DESIRED_STATE_ENFORCEMENT = 3

          # Re-checks the status of the desired state. This check is done
          # for a resource after the enforcement of all OS policies.
          #
          # This step is used to determine the final desired state status for
          # the resource. It accounts for any resources that might have drifted
          # from their desired state due to side effects from executing other
          # resources.
          DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4
        end
      end

      # ExecResource specific output.
      # @!attribute [rw] enforcement_output
      #   @return [::String]
      #     Output from enforcement phase output file (if run).
      #     Output size is limited to 100K bytes.
      class ExecResourceOutput
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Possible compliance states for a resource.
      module ComplianceState
        # The resource is in an unknown compliance state.
        #
        # To get more details about why the policy is in this state, review
        # the output of the `compliance_state_reason` field.
        UNKNOWN = 0

        # Resource is compliant.
        COMPLIANT = 1

        # Resource is non-compliant.
        NON_COMPLIANT = 2
      end
    end

    # Possible compliance states for an os policy.
    module ComplianceState
      # The policy is in an unknown compliance state.
      #
      # Refer to the field `compliance_state_reason` to learn the exact reason
      # for the policy to be in this compliance state.
      UNKNOWN = 0

      # Policy is compliant.
      #
      # The policy is compliant if all the underlying resources are also
      # compliant.
      COMPLIANT = 1

      # Policy is non-compliant.
      #
      # The policy is non-compliant if one or more underlying resources are
      # non-compliant.
      NON_COMPLIANT = 2
    end
  end
end

#update_time::Google::Protobuf::Timestamp

Returns Timestamp for when the report was last generated.

Returns:



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'proto_docs/google/cloud/osconfig/v1/os_policy_assignment_reports.rb', line 128

class OSPolicyAssignmentReport
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Compliance data for an OS policy
  # @!attribute [rw] os_policy_id
  #   @return [::String]
  #     The OS policy id
  # @!attribute [rw] compliance_state
  #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::ComplianceState]
  #     The compliance state of the OS policy.
  # @!attribute [rw] compliance_state_reason
  #   @return [::String]
  #     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.
  # @!attribute [rw] os_policy_resource_compliances
  #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance>]
  #     Compliance data for each resource within the policy that is applied to
  #     the VM.
  class OSPolicyCompliance
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Compliance data for an OS policy resource.
    # @!attribute [rw] os_policy_resource_id
    #   @return [::String]
    #     The ID of the OS policy resource.
    # @!attribute [rw] config_steps
    #   @return [::Array<::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep>]
    #     Ordered list of configuration completed by the agent for the OS policy
    #     resource.
    # @!attribute [rw] compliance_state
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ComplianceState]
    #     The compliance state of the resource.
    # @!attribute [rw] compliance_state_reason
    #   @return [::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.
    # @!attribute [rw] exec_resource_output
    #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ExecResourceOutput]
    #     ExecResource specific output.
    class OSPolicyResourceCompliance
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods

      # Step performed by the OS Config agent for configuring an
      # `OSPolicy` resource to its desired state.
      # @!attribute [rw] type
      #   @return [::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep::Type]
      #     Configuration step type.
      # @!attribute [rw] error_message
      #   @return [::String]
      #     An error message recorded during the execution of this step.
      #     Only populated if errors were encountered during this step execution.
      class OSPolicyResourceConfigStep
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods

        # Supported configuration step types
        module Type
          # Default value. This value is unused.
          TYPE_UNSPECIFIED = 0

          # Checks for resource conflicts such as schema errors.
          VALIDATION = 1

          # Checks the current status of the desired state for a resource.
          DESIRED_STATE_CHECK = 2

          # Enforces the desired state for a resource that is not in desired
          # state.
          DESIRED_STATE_ENFORCEMENT = 3

          # Re-checks the status of the desired state. This check is done
          # for a resource after the enforcement of all OS policies.
          #
          # This step is used to determine the final desired state status for
          # the resource. It accounts for any resources that might have drifted
          # from their desired state due to side effects from executing other
          # resources.
          DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4
        end
      end

      # ExecResource specific output.
      # @!attribute [rw] enforcement_output
      #   @return [::String]
      #     Output from enforcement phase output file (if run).
      #     Output size is limited to 100K bytes.
      class ExecResourceOutput
        include ::Google::Protobuf::MessageExts
        extend ::Google::Protobuf::MessageExts::ClassMethods
      end

      # Possible compliance states for a resource.
      module ComplianceState
        # The resource is in an unknown compliance state.
        #
        # To get more details about why the policy is in this state, review
        # the output of the `compliance_state_reason` field.
        UNKNOWN = 0

        # Resource is compliant.
        COMPLIANT = 1

        # Resource is non-compliant.
        NON_COMPLIANT = 2
      end
    end

    # Possible compliance states for an os policy.
    module ComplianceState
      # The policy is in an unknown compliance state.
      #
      # Refer to the field `compliance_state_reason` to learn the exact reason
      # for the policy to be in this compliance state.
      UNKNOWN = 0

      # Policy is compliant.
      #
      # The policy is compliant if all the underlying resources are also
      # compliant.
      COMPLIANT = 1

      # Policy is non-compliant.
      #
      # The policy is non-compliant if one or more underlying resources are
      # non-compliant.
      NON_COMPLIANT = 2
    end
  end
end