Class: Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResource

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/osconfig_v1alpha/classes.rb,
lib/google/apis/osconfig_v1alpha/representations.rb,
lib/google/apis/osconfig_v1alpha/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.



2131
2132
2133
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2131

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

Instance Attribute Details

#aptGoogle::Apis::OsconfigV1alpha::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



2091
2092
2093
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2091

def apt
  @apt
end

#debGoogle::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceDeb

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



2096
2097
2098
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2096

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)


2101
2102
2103
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2101

def desired_state
  @desired_state
end

#googetGoogle::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceGooGet

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



2107
2108
2109
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2107

def googet
  @googet
end

#msiGoogle::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceMsi

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



2112
2113
2114
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2112

def msi
  @msi
end

#rpmGoogle::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceRpm

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



2117
2118
2119
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2117

def rpm
  @rpm
end

#yumGoogle::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceYum

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



2123
2124
2125
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2123

def yum
  @yum
end

#zypperGoogle::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceZypper

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



2129
2130
2131
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2129

def zypper
  @zypper
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
# File 'lib/google/apis/osconfig_v1alpha/classes.rb', line 2136

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