

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon Neptune API 的使用簡介
<a name="using-neptune-apis"></a>

Amazon Neptune 管理 API 會提供 SDK 支援，用於建立、管理和刪除 Neptune 資料庫叢集和執行個體，而 Neptune 資料 API 則會提供 SDK 支援，用於將資料載入圖形、執行查詢、取得圖形中資料的相關資訊，以及執行機器學習操作。這些 API 在所有 SDK 語言中皆可使用。透過自動簽署 API 請求，它們大幅簡化了將 Neptune 整合至應用程式的操作。

本頁面提供如何使用這些 API 的詳細資訊。

## 與其 Neptune 資料 API SDK 對應項目不同名稱的 IAM 動作
<a name="neptune-apis-shared-iam-actions"></a>

當您在已啟用 IAM 身分驗證的叢集上呼叫 Neptune API 方法時，您必須將 IAM 政策附加到進行呼叫的使用者或角色，此政策為您想要進行的動作提供許可。您可以使用對應的 [IAM 動作](iam-dp-actions.md)，在政策中設定這些許可。您也可以使用 [IAM 條件金鑰](iam-data-condition-keys.md)限制可以採取的動作。

大多數 IAM 動作與它們對應的 API 方法具有相同的名稱，但是資料 API 中的某些方法具有不同的名稱，因為有些名稱是由多個方法共用。下表列出資料方法及其對應的 IAM 動作：


