

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

# ListFindings
<a name="API_ListFindings"></a>

检索指定分析器生成的结果列表。 ListFindings 和 ListFindings V2 都`access-analyzer:ListFindings`在 IAM 策略声明的`Action`元素中使用。您必须拥有执行该`access-analyzer:ListFindings`操作的权限。

要了解可用于检索结果列表的筛选密钥，请参阅 [IAM **用户指南**中的 IAM Access Analyzer 筛选密钥](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html)。

**注意**  
ListFindings 仅支持外部访问分析器。对于内部和未使用的访问分析器，必须使用 ListFindings V2。

## 请求语法
<a name="API_ListFindings_RequestSyntax"></a>

```
POST /finding HTTP/1.1
Content-type: application/json

{
   "analyzerArn": "string",
   "filter": { 
      "string" : { 
         "contains": [ "string" ],
         "eq": [ "string" ],
         "exists": boolean,
         "neq": [ "string" ]
      }
   },
   "maxResults": number,
   "nextToken": "string",
   "sort": { 
      "attributeName": "string",
      "orderBy": "string"
   }
}
```

## URI 请求参数
<a name="API_ListFindings_RequestParameters"></a>

该请求不使用任何 URI 参数。

## 请求正文
<a name="API_ListFindings_RequestBody"></a>

请求接受采用 JSON 格式的以下数据。

 ** [analyzerArn](#API_ListFindings_RequestSyntax) **   <a name="accessanalyzer-ListFindings-request-analyzerArn"></a>
要从中检索结果[的分析器的 ARN](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-getting-started.html#permission-resources)。  
类型：字符串  
模式：`[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:analyzer/.{1,255}`  
是否必需：是

 ** [filter](#API_ListFindings_RequestSyntax) **   <a name="accessanalyzer-ListFindings-request-filter"></a>
与要返回的结果相匹配的过滤器。  
类型：字符串到 [Criterion](API_Criterion.md) 对象的映射  
必需：否

 ** [maxResults](#API_ListFindings_RequestSyntax) **   <a name="accessanalyzer-ListFindings-request-maxResults"></a>
响应中返回的最大结果数。  
类型：整数  
必需：否

 ** [nextToken](#API_ListFindings_RequestSyntax) **   <a name="accessanalyzer-ListFindings-request-nextToken"></a>
用于对返回的结果进行分页的标记。  
类型：字符串  
必需：否

 ** [sort](#API_ListFindings_RequestSyntax) **   <a name="accessanalyzer-ListFindings-request-sort"></a>
返回结果的排序顺序。  
类型：[SortCriteria](API_SortCriteria.md) 对象  
必需：否

## 响应语法
<a name="API_ListFindings_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "findings": [ 
      { 
         "action": [ "string" ],
         "analyzedAt": "string",
         "condition": { 
            "string" : "string" 
         },
         "createdAt": "string",
         "error": "string",
         "id": "string",
         "isPublic": boolean,
         "principal": { 
            "string" : "string" 
         },
         "resource": "string",
         "resourceControlPolicyRestriction": "string",
         "resourceOwnerAccount": "string",
         "resourceType": "string",
         "sources": [ 
            { 
               "detail": { 
                  "accessPointAccount": "string",
                  "accessPointArn": "string"
               },
               "type": "string"
            }
         ],
         "status": "string",
         "updatedAt": "string"
      }
   ],
   "nextToken": "string"
}
```

## 响应元素
<a name="API_ListFindings_ResponseElements"></a>

如果此操作成功，则该服务将会发送回 HTTP 200 响应。

服务以 JSON 格式返回以下数据。

 ** [findings](#API_ListFindings_ResponseSyntax) **   <a name="accessanalyzer-ListFindings-response-findings"></a>
从分析器检索到的符合指定筛选条件的结果列表（如果有）。  
类型：[FindingSummary](API_FindingSummary.md) 对象数组

 ** [nextToken](#API_ListFindings_ResponseSyntax) **   <a name="accessanalyzer-ListFindings-response-nextToken"></a>
用于对返回的结果进行分页的标记。  
类型：字符串

## 错误
<a name="API_ListFindings_Errors"></a>

有关所有操作的常见错误信息，请参阅 [常见错误类型](CommonErrors.md)。

 ** AccessDeniedException **   
您没有足够的访问权限，无法执行该操作。  
HTTP 状态代码：403

 ** InternalServerException **   
内部服务器错误。    
 ** retryAfterSeconds **   
等待重试的秒数。
HTTP 状态代码：500

 ** ResourceNotFoundException **   
找不到指定资源。    
 ** resourceId **   
资源的 ID。  
 ** resourceType **   
资源的类型。
HTTP 状态代码：404

 ** ThrottlingException **   
超过限制限制错误。    
 ** retryAfterSeconds **   
等待重试的秒数。
HTTP 状态代码：429

 ** ValidationException **   
验证异常错误。    
 ** fieldList **   
未验证的字段列表。  
 ** reason **   
异常的原因。
HTTP 状态代码：400

## 另请参阅
<a name="API_ListFindings_SeeAlso"></a>

有关以特定语言之一使用此 API 的更多信息 AWS SDKs，请参阅以下内容：
+  [AWS 命令行界面 V2](https://docs.aws.amazon.com/goto/cli2/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 适用于.NET 的 SDK V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 适用于 C\$1\$1 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 适用于 Go v2 的 SDK](https://docs.aws.amazon.com/goto/SdkForGoV2/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 适用于 Java 的 SDK V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS JavaScript V3 版软件开发工具包](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 适用于 Kotlin 的 SDK](https://docs.aws.amazon.com/goto/SdkForKotlin/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 适用于 PHP 的 SDK V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS Python 软件开发工具包](https://docs.aws.amazon.com/goto/boto3/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 适用于 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/accessanalyzer-2019-11-01/ListFindings) 