本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
检索查找详情(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 — 使用
GetFindingsAPI 操作。 -
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