# Network Security v1beta1 API - Class AuthorizationPolicy (2.0.0-beta08)

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

- [2.0.0-beta08 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy)
- [2.0.0-beta07](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/2.0.0-beta07/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy)
- [1.0.0-beta02](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/1.0.0-beta02/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy)

    public sealed class AuthorizationPolicy : IMessage<AuthorizationPolicy>, IEquatable<AuthorizationPolicy>, IDeepCloneable<AuthorizationPolicy>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Security v1beta1 API class AuthorizationPolicy.

AuthorizationPolicy is a resource that specifies how a server
should authorize incoming connections. This resource in itself does
not change the configuration unless it's attached to a target https
proxy or endpoint config selector resource.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AuthorizationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AuthorizationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AuthorizationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## 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.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

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

## Assembly

Google.Cloud.NetworkSecurity.V1Beta1.dll

## Constructors

### AuthorizationPolicy()

    public AuthorizationPolicy()

### AuthorizationPolicy(AuthorizationPolicy)

    public AuthorizationPolicy(AuthorizationPolicy other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy` |

## Properties

### Action

    public AuthorizationPolicy.Types.Action Action { get; set; }

Required. The action to take when a rule match is found. Possible values
are "ALLOW" or "DENY".

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy.Types.Action` |   |

### AuthorizationPolicyName

    public AuthorizationPolicyName AuthorizationPolicyName { get; set; }

[AuthorizationPolicyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicyName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy#Google_Cloud_NetworkSecurity_V1Beta1_AuthorizationPolicy_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicyName` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The timestamp when the resource was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Description

    public string Description { get; set; }

Optional. Free-text description of the resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Labels

    public MapField<string, string> Labels { get; }

Optional. Set of label tags associated with the AuthorizationPolicy
resource.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### Name

    public string Name { get; set; }

Required. Name of the AuthorizationPolicy resource. It matches pattern
`projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Rules

    public RepeatedField<AuthorizationPolicy.Types.Rule> Rules { get; }

Optional. List of rules to match. Note that at least one of the rules must
match in order for the action specified in the 'action' field to be taken.
A rule is a match if there is a matching source and destination. If left
blank, the action specified in the `action` field will be applied on every
request.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkSecurity.V1Beta1/latest/Google.Cloud.NetworkSecurity.V1Beta1.AuthorizationPolicy.Types.Rule` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The timestamp when the resource was updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |