

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

# CreateCluster
<a name="API_CreateCluster"></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。

创建一个空集群。每个集群支持五个节点。您可以分别使用 [CreateJob](API_CreateJob.md) 操作为每个节点创建作业。只有在创建了这五个节点的作业之后，集群才会运送。

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

```
{
   "AddressId": "string",
   "Description": "string",
   "ForceCreateJobs": boolean,
   "ForwardingAddressId": "string",
   "InitialClusterSize": number,
   "JobType": "string",
   "KmsKeyARN": "string",
   "LongTermPricingIds": [ "string" ],
   "Notification": { 
      "DevicePickupSnsTopicARN": "string",
      "JobStatesToNotify": [ "string" ],
      "NotifyAll": boolean,
      "SnsTopicARN": "string"
   },
   "OnDeviceServiceConfiguration": { 
      "EKSOnDeviceService": { 
         "EKSAnywhereVersion": "string",
         "KubernetesVersion": "string"
      },
      "NFSOnDeviceService": { 
         "StorageLimit": number,
         "StorageUnit": "string"
      },
      "S3OnDeviceService": { 
         "FaultTolerance": number,
         "ServiceSize": number,
         "StorageLimit": number,
         "StorageUnit": "string"
      },
      "TGWOnDeviceService": { 
         "StorageLimit": number,
         "StorageUnit": "string"
      }
   },
   "RemoteManagement": "string",
   "Resources": { 
      "Ec2AmiResources": [ 
         { 
            "AmiId": "string",
            "SnowballAmiId": "string"
         }
      ],
      "LambdaResources": [ 
         { 
            "EventTriggers": [ 
               { 
                  "EventResourceARN": "string"
               }
            ],
            "LambdaArn": "string"
         }
      ],
      "S3Resources": [ 
         { 
            "BucketArn": "string",
            "KeyRange": { 
               "BeginMarker": "string",
               "EndMarker": "string"
            },
            "TargetOnDeviceServices": [ 
               { 
                  "ServiceName": "string",
                  "TransferOption": "string"
               }
            ]
         }
      ]
   },
   "RoleARN": "string",
   "ShippingOption": "string",
   "SnowballCapacityPreference": "string",
   "SnowballType": "string",
   "TaxDocuments": { 
      "IND": { 
         "GSTIN": "string"
      }
   }
}
```

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

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

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

 ** [AddressId](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-AddressId"></a>
您要希望将集群运送到的地址的 ID。  
类型：字符串  
长度限制：固定长度为 40。  
模式：`ADID[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`  
是否必需：是

 ** [Description](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-Description"></a>
此特定集群的可选描述，例如 `Environmental Data Cluster-01`。  
类型：字符串  
长度限制：最小长度为 1。长度上限为 1024。  
模式：`.*`  
必需：否

 ** [ForceCreateJobs](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-ForceCreateJobs"></a>
当用户尝试过度或过少配置集群时，强制创建集群。如果集群的初始大小大于（过度配置）或小于（配置不足）为满足`OnDeviceServiceConfiguration` 指定的容量要求所需的大小，则集群处于过度配置或配置不足的状态。  
类型：布尔值  
必需：否

 ** [ForwardingAddressId](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-ForwardingAddressId"></a>
您所在的地区不支持此字段。  
类型：字符串  
长度限制：固定长度为 40。  
模式：`ADID[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`  
必需：否

 ** [InitialClusterSize](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-InitialClusterSize"></a>
如果提供，每个作业都将自动创建并与新集群相关联。如果未提供，则将被视为 0。  
类型：整数  
有效范围：最小值为 0。最大值为 16。  
必需：否

 ** [JobType](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-JobType"></a>
此集群的作业类型。目前，`LOCAL_USE` 是集群唯一支持的作业类型。  
有关 Snowball Edge 设备类型的信息，请参阅 Snowball Edge 开发者指南中的[设备硬件信息](https://docs.aws.amazon.com/snowball/latest/developer-guide/device-differences.html)。  
类型：字符串  
有效值：`IMPORT | EXPORT | LOCAL_USE`  
是否必需：是

 ** [KmsKeyARN](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-KmsKeyARN"></a>
您要与此集群关联的`KmsKeyARN`值。 `KmsKeyARN`值是使用 AWS Key Management Service (AWS KMS) 中的 [CreateKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html)API 操作创建的。  
类型：字符串  
长度限制：长度上限为 255。  
模式：`arn:aws.*:kms:.*:[0-9]{12}:key/.*`  
必需：否

 ** [LongTermPricingIds](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-LongTermPricingIds"></a>
列出长期定价 ID，它将用于与为新集群自动创建的作业相关联。  
类型：字符串数组  
长度限制：固定长度为 41。  
模式：`LTPID[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`  
必需：否

 ** [Notification](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-Notification"></a>
此集群的 Amazon Simple Notification Service（Amazon SNS）通知设置。  
类型：[Notification](API_Notification.md) 对象  
必需：否

 ** [OnDeviceServiceConfiguration](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-OnDeviceServiceConfiguration"></a>
指定 Snowball Edge 设备上将从中导出或导入您传输的数据的一个或多个服务。 AWS Snowball Edge 设备集群支持 Amazon S3 和 NFS（网络文件系统）。  
类型：[OnDeviceServiceConfiguration](API_OnDeviceServiceConfiguration.md) 对象  
必需：否

 ** [RemoteManagement](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-RemoteManagement"></a>
允许您从内部网络之外安全地远程操作和管理集群中的 Snow 设备。如果设置为 `INSTALLED_AUTOSTART`，则远程管理会在设备到达您的位置时自动启用。否则，您需要使用 Snowball 客户端来管理设备。  
类型：字符串  
有效值：`INSTALLED_ONLY | INSTALLED_AUTOSTART | NOT_INSTALLED`  
必需：否

 ** [Resources](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-Resources"></a>
与集群作业关联的资源。这些资源包括 Amazon S3 存储桶和用 Python 语言编写的可选 AWS Lambda 函数。  
类型：[JobResource](API_JobResource.md) 对象  
必需：否

 ** [RoleARN](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-RoleARN"></a>
您`RoleARN`要与此集群关联的。 `RoleArn`值是使用 AWS Identity and Access Management (IAM) 中的 [CreateRole](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html)API 操作创建的。  
类型：字符串  
长度限制：长度上限为 255。  
模式：`arn:aws.*:iam::[0-9]{12}:role/.*`  
必需：否

 ** [ShippingOption](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-ShippingOption"></a>
此集群中每个节点的配送速度。此速度并不指示您需要多长时间收到每台 Snowball Edge 设备，而是表示每台设备运送到目的地的运输速度。每个区域配送速度如下所示：  
+ 在澳大利亚，您可以享受快递服务。通常，快递运输 Snow 设备大约需要一天时间。
+ 在欧盟 (EU)，您可以享受快递服务。通常，快递运输 Snow 设备大约需要一天时间。此外，欧盟的大多数国家/地区还可以使用标准运输，通常单程需要的时间不超过一周。
+ 在印度，Snow 设备将在一到七天内送达。
+ 在美国 (US)，您可以享受次日达和隔日达。
+ 在澳大利亚，您可以享受快递服务。通常，快递运输设备大约需要一天时间。
+ 在欧盟 (EU)，您可以享受快递服务。通常，快递运输 Snow 设备大约需要一天时间。此外，欧盟的大多数国家/地区还可以使用标准运输，通常单程需要的时间不超过一周。
+ 在印度，Snow 设备将在一到七天内送达。
+ 在美国，您可以享受次日达和隔日达。
类型：字符串  
有效值：`SECOND_DAY | NEXT_DAY | EXPRESS | STANDARD`  
是否必需：是

 ** [SnowballCapacityPreference](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-SnowballCapacityPreference"></a>
如果您的作业是在美国某个地区创建的，则可以选择为该作业指定您想要的 Snow 设备尺寸。在所有其他地区，Snowball 的存储容量为 80 TB。  
有关 Snowball Edge 设备类型的信息，请参阅《Snowball Edge 开发者指南》中的[设备硬件信息](/snowball/latest/developer-guide/device-differences.html)。  
类型：字符串  
有效值：`T50 | T80 | T100 | T42 | T98 | T8 | T14 | T32 | NoPreference | T240 | T13`  
必需：否

 ** [SnowballType](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-SnowballType"></a>
用于此集群的 Snow 系列设备的类型。  
对于集群作业， AWS Snowball Edge 目前仅支持该`EDGE`设备类型。
有关 Snowball Edge 设备类型的信息，请参阅《Snowball Edge 开发者指南》中的[设备硬件信息](https://docs.aws.amazon.com/snowball/latest/developer-guide/device-differences.html)。  
类型：字符串  
有效值：`STANDARD | EDGE | EDGE_C | EDGE_CG | EDGE_S | SNC1_HDD | SNC1_SSD | V3_5C | V3_5S | RACK_5U_C`  
是否必需：是

 ** [TaxDocuments](#API_CreateCluster_RequestSyntax) **   <a name="Snowball-CreateCluster-request-TaxDocuments"></a>
您所需要的税务文件 AWS 区域。  
类型：[TaxDocuments](API_TaxDocuments.md) 对象  
必需：否

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

```
{
   "ClusterId": "string",
   "JobListEntries": [ 
      { 
         "CreationDate": number,
         "Description": "string",
         "IsMaster": boolean,
         "JobId": "string",
         "JobState": "string",
         "JobType": "string",
         "SnowballType": "string"
      }
   ]
}
```

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

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

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

 ** [ClusterId](#API_CreateCluster_ResponseSyntax) **   <a name="Snowball-CreateCluster-response-ClusterId"></a>
为集群自动生成的 ID。  
类型：字符串  
长度限制：固定长度为 39。  
模式：`CID[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`

 ** [JobListEntries](#API_CreateCluster_ResponseSyntax) **   <a name="Snowball-CreateCluster-response-JobListEntries"></a>
为此集群创建的作业列表。有关语法，请参阅本指南JobListEntries中的 [ListJobsResult\$1](https://amazonaws.com/snowball/latest/api-reference/API_ListJobs.html#API_ListJobs_ResponseSyntax)。  
类型：[JobListEntry](API_JobListEntry.md) 对象数组

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

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

 ** Ec2RequestFailedException **   
您的用户缺乏执行尝试操作所必需的 Amazon EC2 权限。  
HTTP 状态代码：400

 ** InvalidInputCombinationException **   
作业或集群创建失败。一个或多个输入无效。确认[CreateCluster:SnowballType](#Snowball-CreateCluster-request-SnowballType)值支持您的[CreateJob:JobType](API_CreateJob.md#Snowball-CreateJob-request-JobType)，然后重试。  
HTTP 状态代码：400

 ** InvalidResourceException **   
找不到指定的资源。请查看您在上次请求中提供的信息，然后重试。    
 ** ResourceType **   
提供的资源值无效。
HTTP 状态代码：400

 ** KMSRequestFailedException **   
提供的 AWS Key Management Service 密钥缺少执行指定[CreateJob](API_CreateJob.md)或[UpdateJob](API_UpdateJob.md)操作的权限。  
HTTP 状态代码：400

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

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