patch_deployments
Creates, updates, deletes, gets or lists a patch_deployments
resource.
Overview
Name | patch_deployments |
Type | Resource |
Id | google.osconfig.patch_deployments |
Fields
Name | Datatype | Description |
---|---|---|
name | 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. |
description | string | Optional. Description of the patch deployment. Length of the description is limited to 1024 characters. |
createTime | string | Output only. Time the patch deployment was created. Timestamp is in RFC3339 text format. |
duration | string | Optional. Duration of the patch. After the duration ends, the patch times out. |
instanceFilter | object | A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. |
lastExecuteTime | string | Output only. The last time a patch job was started by this deployment. Timestamp is in RFC3339 text format. |
oneTimeSchedule | object | Sets the time for a one time patch deployment. Timestamp is in RFC3339 text format. |
patchConfig | object | Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. |
recurringSchedule | object | Sets the time for recurring patch deployments. |
rollout | object | Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. |
state | string | Output only. Current state of the patch deployment. |
updateTime | string | Output only. Time the patch deployment was last updated. Timestamp is in RFC3339 text format. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | patchDeploymentsId, projectsId | Get an OS Config patch deployment. |
list | SELECT | projectsId | Get a page of OS Config patch deployments. |
create | INSERT | projectsId | Create an OS Config patch deployment. |
delete | DELETE | patchDeploymentsId, projectsId | Delete an OS Config patch deployment. |
patch | UPDATE | patchDeploymentsId, projectsId | Update an OS Config patch deployment. |
pause | EXEC | patchDeploymentsId, projectsId | Change state of patch deployment to "PAUSED". Patch deployment in paused state doesn't generate patch jobs. |
resume | EXEC | patchDeploymentsId, projectsId | Change state of patch deployment back to "ACTIVE". Patch deployment in active state continues to generate patch jobs. |
SELECT
examples
Get a page of OS Config patch deployments.
SELECT
name,
description,
createTime,
duration,
instanceFilter,
lastExecuteTime,
oneTimeSchedule,
patchConfig,
recurringSchedule,
rollout,
state,
updateTime
FROM google.osconfig.patch_deployments
WHERE projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new patch_deployments
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.osconfig.patch_deployments (
projectsId,
name,
description,
instanceFilter,
patchConfig,
duration,
oneTimeSchedule,
recurringSchedule,
rollout
)
SELECT
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ instanceFilter }}',
'{{ patchConfig }}',
'{{ duration }}',
'{{ oneTimeSchedule }}',
'{{ recurringSchedule }}',
'{{ rollout }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: instanceFilter
value:
- name: all
value: boolean
- name: groupLabels
value:
- - name: labels
value: object
- name: zones
value:
- string
- name: instances
value:
- string
- name: instanceNamePrefixes
value:
- string
- name: patchConfig
value:
- name: rebootConfig
value: string
- name: apt
value:
- name: type
value: string
- name: excludes
value:
- string
- name: exclusivePackages
value:
- string
- name: yum
value:
- name: security
value: boolean
- name: minimal
value: boolean
- name: excludes
value:
- string
- name: exclusivePackages
value:
- string
- name: goo
value: []
- name: zypper
value:
- name: withOptional
value: boolean
- name: withUpdate
value: boolean
- name: categories
value:
- string
- name: severities
value:
- string
- name: excludes
value:
- string
- name: exclusivePatches
value:
- string
- name: windowsUpdate
value:
- name: classifications
value:
- string
- name: excludes
value:
- string
- name: exclusivePatches
value:
- string
- name: preStep
value:
- name: linuxExecStepConfig
value:
- name: localPath
value: string
- name: gcsObject
value:
- name: bucket
value: string
- name: object
value: string
- name: generationNumber
value: string
- name: allowedSuccessCodes
value:
- integer
- name: interpreter
value: string
- name: migInstancesAllowed
value: boolean
- name: duration
value: string
- name: oneTimeSchedule
value:
- name: executeTime
value: string
- name: recurringSchedule
value:
- name: timeZone
value:
- name: id
value: string
- name: version
value: string
- name: startTime
value: string
- name: endTime
value: string
- name: timeOfDay
value:
- name: hours
value: integer
- name: minutes
value: integer
- name: seconds
value: integer
- name: nanos
value: integer
- name: frequency
value: string
- name: weekly
value:
- name: dayOfWeek
value: string
- name: monthly
value:
- name: weekDayOfMonth
value:
- name: weekOrdinal
value: integer
- name: dayOfWeek
value: string
- name: dayOffset
value: integer
- name: monthDay
value: integer
- name: lastExecuteTime
value: string
- name: nextExecuteTime
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: lastExecuteTime
value: string
- name: rollout
value:
- name: mode
value: string
- name: disruptionBudget
value:
- name: fixed
value: integer
- name: percent
value: integer
- name: state
value: string
UPDATE
example
Updates a patch_deployments
resource.
/*+ update */
UPDATE google.osconfig.patch_deployments
SET
name = '{{ name }}',
description = '{{ description }}',
instanceFilter = '{{ instanceFilter }}',
patchConfig = '{{ patchConfig }}',
duration = '{{ duration }}',
oneTimeSchedule = '{{ oneTimeSchedule }}',
recurringSchedule = '{{ recurringSchedule }}',
rollout = '{{ rollout }}'
WHERE
patchDeploymentsId = '{{ patchDeploymentsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified patch_deployments
resource.
/*+ delete */
DELETE FROM google.osconfig.patch_deployments
WHERE patchDeploymentsId = '{{ patchDeploymentsId }}'
AND projectsId = '{{ projectsId }}';