inventory.proto 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.osconfig.v1;
  16. import "google/protobuf/timestamp.proto";
  17. option csharp_namespace = "Google.Cloud.OsConfig.V1";
  18. option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "Inventories";
  21. option java_package = "com.google.cloud.osconfig.v1";
  22. option php_namespace = "Google\\Cloud\\OsConfig\\V1";
  23. option ruby_package = "Google::Cloud::OsConfig::V1";
  24. // OS Config Inventory is a service for collecting and reporting operating
  25. // system and package information on VM instances.
  26. // The inventory details of a VM.
  27. message Inventory {
  28. // Operating system information for the VM.
  29. message OsInfo {
  30. // The VM hostname.
  31. string hostname = 9;
  32. // The operating system long name.
  33. // For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
  34. // Datacenter'.
  35. string long_name = 2;
  36. // The operating system short name.
  37. // For example, 'windows' or 'debian'.
  38. string short_name = 3;
  39. // The version of the operating system.
  40. string version = 4;
  41. // The system architecture of the operating system.
  42. string architecture = 5;
  43. // The kernel version of the operating system.
  44. string kernel_version = 6;
  45. // The kernel release of the operating system.
  46. string kernel_release = 7;
  47. // The current version of the OS Config agent running on the VM.
  48. string osconfig_agent_version = 8;
  49. }
  50. // A single piece of inventory on a VM.
  51. message Item {
  52. // The origin of a specific inventory item.
  53. enum OriginType {
  54. // Invalid. An origin type must be specified.
  55. ORIGIN_TYPE_UNSPECIFIED = 0;
  56. // This inventory item was discovered as the result of the agent
  57. // reporting inventory via the reporting API.
  58. INVENTORY_REPORT = 1;
  59. }
  60. // The different types of inventory that are tracked on a VM.
  61. enum Type {
  62. // Invalid. An type must be specified.
  63. TYPE_UNSPECIFIED = 0;
  64. // This represents a package that is installed on the VM.
  65. INSTALLED_PACKAGE = 1;
  66. // This represents an update that is available for a package.
  67. AVAILABLE_PACKAGE = 2;
  68. }
  69. // Identifier for this item, unique across items for this VM.
  70. string id = 1;
  71. // The origin of this inventory item.
  72. OriginType origin_type = 2;
  73. // When this inventory item was first detected.
  74. google.protobuf.Timestamp create_time = 8;
  75. // When this inventory item was last modified.
  76. google.protobuf.Timestamp update_time = 9;
  77. // The specific type of inventory, correlating to its specific details.
  78. Type type = 5;
  79. // Specific details of this inventory item based on its type.
  80. oneof details {
  81. // Software package present on the VM instance.
  82. SoftwarePackage installed_package = 6;
  83. // Software package available to be installed on the VM instance.
  84. SoftwarePackage available_package = 7;
  85. }
  86. }
  87. // Software package information of the operating system.
  88. message SoftwarePackage {
  89. // Information about the different types of software packages.
  90. oneof details {
  91. // Yum package info.
  92. // For details about the yum package manager, see
  93. // https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
  94. VersionedPackage yum_package = 1;
  95. // Details of an APT package.
  96. // For details about the apt package manager, see
  97. // https://wiki.debian.org/Apt.
  98. VersionedPackage apt_package = 2;
  99. // Details of a Zypper package.
  100. // For details about the Zypper package manager, see
  101. // https://en.opensuse.org/SDB:Zypper_manual.
  102. VersionedPackage zypper_package = 3;
  103. // Details of a Googet package.
  104. // For details about the googet package manager, see
  105. // https://github.com/google/googet.
  106. VersionedPackage googet_package = 4;
  107. // Details of a Zypper patch.
  108. // For details about the Zypper package manager, see
  109. // https://en.opensuse.org/SDB:Zypper_manual.
  110. ZypperPatch zypper_patch = 5;
  111. // Details of a Windows Update package.
  112. // See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
  113. // information about Windows Update.
  114. WindowsUpdatePackage wua_package = 6;
  115. // Details of a Windows Quick Fix engineering package.
  116. // See
  117. // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
  118. // for info in Windows Quick Fix Engineering.
  119. WindowsQuickFixEngineeringPackage qfe_package = 7;
  120. // Details of a COS package.
  121. VersionedPackage cos_package = 8;
  122. }
  123. }
  124. // Information related to the a standard versioned package. This includes
  125. // package info for APT, Yum, Zypper, and Googet package managers.
  126. message VersionedPackage {
  127. // The name of the package.
  128. string package_name = 4;
  129. // The system architecture this package is intended for.
  130. string architecture = 2;
  131. // The version of the package.
  132. string version = 3;
  133. }
  134. // Details related to a Windows Update package.
  135. // Field data and names are taken from Windows Update API IUpdate Interface:
  136. // https://docs.microsoft.com/en-us/windows/win32/api/_wua/
  137. // Descriptive fields like title, and description are localized based on
  138. // the locale of the VM being updated.
  139. message WindowsUpdatePackage {
  140. // Categories specified by the Windows Update.
  141. message WindowsUpdateCategory {
  142. // The identifier of the windows update category.
  143. string id = 1;
  144. // The name of the windows update category.
  145. string name = 2;
  146. }
  147. // The localized title of the update package.
  148. string title = 1;
  149. // The localized description of the update package.
  150. string description = 2;
  151. // The categories that are associated with this update package.
  152. repeated WindowsUpdateCategory categories = 3;
  153. // A collection of Microsoft Knowledge Base article IDs that are associated
  154. // with the update package.
  155. repeated string kb_article_ids = 4;
  156. // A hyperlink to the language-specific support information for the update.
  157. string support_url = 11;
  158. // A collection of URLs that provide more information about the update
  159. // package.
  160. repeated string more_info_urls = 5;
  161. // Gets the identifier of an update package. Stays the same across
  162. // revisions.
  163. string update_id = 6;
  164. // The revision number of this update package.
  165. int32 revision_number = 7;
  166. // The last published date of the update, in (UTC) date and time.
  167. google.protobuf.Timestamp last_deployment_change_time = 10;
  168. }
  169. // Details related to a Zypper Patch.
  170. message ZypperPatch {
  171. // The name of the patch.
  172. string patch_name = 5;
  173. // The category of the patch.
  174. string category = 2;
  175. // The severity specified for this patch
  176. string severity = 3;
  177. // Any summary information provided about this patch.
  178. string summary = 4;
  179. }
  180. // Information related to a Quick Fix Engineering package.
  181. // Fields are taken from Windows QuickFixEngineering Interface and match
  182. // the source names:
  183. // https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
  184. message WindowsQuickFixEngineeringPackage {
  185. // A short textual description of the QFE update.
  186. string caption = 1;
  187. // A textual description of the QFE update.
  188. string description = 2;
  189. // Unique identifier associated with a particular QFE update.
  190. string hot_fix_id = 3;
  191. // Date that the QFE update was installed. Mapped from installed_on field.
  192. google.protobuf.Timestamp install_time = 5;
  193. }
  194. // Base level operating system information for the VM.
  195. OsInfo os_info = 1;
  196. // Inventory items related to the VM keyed by an opaque unique identifier for
  197. // each inventory item. The identifier is unique to each distinct and
  198. // addressable inventory item and will change, when there is a new package
  199. // version.
  200. map<string, Item> items = 2;
  201. }