Class: Google::Apis::TpuV1alpha1::Node

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

Overview

A TPU instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Node

Returns a new instance of Node



317
318
319
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 317

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

Instance Attribute Details

#accelerator_typeString

The type of hardware accelerators associated with this node. Required. Corresponds to the JSON property acceleratorType

Returns:

  • (String)


217
218
219
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 217

def accelerator_type
  @accelerator_type
end

#cidr_blockString

The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block. Required. Corresponds to the JSON property cidrBlock

Returns:

  • (String)


230
231
232
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 230

def cidr_block
  @cidr_block
end

#create_timeString

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

Returns:

  • (String)


236
237
238
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 236

def create_time
  @create_time
end

#descriptionString

The user-supplied description of the TPU. Maximum of 512 characters. Corresponds to the JSON property description

Returns:

  • (String)


241
242
243
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 241

def description
  @description
end

#healthString

The health status of the TPU node. Corresponds to the JSON property health

Returns:

  • (String)


246
247
248
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 246

def health
  @health
end

#health_descriptionString

Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy. Corresponds to the JSON property healthDescription

Returns:

  • (String)


253
254
255
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 253

def health_description
  @health_description
end

#ip_addressString

Output only. DEPRECATED! Use network_endpoints instead. The network address for the TPU Node as visible to Compute Engine instances. Corresponds to the JSON property ipAddress

Returns:

  • (String)


261
262
263
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 261

def ip_address
  @ip_address
end

#labelsHash<String,String>

Resource labels to represent user-provided metadata. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


266
267
268
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 266

def labels
  @labels
end

#nameString

Output only. The immutable name of the TPU Corresponds to the JSON property name

Returns:

  • (String)


272
273
274
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 272

def name
  @name
end

#networkString

The name of a network they wish to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used. Corresponds to the JSON property network

Returns:

  • (String)


279
280
281
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 279

def network
  @network
end

#network_endpointsArray<Google::Apis::TpuV1alpha1::NetworkEndpoint>

Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node reach out to the 0th entry in this map first. Corresponds to the JSON property networkEndpoints



287
288
289
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 287

def network_endpoints
  @network_endpoints
end

#portString

Output only. DEPRECATED! Use network_endpoints instead. The network port for the TPU Node as visible to Compute Engine instances. Corresponds to the JSON property port

Returns:

  • (String)


294
295
296
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 294

def port
  @port
end

#service_accountString

Output only. The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data. Corresponds to the JSON property serviceAccount

Returns:

  • (String)


303
304
305
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 303

def 
  @service_account
end

#stateString

Output only. The current state for the TPU Node. Corresponds to the JSON property state

Returns:

  • (String)


309
310
311
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 309

def state
  @state
end

#tensorflow_versionString

The version of Tensorflow running in the Node. Required. Corresponds to the JSON property tensorflowVersion

Returns:

  • (String)


315
316
317
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 315

def tensorflow_version
  @tensorflow_version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'generated/google/apis/tpu_v1alpha1/classes.rb', line 322

def update!(**args)
  @accelerator_type = args[:accelerator_type] if args.key?(:accelerator_type)
  @cidr_block = args[:cidr_block] if args.key?(:cidr_block)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @health = args[:health] if args.key?(:health)
  @health_description = args[:health_description] if args.key?(:health_description)
  @ip_address = args[:ip_address] if args.key?(:ip_address)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @network_endpoints = args[:network_endpoints] if args.key?(:network_endpoints)
  @port = args[:port] if args.key?(:port)
  @service_account = args[:service_account] if args.key?(:service_account)
  @state = args[:state] if args.key?(:state)
  @tensorflow_version = args[:tensorflow_version] if args.key?(:tensorflow_version)
end