# Policy Simulator v1 API - Class OrgPolicyViolationsPreviewService (1.4.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.4.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.3.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.2.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.1.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.0.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService)

    public static class OrgPolicyViolationsPreviewService

Reference documentation and code samples for the Policy Simulator v1 API class OrgPolicyViolationsPreviewService.

Violations Preview API service for OrgPolicy.

An
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is a preview of the violations that will exist as soon as a proposed
OrgPolicy change is submitted. To create an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.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.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> OrgPolicyViolationsPreviewService

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.PolicySimulator.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1)

## Assembly

Google.Cloud.PolicySimulator.V1.dll

## Methods

### BindService(OrgPolicyViolationsPreviewServiceBase)

    public static ServerServiceDefinition BindService(OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase serviceImpl)

Creates service definition that can be registered with a server

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `serviceImpl` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase` An object implementing the server-side handling logic. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerServiceDefinition.html` |   |

### BindService(ServiceBinderBase, OrgPolicyViolationsPreviewServiceBase)

    public static void BindService(ServiceBinderBase serviceBinder, OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase serviceImpl)

Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
Note: this method is part of an experimental API that can change or be removed without any prior notice.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `serviceBinder` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServiceBinderBase.html` Service methods will be bound by calling `AddMethod` on this object. |
| `serviceImpl` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase` An object implementing the server-side handling logic. |