Class: Google::Apis::NetworkconnectivityV1::Route

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

A route defines a path from VM instances within a spoke to a specific destination resource. Only VPC spokes have routes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Route

Returns a new instance of Route.



2155
2156
2157
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2155

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

Instance Attribute Details

#create_timeString

Output only. The time the route was created. Corresponds to the JSON property createTime

Returns:

  • (String)


2088
2089
2090
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2088

def create_time
  @create_time
end

#descriptionString

An optional description of the route. Corresponds to the JSON property description

Returns:

  • (String)


2093
2094
2095
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2093

def description
  @description
end

#ip_cidr_rangeString

The destination IP address range. Corresponds to the JSON property ipCidrRange

Returns:

  • (String)


2098
2099
2100
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2098

def ip_cidr_range
  @ip_cidr_range
end

#labelsHash<String,String>

Optional labels in key-value pair format. For more information about labels, see Requirements for labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


2105
2106
2107
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2105

def labels
  @labels
end

#locationString

Output only. The location of the route. Uses the following form: "projects/ project/locations/location" Example: projects/1234/locations/us-central1 Corresponds to the JSON property location

Returns:

  • (String)


2111
2112
2113
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2111

def location
  @location
end

#nameString

Immutable. The name of the route. Route names must be unique. Route names use the following form: projects/project_number/locations/global/hubs/hub/ routeTables/route_table_id/routes/route_id` Corresponds to the JSON propertyname`

Returns:

  • (String)


2118
2119
2120
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2118

def name
  @name
end

#next_hop_vpc_networkGoogle::Apis::NetworkconnectivityV1::NextHopVpcNetwork

Immutable. The destination VPC network for packets on this route. Corresponds to the JSON property nextHopVpcNetwork



2123
2124
2125
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2123

def next_hop_vpc_network
  @next_hop_vpc_network
end

#spokeString

Immutable. The spoke that this route leads to. Example: projects/12345/ locations/global/spokes/SPOKE Corresponds to the JSON property spoke

Returns:

  • (String)


2129
2130
2131
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2129

def spoke
  @spoke
end

#stateString

Output only. The current lifecycle state of the route. Corresponds to the JSON property state

Returns:

  • (String)


2134
2135
2136
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2134

def state
  @state
end

#typeString

Output only. The route's type. Its type is determined by the properties of its IP address range. Corresponds to the JSON property type

Returns:

  • (String)


2140
2141
2142
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2140

def type
  @type
end

#uidString

Output only. The Google-generated UUID for the route. This value is unique across all Network Connectivity Center route resources. If a route is deleted and another with the same name is created, the new route is assigned a different uid. Corresponds to the JSON property uid

Returns:

  • (String)


2148
2149
2150
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2148

def uid
  @uid
end

#update_timeString

Output only. The time the route was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


2153
2154
2155
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2153

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
# File 'lib/google/apis/networkconnectivity_v1/classes.rb', line 2160

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @ip_cidr_range = args[:ip_cidr_range] if args.key?(:ip_cidr_range)
  @labels = args[:labels] if args.key?(:labels)
  @location = args[:location] if args.key?(:location)
  @name = args[:name] if args.key?(:name)
  @next_hop_vpc_network = args[:next_hop_vpc_network] if args.key?(:next_hop_vpc_network)
  @spoke = args[:spoke] if args.key?(:spoke)
  @state = args[:state] if args.key?(:state)
  @type = args[:type] if args.key?(:type)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
end