Class: Google::Apis::OsconfigV1::OsPolicyResourcePackageResource
- Inherits:
-
Object
- Object
- Google::Apis::OsconfigV1::OsPolicyResourcePackageResource
- 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
-
#apt ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceApt
A package managed by APT.
-
#deb ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceDeb
A deb package file.
-
#desired_state ⇒ String
Required.
-
#googet ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceGooGet
A package managed by GooGet.
-
#msi ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceMsi
An MSI package.
-
#rpm ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceRpm
An RPM package file.
-
#yum ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceYum
A package managed by YUM.
-
#zypper ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceZypper
A package managed by Zypper.
Instance Method Summary collapse
-
#initialize(**args) ⇒ OsPolicyResourcePackageResource
constructor
A new instance of OsPolicyResourcePackageResource.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ OsPolicyResourcePackageResource
Returns a new instance of OsPolicyResourcePackageResource.
2179 2180 2181 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2179 def initialize(**args) update!(**args) end |
Instance Attribute Details
#apt ⇒ Google::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
2139 2140 2141 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2139 def apt @apt end |
#deb ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceDeb
A deb package file. dpkg packages only support INSTALLED state.
Corresponds to the JSON property deb
2144 2145 2146 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2144 def deb @deb end |
#desired_state ⇒ String
Required. The desired state the agent should maintain for this package.
Corresponds to the JSON property desiredState
2149 2150 2151 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2149 def desired_state @desired_state end |
#googet ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceGooGet
A package managed by GooGet. - install: googet -noconfirm install package
-
remove: googet -noconfirm remove package
Corresponds to the JSON property googet
2155 2156 2157 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2155 def googet @googet end |
#msi ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceMsi
An MSI package. MSI packages only support INSTALLED state.
Corresponds to the JSON property msi
2160 2161 2162 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2160 def msi @msi end |
#rpm ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceRpm
An RPM package file. RPM packages only support INSTALLED state.
Corresponds to the JSON property rpm
2165 2166 2167 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2165 def rpm @rpm end |
#yum ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceYum
A package managed by YUM. - install: yum -y install package
- remove: yum -
y remove package
Corresponds to the JSON property yum
2171 2172 2173 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2171 def yum @yum end |
#zypper ⇒ Google::Apis::OsconfigV1::OsPolicyResourcePackageResourceZypper
A package managed by Zypper. - install: zypper -y install package
- remove:
zypper -y rm package
Corresponds to the JSON property zypper
2177 2178 2179 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2177 def zypper @zypper end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 |
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2184 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 |