REST Resource: projects.patchDeployments

Resource: 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.

JSON representation
{
  "name": string,
  "description": string,
  "instanceFilter": {
    object (PatchInstanceFilter)
  },
  "patchConfig": {
    object (PatchConfig)
  },
  "duration": string,
  "createTime": string,
  "updateTime": string,
  "lastExecuteTime": string,
  "rollout": {
    object (PatchRollout)
  },

  // Union field schedule can be only one of the following:
  "oneTimeSchedule": {
    object (OneTimeSchedule)
  },
  "recurringSchedule": {
    object (RecurringSchedule)
  }
  // End of list of possible types for union field schedule.
}
Fields
name

string

Unique name for the patch deployment resource in a project. The patch deployment name is in the form: projects/{project_id}/patchDeployments/{patchDeploymentId}. This field is ignored when you create a new patch deployment.

description

string

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

instanceFilter

object (PatchInstanceFilter)

Required. VM instances to patch.

patchConfig

object (PatchConfig)

Optional. Patch configuration that is applied.

duration

string (Duration format)

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

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

createTime

string (Timestamp format)

Output only. Time the patch deployment was created. Timestamp is in RFC3339 text format.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Time the patch deployment was last updated. Timestamp is in RFC3339 text format.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

lastExecuteTime

string (Timestamp format)

Output only. The last time a patch job was started by this deployment. Timestamp is in RFC3339 text format.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

rollout

object (PatchRollout)

Optional. Rollout strategy of the patch job.

Union field schedule. Schedule for the patch. schedule can be only one of the following:
oneTimeSchedule

object (OneTimeSchedule)

Required. Schedule a one-time execution.

recurringSchedule

object (RecurringSchedule)

Required. Schedule recurring executions.

OneTimeSchedule

Sets the time for a one time patch deployment. Timestamp is in RFC3339 text format.

JSON representation
{
  "executeTime": string
}
Fields
executeTime

string (Timestamp format)

Required. The desired patch job execution time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

RecurringSchedule

Sets the time for recurring patch deployments.

JSON representation
{
  "timeZone": {
    object (TimeZone)
  },
  "startTime": string,
  "endTime": string,
  "timeOfDay": {
    object (TimeOfDay)
  },
  "frequency": enum (Frequency),
  "lastExecuteTime": string,
  "nextExecuteTime": string,

  // Union field schedule_config can be only one of the following:
  "weekly": {
    object (WeeklySchedule)
  },
  "monthly": {
    object (MonthlySchedule)
  }
  // End of list of possible types for union field schedule_config.
}
Fields
timeZone

object (TimeZone)

Required. Defines the time zone that timeOfDay is relative to. The rules for daylight saving time are determined by the chosen time zone.

startTime

string (Timestamp format)

Optional. The time that the recurring schedule becomes effective. Defaults to createTime of the patch deployment.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

Optional. The end time at which a recurring patch deployment schedule is no longer active.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

timeOfDay

object (TimeOfDay)

Required. Time of the day to run a recurring deployment.

frequency

enum (Frequency)

Required. The frequency unit of this recurring schedule.

lastExecuteTime

string (Timestamp format)

Output only. The time the last patch job ran successfully.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

nextExecuteTime

string (Timestamp format)

Output only. The time the next patch job is scheduled to run.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Union field schedule_config. Configurations for this recurring schedule. Configurations must match frequency. schedule_config can be only one of the following:
weekly

object (WeeklySchedule)

Required. Schedule with weekly executions.

monthly

object (MonthlySchedule)

Required. Schedule with monthly executions.

Frequency

Specifies the frequency of the recurring patch deployments.

Enums
FREQUENCY_UNSPECIFIED Invalid. A frequency must be specified.
WEEKLY Indicates that the frequency should be expressed in terms of weeks.
MONTHLY Indicates that the frequency should be expressed in terms of months.

WeeklySchedule

Represents a weekly schedule.

JSON representation
{
  "dayOfWeek": enum (DayOfWeek)
}
Fields
dayOfWeek

enum (DayOfWeek)

Required. Day of the week.

MonthlySchedule

Represents a monthly schedule. An example of a valid monthly schedule is "on the third Tuesday of the month" or "on the 15th of the month".

JSON representation
{

  // Union field day_of_month can be only one of the following:
  "weekDayOfMonth": {
    object (WeekDayOfMonth)
  },
  "monthDay": integer
  // End of list of possible types for union field day_of_month.
}
Fields
Union field day_of_month. One day in a month. day_of_month can be only one of the following:
weekDayOfMonth

object (WeekDayOfMonth)

Required. Week day in a month.

monthDay

integer

Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 indicates the last day of the month. Months without the target day will be skipped. For example, a schedule to run "every month on the 31st" will not run in February, April, June, etc.

WeekDayOfMonth

Represents one week day in a month. An example is "the 4th Sunday".

JSON representation
{
  "weekOrdinal": integer,
  "dayOfWeek": enum (DayOfWeek)
}
Fields
weekOrdinal

integer

Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 indicates the last week of the month.

dayOfWeek

enum (DayOfWeek)

Required. A day of the week.

Methods

create

Create an OS Config patch deployment.

delete

Delete an OS Config patch deployment.

get

Get an OS Config patch deployment.

list

Get a page of OS Config patch deployments.