

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

# CreateJob
<a name="API_CreateJob"></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。

创建作业以在 Amazon S3 和您的本地数据中心之间导入或导出数据。要为 Snow 设备创建任务，您 AWS 账户 必须拥有正确的信任策略和权限。如果您要为集群中的节点创建作业，则只需提供 `clusterId` 值即可；其他作业属性继承自集群。

**注意**  
订购集群作业时，仅支持 Snowball Edge 设备类型。  
设备容量是可选的。  
设备类型的可用性因 AWS 区域而异。有关区域可用性的更多信息，请参阅 [AWS 区域服务](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/?p=ngi&loc=4)。



**Snow 系列设备及其容量。**
+ 设备类型：**V3\$15C** 
  + 容量：T32
  + 描述：Snowball Edge Compute Optimized

  
+ 设备类型：**V3\$15S** 
  + 容量：T240
  + 描述：Snowball Edge Storage Optimized (210TB)

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

```
{
   "AddressId": "string",
   "ClusterId": "string",
   "Description": "string",
   "DeviceConfiguration": { 
      "SnowconeDeviceConfiguration": { 
         "WirelessConnection": { 
            "IsWifiEnabled": boolean
         }
      }
   },
   "ForwardingAddressId": "string",
   "ImpactLevel": "string",
   "JobType": "string",
   "KmsKeyARN": "string",
   "LongTermPricingId": "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"
      }
   },
   "PickupDetails": { 
      "DevicePickupId": "string",
      "Email": "string",
      "IdentificationExpirationDate": number,
      "IdentificationIssuingOrg": "string",
      "IdentificationNumber": "string",
      "Name": "string",
      "PhoneNumber": "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_CreateJob_RequestParameters"></a>

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

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

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

 ** [ClusterId](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-ClusterId"></a>
集群的 ID。如果您要为集群中的节点创建作业，则只需提供此 `clusterId` 值。其他作业属性继承自集群。  
类型：字符串  
长度限制：固定长度为 39。  
模式：`CID[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`  
必需：否

 ** [Description](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-Description"></a>
定义此特定作业的可选描述，例如 `Important Photos 2016-08-11`。  
类型：字符串  
长度限制：最小长度为 1。长度上限为 1024。  
模式：`^[a-zA-Z0-9\s\-\_\.\:]+$`  
必需：否

 ** [DeviceConfiguration](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-DeviceConfiguration"></a>
定义 AWS Snowball Edge 任务的设备配置。  
有关 Snowball Edge 设备类型的信息，请参阅《Snowball Edge 开发者指南》中的[设备硬件信息](https://docs.aws.amazon.com/snowball/latest/developer-guide/device-differences.html)。  
类型：[DeviceConfiguration](API_DeviceConfiguration.md) 对象  
必需：否

 ** [ForwardingAddressId](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-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}`  
必需：否

 ** [ImpactLevel](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-ImpactLevel"></a>
作业创建时提供的将在设备上存储或处理的数据的最高影响等级。  
类型：字符串  
有效值：`IL2 | IL4 | IL5 | IL6 | IL99`  
必需：否

 ** [JobType](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-JobType"></a>
定义要创建的作业类型。  
类型：字符串  
有效值：`IMPORT | EXPORT | LOCAL_USE`  
必需：否

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

 ** [LongTermPricingId](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-LongTermPricingId"></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_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-Notification"></a>
为此作业定义 Amazon Simple Notification Service（Amazon SNS）通知设置。  
类型：[Notification](API_Notification.md) 对象  
必需：否

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

 ** [PickupDetails](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-PickupDetails"></a>
识别设备取货人员的信息。  
类型：[PickupDetails](API_PickupDetails.md) 对象  
必需：否

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

 ** [Resources](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-Resources"></a>
定义与此作业关联的 Amazon S3 存储桶。  
对于 `IMPORT` 作业，您可以指定要将传输的数据导入到哪个或哪些存储桶。  
对于 `EXPORT` 作业，您可以指定要从哪个或哪些存储桶导出传输的数据。您还可以选择性地指定 `KeyRange` 值。如果您选择导出范围，可以通过提供包含性的 `BeginMarker` 值和/或包含性的 `EndMarker` 值，定义范围的长度。范围按 UTF-8 二进制排序。  
类型：[JobResource](API_JobResource.md) 对象  
必需：否

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

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

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

 ** [SnowballType](#API_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-SnowballType"></a>
用于此作业的 Snow 系列设备类型。  
对于集群作业， AWS Snowball Edge 目前仅支持该`EDGE`设备类型。
用于此任务的 Sno AWS w 设备类型。目前，`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_CreateJob_RequestSyntax) **   <a name="Snowball-CreateJob-request-TaxDocuments"></a>
您所需要的税务文件 AWS 区域。  
类型：[TaxDocuments](API_TaxDocuments.md) 对象  
必需：否

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

```
{
   "JobId": "string"
}
```

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

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

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

 ** [JobId](#API_CreateJob_ResponseSyntax) **   <a name="Snowball-CreateJob-response-JobId"></a>
为作业自动生成的 ID，例如 `JID123e4567-e89b-12d3-a456-426655440000`。  
类型：字符串  
长度限制：固定长度为 39。  
模式：`(M|J)ID[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`

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

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

 ** ClusterLimitExceededException **   
作业创建失败。当前，集群支持五个节点。如果您的集群的节点少于五个，并且要为此集群创建更多节点，请重试并创建作业，直到您的集群恰好有五个节点。  
HTTP 状态代码：400

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

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

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

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

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

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