Class: Google::Apis::ComputeBeta::NetworkPolicyTrafficClassificationRule
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::NetworkPolicyTrafficClassificationRule
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_beta/classes.rb,
lib/google/apis/compute_beta/representations.rb,
lib/google/apis/compute_beta/representations.rb
Overview
Represents a traffic classification rule that describes one or more match conditions along with the action to be taken when traffic matches this condition.
Instance Attribute Summary collapse
-
#action ⇒ Google::Apis::ComputeBeta::NetworkPolicyTrafficClassificationRuleAction
The Action to perform when the client connection triggers the rule.
-
#description ⇒ String
An optional description for this resource.
-
#disabled ⇒ Boolean
(also: #disabled?)
Denotes whether the network policy rule is disabled.
-
#kind ⇒ String
Output only.
-
#match ⇒ Google::Apis::ComputeBeta::NetworkPolicyTrafficClassificationRuleMatcher
Represents a match condition that incoming traffic is evaluated against.
-
#priority ⇒ Fixnum
An integer indicating the priority of a rule in the list.
-
#rule_name ⇒ String
An optional name for the rule.
-
#rule_tuple_count ⇒ Fixnum
Output only.
-
#target_secure_tags ⇒ Array<Google::Apis::ComputeBeta::NetworkPolicyTrafficClassificationRuleSecureTag>
A list of secure tags that controls which instances the traffic classification rule applies to.
-
#target_service_accounts ⇒ Array<String>
A list of service accounts indicating the sets of instances that are applied with this rule.
Instance Method Summary collapse
-
#initialize(**args) ⇒ NetworkPolicyTrafficClassificationRule
constructor
A new instance of NetworkPolicyTrafficClassificationRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ NetworkPolicyTrafficClassificationRule
Returns a new instance of NetworkPolicyTrafficClassificationRule.
42040 42041 42042 |
# File 'lib/google/apis/compute_beta/classes.rb', line 42040 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ Google::Apis::ComputeBeta::NetworkPolicyTrafficClassificationRuleAction
The Action to perform when the client connection triggers the rule.
Corresponds to the JSON property action
41967 41968 41969 |
# File 'lib/google/apis/compute_beta/classes.rb', line 41967 def action @action end |
#description ⇒ String
An optional description for this resource.
Corresponds to the JSON property description
41972 41973 41974 |
# File 'lib/google/apis/compute_beta/classes.rb', line 41972 def description @description end |
#disabled ⇒ Boolean Also known as: disabled?
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.
Corresponds to the JSON property disabled
41980 41981 41982 |
# File 'lib/google/apis/compute_beta/classes.rb', line 41980 def disabled @disabled end |
#kind ⇒ String
Output only. [Output only] Type of the resource. Alwayscompute#
networkPolicyTrafficClassificationRule for network
policy traffic classification rules
Corresponds to the JSON property kind
41988 41989 41990 |
# File 'lib/google/apis/compute_beta/classes.rb', line 41988 def kind @kind end |
#match ⇒ Google::Apis::ComputeBeta::NetworkPolicyTrafficClassificationRuleMatcher
Represents a match condition that incoming traffic is evaluated against.
Exactly one field must be specified.
Corresponds to the JSON property match
41994 41995 41996 |
# File 'lib/google/apis/compute_beta/classes.rb', line 41994 def match @match end |
#priority ⇒ Fixnum
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.
Corresponds to the JSON property priority
42004 42005 42006 |
# File 'lib/google/apis/compute_beta/classes.rb', line 42004 def priority @priority end |
#rule_name ⇒ String
An optional name for the rule. This field is not a unique identifier
and can be updated.
Corresponds to the JSON property ruleName
42010 42011 42012 |
# File 'lib/google/apis/compute_beta/classes.rb', line 42010 def rule_name @rule_name end |
#rule_tuple_count ⇒ Fixnum
Output only. [Output Only] Calculation of the complexity of a single network
policy
rule.
Corresponds to the JSON property ruleTupleCount
42017 42018 42019 |
# File 'lib/google/apis/compute_beta/classes.rb', line 42017 def rule_tuple_count @rule_tuple_count end |
#target_secure_tags ⇒ Array<Google::Apis::ComputeBeta::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.
Corresponds to the JSON property targetSecureTags
42032 42033 42034 |
# File 'lib/google/apis/compute_beta/classes.rb', line 42032 def @target_secure_tags end |
#target_service_accounts ⇒ Array<String>
A list of service accounts indicating the sets of instances that are
applied with this rule.
Corresponds to the JSON property targetServiceAccounts
42038 42039 42040 |
# File 'lib/google/apis/compute_beta/classes.rb', line 42038 def target_service_accounts @target_service_accounts end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
42045 42046 42047 42048 42049 42050 42051 42052 42053 42054 42055 42056 |
# File 'lib/google/apis/compute_beta/classes.rb', line 42045 def update!(**args) @action = args[:action] if args.key?(:action) @description = args[:description] if args.key?(:description) @disabled = args[:disabled] if args.key?(:disabled) @kind = args[:kind] if args.key?(:kind) @match = args[:match] if args.key?(:match) @priority = args[:priority] if args.key?(:priority) @rule_name = args[:rule_name] if args.key?(:rule_name) @rule_tuple_count = args[:rule_tuple_count] if args.key?(:rule_tuple_count) @target_secure_tags = args[:target_secure_tags] if args.key?(:target_secure_tags) @target_service_accounts = args[:target_service_accounts] if args.key?(:target_service_accounts) end |