Reference documentation and code samples for the Policy Simulator V1 API module Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService.
Violations Preview API service for OrgPolicy.
An
OrgPolicyViolationsPreview
is a preview of the violations that will exist as soon as a proposed
OrgPolicy change is submitted. To create an
OrgPolicyViolationsPreview,
the API user specifies the changes they wish to make and requests the
generation of a preview via [GenerateViolationsPreview][]. the OrgPolicy
Simulator service then scans the API user's currently existing resources to
determine these resources violate the newly set OrgPolicy.
To load this service and instantiate a REST client:
[[["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 - Module Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService (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-OrgPolicyViolationsPreviewService)\n- [1.3.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.3.0/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService)\n- [1.2.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.2.1/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService)\n- [1.1.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.1.0/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService)\n- [1.0.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.0.1/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService)\n- [0.4.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.4.0/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService)\n- [0.3.2](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.3.2/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService)\n- [0.2.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.2.0/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService)\n- [0.1.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.1.1/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreviewService) \nReference documentation and code samples for the Policy Simulator V1 API module Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService.\n\nViolations Preview API service for OrgPolicy.\n\nAn\n[OrgPolicyViolationsPreview](/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview \"Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview (class)\")\nis a preview of the violations that will exist as soon as a proposed\nOrgPolicy change is submitted. To create an\n[OrgPolicyViolationsPreview](/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-PolicySimulator-V1-OrgPolicyViolationsPreview \"Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview (class)\"),\nthe API user specifies the changes they wish to make and requests the\ngeneration of a preview via \\[GenerateViolationsPreview\\]\\[\\]. the OrgPolicy\nSimulator service then scans the API user's currently existing resources to\ndetermine these resources violate the newly set OrgPolicy.\n\nTo load this service and instantiate a REST client: \n\n require \"google/cloud/policy_simulator/v1/org_policy_violations_preview_service/rest\"\n client = ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreviewService::Rest::Client.new"]]