NAME
Google::Cloud::Osconfig::V1::PatchJobs - Compiled Protocol Buffers messages for google/cloud/osconfig/v1/patch_jobs.proto
SYNOPSIS
use Google::Cloud::Osconfig::V1::PatchJobs;
my $msg = Google::Cloud::Osconfig::V1::PatchJobs::ExecutePatchJobRequest->new({
parent => $parent,
description => $description,
instance_filter => $instance_filter,
patch_config => $patch_config,
});
# Read or update a field
my $val = $msg->parent();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Osconfig::V1::PatchJobs::ExecutePatchJobRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/osconfig/v1/patch_jobs.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Osconfig::V1::PatchJobs::ExecutePatchJobRequest
A request message to initiate patching across Compute Engine instances.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project in which to run this patch in the form `projects/*`
$msg->description()/$msg->description($value)Type:
StringDescription of the patch job. Length of the description is limited to 1024 characters.
$msg->instance_filter()/$msg->instance_filter($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchInstanceFilter)Required. Instances to patch, either explicitly or filtered by some criteria such as zone or labels.
$msg->patch_config()/$msg->patch_config($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchConfig)Patch configuration being applied. If omitted, instances are patched using the default configurations.
$msg->duration()/$msg->duration($value)Type:
Message(Google::Protobuf::Duration::Duration)Duration of the patch job. After the duration ends, the patch job times out.
$msg->dry_run()/$msg->dry_run($value)Type:
BoolIf this patch is a dry-run only, instances are contacted but will do nothing.
$msg->display_name()/$msg->display_name($value)Type:
StringDisplay name for this patch job. This does not have to be unique.
$msg->rollout()/$msg->rollout($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchRollout)Rollout strategy of the patch job.
Google::Cloud::Osconfig::V1::PatchJobs::GetPatchJobRequest
Request to get an active or completed patch job.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. Name of the patch in the form `projects/*/patchJobs/*`
Google::Cloud::Osconfig::V1::PatchJobs::ListPatchJobInstanceDetailsRequest
Request to list details for all instances that are part of a patch job.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The parent for the instances are in the form of `projects/*/patchJobs/*`.
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of instance details records to return. Default is 100.
$msg->page_token()/$msg->page_token($value)Type:
StringA pagination token returned from a previous call that indicates where this listing should continue from.
$msg->filter()/$msg->filter($value)Type:
StringA filter expression that filters results listed in the response. This field supports filtering results by instance zone, name, state, or `failure_reason`.
Google::Cloud::Osconfig::V1::PatchJobs::ListPatchJobInstanceDetailsResponse
A response message for listing the instances details for a patch job.
Inherits from Protobuf::Message.
Accessors
$msg->patch_job_instance_details()/$msg->patch_job_instance_details($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchJobInstanceDetails)A list of instance status.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringA pagination token that can be used to get the next page of results.
Google::Cloud::Osconfig::V1::PatchJobs::PatchJobInstanceDetails
Patch details for a VM instance. For more information about reviewing VM instance details, see [Listing all VM instance details for a specific patch job](https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details).
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe instance name in the form `projects/*/zones/*/instances/*`
$msg->instance_system_id()/$msg->instance_system_id($value)Type:
StringThe unique identifier for the instance. This identifier is defined by the server.
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Osconfig::V1::Instance::PatchState)Current state of instance patch.
$msg->failure_reason()/$msg->failure_reason($value)Type:
StringIf the patch fails, this field provides the reason.
$msg->attempt_count()/$msg->attempt_count($value)Type:
Int64The number of times the agent that the agent attempts to apply the patch.
Google::Cloud::Osconfig::V1::PatchJobs::ListPatchJobsRequest
A request message for listing patch jobs.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. In the form of `projects/*`
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of instance status to return.
$msg->page_token()/$msg->page_token($value)Type:
StringA pagination token returned from a previous call that indicates where this listing should continue from.
$msg->filter()/$msg->filter($value)Type:
StringIf provided, this field specifies the criteria that must be met by patch jobs to be included in the response. Currently, filtering is only available on the patch_deployment field.
Google::Cloud::Osconfig::V1::PatchJobs::ListPatchJobsResponse
A response message for listing patch jobs.
Inherits from Protobuf::Message.
Accessors
$msg->patch_jobs()/$msg->patch_jobs($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchJob)The list of patch jobs.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringA pagination token that can be used to get the next page of results.
Google::Cloud::Osconfig::V1::PatchJobs::PatchJob
A high level representation of a patch job that is either in progress or has completed.
Instance details are not included in the job. To paginate through instance details, use ListPatchJobInstanceDetails.
For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringUnique identifier for this patch job in the form `projects/*/patchJobs/*`
$msg->display_name()/$msg->display_name($value)Type:
StringDisplay name for this patch job. This is not a unique identifier.
$msg->description()/$msg->description($value)Type:
StringDescription of the patch job. Length of the description is limited to 1024 characters.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Time this patch job was created.
$msg->update_time()/$msg->update_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Last time this patch job was updated.
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Osconfig::V1::PatchJob::State)The current state of the PatchJob.
$msg->instance_filter()/$msg->instance_filter($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchInstanceFilter)Instances to patch.
$msg->patch_config()/$msg->patch_config($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchConfig)Patch configuration being applied.
$msg->duration()/$msg->duration($value)Type:
Message(Google::Protobuf::Duration::Duration)Duration of the patch job. After the duration ends, the patch job times out.
$msg->instance_details_summary()/$msg->instance_details_summary($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchJob::InstanceDetailsSummary)Summary of instance details.
$msg->dry_run()/$msg->dry_run($value)Type:
BoolIf this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
$msg->error_message()/$msg->error_message($value)Type:
StringIf this patch job failed, this message provides information about the failure.
$msg->percent_complete()/$msg->percent_complete($value)Type:
DoubleReflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete.
$msg->patch_deployment()/$msg->patch_deployment($value)Type:
StringOutput only. Name of the patch deployment that created this patch job.
$msg->rollout()/$msg->rollout($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchRollout)Rollout strategy being applied.
Enum: PatchJob::State
STATE_UNSPECIFIED=>0STARTED=>1INSTANCE_LOOKUP=>2PATCHING=>3SUCCEEDED=>4COMPLETED_WITH_ERRORS=>5CANCELED=>6TIMED_OUT=>7
Google::Cloud::Osconfig::V1::PatchJobs::PatchConfig
Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance.
Inherits from Protobuf::Message.
Accessors
$msg->reboot_config()/$msg->reboot_config($value)Type:
Enum(Google::Cloud::Osconfig::V1::PatchConfig::RebootConfig)Post-patch reboot settings.
$msg->apt()/$msg->apt($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::AptSettings)Apt update settings. Use this setting to override the default `apt` patch rules.
$msg->yum()/$msg->yum($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::YumSettings)Yum update settings. Use this setting to override the default `yum` patch rules.
$msg->goo()/$msg->goo($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::GooSettings)Goo update settings. Use this setting to override the default `goo` patch rules.
$msg->zypper()/$msg->zypper($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::ZypperSettings)Zypper update settings. Use this setting to override the default `zypper` patch rules.
$msg->windows_update()/$msg->windows_update($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::WindowsUpdateSettings)Windows update settings. Use this override the default windows patch rules.
$msg->pre_step()/$msg->pre_step($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::ExecStep)The `ExecStep` to run before the patch update.
$msg->post_step()/$msg->post_step($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::ExecStep)The `ExecStep` to run after the patch update.
$msg->mig_instances_allowed()/$msg->mig_instances_allowed($value)Type:
BoolAllows the patch job to run on Managed instance groups (MIGs).
Enum: PatchConfig::RebootConfig
REBOOT_CONFIG_UNSPECIFIED=>0DEFAULT=>1ALWAYS=>2NEVER=>3
Google::Cloud::Osconfig::V1::PatchJobs::Instance
Namespace for instance state enums.
Inherits from Protobuf::Message.
Enum: Instance::PatchState
PATCH_STATE_UNSPECIFIED=>0PENDING=>1INACTIVE=>2NOTIFIED=>3STARTED=>4DOWNLOADING_PATCHES=>5APPLYING_PATCHES=>6REBOOTING=>7SUCCEEDED=>8SUCCEEDED_REBOOT_REQUIRED=>9FAILED=>10ACKED=>11TIMED_OUT=>12RUNNING_PRE_PATCH_STEP=>13RUNNING_POST_PATCH_STEP=>14NO_AGENT_DETECTED=>15
Google::Cloud::Osconfig::V1::PatchJobs::CancelPatchJobRequest
Message for canceling a patch job.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. Name of the patch in the form `projects/*/patchJobs/*`
Google::Cloud::Osconfig::V1::PatchJobs::AptSettings
Apt patching is completed by executing `apt-get update && apt-get upgrade`. Additional options can be set to control how this is executed.
Inherits from Protobuf::Message.
Accessors
$msg->type()/$msg->type($value)Type:
Enum(Google::Cloud::Osconfig::V1::AptSettings::Type)By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
$msg->excludes()/$msg->excludes($value)Type:
StringList of packages to exclude from update. These packages will be excluded
$msg->exclusive_packages()/$msg->exclusive_packages($value)Type:
StringAn exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields.
Enum: AptSettings::Type
TYPE_UNSPECIFIED=>0DIST=>1UPGRADE=>2
Google::Cloud::Osconfig::V1::PatchJobs::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.
Inherits from Protobuf::Message.
Accessors
$msg->security()/$msg->security($value)Type:
BoolAdds the `--security` flag to `yum update`. Not supported on all platforms.
$msg->minimal()/$msg->minimal($value)Type:
BoolWill cause patch to run `yum update-minimal` instead.
$msg->excludes()/$msg->excludes($value)Type:
StringList of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
$msg->exclusive_packages()/$msg->exclusive_packages($value)Type:
StringAn exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.
Google::Cloud::Osconfig::V1::PatchJobs::GooSettings
Googet patching is performed by running `googet update`.
Inherits from Protobuf::Message.
Google::Cloud::Osconfig::V1::PatchJobs::ZypperSettings
Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual.
Inherits from Protobuf::Message.
Accessors
$msg->with_optional()/$msg->with_optional($value)Type:
BoolAdds the `--with-optional` flag to `zypper patch`.
$msg->with_update()/$msg->with_update($value)Type:
BoolAdds the `--with-update` flag, to `zypper patch`.
$msg->categories()/$msg->categories($value)Type:
StringInstall only patches with these categories. Common categories include security, recommended, and feature.
$msg->severities()/$msg->severities($value)Type:
StringInstall only patches with these severities. Common severities include critical, important, moderate, and low.
$msg->excludes()/$msg->excludes($value)Type:
StringList of patches to exclude from update.
$msg->exclusive_patches()/$msg->exclusive_patches($value)Type:
StringAn exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:<patch_name>' command. This field must not be used with any other patch configuration fields.
Google::Cloud::Osconfig::V1::PatchJobs::WindowsUpdateSettings
Windows patching is performed using the Windows Update Agent.
Inherits from Protobuf::Message.
Accessors
$msg->classifications()/$msg->classifications($value)Type:
Enum(Google::Cloud::Osconfig::V1::WindowsUpdateSettings::Classification)Only apply updates of these windows update classifications. If empty, all updates are applied.
$msg->excludes()/$msg->excludes($value)Type:
StringList of KBs to exclude from update.
$msg->exclusive_patches()/$msg->exclusive_patches($value)Type:
StringAn exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations.
Enum: WindowsUpdateSettings::Classification
CLASSIFICATION_UNSPECIFIED=>0CRITICAL=>1SECURITY=>2DEFINITION=>3DRIVER=>4FEATURE_PACK=>5SERVICE_PACK=>6TOOL=>7UPDATE_ROLLUP=>8UPDATE=>9
Google::Cloud::Osconfig::V1::PatchJobs::ExecStep
A step that runs an executable for a PatchJob.
Inherits from Protobuf::Message.
Accessors
$msg->linux_exec_step_config()/$msg->linux_exec_step_config($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::ExecStepConfig)The ExecStepConfig for all Linux VMs targeted by the PatchJob.
$msg->windows_exec_step_config()/$msg->windows_exec_step_config($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::ExecStepConfig)The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Google::Cloud::Osconfig::V1::PatchJobs::ExecStepConfig
Common configurations for an ExecStep.
Inherits from Protobuf::Message.
Accessors
$msg->local_path()/$msg->local_path($value)Type:
StringAn absolute path to the executable on the VM.
$msg->gcs_object()/$msg->gcs_object($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::GcsObject)A Cloud Storage object containing the executable.
$msg->allowed_success_codes()/$msg->allowed_success_codes($value)Type:
Int32Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
$msg->interpreter()/$msg->interpreter($value)Type:
Enum(Google::Cloud::Osconfig::V1::ExecStepConfig::Interpreter)The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Enum: ExecStepConfig::Interpreter
INTERPRETER_UNSPECIFIED=>0SHELL=>1POWERSHELL=>2
Google::Cloud::Osconfig::V1::PatchJobs::GcsObject
Cloud Storage object representation.
Inherits from Protobuf::Message.
Accessors
$msg->bucket()/$msg->bucket($value)Type:
StringRequired. Bucket of the Cloud Storage object.
$msg->object()/$msg->object($value)Type:
StringRequired. Name of the Cloud Storage object.
$msg->generation_number()/$msg->generation_number($value)Type:
Int64Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
Google::Cloud::Osconfig::V1::PatchJobs::PatchInstanceFilter
A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones.
Inherits from Protobuf::Message.
Accessors
$msg->all()/$msg->all($value)Type:
BoolTarget all VM instances in the project. If true, no other criteria is permitted.
$msg->group_labels()/$msg->group_labels($value)Type:
Message(Google::Cloud::Osconfig::V1::PatchJobs::PatchInstanceFilter::GroupLabel)Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
$msg->zones()/$msg->zones($value)Type:
StringTargets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
$msg->instances()/$msg->instances($value)Type:
StringTargets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
$msg->instance_name_prefixes()/$msg->instance_name_prefixes($value)Type:
StringTargets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-".
Google::Cloud::Osconfig::V1::PatchJobs::PatchRollout
Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs.
Inherits from Protobuf::Message.
Accessors
$msg->mode()/$msg->mode($value)Type:
Enum(Google::Cloud::Osconfig::V1::PatchRollout::Mode)Mode of the patch rollout.
$msg->disruption_budget()/$msg->disruption_budget($value)Type:
Message(Google::Cloud::Osconfig::V1::OsconfigCommon::FixedOrPercent)The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up.
During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps.
A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget.
For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone.
For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
Enum: PatchRollout::Mode
MODE_UNSPECIFIED=>0ZONE_BY_ZONE=>1CONCURRENT_ZONES=>2
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Osconfig::V1::PatchJobs::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.