class Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResource

A resource that manages a system package.

Attributes

apt[RW]

A package managed by APT. - install: `apt-get update && apt-get -y install [ name]` - remove: `apt-get -y remove [name]` Corresponds to the JSON property `apt` @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceApt]

deb[RW]

A deb package file. dpkg packages only support INSTALLED state. Corresponds to the JSON property `deb` @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceDeb]

desired_state[RW]

Required. The desired state the agent should maintain for this package. Corresponds to the JSON property `desiredState` @return [String]

googet[RW]

A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` Corresponds to the JSON property `googet` @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceGooGet]

msi[RW]

An MSI package. MSI packages only support INSTALLED state. Corresponds to the JSON property `msi` @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceMsi]

rpm[RW]

An RPM package file. RPM packages only support INSTALLED state. Corresponds to the JSON property `rpm` @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceRpm]

yum[RW]

A package managed by YUM. - install: `yum -y install package` - remove: `yum - y remove package` Corresponds to the JSON property `yum` @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceYum]

zypper[RW]

A package managed by Zypper. - install: `zypper -y install package` - remove: ` zypper -y rm package` Corresponds to the JSON property `zypper` @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceZypper]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/osconfig_v1alpha/classes.rb, line 1854
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/osconfig_v1alpha/classes.rb, line 1859
def update!(**args)
  @apt = args[:apt] if args.key?(:apt)
  @deb = args[:deb] if args.key?(:deb)
  @desired_state = args[:desired_state] if args.key?(:desired_state)
  @googet = args[:googet] if args.key?(:googet)
  @msi = args[:msi] if args.key?(:msi)
  @rpm = args[:rpm] if args.key?(:rpm)
  @yum = args[:yum] if args.key?(:yum)
  @zypper = args[:zypper] if args.key?(:zypper)
end