Class: Google::Apis::NetworkconnectivityV1::PolicyBasedRoute

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkconnectivity_v1/classes.rb,
lib/google/apis/networkconnectivity_v1/representations.rb,
lib/google/apis/networkconnectivity_v1/representations.rb

Overview

Policy-based routes route L4 network traffic based on not just destination IP address, but also source IP address, protocol, and more. If a policy-based route conflicts with other types of routes, the policy-based route always takes precedence.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PolicyBasedRoute

Returns a new instance of PolicyBasedRoute.



2305
2306
2307
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2305

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

Instance Attribute Details

#create_timeString

Output only. Time when the policy-based route was created. Corresponds to the JSON property createTime

Returns:

  • (String)


2222
2223
2224
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2222

def create_time
  @create_time
end

#descriptionString

Optional. An optional description of this resource. Provide this field when you create the resource. Corresponds to the JSON property description

Returns:

  • (String)


2228
2229
2230
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2228

def description
  @description
end

#filterGoogle::Apis::NetworkconnectivityV1::Filter

Filter matches L4 traffic. Corresponds to the JSON property filter



2233
2234
2235
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2233

def filter
  @filter
end

#interconnect_attachmentGoogle::Apis::NetworkconnectivityV1::InterconnectAttachment

InterconnectAttachment that this route applies to. Corresponds to the JSON property interconnectAttachment



2238
2239
2240
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2238

def interconnect_attachment
  @interconnect_attachment
end

#kindString

Output only. Type of this resource. Always networkconnectivity# policyBasedRoute for policy-based Route resources. Corresponds to the JSON property kind

Returns:

  • (String)


2244
2245
2246
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2244

def kind
  @kind
end

#labelsHash<String,String>

User-defined labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2249
2250
2251
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2249

def labels
  @labels
end

#nameString

Immutable. A unique name of the resource in the form of projects/ project_number/locations/global/PolicyBasedRoutes/policy_based_route_id` Corresponds to the JSON propertyname`

Returns:

  • (String)


2255
2256
2257
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2255

def name
  @name
end

#networkString

Required. Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network. Corresponds to the JSON property network

Returns:

  • (String)


2261
2262
2263
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2261

def network
  @network
end

#next_hop_ilb_ipString

Optional. The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets. For this version, only nextHopIlbIp is supported. Corresponds to the JSON property nextHopIlbIp

Returns:

  • (String)


2267
2268
2269
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2267

def next_hop_ilb_ip
  @next_hop_ilb_ip
end

#next_hop_other_routesString

Optional. Other routes that will be referenced to determine the next hop of the packet. Corresponds to the JSON property nextHopOtherRoutes

Returns:

  • (String)


2273
2274
2275
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2273

def next_hop_other_routes
  @next_hop_other_routes
end

#priorityFixnum

Optional. The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive. Corresponds to the JSON property priority

Returns:

  • (Fixnum)


2282
2283
2284
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2282

def priority
  @priority
end

Output only. Server-defined fully-qualified URL for this resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


2287
2288
2289
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2287

def self_link
  @self_link
end

#update_timeString

Output only. Time when the policy-based route was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


2292
2293
2294
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2292

def update_time
  @update_time
end

#virtual_machineGoogle::Apis::NetworkconnectivityV1::VirtualMachine

VM instances that this policy-based route applies to. Corresponds to the JSON property virtualMachine



2297
2298
2299
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2297

def virtual_machine
  @virtual_machine
end

#warningsArray<Google::Apis::NetworkconnectivityV1::Warnings>

Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages. Corresponds to the JSON property warnings



2303
2304
2305
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2303

def warnings
  @warnings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2310

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @filter = args[:filter] if args.key?(:filter)
  @interconnect_attachment = args[:interconnect_attachment] if args.key?(:interconnect_attachment)
  @kind = args[:kind] if args.key?(:kind)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @next_hop_ilb_ip = args[:next_hop_ilb_ip] if args.key?(:next_hop_ilb_ip)
  @next_hop_other_routes = args[:next_hop_other_routes] if args.key?(:next_hop_other_routes)
  @priority = args[:priority] if args.key?(:priority)
  @self_link = args[:self_link] if args.key?(:self_link)
  @update_time = args[:update_time] if args.key?(:update_time)
  @virtual_machine = args[:virtual_machine] if args.key?(:virtual_machine)
  @warnings = args[:warnings] if args.key?(:warnings)
end