REST Resource: projects.patchJobs

Resource: PatchJob

A high level representation of a patch job that is either in progress or has completed.

Instances details are not included in the job. To paginate through instance details, use instanceDetails.list.

For more information about patch jobs, see Creating patch jobs.

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "createTime": string,
  "updateTime": string,
  "state": enum (State),
  "instanceFilter": {
    object (PatchInstanceFilter)
  },
  "patchConfig": {
    object (PatchConfig)
  },
  "duration": string,
  "instanceDetailsSummary": {
    object (InstanceDetailsSummary)
  },
  "dryRun": boolean,
  "errorMessage": string,
  "percentComplete": number,
  "patchDeployment": string
}
Fields
name

string

Unique identifier for this patch job in the form projects/*/patchJobs/*

displayName

string

Display name for this patch job. This is not a unique identifier.

description

string

Description of the patch job. Length of the description is limited to 1024 characters.

createTime

string (Timestamp format)

Time this patch job was created.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Last time this patch job was updated.

A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

state

enum (State)

The current state of the PatchJob .

instanceFilter

object (PatchInstanceFilter)

Instances to patch.

patchConfig

object (PatchConfig)

Patch configuration being applied.

duration

string (Duration format)

Duration of the patch job. After the duration ends, the patch job times out.

A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".

instanceDetailsSummary

object (InstanceDetailsSummary)

Summary of instance details.

dryRun

boolean

If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.

errorMessage

string

If this patch job failed, this message provides information about the failure.

percentComplete

number

Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete.

patchDeployment

string

Output only. Name of the patch deployment that created this patch job.

State

Enumeration of the various states a patch job passes through as it executes.

Enums
STATE_UNSPECIFIED State must be specified.
STARTED The patch job was successfully initiated.
INSTANCE_LOOKUP The patch job is looking up instances to run the patch on.
PATCHING Instances are being patched.
SUCCEEDED Patch job completed successfully.
COMPLETED_WITH_ERRORS Patch job completed but there were errors.
CANCELED The patch job was canceled.
TIMED_OUT The patch job timed out.

InstanceDetailsSummary

A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to InstancePatchState. List patch job instance details to see the specific states of each instance.

JSON representation
{
  "pendingInstanceCount": string,
  "inactiveInstanceCount": string,
  "notifiedInstanceCount": string,
  "startedInstanceCount": string,
  "downloadingPatchesInstanceCount": string,
  "applyingPatchesInstanceCount": string,
  "rebootingInstanceCount": string,
  "succeededInstanceCount": string,
  "succeededRebootRequiredInstanceCount": string,
  "failedInstanceCount": string,
  "ackedInstanceCount": string,
  "timedOutInstanceCount": string,
  "prePatchStepInstanceCount": string,
  "postPatchStepInstanceCount": string,
  "noAgentDetectedInstanceCount": string
}
Fields
pendingInstanceCount

string (int64 format)

Number of instances pending patch job.

inactiveInstanceCount

string (int64 format)

Number of instances that are inactive.

notifiedInstanceCount

string (int64 format)

Number of instances notified about patch job.

startedInstanceCount

string (int64 format)

Number of instances that have started.

downloadingPatchesInstanceCount

string (int64 format)

Number of instances that are downloading patches.

applyingPatchesInstanceCount

string (int64 format)

Number of instances that are applying patches.

rebootingInstanceCount

string (int64 format)

Number of instances rebooting.

succeededInstanceCount

string (int64 format)

Number of instances that have completed successfully.

succeededRebootRequiredInstanceCount

string (int64 format)

Number of instances that require reboot.

failedInstanceCount

string (int64 format)

Number of instances that failed.

ackedInstanceCount

string (int64 format)

Number of instances that have acked and will start shortly.

timedOutInstanceCount

string (int64 format)

Number of instances that exceeded the time out while applying the patch.

prePatchStepInstanceCount

string (int64 format)

Number of instances that are running the pre-patch step.

postPatchStepInstanceCount

string (int64 format)

Number of instances that are running the post-patch step.

noAgentDetectedInstanceCount

string (int64 format)

Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.

Methods

cancel

Cancel a patch job.

execute

Patch VM instances by creating and running a patch job.

get

Get the patch job.

list

Get a list of patch jobs.