Class: Google::Apis::OsconfigV1::OsPolicyResourcePackageResource

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

A resource that manages a system package.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OsPolicyResourcePackageResource

Returns a new instance of OsPolicyResourcePackageResource.



2238
2239
2240
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2238

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

Instance Attribute Details

#aptGoogle::Apis::OsconfigV1::OsPolicyResourcePackageResourceApt

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



2198
2199
2200
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2198

def apt
  @apt
end

#debGoogle::Apis::OsconfigV1::OsPolicyResourcePackageResourceDeb

A deb package file. dpkg packages only support INSTALLED state. Corresponds to the JSON property deb



2203
2204
2205
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2203

def deb
  @deb
end

#desired_stateString

Required. The desired state the agent should maintain for this package. Corresponds to the JSON property desiredState

Returns:

  • (String)


2208
2209
2210
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2208

def desired_state
  @desired_state
end

#googetGoogle::Apis::OsconfigV1::OsPolicyResourcePackageResourceGooGet

A package managed by GooGet. - install: googet -noconfirm install package - remove: googet -noconfirm remove package Corresponds to the JSON property googet



2214
2215
2216
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2214

def googet
  @googet
end

#msiGoogle::Apis::OsconfigV1::OsPolicyResourcePackageResourceMsi

An MSI package. MSI packages only support INSTALLED state. Corresponds to the JSON property msi



2219
2220
2221
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2219

def msi
  @msi
end

#rpmGoogle::Apis::OsconfigV1::OsPolicyResourcePackageResourceRpm

An RPM package file. RPM packages only support INSTALLED state. Corresponds to the JSON property rpm



2224
2225
2226
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2224

def rpm
  @rpm
end

#yumGoogle::Apis::OsconfigV1::OsPolicyResourcePackageResourceYum

A package managed by YUM. - install: yum -y install package - remove: yum - y remove package Corresponds to the JSON property yum



2230
2231
2232
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2230

def yum
  @yum
end

#zypperGoogle::Apis::OsconfigV1::OsPolicyResourcePackageResourceZypper

A package managed by Zypper. - install: zypper -y install package - remove: zypper -y rm package Corresponds to the JSON property zypper



2236
2237
2238
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2236

def zypper
  @zypper
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2243

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