

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

# 使用 Gremlin 访问 Neptune 图形
<a name="access-graph-gremlin"></a>

亚马逊 Neptune 与 Apach TinkerPop e 和 Gremlin 兼容。这意味着您可以连接到 Neptune 数据库实例并使用 Gremlin 遍历语言来查询图表（参见 Apache 文档中的图[表](https://tinkerpop.apache.org/docs/current/reference/#graph)）。 TinkerPop 有关 Gremlin 的 Neptune 实施的差异，请参阅[Gremlin 标准合规性](access-graph-gremlin-differences.md)。

 Gremlin 中的*遍历* 是一系列连环步骤。它开始于顶点（或边缘）。它通过依次按照每个顶点的传出边缘，然后按接下来这些顶点的传出边缘来遍历图形。每个步骤都是遍历中的一个操作。有关更多信息，请参阅[文档中的遍历](https://tinkerpop.apache.org/docs/current/reference/#traversal)。 TinkerPop 

不同的 Neptune 引擎版本支持不同的 Gremlin 版本。查看你正在运行的 Neptune 版本的[引擎发布页面](engine-releases.md)，确定它支持哪个 Gremlin 版本，或者参阅下表，其中列出了不同 Neptune 引擎版本支持的最早和最新版本： TinkerPop 


| Neptune 引擎版本 | 最低 TinkerPop 版本 | 最大 TinkerPop 版本 | 
| --- | --- | --- | 
| `1.3.2.0 and newer` | `3.7.1` | `3.7.3` | 
| `1.3.1.0` | `3.6.2` | `3.6.5` | 
| `1.3.0.0` | `3.6.2` | `3.6.4` | 
| `1.2.1.0 <= 1.2.1.2` | `3.6.2` | `3.6.2` | 
| `1.1.1.0 <= 1.2.0.2` | `3.5.5` | `3.5.6` | 
| `1.1.0.0 and older` | `(deprecated)` | `(deprecated)` | 

TinkerPop 客户端通常在一个系列中向后兼容（例如`3.6.x`，或`3.7.x`），虽然它们通常可以跨越这些界限，但上表推荐了版本组合，以获得最佳体验和兼容性。除非另有建议，否则通常最好遵守这些准则并升级客户端应用程序以匹配 TinkerPop 您正在使用的版本。

升级 TinkerPop 版本时，务必TinkerPop参考[升级文档，该文档](http://tinkerpop.apache.org/docs/current/upgrade/)将帮助您确定可以利用的新功能，以及您在接近升级时可能需要注意的问题。除非有人特别指出需要考虑的问题，否则您通常应该期望现有的查询和功能在升级后能够正常工作。最后，请务必注意，如果您升级的版本具有新功能，则如果该版本晚于 Neptune 支持的版本，则可能无法使用该版本。

Gremlin 语言有多个变体，并支持采用多种编程语言进行 Gremlin 访问。有关更多信息，请参阅文档中的 [“关于 Gremlin 语言变体](https://tinkerpop.apache.org/docs/current/reference/#gremlin-drivers-variants)” TinkerPop 。

本文档介绍如何使用以下变体和编程语言访问 Neptune：
+ [设置 Gremlin 控制台以连接到 Neptune 数据库实例](access-graph-gremlin-console.md)
+ [使用 HTTPS REST 端点连接到 Neptune 数据库实例](access-graph-gremlin-rest.md)
+ [要与 Amazon Neptune 结合使用的基于 Java 的 Gremlin 客户端](access-graph-gremlin-client.md)
+ [使用 Python 连接到 Neptune 数据库实例](access-graph-gremlin-python.md)
+ [使用 .NET 连接到 Neptune 数据库实例](access-graph-gremlin-dotnet.md)
+ [使用 Node.js 连接到 Neptune 数据库实例](access-graph-gremlin-node-js.md)
+ [使用 Go 连接到 Neptune 数据库实例](access-graph-gremlin-go.md)

如中所述[使用 SSL/HTTPS 加密与 Amazon Neptune 数据库的连接](security-ssl.md)，在所有区域连接到 Neptune 时，必须使用传输层 Security/Secure 套接字层 (TLS/SSL)。 AWS 

在开始之前，您必须具有以下内容：
+ 一个 Neptune 数据库实例。有关创建 Neptune 数据库实例的信息，请参阅[创建 Amazon Neptune 集群](get-started-create-cluster.md)。
+ 与 Neptune 数据库实例位于同一虚拟私有云 (VPC) 中的 Amazon EC2 实例。

有关将数据加载到 Neptune 中的更多信息，包括先决条件、加载格式和加载参数，请参阅[将数据加载到 Amazon Neptune 中](load-data.md)。

**Topics**
+ [设置 Gremlin 控制台以连接到 Neptune 数据库实例](access-graph-gremlin-console.md)
+ [使用 HTTPS REST 端点连接到 Neptune 数据库实例](access-graph-gremlin-rest.md)
+ [要与 Amazon Neptune 结合使用的基于 Java 的 Gremlin 客户端](access-graph-gremlin-client.md)
+ [使用 Python 连接到 Neptune 数据库实例](access-graph-gremlin-python.md)
+ [使用 .NET 连接到 Neptune 数据库实例](access-graph-gremlin-dotnet.md)
+ [使用 Node.js 连接到 Neptune 数据库实例](access-graph-gremlin-node-js.md)
+ [使用 Go 连接到 Neptune 数据库实例](access-graph-gremlin-go.md)
+ [使用 AWS SDK 运行 Gremlin 查询](access-graph-gremlin-sdk.md)
+ [Gremlin 查询提示](gremlin-query-hints.md)
+ [Gremlin 查询状态 API](gremlin-api-status.md)
+ [Gremlin 查询取消](gremlin-api-status-cancel.md)
+ [对基于 Gremlin 脚本的会话的支持](access-graph-gremlin-sessions.md)
+ [Neptune 中的 Gremlin 事务](access-graph-gremlin-transactions.md)
+ [使用 Gremlin 直播查询结果](access-graph-gremlin-streaming.md)
+ [将 Gremlin API 与 Amazon Neptune 结合使用](gremlin-api-reference.md)
+ [在 Amazon Neptune Gremlin 中缓存查询结果](gremlin-results-cache.md)
+ [使用 Gremlin `mergeV()` 和 `mergeE()` 步骤进行高效的更新插入](gremlin-efficient-upserts.md)
+ [使用 `fold()/coalesce()/unfold()` 进行高效的 Gremlin 更新插入](gremlin-efficient-upserts-pre-3.6.md)
+ [使用 Gremlin `explain` 分析 Neptune 查询执行](gremlin-explain.md)
+ [在 Neptune DFE 查询引擎中使用 Gremlin](gremlin-with-dfe.md)