You need to enable JavaScript to run this app.
文档中心
云服务器

云服务器

复制全文
下载 pdf
补丁管理
ListInstancePatchReports - 查询实例合规报告列表
复制全文
下载 pdf
ListInstancePatchReports - 查询实例合规报告列表
调用ListInstancePatchReports接口,查询实例合规报告列表。​
使用说明​
已完成目标实例的补丁状态扫描,或已对目标实例扫描并安装相关补丁。详情请参见创建补丁计划。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:ListInstancePatchReports​
要执行的操作,取值:ListInstancePatchReports。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
InstanceIds string[] 可选 示例值:["i-abc123"]​
实例ID列表,您可以通过调用DescribeInstances接口获取符合条件的实例ID。取值:​
  • 多个补丁基线之间使用“,”(英文逗号)分割。​
  • 单次最多支持传入20个实例ID。​
​
NextToken string 可选 示例值:token-abc123​
分页查询凭证,用于标记分页的位置,下次查询时,取值为上一次API调用返回的NextToken参数值。​
  • 若调用时传入Token值,则取自当前页返回结果。​
  • 若调用时未传入Token值:​
  • 当查询结果存在后续分页,返回结果中将包含有效的分页Token。​
  • 当当前页为最后一页(无后续数据),返回的Token值为空字符串。​
​
MaxResults integer 可选 示例值:10​
分页查询时设置的每页行数,取值:​
  • 默认值:10​
  • 取值范围:1~100​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
NextToken string 示例值:token-abc123​
本次调用返回的查询凭证值。取值:​
  • 若调用时传入Token值,则取自当前页返回结果。​
  • 若调用时未传入Token值:​
  • 当查询结果存在后续分页,返回结果中将包含有效的分页Token。​
  • 当当前页为最后一页(无后续数据),返回的Token值为空字符串。​
​
InstancePatchReports object[] 示例值:--​
实例补丁报告列表。​
InstalledOtherCount integer 示例值:1​
不符合基线的补丁数量。​
​
MissingCount integer 示例值:11​
未安装补丁数量。​
​
InstalledCount integer 示例值:5​
已安装的补丁数量。​
​
PatchPlanId string 示例值:pp-yecrlep6z8ffaj3w****​
补丁计划ID。​
​
InstanceId string 示例值:i-yee25xg1ds7fzxcl****​
实例ID。​
​
BaselineId string 示例值:bl-yee2zezsaq9vq62****​
补丁基线ID。​
​
OperationType string 示例值:Scan​
操作类型,取值:​
  • Scan:仅扫描补丁。​
  • Install:扫描并安装补丁。​
​
PatchPlanName string 示例值:PlanName​
补丁计划名称。​
​
OperationEndTime string 示例值:2025-12-09T20:45Z​
在目标实例上执行的命令、补丁安装或配置操作全部执行完毕的时间点。​
​
OperationStartTime string 示例值:2025-12-09T20:45Z​
在目标实例上执行的命令、补丁安装或配置操作开始执行的时间点。​
​
AvailableSecurityUpdateCount integer 示例值:12​
可用的安全相关补丁,但尚未通过补丁基线批准。​
说明​
该类补丁未获批,通常是因为不满足基线规则,例如在指定自动批准期限前已发布更新版本。​
​
OwnerInformation string 示例值:210000****​
账户ID,火山引擎主账号的唯一标识。​
​
OperationSystem string 示例值:Ubuntu​
操作系统类型。取值:​
  • Ubuntu​
  • Debian​
​
NotApplicableCount integer 示例值:7​
来自补丁基线、但因不适用于实例(该补丁与当前实例环境不匹配)而未安装的补丁数量。​
​
OtherNonCompliantCount integer 示例值:6​
被指定为非Critical或非Security但不符合补丁基准的补丁数量。​
​
SecurityNonCompliantCount integer 示例值:65​
未安装的、补丁合规性报告中标记为 Security 安全类补丁的数量。​
说明​
该类补丁可能缺失、安装失败、已被拒绝、或已安装但需重启才能生效。​
​
CriticalNonCompliantCount integer 示例值:33​
补丁基线中,未安装的、合规性报告标记为Critical的补丁数量。​
说明​
该类补丁可能缺失、安装失败、已被拒绝、或已安装但需重启才能生效。​
​
FailedCount integer 示例值:1​
安装失败的补丁数量。​
​
InstalledPendingRebootCount integer 示例值:1​
安装待重启的补丁数量。​
​
InstalledRejectedCount integer 示例值:1​
已安装用户拒绝的补丁数量。​
​
​
​
​
请求示例​
​
POST /?Version=2020-04-01&Action=ListInstancePatchReports HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
AccessKey: AK*****************​
SecretKey: TXpS***************​
ServiceName: ecs​
Region: cn-beijing​
X-Top-Account-Id: 21000*****​
Content-Type: application/json​
​
{​
"InstanceIds": ["i-instance001"],​
"MaxResults": 10​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202601221013131313****",​
"Action": "ListInstancePatchReports",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {​
"InstancePatchReports": [​
{​
"InstanceId": "i-instance001",​
"BaselineId": "bl-12345678abc****",​
"PatchPlanId": "pp-87654321zyx****",​
"PatchPlanName": "Weekly-Prod-Patching",​
"OperationSystem": "Linux",​
"OperationType": "Install",​
"OperationStartTime": "2026-01-25T02:00:00Z",​
"OperationEndTime": "2026-01-25T02:15:00Z",​
"OwnerInformation": "",​
"InstalledCount": 15,​
"MissingCount": 2,​
"FailedCount": 0,​
"InstalledPendingRebootCount": 1,​
"InstalledRejectedCount": 0,​
"InstalledOtherCount": 0,​
"CriticalNonCompliantCount": 1,​
"SecurityNonCompliantCount": 2,​
"NotApplicableCount": 5,​
"AvailableSecurityUpdateCount": 0,​
"OtherNonCompliantCount": 0​
}​
],​
"NextToken": ""​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidArgument​
The specified argument is invalid.​
指定的参数不合法。​
500​
InternalError​
An internal error has occurred.​
内部错误,请重试。如果多次尝试失败,请提交工单。​
​
​
最近更新时间:2026.03.03 16:14:48
这个页面对您有帮助吗?
有用
有用
无用
无用