

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

# ListClusters
<a name="API_ListClusters"></a>

**注意**  
 AWS Snowball Edge 不再向新客户提供。新客户应探索[AWS DataSync](https://aws.amazon.com/datasync/)在线传输、用于安全物理[传输AWS 的数据传输终端](https://aws.amazon.com/data-transfer-terminal/)或 AWS 合作伙伴解决方案。对于边缘计算，请浏览 [AWS Out](https://aws.amazon.com/outposts/) posts。

返回指定长度的 `ClusterListEntry` 对象的数组。每个 `ClusterListEntry` 对象都包含集群的状态、集群的 ID 和其他重要状态信息。

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

```
{
   "MaxResults": number,
   "NextToken": "string"
}
```

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

有关所有操作的通用参数的信息，请参阅[常用参数](CommonParameters.md)。

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

 ** [MaxResults](#API_ListClusters_RequestSyntax) **   <a name="Snowball-ListClusters-request-MaxResults"></a>
要返回的 `ClusterListEntry` 对象数量。  
类型：整数  
有效范围：最小值为 0。最大值为 100。  
必需：否

 ** [NextToken](#API_ListClusters_RequestSyntax) **   <a name="Snowball-ListClusters-request-NextToken"></a>
HTTP 请求是无状态请求。要确定哪个对象出现在 `ClusterListEntry` 对象列表中的“下一个”，您可以选择指定 `NextToken` 作为返回列表的起点。  
类型：字符串  
长度限制：最小长度为 1。长度上限为 1024。  
模式：`.*`  
必需：否

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

```
{
   "ClusterListEntries": [ 
      { 
         "ClusterId": "string",
         "ClusterState": "string",
         "CreationDate": number,
         "Description": "string"
      }
   ],
   "NextToken": "string"
}
```

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

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

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

 ** [ClusterListEntries](#API_ListClusters_ResponseSyntax) **   <a name="Snowball-ListClusters-response-ClusterListEntries"></a>
每个 `ClusterListEntry` 对象都包含集群的状态、集群的 ID 和其他重要状态信息。  
类型：[ClusterListEntry](API_ClusterListEntry.md) 对象数组

 ** [NextToken](#API_ListClusters_ResponseSyntax) **   <a name="Snowball-ListClusters-response-NextToken"></a>
HTTP 请求是无状态请求。如果您在下次调用 `ClusterListEntry` 时使用自动生成的 `NextToken` 值，则返回的集群列表将从数组中的这一点开始。  
类型：字符串  
长度限制：最小长度为 1。长度上限为 1024。  
模式：`.*`

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

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

 ** InvalidNextTokenException **   
`NextToken` 字符串被意外更改，操作已停止。在不更改 `NextToken` 字符串的情况下运行操作，然后重试。  
HTTP 状态代码：400

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

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