

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

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

擷取指定分析器產生的調查結果清單。ListFindings 和 ListFindingsV2 都用於 IAM 政策陳述式的 `access-analyzer:ListFindings` `Action`元素。您必須具有執行 `access-analyzer:ListFindings`動作的許可。

若要了解可用來擷取問題清單的篩選金鑰，請參閱《[IAM 使用者指南》中的 IAM Access Analyzer 篩選金鑰](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html)。 ****

**注意**  
ListFindings 僅支援外部存取分析器。您必須將 ListFindingsV2 用於內部和未使用的存取分析器。

## 請求語法
<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>

如需在其中一種語言特定 AWS SDKs中使用此 API 的詳細資訊，請參閱下列內容：
+  [AWS 命令列界面 V2](https://docs.aws.amazon.com/goto/cli2/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 適用於 .NET V4 的 SDK](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 的 SDK v2](https://docs.aws.amazon.com/goto/SdkForGoV2/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 適用於 Java V2 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaV2/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 適用於 JavaScript V3 的 SDK](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 V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForPHPV3/accessanalyzer-2019-11-01/ListFindings) 
+  [AWS 適用於 Python 的 SDK](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) 