Reference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::PatchDeployment.
Patch deployments are configurations that individual patch jobs use to
complete a patch. These configurations include instance filter, package
repository settings, and a schedule. For more information about creating and
managing patch deployments, see Scheduling patch
jobs.
(::String) — Unique name for the patch deployment resource in a project. The patch
deployment name is in the form:
projects/{project_id}/patchDeployments/{patch_deployment_id}.
This field is ignored when you create a new patch deployment.
#name=
defname=(value)->::String
Parameter
value (::String) — Unique name for the patch deployment resource in a project. The patch
deployment name is in the form:
projects/{project_id}/patchDeployments/{patch_deployment_id}.
This field is ignored when you create a new patch deployment.
Returns
(::String) — Unique name for the patch deployment resource in a project. The patch
deployment name is in the form:
projects/{project_id}/patchDeployments/{patch_deployment_id}.
This field is ignored when you create a new patch deployment.
Note: The following fields are mutually exclusive: one_time_schedule, recurring_schedule. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: one_time_schedule, recurring_schedule. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: one_time_schedule, recurring_schedule. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: recurring_schedule, one_time_schedule. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: recurring_schedule, one_time_schedule. If a field in that set is populated, all other fields in the set will automatically be cleared.
Note: The following fields are mutually exclusive: recurring_schedule, one_time_schedule. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Cloud OS Config V1 API - Class Google::Cloud::OsConfig::V1::PatchDeployment (v1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [1.3.0](/ruby/docs/reference/google-cloud-os_config-v1/1.3.0/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [1.2.1](/ruby/docs/reference/google-cloud-os_config-v1/1.2.1/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [1.1.0](/ruby/docs/reference/google-cloud-os_config-v1/1.1.0/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [1.0.1](/ruby/docs/reference/google-cloud-os_config-v1/1.0.1/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [0.16.0](/ruby/docs/reference/google-cloud-os_config-v1/0.16.0/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [0.15.2](/ruby/docs/reference/google-cloud-os_config-v1/0.15.2/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [0.14.0](/ruby/docs/reference/google-cloud-os_config-v1/0.14.0/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [0.13.0](/ruby/docs/reference/google-cloud-os_config-v1/0.13.0/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [0.12.0](/ruby/docs/reference/google-cloud-os_config-v1/0.12.0/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [0.11.0](/ruby/docs/reference/google-cloud-os_config-v1/0.11.0/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [0.10.0](/ruby/docs/reference/google-cloud-os_config-v1/0.10.0/Google-Cloud-OsConfig-V1-PatchDeployment)\n- [0.9.1](/ruby/docs/reference/google-cloud-os_config-v1/0.9.1/Google-Cloud-OsConfig-V1-PatchDeployment) \nReference documentation and code samples for the Cloud OS Config V1 API class Google::Cloud::OsConfig::V1::PatchDeployment.\n\nPatch deployments are configurations that individual patch jobs use to\ncomplete a patch. These configurations include instance filter, package\nrepository settings, and a schedule. For more information about creating and\nmanaging patch deployments, see [Scheduling patch\njobs](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs). \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. Time the patch deployment was created. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.\n\n### #description\n\n def description() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Description of the patch deployment. Length of the description is limited to 1024 characters.\n\n### #description=\n\n def description=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Description of the patch deployment. Length of the description is limited to 1024 characters. \n**Returns**\n\n- (::String) --- Optional. Description of the patch deployment. Length of the description is limited to 1024 characters.\n\n### #duration\n\n def duration() -\u003e ::Google::Protobuf::Duration\n\n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Optional. Duration of the patch. After the duration ends, the patch times out.\n\n### #duration=\n\n def duration=(value) -\u003e ::Google::Protobuf::Duration\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Optional. Duration of the patch. After the duration ends, the patch times out. \n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Optional. Duration of the patch. After the duration ends, the patch times out.\n\n### #instance_filter\n\n def instance_filter() -\u003e ::Google::Cloud::OsConfig::V1::PatchInstanceFilter\n\n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::PatchInstanceFilter](./Google-Cloud-OsConfig-V1-PatchInstanceFilter)) --- Required. VM instances to patch.\n\n### #instance_filter=\n\n def instance_filter=(value) -\u003e ::Google::Cloud::OsConfig::V1::PatchInstanceFilter\n\n**Parameter**\n\n- **value** ([::Google::Cloud::OsConfig::V1::PatchInstanceFilter](./Google-Cloud-OsConfig-V1-PatchInstanceFilter)) --- Required. VM instances to patch. \n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::PatchInstanceFilter](./Google-Cloud-OsConfig-V1-PatchInstanceFilter)) --- Required. VM instances to patch.\n\n### #last_execute_time\n\n def last_execute_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The last time a patch job was started by this deployment. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Unique name for the patch deployment resource in a project. The patch deployment name is in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is ignored when you create a new patch deployment.\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Unique name for the patch deployment resource in a project. The patch deployment name is in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is ignored when you create a new patch deployment. \n**Returns**\n\n- (::String) --- Unique name for the patch deployment resource in a project. The patch deployment name is in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is ignored when you create a new patch deployment.\n\n### #one_time_schedule\n\n def one_time_schedule() -\u003e ::Google::Cloud::OsConfig::V1::OneTimeSchedule\n\n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::OneTimeSchedule](./Google-Cloud-OsConfig-V1-OneTimeSchedule)) --- Required. Schedule a one-time execution.\n\n\n Note: The following fields are mutually exclusive: `one_time_schedule`, `recurring_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #one_time_schedule=\n\n def one_time_schedule=(value) -\u003e ::Google::Cloud::OsConfig::V1::OneTimeSchedule\n\n**Parameter**\n\n- **value** ([::Google::Cloud::OsConfig::V1::OneTimeSchedule](./Google-Cloud-OsConfig-V1-OneTimeSchedule)) --- Required. Schedule a one-time execution.\n\n\nNote: The following fields are mutually exclusive: `one_time_schedule`, `recurring_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::OneTimeSchedule](./Google-Cloud-OsConfig-V1-OneTimeSchedule)) --- Required. Schedule a one-time execution.\n\n\n Note: The following fields are mutually exclusive: `one_time_schedule`, `recurring_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #patch_config\n\n def patch_config() -\u003e ::Google::Cloud::OsConfig::V1::PatchConfig\n\n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::PatchConfig](./Google-Cloud-OsConfig-V1-PatchConfig)) --- Optional. Patch configuration that is applied.\n\n### #patch_config=\n\n def patch_config=(value) -\u003e ::Google::Cloud::OsConfig::V1::PatchConfig\n\n**Parameter**\n\n- **value** ([::Google::Cloud::OsConfig::V1::PatchConfig](./Google-Cloud-OsConfig-V1-PatchConfig)) --- Optional. Patch configuration that is applied. \n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::PatchConfig](./Google-Cloud-OsConfig-V1-PatchConfig)) --- Optional. Patch configuration that is applied.\n\n### #recurring_schedule\n\n def recurring_schedule() -\u003e ::Google::Cloud::OsConfig::V1::RecurringSchedule\n\n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::RecurringSchedule](./Google-Cloud-OsConfig-V1-RecurringSchedule)) --- Required. Schedule recurring executions.\n\n\n Note: The following fields are mutually exclusive: `recurring_schedule`, `one_time_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #recurring_schedule=\n\n def recurring_schedule=(value) -\u003e ::Google::Cloud::OsConfig::V1::RecurringSchedule\n\n**Parameter**\n\n- **value** ([::Google::Cloud::OsConfig::V1::RecurringSchedule](./Google-Cloud-OsConfig-V1-RecurringSchedule)) --- Required. Schedule recurring executions.\n\n\nNote: The following fields are mutually exclusive: `recurring_schedule`, `one_time_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::RecurringSchedule](./Google-Cloud-OsConfig-V1-RecurringSchedule)) --- Required. Schedule recurring executions.\n\n\n Note: The following fields are mutually exclusive: `recurring_schedule`, `one_time_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #rollout\n\n def rollout() -\u003e ::Google::Cloud::OsConfig::V1::PatchRollout\n\n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::PatchRollout](./Google-Cloud-OsConfig-V1-PatchRollout)) --- Optional. Rollout strategy of the patch job.\n\n### #rollout=\n\n def rollout=(value) -\u003e ::Google::Cloud::OsConfig::V1::PatchRollout\n\n**Parameter**\n\n- **value** ([::Google::Cloud::OsConfig::V1::PatchRollout](./Google-Cloud-OsConfig-V1-PatchRollout)) --- Optional. Rollout strategy of the patch job. \n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::PatchRollout](./Google-Cloud-OsConfig-V1-PatchRollout)) --- Optional. Rollout strategy of the patch job.\n\n### #state\n\n def state() -\u003e ::Google::Cloud::OsConfig::V1::PatchDeployment::State\n\n**Returns**\n\n- ([::Google::Cloud::OsConfig::V1::PatchDeployment::State](./Google-Cloud-OsConfig-V1-PatchDeployment-State)) --- Output only. Current state of the patch deployment.\n\n### #update_time\n\n def update_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. Time the patch deployment was last updated. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format."]]