# Compute Engine v1 API - Class RegionSecurityPolicies.RegionSecurityPoliciesBase (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(RegionSecurityPolicies), "BindService")]
    public abstract class RegionSecurityPolicies.RegionSecurityPoliciesBase

Reference documentation and code samples for the Compute Engine v1 API class RegionSecurityPolicies.RegionSecurityPoliciesBase.

Base class for server-side implementations of RegionSecurityPolicies

## Inheritance

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

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

### AddRule(AddRuleRegionSecurityPolicyRequest, ServerCallContext)

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

Inserts a rule into a security policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.AddRuleRegionSecurityPolicyRequest` 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(DeleteRegionSecurityPolicyRequest, ServerCallContext)

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

Deletes the specified policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DeleteRegionSecurityPolicyRequest` 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(GetRegionSecurityPolicyRequest, ServerCallContext)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetRegionSecurityPolicyRequest` 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). |

### GetRule(GetRuleRegionSecurityPolicyRequest, ServerCallContext)

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

Gets a rule at the specified priority.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetRuleRegionSecurityPolicyRequest` 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(InsertRegionSecurityPolicyRequest, ServerCallContext)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.InsertRegionSecurityPolicyRequest` 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(ListRegionSecurityPoliciesRequest, ServerCallContext)

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

List all the policies that have been configured for the specified project
and region.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListRegionSecurityPoliciesRequest` 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). |

### Patch(PatchRegionSecurityPolicyRequest, ServerCallContext)

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

Patches the specified policy with the data included in the request. To
clear fields in the policy, leave the fields empty and specify them in the
updateMask. This cannot be used to be update the rules in the policy.
Please use the per rule methods like addRule, patchRule, and removeRule
instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.PatchRegionSecurityPolicyRequest` 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(PatchRuleRegionSecurityPolicyRequest, ServerCallContext)

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

Patches a rule at the specified priority. To clear fields in the rule,
leave the fields empty and specify them in the updateMask.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.PatchRuleRegionSecurityPolicyRequest` 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(RemoveRuleRegionSecurityPolicyRequest, ServerCallContext)

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

Deletes a rule at the specified priority.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.RemoveRuleRegionSecurityPolicyRequest` 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). |

### SetLabels(SetLabelsRegionSecurityPolicyRequest, ServerCallContext)

    public virtual Task<Operation> SetLabels(SetLabelsRegionSecurityPolicyRequest request, ServerCallContext context)

Sets the labels on a security policy. To learn more about labels,
read the Labeling Resources
documentation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetLabelsRegionSecurityPolicyRequest` 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). |