# Class NetworkPolicyTrafficClassificationRule (0.12.0)

0.12.0 (latest) 0.11.0 0.4.0 0.3.0 0.2.0 0.1.8

    NetworkPolicyTrafficClassificationRule(
        mapping=None, *, ignore_unknown_fields=False, **kwargs
    )

Represents a traffic classification rule that describes one
or more match conditions along with the action to be taken when
traffic matches this condition.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `action` | `https://docs.cloud.google.com/python/docs/reference/google-cloud-compute-v1beta/latest/google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRuleAction` The Action to perform when the client connection triggers the rule. This field is a member of `oneof`_ `_action`. |
| `description` | `str` An optional description for this resource. This field is a member of `oneof`_ `_description`. |
| `disabled` | `bool` Denotes whether the network policy rule is disabled. When set to true, the network policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the network policy rule will be enabled. This field is a member of `oneof`_ `_disabled`. |
| `kind` | `str` Output only. \[Output only\] Type of the resource. Alwayscompute#networkPolicyTrafficClassificationRule for network policy traffic classification rules This field is a member of `oneof`_ `_kind`. |
| `match` | `https://docs.cloud.google.com/python/docs/reference/google-cloud-compute-v1beta/latest/google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRuleMatcher` A match condition that outgoing traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. This field is a member of `oneof`_ `_match`. |
| `priority` | `int` An integer indicating the priority of a rule in the list. The priority must be a positive value between 1 and 2147482647. The priority values from 2147482648 to 2147483647 (1000) are reserved for system default network policy rules. Rules are evaluated from highest to lowest priority where 1 is the highest priority and 2147483647 is the lowest priority. This field is a member of `oneof`_ `_priority`. |
| `rule_name` | `str` An optional name for the rule. This field is not a unique identifier and can be updated. This field is a member of `oneof`_ `_rule_name`. |
| `rule_tuple_count` | `int` Output only. \[Output Only\] Calculation of the complexity of a single network policy rule. This field is a member of `oneof`_ `_rule_tuple_count`. |
| `target_secure_tags` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/google-cloud-compute-v1beta/latest/google.cloud.compute_v1beta.types.NetworkPolicyTrafficClassificationRuleSecureTag]` A list of secure tags that controls which instances the traffic classification rule applies to. If targetSecureTag are specified, then the traffic classification rule applies only to instances in the VPC network that have one of those EFFECTIVE secure tags, if all the targetSecureTag are in INEFFECTIVE state, then this rule will be ignored. targetSecureTag may not be set at the same time as targetServiceAccounts. If neithertargetServiceAccounts nor targetSecureTag are specified, the traffic classification rule applies to all instances on the specified network. Maximum number of target label tags allowed is 256. |
| `target_service_accounts` | `MutableSequence[str]` A list of service accounts indicating the sets of instances that are applied with this rule. |