# Compute Engine v1 API - Class OrganizationSecurityPolicies.OrganizationSecurityPoliciesBase (3.28.0)

3.28.0 (latest) 3.27.0 3.26.0 3.25.0 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    [BindServiceMethod(typeof(OrganizationSecurityPolicies), "BindService")]
    public abstract class OrganizationSecurityPolicies.OrganizationSecurityPoliciesBase

Reference documentation and code samples for the Compute Engine v1 API class OrganizationSecurityPolicies.OrganizationSecurityPoliciesBase.

Base class for server-side implementations of OrganizationSecurityPolicies

## Inheritance

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

## 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.Compute.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1)

## Assembly

Google.Cloud.Compute.V1.dll

## Methods

### AddAssociation(AddAssociationOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> AddAssociation(AddAssociationOrganizationSecurityPolicyRequest request, ServerCallContext context)

Inserts an association for the specified security policy.

This has billing implications. Projects in the hierarchy with effective
hierarchical security policies will be automatically enrolled into Cloud
Armor Enterprise if not already enrolled.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.addAssociation
instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.AddAssociationOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### AddRule(AddRuleOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> AddRule(AddRuleOrganizationSecurityPolicyRequest request, ServerCallContext context)

Inserts a rule into a security policy.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.addRule instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.AddRuleOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### CopyRules(CopyRulesOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> CopyRules(CopyRulesOrganizationSecurityPolicyRequest request, ServerCallContext context)

Copies rules to the specified security policy.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.cloneRules
instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.CopyRulesOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### Delete(DeleteOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> Delete(DeleteOrganizationSecurityPolicyRequest request, ServerCallContext context)

Deletes the specified policy.

Use this API to remove Cloud Armor policies. Previously, alpha and beta
versions of this API were used to remove firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.delete instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DeleteOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### Get(GetOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<SecurityPolicy> Get(GetOrganizationSecurityPolicyRequest request, ServerCallContext context)

List all of the ordered rules present in a single specified policy.

Use this API to read Cloud Armor policies. Previously, alpha and beta
versions of this API were used to read firewall policies. This usage is now
disabled for most organizations. Use firewallPolicies.get instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.SecurityPolicy` | The response to send back to the client (wrapped by a task). |

### GetAssociation(GetAssociationOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<SecurityPolicyAssociation> GetAssociation(GetAssociationOrganizationSecurityPolicyRequest request, ServerCallContext context)

Gets an association with the specified name.

Use this API to read Cloud Armor policies. Previously, alpha and beta
versions of this API were used to read firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.getAssociation
instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetAssociationOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.SecurityPolicyAssociation` | The response to send back to the client (wrapped by a task). |

### GetRule(GetRuleOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<SecurityPolicyRule> GetRule(GetRuleOrganizationSecurityPolicyRequest request, ServerCallContext context)

Gets a rule at the specified priority.

Use this API to read Cloud Armor policies. Previously, alpha and beta
versions of this API were used to read firewall policies. This usage is now
disabled for most organizations. Use firewallPolicies.getRule instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetRuleOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.SecurityPolicyRule` | The response to send back to the client (wrapped by a task). |

### Insert(InsertOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> Insert(InsertOrganizationSecurityPolicyRequest request, ServerCallContext context)

Creates a new policy in the specified organization using the data included
in the request.

Use this API to add Cloud Armor policies. Previously, alpha and beta
versions of this API were used to add firewall policies. This usage is now
disabled for most organizations. Use firewallPolicies.insert instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.InsertOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### List(ListOrganizationSecurityPoliciesRequest, ServerCallContext)

    public virtual Task<SecurityPolicyList> List(ListOrganizationSecurityPoliciesRequest request, ServerCallContext context)

List all the policies that have been configured for the specified
organization.

Use this API to read Cloud Armor policies. Previously, alpha and beta
versions of this API were used to read firewall policies. This usage is now
disabled for most organizations. Use firewallPolicies.list instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListOrganizationSecurityPoliciesRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.SecurityPolicyList` | The response to send back to the client (wrapped by a task). |

### ListAssociations(ListAssociationsOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<OrganizationSecurityPoliciesListAssociationsResponse> ListAssociations(ListAssociationsOrganizationSecurityPolicyRequest request, ServerCallContext context)

Lists associations of a specified target, i.e., organization or folder.

Use this API to read Cloud Armor policies. Previously, alpha and beta
versions of this API were used to read firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.listAssociations
instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListAssociationsOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.OrganizationSecurityPoliciesListAssociationsResponse` | The response to send back to the client (wrapped by a task). |

### ListPreconfiguredExpressionSets(ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest, ServerCallContext)

    public virtual Task<SecurityPoliciesListPreconfiguredExpressionSetsResponse> ListPreconfiguredExpressionSets(ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest request, ServerCallContext context)

Gets the current list of preconfigured Web Application Firewall (WAF)
expressions.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListPreconfiguredExpressionSetsOrganizationSecurityPoliciesRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.SecurityPoliciesListPreconfiguredExpressionSetsResponse` | The response to send back to the client (wrapped by a task). |

### Move(MoveOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> Move(MoveOrganizationSecurityPolicyRequest request, ServerCallContext context)

Moves the specified security policy.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.move instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.MoveOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### Patch(PatchOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> Patch(PatchOrganizationSecurityPolicyRequest request, ServerCallContext context)

Patches the specified policy with the data included in the request.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.patch instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.PatchOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### PatchRule(PatchRuleOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> PatchRule(PatchRuleOrganizationSecurityPolicyRequest request, ServerCallContext context)

Patches a rule at the specified priority.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.patchRule
instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.PatchRuleOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### RemoveAssociation(RemoveAssociationOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> RemoveAssociation(RemoveAssociationOrganizationSecurityPolicyRequest request, ServerCallContext context)

Removes an association for the specified security policy.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.removeAssociation
instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.RemoveAssociationOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |

### RemoveRule(RemoveRuleOrganizationSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> RemoveRule(RemoveRuleOrganizationSecurityPolicyRequest request, ServerCallContext context)

Deletes a rule at the specified priority.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.removeRule
instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.RemoveRuleOrganizationSecurityPolicyRequest` 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.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The response to send back to the client (wrapped by a task). |