# Cloud OS Config V1 API - Class Google::Cloud::OsConfig::V1::PatchDeployment (v1.9.0)

1.9.0 (latest) 1.8.1 1.7.0 1.6.1 1.5.0 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.16.0 0.15.2 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.1 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](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs).

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Time the patch deployment was created. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.

### #description

    def description() -> ::String

**Returns**

- (::String) --- Optional. Description of the patch deployment. Length of the description is limited to 1024 characters.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Description of the patch deployment. Length of the description is limited to 1024 characters.
**Returns**

- (::String) --- Optional. Description of the patch deployment. Length of the description is limited to 1024 characters.

### #duration

    def duration() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Protobuf-Duration)) --- Optional. Duration of the patch. After the duration ends, the patch times out.

### #duration=

    def duration=(value) -> ::Google::Protobuf::Duration

**Parameter**

- **value** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Protobuf-Duration)) --- Optional. Duration of the patch. After the duration ends, the patch times out.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Protobuf-Duration)) --- Optional. Duration of the patch. After the duration ends, the patch times out.

### #instance_filter

    def instance_filter() -> ::Google::Cloud::OsConfig::V1::PatchInstanceFilter

**Returns**

- ([::Google::Cloud::OsConfig::V1::PatchInstanceFilter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchInstanceFilter)) --- Required. VM instances to patch.

### #instance_filter=

    def instance_filter=(value) -> ::Google::Cloud::OsConfig::V1::PatchInstanceFilter

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1::PatchInstanceFilter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchInstanceFilter)) --- Required. VM instances to patch.
**Returns**

- ([::Google::Cloud::OsConfig::V1::PatchInstanceFilter](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchInstanceFilter)) --- Required. VM instances to patch.

### #last_execute_time

    def last_execute_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/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.

### #name

    def name() -> ::String

**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.

### #name=

    def name=(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.

### #one_time_schedule

    def one_time_schedule() -> ::Google::Cloud::OsConfig::V1::OneTimeSchedule

**Returns**

- ([::Google::Cloud::OsConfig::V1::OneTimeSchedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OneTimeSchedule)) --- Required. Schedule a one-time execution.


  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.

### #one_time_schedule=

    def one_time_schedule=(value) -> ::Google::Cloud::OsConfig::V1::OneTimeSchedule

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1::OneTimeSchedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OneTimeSchedule)) --- Required. Schedule a one-time execution.


  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.
**Returns**

- ([::Google::Cloud::OsConfig::V1::OneTimeSchedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-OneTimeSchedule)) --- Required. Schedule a one-time execution.


  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.

### #patch_config

    def patch_config() -> ::Google::Cloud::OsConfig::V1::PatchConfig

**Returns**

- ([::Google::Cloud::OsConfig::V1::PatchConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchConfig)) --- Optional. Patch configuration that is applied.

### #patch_config=

    def patch_config=(value) -> ::Google::Cloud::OsConfig::V1::PatchConfig

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1::PatchConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchConfig)) --- Optional. Patch configuration that is applied.
**Returns**

- ([::Google::Cloud::OsConfig::V1::PatchConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchConfig)) --- Optional. Patch configuration that is applied.

### #recurring_schedule

    def recurring_schedule() -> ::Google::Cloud::OsConfig::V1::RecurringSchedule

**Returns**

- ([::Google::Cloud::OsConfig::V1::RecurringSchedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-RecurringSchedule)) --- Required. Schedule recurring executions.


  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.

### #recurring_schedule=

    def recurring_schedule=(value) -> ::Google::Cloud::OsConfig::V1::RecurringSchedule

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1::RecurringSchedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-RecurringSchedule)) --- Required. Schedule recurring executions.


  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.
**Returns**

- ([::Google::Cloud::OsConfig::V1::RecurringSchedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-RecurringSchedule)) --- Required. Schedule recurring executions.


  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.

### #rollout

    def rollout() -> ::Google::Cloud::OsConfig::V1::PatchRollout

**Returns**

- ([::Google::Cloud::OsConfig::V1::PatchRollout](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchRollout)) --- Optional. Rollout strategy of the patch job.

### #rollout=

    def rollout=(value) -> ::Google::Cloud::OsConfig::V1::PatchRollout

**Parameter**

- **value** ([::Google::Cloud::OsConfig::V1::PatchRollout](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchRollout)) --- Optional. Rollout strategy of the patch job.
**Returns**

- ([::Google::Cloud::OsConfig::V1::PatchRollout](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchRollout)) --- Optional. Rollout strategy of the patch job.

### #state

    def state() -> ::Google::Cloud::OsConfig::V1::PatchDeployment::State

**Returns**

- ([::Google::Cloud::OsConfig::V1::PatchDeployment::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/Google-Cloud-OsConfig-V1-PatchDeployment-State)) --- Output only. Current state of the patch deployment.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1/latest/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.