

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

# Neptune 数据平面引擎、快速重置和通用结构 API
<a name="data-api-dp-environment-APIs"></a>

**引擎操作：**
+ [GetEngineStatus（操作）](#GetEngineStatus)
+ [ExecuteFastReset（操作）](#ExecuteFastReset)

**引擎操作结构：**
+ [QueryLanguageVersion（结构）](#QueryLanguageVersion)
+ [FastResetToken（结构）](#FastResetToken)

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

         此 API 的 Amazon CLI 名称为：`get-engine-status`。

检索主机上图形数据库的状态。

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

**请求**
+ *无请求参数。*

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

  设置为在数据库集群上运行的 Neptune 引擎版本。如果此引擎版本发布以来已手动安装补丁程序，则版本号添加前缀 `Patch-`。
+ **dfeQueryEngine** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  如果 DFE 引擎已完全启用，则设置为 `enabled`；或者如果 DFE 引擎仅用于 `useDFE` 查询提示设置为 `true` 的查询，则设置为 `viaQueryHint`（默认值）。
+ **features** – 它是键值对的映射数组，其中：

      每个键都是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

      每个值都是一个文档，类型为：`document`（由类似 JSON 的数据模型表示的与协议无关的开放内容）。

  包含有关在您的数据库集群上启用的特征的状态信息。
+ **gremlin** – 一个 [QueryLanguageVersion](#QueryLanguageVersion) 对象。

  包含有关您的集群上可用的 Gremlin 查询语言的信息。具体而言，它包含一个版本字段，用于指定引擎正在使用的当前 TinkerPop 版本。
+ **labMode** – 它是键值对的映射数组，其中：

      每个键都是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

      每个值都是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  包含引擎正在使用的实验室模式设置。
+ **opencypher** – 一个 [QueryLanguageVersion](#QueryLanguageVersion) 对象。

  包含有关您的集群上可用的 openCypher 查询语言的信息。具体而言，它包含一个版本字段，用于指定引擎正在使用的当前 OperCypher 版本。
+ **role** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  如果实例为只读副本，则设置为 `reader`；如果实例为主实例，则设置为 `writer`。
+ **rollingBackTrxCount** – 一个整数，类型为：`integer`（带符号的 32 位整数）。

  如果有事务正在回滚，则此字段将设置为此类事务的数量。如果没有，则该字段根本不会出现。
+ **rollingBackTrxEarliestStartTime** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  设置为正在回滚的最早事务的开始时间。如果没有回滚任何事务，则该字段根本不会出现。
+ **settings** – 它是键值对的映射数组，其中：

      每个键都是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

      每个值都是一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  包含有关数据库集群上的当前设置的信息。例如，包含当前集群查询超时设置（`clusterQueryTimeoutInMs`）。
+ **sparql** – 一个 [QueryLanguageVersion](#QueryLanguageVersion) 对象。

  包含有关您的集群上可用的 SPARQL 查询语言的信息。具体而言，它包含一个版本字段，用于指定引擎正在使用的当前 SPARQL 版本。
+ **startTime** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  设置为当前服务器进程启动的 UTC 时间。
+ **status** – 一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  如果实例没有遇到问题，则设置为 `healthy`。如果实例从崩溃中恢复或者进行了重启，并且最近一次服务器关闭时仍有活动的事务在运行，则状态设置为 `recovery`。

**错误**
+ [UnsupportedOperationException](data-api-dp-errors.md#UnsupportedOperationException)
+ [InternalFailureException](data-api-dp-errors.md#InternalFailureException)
+ [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)
+ [IllegalArgumentException](data-api-dp-errors.md#IllegalArgumentException)
+ [TooManyRequestsException](data-api-dp-errors.md#TooManyRequestsException)

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

         此 API 的 Amazon CLI 名称为：`execute-fast-reset`。

快速重置 REST API 允许您快速轻松地重置 Neptune 图形，同时移除其所有数据。

Neptune 快速重置是一个两步过程。首先，在 `action` 设置为 `initiateDatabaseReset` 的情况下调用 `ExecuteFastReset`。这将返回一个 UUID 令牌，然后在 `action` 设置为 `performDatabaseReset` 的情况下再次调用 `ExecuteFastReset` 时包含该令牌。请参阅[使用快速重置 API 清空 Amazon Neptune 数据库集群](https://docs.amazonaws.cn/neptune/latest/userguide/manage-console-fast-reset.html)。

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

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

  快速重置操作。下列值之一：
  + **`initiateDatabaseReset`** – 此操作会生成实际执行快速重置所需的唯一令牌。
  + **`performDatabaseReset`** – 此操作使用 `initiateDatabaseReset` 操作生成的令牌来实际执行快速重置。

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

  用于启动重置的快速重置令牌。

**响应**
+ **payload** – 一个 [FastResetToken](#FastResetToken) 对象。

  `payload` 仅由 `initiateDatabaseReset` 操作返回，并包含用于 `performDatabaseReset` 操作以实现重置的唯一令牌。
+ **status** – *必需：*一个字符串，类型为：`string`（UTF-8 编码的字符串）。

  `status` 仅针对 `performDatabaseReset` 操作返回，表示快速重置请求是否被接受。

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

## *引擎操作结构：*
<a name="data-api-dp-environment-APIs-engine-operation-structures-spacer"></a>

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

用于表达查询语言版本的结构。

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

  查询语言的版本。

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

包含用于启动快速重置的快速重置令牌的结构。

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

  由数据库在 `initiateDatabaseReset` 操作中生成的 UUID，然后 `performDatabaseReset` 使用它来重置数据库。