检索查找详情(Security Hub API、Amazon CLI) - Amazon Security Hub
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

检索查找详情(Security Hub API、Amazon CLI)

要以编程方式检索选定发现的详细信息,您可以使用 API 调用或Amazon Command Line Interface.

请注意,当您按以下条件筛选时CompanyName要么ProductName,Security Hub 使用中的值ProductFields. 它不使用顶级策略CompanyNameProductName字段之间没有不同。

要检索结果列表(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