Reference documentation and code samples for the Policy Simulator V1 API class Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview::ResourceCounts.
A summary of the state of all resources scanned for compliance with the
changed OrgPolicy.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#compliant
defcompliant()->::Integer
Returns
(::Integer) — Output only. Number of scanned resources with zero violations.
#errors
deferrors()->::Integer
Returns
(::Integer) — Output only. Number of resources that returned an error when scanned.
#noncompliant
defnoncompliant()->::Integer
Returns
(::Integer) — Output only. Number of scanned resources with at least one violation.
#scanned
defscanned()->::Integer
Returns
(::Integer) — Output only. Number of resources checked for compliance.
Must equal: unenforced + noncompliant + compliant + error
#unenforced
defunenforced()->::Integer
Returns
(::Integer) — Output only. Number of resources where the constraint was not enforced,
i.e. the Policy set enforced: false for that resource.
[[["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-03 UTC."],[],[],null,["# Policy Simulator V1 API - Class Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview::ResourceCounts (v1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts)\n- [1.3.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.3.0/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts)\n- [1.2.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.2.1/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts)\n- [1.1.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.1.0/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts)\n- [1.0.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.0.1/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts)\n- [0.4.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.4.0/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts)\n- [0.3.2](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.3.2/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts)\n- [0.2.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.2.0/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts)\n- [0.1.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.1.1/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview-ResourceCounts) \nReference documentation and code samples for the Policy Simulator V1 API class Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview::ResourceCounts.\n\nA summary of the state of all resources scanned for compliance with the\nchanged OrgPolicy. \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### #compliant\n\n def compliant() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Output only. Number of scanned resources with zero violations.\n\n### #errors\n\n def errors() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Output only. Number of resources that returned an error when scanned.\n\n### #noncompliant\n\n def noncompliant() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Output only. Number of scanned resources with at least one violation.\n\n### #scanned\n\n def scanned() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Output only. Number of resources checked for compliance.\n\n Must equal: unenforced + noncompliant + compliant + error\n\n### #unenforced\n\n def unenforced() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource."]]