Class: Google::Apis::OsconfigV1::Inventory

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

Overview

This API resource represents the available inventory data for a Compute Engine virtual machine (VM) instance at a given point in time. You can use this API resource to determine the inventory data of your VM. For more information, see Information provided by OS inventory management.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Inventory

Returns a new instance of Inventory.



466
467
468
# File 'lib/google/apis/osconfig_v1/classes.rb', line 466

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

Instance Attribute Details

#itemsHash<String,Google::Apis::OsconfigV1::InventoryItem>

Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version. Corresponds to the JSON property items

Returns:



448
449
450
# File 'lib/google/apis/osconfig_v1/classes.rb', line 448

def items
  @items
end

#nameString

Output only. The Inventory API resource name. Format: projects/ project_number/locations/location/instances/instance_id/inventory Corresponds to the JSON property name

Returns:

  • (String)


454
455
456
# File 'lib/google/apis/osconfig_v1/classes.rb', line 454

def name
  @name
end

#os_infoGoogle::Apis::OsconfigV1::InventoryOsInfo

Operating system information for the VM. Corresponds to the JSON property osInfo



459
460
461
# File 'lib/google/apis/osconfig_v1/classes.rb', line 459

def os_info
  @os_info
end

#update_timeString

Output only. Timestamp of the last reported inventory for the VM. Corresponds to the JSON property updateTime

Returns:

  • (String)


464
465
466
# File 'lib/google/apis/osconfig_v1/classes.rb', line 464

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



471
472
473
474
475
476
# File 'lib/google/apis/osconfig_v1/classes.rb', line 471

def update!(**args)
  @items = args[:items] if args.key?(:items)
  @name = args[:name] if args.key?(:name)
  @os_info = args[:os_info] if args.key?(:os_info)
  @update_time = args[:update_time] if args.key?(:update_time)
end