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.



174
175
176
# File 'lib/google/apis/batch_v1/classes.rb', line 174

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)


129
130
131
# File 'lib/google/apis/batch_v1/classes.rb', line 129

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)


136
137
138
# File 'lib/google/apis/batch_v1/classes.rb', line 136

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)


141
142
143
# File 'lib/google/apis/batch_v1/classes.rb', line 141

def image_version
  @image_version
end

#instanceString

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

Returns:

  • (String)


146
147
148
# File 'lib/google/apis/batch_v1/classes.rb', line 146

def instance
  @instance
end

#instance_idFixnum

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

Returns:

  • (Fixnum)


151
152
153
# File 'lib/google/apis/batch_v1/classes.rb', line 151

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)


156
157
158
# File 'lib/google/apis/batch_v1/classes.rb', line 156

def instance_preemption_notice_received
  @instance_preemption_notice_received
end

#os_releaseHash<String,String>

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

Returns:

  • (Hash<String,String>)


162
163
164
# File 'lib/google/apis/batch_v1/classes.rb', line 162

def os_release
  @os_release
end

#versionString

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

Returns:

  • (String)


167
168
169
# File 'lib/google/apis/batch_v1/classes.rb', line 167

def version
  @version
end

#zoneString

Agent zone. Corresponds to the JSON property zone

Returns:

  • (String)


172
173
174
# File 'lib/google/apis/batch_v1/classes.rb', line 172

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



179
180
181
182
183
184
185
186
187
188
189
# File 'lib/google/apis/batch_v1/classes.rb', line 179

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)
  @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