资源:PatchJob
正在进行或已完成的修补作业的简明表示形式。
该作业中不包含实例详情。如需对实例详情进行分页,请使用 instanceDetails.list。
如需详细了解修补作业,请参阅创建修补作业。
JSON 表示法 | |
---|---|
{ "name": string, "displayName": string, "description": string, "createTime": string, "updateTime": string, "state": enum ( |
字段 | |
---|---|
name |
此修补作业的唯一标识符,格式为 |
displayName |
此修补作业的显示名。这不是唯一标识符。 |
description |
此修补作业的说明。说明的长度不得超过 1024 个字符。 |
createTime |
此修补作业的创建时间。 此时间戳采用 RFC3339 世界协调时间 (UTC)(即“祖鲁时”)格式,且精确到纳秒。示例: |
updateTime |
此修补作业的上次更新时间。 此时间戳采用 RFC3339 世界协调时间 (UTC)(即“祖鲁时”)格式,且精确到纳秒。示例: |
state |
PatchJob 的当前状态。 |
instanceFilter |
要修补的实例。 |
patchConfig |
所应用的补丁程序配置。 |
duration |
此修补作业的持续时间。该持续时间结束后,修补作业会发生超时。 该持续时间以秒为单位,最多包含九个小数位,并以“ |
instanceDetailsSummary |
实例详情摘要。 |
dryRun |
如果此修补作业为试运行模式,则代理会报告其已完成,而不在虚拟机实例上运行任何更新。 |
errorMessage |
如果此修补作业失败,则此消息会提供相关故障信息。 |
percentComplete |
反映此修补作业的整体进度,范围介于 0.0(无进展)到 100.0(完成)之间。 |
patchDeployment |
仅限输出。创建了此修补作业的补丁程序部署的名称。 |
State
用于枚举修补作业在执行期间所经历的各种状态。
枚举 | |
---|---|
STATE_UNSPECIFIED |
必须指定状态。 |
STARTED |
修补作业已成功启动。 |
INSTANCE_LOOKUP |
修补作业正在查找要运行补丁程序的实例。 |
PATCHING |
正在修补实例。 |
SUCCEEDED |
修补作业已成功完成。 |
COMPLETED_WITH_ERRORS |
修补作业已完成,但存在错误。 |
CANCELED |
修补作业已被取消。 |
TIMED_OUT |
修补作业已超时。 |
InstanceDetailsSummary
受此修补作业影响的所有实例的当前修补状态摘要。包含处于不同状态的实例的计数。这些状态会映射到 InstancePatchState
。如何查看每个实例的特定状态,请列出修补作业实例详情。
JSON 表示法 | |
---|---|
{ "pendingInstanceCount": string, "inactiveInstanceCount": string, "notifiedInstanceCount": string, "startedInstanceCount": string, "downloadingPatchesInstanceCount": string, "applyingPatchesInstanceCount": string, "rebootingInstanceCount": string, "succeededInstanceCount": string, "succeededRebootRequiredInstanceCount": string, "failedInstanceCount": string, "ackedInstanceCount": string, "timedOutInstanceCount": string, "prePatchStepInstanceCount": string, "postPatchStepInstanceCount": string, "noAgentDetectedInstanceCount": string } |
字段 | |
---|---|
pendingInstanceCount |
正在等待修补作业处理的实例数。 |
inactiveInstanceCount |
处于非活跃状态的实例数。 |
notifiedInstanceCount |
已收到修补作业相关通知的实例数。 |
startedInstanceCount |
已启动的实例数。 |
downloadingPatchesInstanceCount |
正在下载补丁程序的实例数。 |
applyingPatchesInstanceCount |
正在应用补丁程序的实例数。 |
rebootingInstanceCount |
正在重新启动的实例数。 |
succeededInstanceCount |
已成功完成的实例数。 |
succeededRebootRequiredInstanceCount |
需要重新启动的实例数。 |
failedInstanceCount |
失败的实例数。 |
ackedInstanceCount |
已确认并即将启动的实例数。 |
timedOutInstanceCount |
在应用补丁程序时发生超时的实例数。 |
prePatchStepInstanceCount |
正在执行修补前步骤的实例数。 |
postPatchStepInstanceCount |
正在执行修补后步骤的实例数。 |
noAgentDetectedInstanceCount |
似乎未在运行代理的实例数。检查并确保代理已安装、正在运行且能够与服务通信。 |
方法 |
|
---|---|
|
取消修补作业。 |
|
通过创建并运行修补作业来修补虚拟机实例。 |
|
获取修补作业。 |
|
获取修补作业列表。 |