# Policy Simulator v1 API - Class OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase (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.OrgPolicyViolationsPreviewServiceBase)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.3.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.2.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.1.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.0.0/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase)

    [BindServiceMethod(typeof(OrgPolicyViolationsPreviewService), "BindService")]
    public abstract class OrgPolicyViolationsPreviewService.OrgPolicyViolationsPreviewServiceBase

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

Base class for server-side implementations of OrgPolicyViolationsPreviewService

## Inheritance

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

## 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

### CreateOrgPolicyViolationsPreview(CreateOrgPolicyViolationsPreviewRequest, ServerCallContext)

    public virtual Task<Operation> CreateOrgPolicyViolationsPreview(CreateOrgPolicyViolationsPreviewRequest request, ServerCallContext context)

CreateOrgPolicyViolationsPreview creates an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
for the proposed changes in the provided
\[OrgPolicyViolationsPreview.OrgPolicyOverlay\]\[\]. The changes to OrgPolicy
are specified by this `OrgPolicyOverlay`. The resources to scan are
inferred from these specified changes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.CreateOrgPolicyViolationsPreviewRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation.html` | The response to send back to the client (wrapped by a task). |

### GetOrgPolicyViolationsPreview(GetOrgPolicyViolationsPreviewRequest, ServerCallContext)

    public virtual Task<OrgPolicyViolationsPreview> GetOrgPolicyViolationsPreview(GetOrgPolicyViolationsPreviewRequest request, ServerCallContext context)

GetOrgPolicyViolationsPreview gets the specified
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].
Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.GetOrgPolicyViolationsPreviewRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationsPreview` | The response to send back to the client (wrapped by a task). |

### ListOrgPolicyViolations(ListOrgPolicyViolationsRequest, ServerCallContext)

    public virtual Task<ListOrgPolicyViolationsResponse> ListOrgPolicyViolations(ListOrgPolicyViolationsRequest request, ServerCallContext context)

ListOrgPolicyViolations lists the \[OrgPolicyViolations\]\[\] that are present
in an
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsResponse` | The response to send back to the client (wrapped by a task). |

### ListOrgPolicyViolationsPreviews(ListOrgPolicyViolationsPreviewsRequest, ServerCallContext)

    public virtual Task<ListOrgPolicyViolationsPreviewsResponse> ListOrgPolicyViolationsPreviews(ListOrgPolicyViolationsPreviewsRequest request, ServerCallContext context)

ListOrgPolicyViolationsPreviews lists each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
in an organization. Each
\[OrgPolicyViolationsPreview\]\[google.cloud.policysimulator.v1.OrgPolicyViolationsPreview\]
is available for at least 7 days.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.ListOrgPolicyViolationsPreviewsResponse` | The response to send back to the client (wrapped by a task). |