| 資料 API 操作名稱 | IAM 對應關係 | 
| --- | --- | 
| [CancelGremlinQuery](https://docs.aws.amazon.com/neptune/latest/data-api/API_CancelGremlinQuery.html) (cancel\_gremlin\_query) | *動作：*`neptune-db:CancelQuery` | 
| [CancelLoaderJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_CancelLoaderJob.html) (cancel\_loader\_job) | *動作：*`neptune-db:CancelLoaderJob` | 
| [CancelMLDataProcessingJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_CancelMLDataProcessingJob.html) (cancel\_ml\_data\_processing\_job) | *動作：*`neptune-db:CancelMLDataProcessingJob` | 
| [CancelMLModelTrainingJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_CancelMLModelTrainingJob.html) (cancel\_ml\_model\_training\_job) | *動作：*`neptune-db:CancelMLModelTrainingJob` | 
| [CancelOpenCypherQuery](https://docs.aws.amazon.com/neptune/latest/data-api/API_CancelOpenCypherQuery.html) (cancel\_open\_cypher\_query) | *動作：*`neptune-db:CancelQuery` | 
| [CreateMLEndpoint](https://docs.aws.amazon.com/neptune/latest/data-api/API_CreateMLEndpoint.html) (create\_ml\_endpoint) | *動作：*`neptune-db:CreateMLEndpoint` | 
| [DeleteMLEndpoint](https://docs.aws.amazon.com/neptune/latest/data-api/API_DeleteMLEndpoint.html) (delete\_ml\_endpoint) | *動作：*`neptune-db:DeleteMLEndpoint` | 
| [DeletePropertygraphStatistics](https://docs.aws.amazon.com/neptune/latest/data-api/API_DeletePropertygraphStatistics) (delete\_propertygraph\_statistics) | *動作：*`neptune-db:DeleteStatistics` | 
| [DeleteSparqlStatistics](https://docs.aws.amazon.com/neptune/latest/data-api/API_DeleteSparqlStatistics) (delete\_sparql\_statistics) | *動作：*`neptune-db:DeleteStatistics` | 
| [ExecuteFastReset](https://docs.aws.amazon.com/neptune/latest/data-api/API_ExecuteFastReset) execute\_fast\_reset() | *動作：*`neptune-db:ResetDatabase` | 
| [ExecuteGremlinExplainQuery](https://docs.aws.amazon.com/neptune/latest/data-api/API_ExecuteGremlinExplainQuery) (execute\_gremlin\_explain\_query) | *動作:*[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/neptune/latest/userguide/using-neptune-apis.html)<br />*條件金鑰：*`neptune-db:QueryLanguage:Gremlin` | 
| [ExecuteGremlinProfileQuery](https://docs.aws.amazon.com/neptune/latest/data-api/API_ExecuteGremlinProfileQuery) (execute\_gremlin\_profile\_query) | *動作：*`neptune-db:ReadDataViaQuery`<br />*條件金鑰：*`neptune-db:QueryLanguage:Gremlin` | 
| [ExecuteGremlinQuery](https://docs.aws.amazon.com/neptune/latest/data-api/API_ExecuteGremlinQuery) (execute\_gremlin\_query) | *動作:*[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/neptune/latest/userguide/using-neptune-apis.html)<br />*條件金鑰：*`neptune-db:QueryLanguage:Gremlin` | 
| [ExecuteOpenCypherExplainQuery](https://docs.aws.amazon.com/neptune/latest/data-api/API_ExecuteOpenCypherExplainQuery) (execute\_open\_cypher\_explain\_query) | *動作：*`neptune-db:ReadDataViaQuery`<br />*條件金鑰：*`neptune-db:QueryLanguage:OpenCypher` | 
| [ExecuteOpenCypherQuery](https://docs.aws.amazon.com/neptune/latest/data-api/API_ExecuteOpenCypherQuery) (execute\_open\_cypher\_query) | *動作:*[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/neptune/latest/userguide/using-neptune-apis.html)<br />*條件金鑰：*`neptune-db:QueryLanguage:OpenCypher` | 
| [GetEngineStatus](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetEngineStatus.html) (get\_engine\_status) | *動作：*`neptune-db:GetEngineStatus` | 
| [GetGremlinQueryStatus](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetGremlinQueryStatus) (get\_gremlin\_query\_status) | *動作：*`neptune-db::GetQueryStatus`<br />*條件金鑰：*`neptune-db:QueryLanguage:Gremlin` | 
| [GetLoaderJobStatus](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetLoaderJobStatus.html) (get\_loader\_job\_status) | *動作：*`neptune-db:GetLoaderJobStatus` | 
| [GetMLDataProcessingJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetMLDataProcessingJob) (get\_ml\_data\_processing\_job) | *動作：*`neptune-db:GetMLDataProcessingJobStatus` | 
| [GetMLEndpoint](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetMLEndpoint) (get\_ml\_endpoint) | *動作：*`neptune-db:GetMLEndpointStatus` | 
| [GetMLModelTrainingJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetMLModelTrainingJob) (get\_ml\_model\_training\_job) | *動作：*`neptune-db:GetMLModelTrainingJobStatus` | 
| [GetMLModelTransformJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetMLModelTransformJob) (get\_ml\_model\_transform\_job) | *動作：*`neptune-db:GetMLModelTransformJobStatus` | 
| [GetOpenCypherQueryStatus](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetOpenCypherQueryStatus) (get\_open\_cypher\_query\_status) | *動作：*`neptune-db::GetQueryStatus`<br />*條件金鑰：*`neptune-db:QueryLanguage:OpenCypher` | 
| [GetPropertygraphStatistics](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetPropertygraphStatistics) (get\_propertygraph\_statistics) | *動作：*`neptune-db:GetStatisticsStatus` | `` | 
| [GetPropertygraphStream](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetPropertygraphStream) (get\_propertygraph\_stream) | *動作：*`neptune-db:GetStreamRecords`<br />*條件金鑰：*[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/neptune/latest/userguide/using-neptune-apis.html) | 
| [GetPropertygraphSummary](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetPropertygraphSummary) (get\_propertygraph\_summary) | *動作：*`neptune-db:GetGraphSummary` | 
| [GetRDFGraphSummary](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetRDFGraphSummary) (get\_rdf\_graph\_summary) | *動作：*`neptune-db:GetGraphSummary` | 
| [GetSparqlStatistics](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetSparqlStatistics) (get\_sparql\_statistics) | *動作：*`neptune-db:GetStatisticsStatus` | 
| [GetSparqlStream](https://docs.aws.amazon.com/neptune/latest/data-api/API_GetSparqlStream) (get\_sparql\_stream) | *動作：*`neptune-db::GetStreamRecords`<br />*條件金鑰：*`neptune-db:QueryLanguage:Sparql` | 
| [ListGremlinQueries](https://docs.aws.amazon.com/neptune/latest/data-api/API_ListGremlinQueries) (list\_gremlin\_queries) | *動作：*`neptune-db::GetQueryStatus`<br />*條件金鑰：*`neptune-db:QueryLanguage:Gremlin` | 
| [ListMLEndpoints](https://docs.aws.amazon.com/neptune/latest/data-api/API_ListMLEndpoints.html) (list\_ml\_endpoints) | *動作：*`neptune-db:ListMLEndpoints` | `` | 
| [ListMLModelTrainingJobs](https://docs.aws.amazon.com/neptune/latest/data-api/API_ListMLModelTrainingJobs.html) (list\_ml\_model\_training\_jobs) | *動作：*`neptune-db:ListMLModelTrainingJobs` | 
| [ListMLModelTransformJobs](https://docs.aws.amazon.com/neptune/latest/data-api/API_ListMLModelTransformJobs.html) (list\_ml\_model\_transform\_jobs) | *動作：*`neptune-db:ListMLModelTransformJobs` | 
| [ListOpenCypherQueries](https://docs.aws.amazon.com/neptune/latest/data-api/API_ListOpenCypherQueries) (list\_open\_cypher\_queries) | *動作：*`neptune-db::GetQueryStatus`<br />*條件金鑰：*`neptune-db:QueryLanguage:OpenCypher` | 
| [ManagePropertygraphStatistics](https://docs.aws.amazon.com/neptune/latest/data-api/API_ManagePropertygraphStatistics) (manage\_propertygraph\_statistics) | *動作：*`neptune-db:ManageStatistics` | 
| [ManageSparqlStatistics](https://docs.aws.amazon.com/neptune/latest/data-api/API_ManageSparqlStatistics) (manage\_sparql\_statistics) | *動作：*`neptune-db:ManageStatistics` | 
| [StartLoaderJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_StartLoaderJob.html) (start\_loader\_job) | *動作：*`neptune-db:StartLoaderJob` | 
| [StartMLModelDataProcessingJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_StartMLModelDataProcessingJob.html) (start\_ml\_data\_processing\_job) | *動作：*`neptune-db:StartMLModelDataProcessingJob` | 
| [StartMLModelTrainingJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_StartMLModelTrainingJob.html) (start\_ml\_model\_training\_job) | *動作：*`neptune-db:StartMLModelTrainingJob` | 
| [StartMLModelTransformJob](https://docs.aws.amazon.com/neptune/latest/data-api/API_StartMLModelTransformJob.html) (start\_ml\_model\_transform\_job) | *動作：*`neptune-db:StartMLModelTransformJob` | 