Skip to main content

reports

Creates, updates, deletes, gets or lists a reports resource.

Overview

Namereports
TypeResource
Idgoogle.osconfig.reports

Fields

NameDatatypeDescription
namestringThe OSPolicyAssignmentReport API resource name. Format: projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report
instancestringThe Compute Engine VM instance name.
lastRunIdstringUnique 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.
osPolicyAssignmentstringReference to the OSPolicyAssignment API resource that the OSPolicy belongs to. Format: projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}
osPolicyCompliancesarrayCompliance data for each OSPolicy that is applied to the VM.
updateTimestringTimestamp for when the report was last generated.

Methods

NameAccessible byRequired ParamsDescription
listSELECTinstancesId, locationsId, osPolicyAssignmentsId, projectsIdList OS policy assignment reports for all Compute Engine VM instances in the specified zone.

SELECT examples

List OS policy assignment reports for all Compute Engine VM instances in the specified zone.

SELECT
name,
instance,
lastRunId,
osPolicyAssignment,
osPolicyCompliances,
updateTime
FROM google.osconfig.reports
WHERE instancesId = '{{ instancesId }}'
AND locationsId = '{{ locationsId }}'
AND osPolicyAssignmentsId = '{{ osPolicyAssignmentsId }}'
AND projectsId = '{{ projectsId }}';