Reference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport.
A report of the OS policy assignment status for a given instance.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#instance
definstance()->::String
Returns
(::String) — The Compute Engine VM instance name.
#instance=
definstance=(value)->::String
Parameter
value (::String) — The Compute Engine VM instance name.
Returns
(::String) — The Compute Engine VM instance name.
#last_run_id
deflast_run_id()->::String
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.
#last_run_id=
deflast_run_id=(value)->::String
Parameter
value (::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.
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.
#name
defname()->::String
Returns
(::String) — The OSPolicyAssignmentReport API resource name.
[[["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-09 UTC."],[],[],null,["# Cloud OS Config V1 API - Class Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport (v1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [1.3.0](/ruby/docs/reference/google-cloud-os_config-v1/1.3.0/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [1.2.1](/ruby/docs/reference/google-cloud-os_config-v1/1.2.1/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [1.1.0](/ruby/docs/reference/google-cloud-os_config-v1/1.1.0/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [1.0.1](/ruby/docs/reference/google-cloud-os_config-v1/1.0.1/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [0.16.0](/ruby/docs/reference/google-cloud-os_config-v1/0.16.0/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [0.15.2](/ruby/docs/reference/google-cloud-os_config-v1/0.15.2/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [0.14.0](/ruby/docs/reference/google-cloud-os_config-v1/0.14.0/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [0.13.0](/ruby/docs/reference/google-cloud-os_config-v1/0.13.0/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [0.12.0](/ruby/docs/reference/google-cloud-os_config-v1/0.12.0/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [0.11.0](/ruby/docs/reference/google-cloud-os_config-v1/0.11.0/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [0.10.0](/ruby/docs/reference/google-cloud-os_config-v1/0.10.0/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport)\n- [0.9.1](/ruby/docs/reference/google-cloud-os_config-v1/0.9.1/Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport) \nReference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport.\n\nA report of the OS policy assignment status for a given instance. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #instance\n\n def instance() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The Compute Engine VM instance name.\n\n### #instance=\n\n def instance=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The Compute Engine VM instance name. \n**Returns**\n\n- (::String) --- The Compute Engine VM instance name.\n\n### #last_run_id\n\n def last_run_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM.\n\n This ID is logged by the OS Config agent while applying the OS\n policies associated with this assignment on the VM.\n NOTE: If the service is unable to successfully connect to the agent for\n this run, then this id will not be available in the agent logs.\n\n### #last_run_id=\n\n def last_run_id=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM.\n\n\n This ID is logged by the OS Config agent while applying the OS\n policies associated with this assignment on the VM.\n NOTE: 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**Returns**\n\n- (::String) --- Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM.\n\n This ID is logged by the OS Config agent while applying the OS\n policies associated with this assignment on the VM.\n NOTE: If the service is unable to successfully connect to the agent for\n this run, then this id will not be available in the agent logs.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- The `OSPolicyAssignmentReport` API resource name.\n\n\n Format:\n `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- The `OSPolicyAssignmentReport` API resource name.\n\n\n Format:\n`projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` \n**Returns**\n\n- (::String) --- The `OSPolicyAssignmentReport` API resource name.\n\n\n Format:\n `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`\n\n### #os_policy_assignment\n\n def os_policy_assignment() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to.\n\n\n Format:\n `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`\n\n### #os_policy_assignment=\n\n def os_policy_assignment=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to.\n\n\n Format:\n`projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` \n**Returns**\n\n- (::String) --- Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to.\n\n\n Format:\n `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`\n\n### #os_policy_compliances\n\n def os_policy_compliances() -\u003e ::Array\u003c::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance](./Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport-OSPolicyCompliance)\\\u003e) --- Compliance data for each `OSPolicy` that is applied to the VM.\n\n### #os_policy_compliances=\n\n def os_policy_compliances=(value) -\u003e ::Array\u003c::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance](./Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport-OSPolicyCompliance)\\\u003e) --- Compliance data for each `OSPolicy` that is applied to the VM. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::OsConfig::V1::OSPolicyAssignmentReport::OSPolicyCompliance](./Google-Cloud-OsConfig-V1-OSPolicyAssignmentReport-OSPolicyCompliance)\\\u003e) --- Compliance data for each `OSPolicy` that is applied to the VM.\n\n### #update_time\n\n def update_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Timestamp for when the report was last generated.\n\n### #update_time=\n\n def update_time=(value) -\u003e ::Google::Protobuf::Timestamp\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Timestamp for when the report was last generated. \n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Timestamp for when the report was last generated."]]