# Class PatchJob (1.25.0)

1.25.0 (latest) 1.24.0 1.23.0 1.22.0 1.21.0 1.20.2 1.19.0 1.18.1 1.17.5 1.16.0 1.15.3 1.14.1 1.13.0 1.12.4 1.11.2 1.10.0 1.9.0 1.8.0 1.7.1 1.6.0 1.5.2 1.4.0 1.3.2 1.2.0 1.1.0 1.0.0 0.1.2

    PatchJob(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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>`__.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `name` | `str` Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| `display_name` | `str` Display name for this patch job. This is not a unique identifier. |
| `description` | `str` Description of the patch job. Length of the description is limited to 1024 characters. |
| `create_time` | `google.protobuf.timestamp_pb2.Timestamp` Time this patch job was created. |
| `update_time` | `google.protobuf.timestamp_pb2.Timestamp` Last time this patch job was updated. |
| `state` | `https://docs.cloud.google.com/python/docs/reference/osconfig/latest/google.cloud.osconfig_v1.types.PatchJob.State` The current state of the PatchJob. |
| `instance_filter` | `https://docs.cloud.google.com/python/docs/reference/osconfig/latest/google.cloud.osconfig_v1.types.PatchInstanceFilter` Instances to patch. |
| `patch_config` | `https://docs.cloud.google.com/python/docs/reference/osconfig/latest/google.cloud.osconfig_v1.types.PatchConfig` Patch configuration being applied. |
| `duration` | `google.protobuf.duration_pb2.Duration` Duration of the patch job. After the duration ends, the patch job times out. |
| `instance_details_summary` | `https://docs.cloud.google.com/python/docs/reference/osconfig/latest/google.cloud.osconfig_v1.types.PatchJob.InstanceDetailsSummary` Summary of instance details. |
| `dry_run` | `bool` If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance. |
| `error_message` | `str` If this patch job failed, this message provides information about the failure. |
| `percent_complete` | `float` Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete. |
| `patch_deployment` | `str` Output only. Name of the patch deployment that created this patch job. |
| `rollout` | `https://docs.cloud.google.com/python/docs/reference/osconfig/latest/google.cloud.osconfig_v1.types.PatchRollout` Rollout strategy being applied. |

## Classes

### InstanceDetailsSummary

    InstanceDetailsSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

### State

    State(value)

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