Reference to theOSPolicyAssignmentAPI resource that theOSPolicybelongs to. Format:projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}
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.
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
Type
Description
string
setLastRunId
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.
[[["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-09-04 UTC."],[],[],null,["# Google Cloud OsConfig V1 Client - Class OSPolicyAssignmentReport (2.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.0 (latest)](/php/docs/reference/cloud-osconfig/latest/V1.OSPolicyAssignmentReport)\n- [2.0.5](/php/docs/reference/cloud-osconfig/2.0.5/V1.OSPolicyAssignmentReport)\n- [1.3.5](/php/docs/reference/cloud-osconfig/1.3.5/V1.OSPolicyAssignmentReport)\n- [1.2.2](/php/docs/reference/cloud-osconfig/1.2.2/V1.OSPolicyAssignmentReport)\n- [1.1.1](/php/docs/reference/cloud-osconfig/1.1.1/V1.OSPolicyAssignmentReport)\n- [1.0.5](/php/docs/reference/cloud-osconfig/1.0.5/V1.OSPolicyAssignmentReport) \nReference documentation and code samples for the Google Cloud OsConfig V1 Client class OSPolicyAssignmentReport.\n\nA report of the OS policy assignment status for a given instance.\n\nGenerated from protobuf message `google.cloud.osconfig.v1.OSPolicyAssignmentReport`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ OsConfig \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nThe `OSPolicyAssignmentReport` API resource name.\n\nFormat:\n`projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`\n\n### setName\n\nThe `OSPolicyAssignmentReport` API resource name.\n\nFormat:\n`projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`\n\n### getInstance\n\nThe Compute Engine VM instance name.\n\n### setInstance\n\nThe Compute Engine VM instance name.\n\n### getOsPolicyAssignment\n\nReference to the `OSPolicyAssignment` API resource that the `OSPolicy`\nbelongs to.\n\nFormat:\n`projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`\n\n### setOsPolicyAssignment\n\nReference to the `OSPolicyAssignment` API resource that the `OSPolicy`\nbelongs to.\n\nFormat:\n`projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`\n\n### getOsPolicyCompliances\n\nCompliance data for each `OSPolicy` that is applied to the VM.\n\n### setOsPolicyCompliances\n\nCompliance data for each `OSPolicy` that is applied to the VM.\n\n### getUpdateTime\n\nTimestamp for when the report was last generated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nTimestamp for when the report was last generated.\n\n### getLastRunId\n\nUnique identifier of the last attempted run to apply the OS policies\nassociated with this assignment on the VM.\n\nThis ID is logged by the OS Config agent while applying the OS\npolicies associated with this assignment on the VM.\nNOTE: If the service is unable to successfully connect to the agent for\nthis run, then this id will not be available in the agent logs.\n\n### setLastRunId\n\nUnique identifier of the last attempted run to apply the OS policies\nassociated with this assignment on the VM.\n\nThis ID is logged by the OS Config agent while applying the OS\npolicies associated with this assignment on the VM.\nNOTE: If the service is unable to successfully connect to the agent for\nthis run, then this id will not be available in the agent logs."]]