Class: Google::Apis::BatchV1::AgentMetadata

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

Overview

VM Agent Metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AgentMetadata

Returns a new instance of AgentMetadata.



297
298
299
# File 'lib/google/apis/batch_v1/classes.rb', line 297

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

Instance Attribute Details

#creation_timeString

When the VM agent started. Use agent_startup_time instead. Corresponds to the JSON property creationTime

Returns:

  • (String)


247
248
249
# File 'lib/google/apis/batch_v1/classes.rb', line 247

def creation_time
  @creation_time
end

#creatorString

Full name of the entity that created this vm. For MIG, this path is: projects/ project/regions/region/InstanceGroupManagers/igm The value is retrieved from the vm metadata key of "created-by". Corresponds to the JSON property creator

Returns:

  • (String)


254
255
256
# File 'lib/google/apis/batch_v1/classes.rb', line 254

def creator
  @creator
end

#image_versionString

image version for the VM that this agent is installed on. Corresponds to the JSON property imageVersion

Returns:

  • (String)


259
260
261
# File 'lib/google/apis/batch_v1/classes.rb', line 259

def image_version
  @image_version
end

#instanceString

GCP instance name (go/instance-name). Corresponds to the JSON property instance

Returns:

  • (String)


264
265
266
# File 'lib/google/apis/batch_v1/classes.rb', line 264

def instance
  @instance
end

#instance_idFixnum

GCP instance ID (go/instance-id). Corresponds to the JSON property instanceId

Returns:

  • (Fixnum)


269
270
271
# File 'lib/google/apis/batch_v1/classes.rb', line 269

def instance_id
  @instance_id
end

#instance_preemption_notice_receivedBoolean Also known as: instance_preemption_notice_received?

If the GCP instance has received preemption notice. Corresponds to the JSON property instancePreemptionNoticeReceived

Returns:

  • (Boolean)


274
275
276
# File 'lib/google/apis/batch_v1/classes.rb', line 274

def instance_preemption_notice_received
  @instance_preemption_notice_received
end

#machine_typeString

Optional. machine type of the VM Corresponds to the JSON property machineType

Returns:

  • (String)


280
281
282
# File 'lib/google/apis/batch_v1/classes.rb', line 280

def machine_type
  @machine_type
end

#os_releaseHash<String,String>

parsed contents of /etc/os-release Corresponds to the JSON property osRelease

Returns:

  • (Hash<String,String>)


285
286
287
# File 'lib/google/apis/batch_v1/classes.rb', line 285

def os_release
  @os_release
end

#versionString

agent binary version running on VM Corresponds to the JSON property version

Returns:

  • (String)


290
291
292
# File 'lib/google/apis/batch_v1/classes.rb', line 290

def version
  @version
end

#zoneString

Agent zone. Corresponds to the JSON property zone

Returns:

  • (String)


295
296
297
# File 'lib/google/apis/batch_v1/classes.rb', line 295

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



302
303
304
305
306
307
308
309
310
311
312
313
# File 'lib/google/apis/batch_v1/classes.rb', line 302

def update!(**args)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @creator = args[:creator] if args.key?(:creator)
  @image_version = args[:image_version] if args.key?(:image_version)
  @instance = args[:instance] if args.key?(:instance)
  @instance_id = args[:instance_id] if args.key?(:instance_id)
  @instance_preemption_notice_received = args[:instance_preemption_notice_received] if args.key?(:instance_preemption_notice_received)
  @machine_type = args[:machine_type] if args.key?(:machine_type)
  @os_release = args[:os_release] if args.key?(:os_release)
  @version = args[:version] if args.key?(:version)
  @zone = args[:zone] if args.key?(:zone)
end