Class: Google::Apis::OsconfigV1::PatchConfig

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

Patch configuration specifications. Contains details on how to apply the patch( es) to a VM instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PatchConfig

Returns a new instance of PatchConfig.



3056
3057
3058
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3056

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

Instance Attribute Details

#aptGoogle::Apis::OsconfigV1::AptSettings

Apt patching is completed by executing apt-get update && apt-get upgrade. Additional options can be set to control how this is executed. Corresponds to the JSON property apt



2995
2996
2997
# File 'lib/google/apis/osconfig_v1/classes.rb', line 2995

def apt
  @apt
end

#gooGoogle::Apis::OsconfigV1::GooSettings

Googet patching is performed by running googet update. Corresponds to the JSON property goo



3000
3001
3002
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3000

def goo
  @goo
end

#mig_instances_allowedBoolean Also known as: mig_instances_allowed?

Allows the patch job to run on Managed instance groups (MIGs). Corresponds to the JSON property migInstancesAllowed

Returns:

  • (Boolean)


3005
3006
3007
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3005

def mig_instances_allowed
  @mig_instances_allowed
end

#post_stepGoogle::Apis::OsconfigV1::ExecStep

A step that runs an executable for a PatchJob. Corresponds to the JSON property postStep



3011
3012
3013
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3011

def post_step
  @post_step
end

#pre_stepGoogle::Apis::OsconfigV1::ExecStep

A step that runs an executable for a PatchJob. Corresponds to the JSON property preStep



3016
3017
3018
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3016

def pre_step
  @pre_step
end

#reboot_configString

Post-patch reboot settings. Corresponds to the JSON property rebootConfig

Returns:

  • (String)


3021
3022
3023
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3021

def reboot_config
  @reboot_config
end

#skip_unpatchable_vmsBoolean Also known as: skip_unpatchable_vms?

Optional. Enables enhanced reporting for the patch job: 1. The patch job skips instances that cannot be patched and reports them as SKIPPED. An instance cannot be patched for two reasons: 1. The instance runs Container-Optimized OS (COS), which cannot be patched. 2. The instance is part of a managed instance group (MIG), and patching MIG instances is disabled in the patch job's configuration (PatchConfig.migInstancesAllowed is false). 2. The patch job is reported as SUCCEEDED if it completes without errors, even if some instances are SKIPPED. 3. The patch job is reported as COMPLETED_WITH_INACTIVE_VMS if it completes without errors, but does not patch instances that are INACTIVE. Corresponds to the JSON property skipUnpatchableVms

Returns:

  • (Boolean)


3035
3036
3037
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3035

def skip_unpatchable_vms
  @skip_unpatchable_vms
end

#windows_updateGoogle::Apis::OsconfigV1::WindowsUpdateSettings

Windows patching is performed using the Windows Update Agent. Corresponds to the JSON property windowsUpdate



3041
3042
3043
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3041

def windows_update
  @windows_update
end

#yumGoogle::Apis::OsconfigV1::YumSettings

Yum patching is performed by executing yum update. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. Corresponds to the JSON property yum



3048
3049
3050
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3048

def yum
  @yum
end

#zypperGoogle::Apis::OsconfigV1::ZypperSettings

Zypper patching is performed by running zypper patch. See also https://en. opensuse.org/SDB:Zypper_manual. Corresponds to the JSON property zypper



3054
3055
3056
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3054

def zypper
  @zypper
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
# File 'lib/google/apis/osconfig_v1/classes.rb', line 3061

def update!(**args)
  @apt = args[:apt] if args.key?(:apt)
  @goo = args[:goo] if args.key?(:goo)
  @mig_instances_allowed = args[:mig_instances_allowed] if args.key?(:mig_instances_allowed)
  @post_step = args[:post_step] if args.key?(:post_step)
  @pre_step = args[:pre_step] if args.key?(:pre_step)
  @reboot_config = args[:reboot_config] if args.key?(:reboot_config)
  @skip_unpatchable_vms = args[:skip_unpatchable_vms] if args.key?(:skip_unpatchable_vms)
  @windows_update = args[:windows_update] if args.key?(:windows_update)
  @yum = args[:yum] if args.key?(:yum)
  @zypper = args[:zypper] if args.key?(:zypper)
end