本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
检索查找详细信息(Security Hub API,Amazon CLI)
要以编程方式检索所选发现的详细信息,您可以使用 API 调用或Amazon Command Line Interface.
请注意,当你过滤CompanyName
要么ProductName
,Security Hub 使用中的值ProductFields
. 它没有使用顶级CompanyName
和ProductName
字段之间没有不同。
要检索结果的列表(Security Hub API,Amazon CLI)
-
Security Hub API — 使用
GetFindings
API 操作。 -
Amazon CLI— 在命令行处,运行
get-findings
命令。get-findings --filters
<filter criteria JSON>
--sort-criteria<sort criteria>
--page-size<findings per page>
--max-items<maximum number of results>
示例
aws securityhub get-findings --filters '{"GeneratorId":[{"Value": "aws-foundational","Comparison":"PREFIX"}],"WorkflowStatus": [{"Value": "NEW","Comparison":"EQUALS"}],"Confidence": [{"Gte": 85}]}' --sort-criteria '{"Field": "LastObservedAt","SortOrder": "desc"}' --page-size 5 --max-items 100