

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

# Neptune ML 数据处理 API
<a name="data-api-dp-ml-data-processing"></a>

**数据处理操作：**
+ [StartMLDataProcessingJob（操作）](#StartMLDataProcessingJob)
+ [ListMLDataProcessingJobs（操作）](#ListMLDataProcessingJobs)
+ [GetMLDataProcessingJob（操作）](#GetMLDataProcessingJob)
+ [CancelMLDataProcessingJob（操作）](#CancelMLDataProcessingJob)

**ML 通用结构：**
+ [MlResourceDefinition（结构）](#MlResourceDefinition)
+ [MlConfigDefinition（结构）](#MlConfigDefinition)

## StartMLDataProcessingJob（操作）
<a name="StartMLDataProcessingJob"></a>

         此 API 的 AWS CLI 名称为：`start-ml-data-processing-job`。

创建新的 Neptune ML 数据处理任务，用于处理从 Neptune 导出的用于训练的图形数据。请参阅 [`dataprocessing` 命令](https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning-api-dataprocessing.html)。

在启用了 IAM 身份验证的 Neptune 集群中调用此操作时，发出请求的 IAM 用户或角色必须附加允许在该集群中执行 [neptune-db:StartMLModelDataProcessingJob](https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#startmlmodeldataprocessingjob) IAM 操作的策略。

**请求**
+ **configFileName**（在 CLI 中：`--config-file-name`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  描述如何加载导出的图形数据进行训练的数据规范文件。该文件由 Neptune 导出工具包自动生成。默认值为 `training-data-configuration.json`。
+ **id**（在 CLI 中：`--id`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  新任务的唯一标识符。默认值为自动生成的 UUID。
+ **inputDataS3Location**（在 CLI 中：`--input-data-s3-location`）– *必需：*一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  您希望 SageMaker 下载运行数据处理任务所需数据的 Amazon S3 位置的 URI。
+ **modelType**（在 CLI 中：`--model-type`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  Neptune ML 当前支持的两种模型类型之一：异构图模型 (`heterogeneous`) 和知识图谱 (`kge`)。默认值为“无”。如果未指定，Neptune ML 会根据数据自动选择模型类型。
+ **neptuneIamRoleArn**（在 CLI 中：`--neptune-iam-role-arn`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  SageMaker 可以代表您执行任务的 IAM 角色的 Amazon 资源名称 (ARN)。必须将其列在您的数据库集群参数组中，否则将发生错误。
+ **previousDataProcessingJobId**（在 CLI 中：`--previous-data-processing-job-id`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  在较早版本的数据上运行的已完成数据处理任务的任务 ID。
+ **processedDataS3Location**（在 CLI 中：`--processed-data-s3-location`）– *必需：*一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  您希望 SageMaker 保存数据处理任务结果的 Amazon S3 位置的 URI。
+ **processingInstanceType**（在 CLI 中：`--processing-instance-type`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  数据处理期间使用的机器学习实例的类型。它的内存应该足够大，可以容纳处理后的数据集。默认为最小的 ml.r5 类型，其内存比磁盘上导出的图形数据大小大十倍。
+ **processingInstanceVolumeSizeInGB**（在 CLI 中：`--processing-instance-volume-size-in-gb`）– 一个整数，类型为：`integer`（带符号的 32 位整数）。

  处理实例的磁盘卷大小。输入数据和处理后的数据都存储在磁盘上，因此卷大小必须足够大，以容纳两个数据集。默认值是 0。如果未指定或为 0，则 Neptune ML 会根据数据大小自动选择卷大小。
+ **processingTimeOutInSeconds**（在 CLI 中：`--processing-time-out-in-seconds`）– 一个整数，类型为：`integer`（带符号的 32 位整数）。

  数据处理任务的超时（以秒为单位）。默认值为 86400（1 天）。
+ **s3OutputEncryptionKMSKey**（在 CLI 中：`--s-3-output-encryption-kms-key`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  SageMaker 用于加密处理任务的输出的 Amazon Key Management Service（Amazon KMS）密钥。默认值为“无”。
+ **sagemakerIamRoleArn**（在 CLI 中：`--sagemaker-iam-role-arn`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  用于执行 SageMaker 的 IAM 角色的 ARN。必须将其列在您的数据库集群参数组中，否则将发生错误。
+ **securityGroupIds**（在 CLI 中：`--security-group-ids`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  VPC 安全组 ID。默认值为 None (无)。
+ **subnets**（在 CLI 中：`--subnets`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  Neptune VPC 中子网的 ID。默认值为 None (无)。
+ **volumeEncryptionKMSKey**（在 CLI 中：`--volume-encryption-kms-key`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  Amazon Key Management Service (Amazon KMS) 密钥，SageMaker 使用它来加密连接到运行训练任务的 ML 计算实例的存储卷上的数据。默认值为 None (无)。

**响应**
+ **arn** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  数据处理任务的 ARN。
+ **creationTimeInMillis** – 长整型，类型为：`long`（有符号的 64 位整数）。

  创建新的处理任务所花费的时间，以毫秒为单位。
+ **id** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  新数据处理任务的唯一 ID。

**错误**
+ [UnsupportedOperationException](data-api-dp-errors.md#UnsupportedOperationException)
+ [BadRequestException](data-api-dp-errors.md#BadRequestException)
+ [MLResourceNotFoundException](data-api-dp-errors.md#MLResourceNotFoundException)
+ [InvalidParameterException](data-api-dp-errors.md#InvalidParameterException)
+ [ClientTimeoutException](data-api-dp-errors.md#ClientTimeoutException)
+ [PreconditionsFailedException](data-api-dp-errors.md#PreconditionsFailedException)
+ [ConstraintViolationException](data-api-dp-errors.md#ConstraintViolationException)
+ [InvalidArgumentException](data-api-dp-errors.md#InvalidArgumentException)
+ [MissingParameterException](data-api-dp-errors.md#MissingParameterException)
+ [IllegalArgumentException](data-api-dp-errors.md#IllegalArgumentException)
+ [TooManyRequestsException](data-api-dp-errors.md#TooManyRequestsException)

## ListMLDataProcessingJobs（操作）
<a name="ListMLDataProcessingJobs"></a>

         此 API 的 AWS CLI 名称为：`list-ml-data-processing-jobs`。

返回 Neptune ML 数据处理任务的列表。请参阅[使用 Neptune ML 数据处理命令列出处于活动状态的数据处理任务](https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning-api-dataprocessing.html#machine-learning-api-dataprocessing-list-jobs)。

在启用了 IAM 身份验证的 Neptune 集群中调用此操作时，发出请求的 IAM 用户或角色必须附加允许在该集群中执行 [neptune-db:ListMLDataProcessingJobs](https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#listmldataprocessingjobs) IAM 操作的策略。

**请求**
+ **maxItems**（在 CLI 中：`--max-items`）– ListMLDataProcessingJobsInputMaxItemsInteger，类型为：`integer`（带符号的 32 位整数），不小于 1 或大于 1024。

  要返回的最大项目数（从 1 到 1024；默认值为 10）。
+ **neptuneIamRoleArn**（在 CLI 中：`--neptune-iam-role-arn`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  向 Neptune 提供对 SageMaker 和 Amazon S3 资源的访问权限的 IAM 角色的 ARN。必须将其列在您的数据库集群参数组中，否则将发生错误。

**响应**
+ **ids** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  列出数据处理任务 ID 的页面。

**错误**
+ [UnsupportedOperationException](data-api-dp-errors.md#UnsupportedOperationException)
+ [BadRequestException](data-api-dp-errors.md#BadRequestException)
+ [MLResourceNotFoundException](data-api-dp-errors.md#MLResourceNotFoundException)
+ [InvalidParameterException](data-api-dp-errors.md#InvalidParameterException)
+ [ClientTimeoutException](data-api-dp-errors.md#ClientTimeoutException)
+ [PreconditionsFailedException](data-api-dp-errors.md#PreconditionsFailedException)
+ [ConstraintViolationException](data-api-dp-errors.md#ConstraintViolationException)
+ [InvalidArgumentException](data-api-dp-errors.md#InvalidArgumentException)
+ [MissingParameterException](data-api-dp-errors.md#MissingParameterException)
+ [IllegalArgumentException](data-api-dp-errors.md#IllegalArgumentException)
+ [TooManyRequestsException](data-api-dp-errors.md#TooManyRequestsException)

## GetMLDataProcessingJob（操作）
<a name="GetMLDataProcessingJob"></a>

         此 API 的 AWS CLI 名称为：`get-ml-data-processing-job`。

检索有关指定的数据处理任务的信息。请参阅 [`dataprocessing` 命令](https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning-api-dataprocessing.html)。

在启用了 IAM 身份验证的 Neptune 集群中调用此操作时，发出请求的 IAM 用户或角色必须附加允许在该集群中执行 [neptune-db:neptune-db:GetMLDataProcessingJobStatus](https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#getmldataprocessingjobstatus) IAM 操作的策略。

**请求**
+ **id**（在 CLI 中：`--id`）– *必需：*一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  要检索的数据处理任务的唯一标识符。
+ **neptuneIamRoleArn**（在 CLI 中：`--neptune-iam-role-arn`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  向 Neptune 提供对 SageMaker 和 Amazon S3 资源的访问权限的 IAM 角色的 ARN。必须将其列在您的数据库集群参数组中，否则将发生错误。

**响应**
+ **id** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  此数据处理任务的唯一标识符。
+ **processingJob** – 一个 [MlResourceDefinition](#MlResourceDefinition) 对象。

  数据处理任务的定义。
+ **status** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  数据处理任务的状态。

**错误**
+ [UnsupportedOperationException](data-api-dp-errors.md#UnsupportedOperationException)
+ [BadRequestException](data-api-dp-errors.md#BadRequestException)
+ [MLResourceNotFoundException](data-api-dp-errors.md#MLResourceNotFoundException)
+ [InvalidParameterException](data-api-dp-errors.md#InvalidParameterException)
+ [ClientTimeoutException](data-api-dp-errors.md#ClientTimeoutException)
+ [PreconditionsFailedException](data-api-dp-errors.md#PreconditionsFailedException)
+ [ConstraintViolationException](data-api-dp-errors.md#ConstraintViolationException)
+ [InvalidArgumentException](data-api-dp-errors.md#InvalidArgumentException)
+ [MissingParameterException](data-api-dp-errors.md#MissingParameterException)
+ [IllegalArgumentException](data-api-dp-errors.md#IllegalArgumentException)
+ [TooManyRequestsException](data-api-dp-errors.md#TooManyRequestsException)

## CancelMLDataProcessingJob（操作）
<a name="CancelMLDataProcessingJob"></a>

         此 API 的 AWS CLI 名称为：`cancel-ml-data-processing-job`。

取消 Neptune ML 数据处理任务。请参阅 [`dataprocessing` 命令](https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning-api-dataprocessing.html)。

在启用了 IAM 身份验证的 Neptune 集群中调用此操作时，发出请求的 IAM 用户或角色必须附加允许在该集群中执行 [neptune-db:CancelMLDataProcessingJob](https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#cancelmldataprocessingjob) IAM 操作的策略。

**请求**
+ **clean**（在 CLI 中：`--clean`）– 一个布尔值，类型为：`boolean` [布尔值（true 或 false）]。

  如果设置为 `TRUE`，则此标志指定在任务停止时应删除所有 Neptune ML S3 构件。默认值为 `FALSE`。
+ **id**（在 CLI 中：`--id`）– *必需：*一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  数据处理任务的唯一标识符。
+ **neptuneIamRoleArn**（在 CLI 中：`--neptune-iam-role-arn`）– 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  向 Neptune 提供对 SageMaker 和 Amazon S3 资源的访问权限的 IAM 角色的 ARN。必须将其列在您的数据库集群参数组中，否则将发生错误。

**响应**
+ **status** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  取消请求的状态。

**错误**
+ [UnsupportedOperationException](data-api-dp-errors.md#UnsupportedOperationException)
+ [BadRequestException](data-api-dp-errors.md#BadRequestException)
+ [MLResourceNotFoundException](data-api-dp-errors.md#MLResourceNotFoundException)
+ [InvalidParameterException](data-api-dp-errors.md#InvalidParameterException)
+ [ClientTimeoutException](data-api-dp-errors.md#ClientTimeoutException)
+ [PreconditionsFailedException](data-api-dp-errors.md#PreconditionsFailedException)
+ [ConstraintViolationException](data-api-dp-errors.md#ConstraintViolationException)
+ [InvalidArgumentException](data-api-dp-errors.md#InvalidArgumentException)
+ [MissingParameterException](data-api-dp-errors.md#MissingParameterException)
+ [IllegalArgumentException](data-api-dp-errors.md#IllegalArgumentException)
+ [TooManyRequestsException](data-api-dp-errors.md#TooManyRequestsException)

## *ML 通用结构：*
<a name="data-api-dp-ml-data-processing-ml-general-purpose-structures-spacer"></a>

## MlResourceDefinition（结构）
<a name="MlResourceDefinition"></a>

定义 Neptune ML 资源。

**Fields**
+ **arn** – 这是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  资源 ARN。
+ **cloudwatchLogUrl** – 这是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  资源的 CloudWatch 日志 URL。
+ **failureReason** – 这是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  发生故障时的故障原因。
+ **name** – 这是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  资源名称。
+ **outputLocation** – 这是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  输出位置。
+ **status** – 这是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  资源状态。

## MlConfigDefinition（结构）
<a name="MlConfigDefinition"></a>

包含 Neptune ML 配置。

**Fields**
+ **arn** – 这是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  配置的 ARN。
+ **name** – 这是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  配置名称。