Class: Google::Apis::ComputeAlpha::NetworkPolicyTrafficClassificationRule

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkPolicyTrafficClassificationRule

Returns a new instance of NetworkPolicyTrafficClassificationRule.



46121
46122
46123
# File 'lib/google/apis/compute_alpha/classes.rb', line 46121

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#actionGoogle::Apis::ComputeAlpha::NetworkPolicyTrafficClassificationRuleAction

The Action to perform when the client connection triggers the rule. Corresponds to the JSON property action



46048
46049
46050
# File 'lib/google/apis/compute_alpha/classes.rb', line 46048

def action
  @action
end

#descriptionString

An optional description for this resource. Corresponds to the JSON property description

Returns:

  • (String)


46053
46054
46055
# File 'lib/google/apis/compute_alpha/classes.rb', line 46053

def description
  @description
end

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

Returns:

  • (Boolean)


46061
46062
46063
# File 'lib/google/apis/compute_alpha/classes.rb', line 46061

def disabled
  @disabled
end

#kindString

Output only. [Output only] Type of the resource. Alwayscompute# networkPolicyTrafficClassificationRule for network policy traffic classification rules Corresponds to the JSON property kind

Returns:

  • (String)


46069
46070
46071
# File 'lib/google/apis/compute_alpha/classes.rb', line 46069

def kind
  @kind
end

#matchGoogle::Apis::ComputeAlpha::NetworkPolicyTrafficClassificationRuleMatcher

Represents a match condition that incoming traffic is evaluated against. Exactly one field must be specified. Corresponds to the JSON property match



46075
46076
46077
# File 'lib/google/apis/compute_alpha/classes.rb', line 46075

def match
  @match
end

#priorityFixnum

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

Returns:

  • (Fixnum)


46085
46086
46087
# File 'lib/google/apis/compute_alpha/classes.rb', line 46085

def priority
  @priority
end

#rule_nameString

An optional name for the rule. This field is not a unique identifier and can be updated. Corresponds to the JSON property ruleName

Returns:

  • (String)


46091
46092
46093
# File 'lib/google/apis/compute_alpha/classes.rb', line 46091

def rule_name
  @rule_name
end

#rule_tuple_countFixnum

Output only. [Output Only] Calculation of the complexity of a single network policy rule. Corresponds to the JSON property ruleTupleCount

Returns:

  • (Fixnum)


46098
46099
46100
# File 'lib/google/apis/compute_alpha/classes.rb', line 46098

def rule_tuple_count
  @rule_tuple_count
end

#target_secure_tagsArray<Google::Apis::ComputeAlpha::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



46113
46114
46115
# File 'lib/google/apis/compute_alpha/classes.rb', line 46113

def target_secure_tags
  @target_secure_tags
end

#target_service_accountsArray<String>

A list of service accounts indicating the sets of instances that are applied with this rule. Corresponds to the JSON property targetServiceAccounts

Returns:

  • (Array<String>)


46119
46120
46121
# File 'lib/google/apis/compute_alpha/classes.rb', line 46119

def target_service_accounts
  @target_service_accounts
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



46126
46127
46128
46129
46130
46131
46132
46133
46134
46135
46136
46137
# File 'lib/google/apis/compute_alpha/classes.rb', line 46126

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