AWS.NeptuneGraph reference
CancelExportTask
Section titled “CancelExportTask”Source:
src/AWS/NeptuneGraph/CancelExportTask.ts
Runtime binding for the CancelExportTask operation (IAM action neptune-graph:CancelExportTask).
Cancels a running export task by id. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.CancelExportTaskHttp).
CancelExportTask: Importing and Exporting Data
Section titled “CancelExportTask: Importing and Exporting Data”const cancelExport = yield* NeptuneGraph.CancelExportTask();
yield* cancelExport({ taskIdentifier });CancelImportTask
Section titled “CancelImportTask”Source:
src/AWS/NeptuneGraph/CancelImportTask.ts
Runtime binding for the CancelImportTask operation (IAM action neptune-graph:CancelImportTask).
Cancels a running import task by id. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.CancelImportTaskHttp).
CancelImportTask: Importing and Exporting Data
Section titled “CancelImportTask: Importing and Exporting Data”const cancelImport = yield* NeptuneGraph.CancelImportTask();
yield* cancelImport({ taskIdentifier });CancelQuery
Section titled “CancelQuery”Source:
src/AWS/NeptuneGraph/CancelQuery.ts
Runtime binding for the CancelQuery operation (IAM action neptune-graph:CancelQuery),
scoped to one Graph.
Cancels a query running on the bound graph by its query id — e.g. kill a runaway openCypher traversal found via ListQueries. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.CancelQueryHttp).
CancelQuery: Managing Queries
Section titled “CancelQuery: Managing Queries”const cancelQuery = yield* NeptuneGraph.CancelQuery(graph);
yield* cancelQuery({ queryId });CreateGraphSnapshot
Section titled “CreateGraphSnapshot”Source:
src/AWS/NeptuneGraph/CreateGraphSnapshot.ts
Runtime binding for the CreateGraphSnapshot operation (IAM actions neptune-graph:CreateGraphSnapshot + neptune-graph:TagResource),
scoped to one Graph.
Takes an on-demand snapshot of the bound graph — e.g. a pre-import backup from an operational Lambda. Snapshot creation is asynchronous; poll it with GetGraphSnapshot. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.CreateGraphSnapshotHttp).
CreateGraphSnapshot: Managing Snapshots
Section titled “CreateGraphSnapshot: Managing Snapshots”const createSnapshot = yield* NeptuneGraph.CreateGraphSnapshot(graph);
const snapshot = yield* createSnapshot({ snapshotName: "pre-import" });// snapshot.status → "CREATING"DeleteGraphSnapshot
Section titled “DeleteGraphSnapshot”Source:
src/AWS/NeptuneGraph/DeleteGraphSnapshot.ts
Runtime binding for the DeleteGraphSnapshot operation (IAM action neptune-graph:DeleteGraphSnapshot).
Deletes a graph snapshot by id — e.g. a retention Lambda pruning old backups found via ListGraphSnapshots. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.DeleteGraphSnapshotHttp).
DeleteGraphSnapshot: Managing Snapshots
Section titled “DeleteGraphSnapshot: Managing Snapshots”const deleteSnapshot = yield* NeptuneGraph.DeleteGraphSnapshot();
yield* deleteSnapshot({ snapshotIdentifier });ExecuteQuery
Section titled “ExecuteQuery”Source:
src/AWS/NeptuneGraph/ExecuteQuery.ts
Runtime binding for neptune-graph:ExecuteQuery — run an openCypher query
against a Neptune Analytics Graph.
Bind this operation to a Graph inside a function runtime to get a
callable that automatically injects the graph identifier and grants the
data-plane query actions (ReadDataViaQuery, WriteDataViaQuery,
DeleteDataViaQuery) on the graph.
The response payload is a streaming body — collect it to parse the JSON
result document.
ExecuteQuery: Querying a Graph
Section titled “ExecuteQuery: Querying a Graph”Run an openCypher query
const executeQuery = yield* AWS.NeptuneGraph.ExecuteQuery(graph);
const response = yield* executeQuery({ queryString: "MATCH (n) RETURN count(n) AS nodes", language: "OPEN_CYPHER",});const body = yield* Stream.mkString( Stream.decodeText(response.payload),);const { results } = JSON.parse(body);Write data with parameters
yield* executeQuery({ queryString: "CREATE (n:Person {name: $name})", language: "OPEN_CYPHER", parameters: { name: "Ada" },});GetExportTask
Section titled “GetExportTask”Source:
src/AWS/NeptuneGraph/GetExportTask.ts
Runtime binding for the GetExportTask operation (IAM action neptune-graph:GetExportTask).
Reads one export task by id — status, progress percentage, and exported-record counts. Task ids are server-generated runtime data. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.GetExportTaskHttp).
GetExportTask: Importing and Exporting Data
Section titled “GetExportTask: Importing and Exporting Data”const getExportTask = yield* NeptuneGraph.GetExportTask();
const task = yield* getExportTask({ taskIdentifier });// task.status → "SUCCEEDED"GetGraphSnapshot
Section titled “GetGraphSnapshot”Source:
src/AWS/NeptuneGraph/GetGraphSnapshot.ts
Runtime binding for the GetGraphSnapshot operation (IAM action neptune-graph:GetGraphSnapshot).
Reads one graph snapshot by id — status, source graph, and encryption key. Snapshot ids are server-generated runtime data, so the grant spans the account’s snapshots. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.GetGraphSnapshotHttp).
GetGraphSnapshot: Managing Snapshots
Section titled “GetGraphSnapshot: Managing Snapshots”const getSnapshot = yield* NeptuneGraph.GetGraphSnapshot();
const snapshot = yield* getSnapshot({ snapshotIdentifier });// snapshot.status → "AVAILABLE"GetGraphSummary
Section titled “GetGraphSummary”Source:
src/AWS/NeptuneGraph/GetGraphSummary.ts
Runtime binding for the GetGraphSummary operation (IAM action neptune-graph:GetGraphSummary),
scoped to one Graph.
Reads the data summary of the bound graph — node/edge counts, labels, and (in DETAILED mode) per-label structure. Cheap way to sanity-check a load or drive dashboards without running a query. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.GetGraphSummaryHttp).
GetGraphSummary: Inspecting a Graph
Section titled “GetGraphSummary: Inspecting a Graph”const getSummary = yield* NeptuneGraph.GetGraphSummary(graph);
const summary = yield* getSummary({ mode: "BASIC" });// summary.graphSummary?.numNodes, summary.graphSummary?.numEdgesGetImportTask
Section titled “GetImportTask”Source:
src/AWS/NeptuneGraph/GetImportTask.ts
Runtime binding for the GetImportTask operation (IAM action neptune-graph:GetImportTask).
Reads one import task by id — status, progress statistics, and parsed-record counts. Task ids are server-generated runtime data. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.GetImportTaskHttp).
GetImportTask: Importing and Exporting Data
Section titled “GetImportTask: Importing and Exporting Data”const getImportTask = yield* NeptuneGraph.GetImportTask();
const task = yield* getImportTask({ taskIdentifier });// task.status → "SUCCEEDED"GetQuery
Section titled “GetQuery”Source:
src/AWS/NeptuneGraph/GetQuery.ts
Runtime binding for the GetQuery operation (IAM action neptune-graph:GetQueryStatus),
scoped to one Graph.
Retrieves the status of a query running on the bound graph (IAM action neptune-graph:GetQueryStatus). Provide the implementation with
Effect.provide(AWS.NeptuneGraph.GetQueryHttp).
GetQuery: Managing Queries
Section titled “GetQuery: Managing Queries”const getQuery = yield* NeptuneGraph.GetQuery(graph);
const status = yield* getQuery({ queryId });// status.state → "RUNNING" | "WAITING" | "CANCELLING"Source:
src/AWS/NeptuneGraph/Graph.ts
An Amazon Neptune Analytics graph — a serverless, memory-optimized graph
that serves openCypher queries over an IAM-authenticated HTTPS endpoint.
Unlike classic Neptune, a graph with publicConnectivity: true needs no
VPC plumbing at all. Provisioning takes several minutes and the graph
bills per m-NCU-hour while it exists.
Mutable fields (provisionedMemory, publicConnectivity,
deletionProtection) are reconciled in place; immutable fields
(replicaCount, kmsKeyIdentifier, vectorSearchConfiguration) force a
replacement.
Graph: Creating a Graph
Section titled “Graph: Creating a Graph”const graph = yield* Graph("Knowledge", { provisionedMemory: 16, publicConnectivity: true, replicaCount: 0, deletionProtection: false,});Graph: Vector Search
Section titled “Graph: Vector Search”const graph = yield* Graph("Embeddings", { provisionedMemory: 16, vectorSearchConfiguration: { dimension: 1536 },});Graph: Querying
Section titled “Graph: Querying”const executeQuery = yield* AWS.NeptuneGraph.ExecuteQuery(graph);const result = yield* executeQuery({ queryString: "MATCH (n) RETURN count(n) AS n", language: "OPEN_CYPHER",});ListExportTasks
Section titled “ListExportTasks”Source:
src/AWS/NeptuneGraph/ListExportTasks.ts
Runtime binding for the ListExportTasks operation (IAM action neptune-graph:ListExportTasks),
scoped to one Graph.
Lists the export tasks of the bound graph. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.ListExportTasksHttp).
ListExportTasks: Importing and Exporting Data
Section titled “ListExportTasks: Importing and Exporting Data”const listExportTasks = yield* NeptuneGraph.ListExportTasks(graph);
const { tasks } = yield* listExportTasks();ListGraphSnapshots
Section titled “ListGraphSnapshots”Source:
src/AWS/NeptuneGraph/ListGraphSnapshots.ts
Runtime binding for the ListGraphSnapshots operation (IAM action neptune-graph:ListGraphSnapshots),
scoped to one Graph.
Lists the snapshots of the bound graph. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.ListGraphSnapshotsHttp).
ListGraphSnapshots: Managing Snapshots
Section titled “ListGraphSnapshots: Managing Snapshots”const listSnapshots = yield* NeptuneGraph.ListGraphSnapshots(graph);
const { graphSnapshots } = yield* listSnapshots();ListImportTasks
Section titled “ListImportTasks”Source:
src/AWS/NeptuneGraph/ListImportTasks.ts
Runtime binding for the ListImportTasks operation (IAM action neptune-graph:ListImportTasks).
Lists the account’s Neptune Analytics import tasks. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.ListImportTasksHttp).
ListImportTasks: Importing and Exporting Data
Section titled “ListImportTasks: Importing and Exporting Data”const listImportTasks = yield* NeptuneGraph.ListImportTasks();
const { tasks } = yield* listImportTasks();ListQueries
Section titled “ListQueries”Source:
src/AWS/NeptuneGraph/ListQueries.ts
Runtime binding for the ListQueries operation (IAM action neptune-graph:ListQueries),
scoped to one Graph.
Lists the openCypher queries currently active on the bound graph. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.ListQueriesHttp).
ListQueries: Managing Queries
Section titled “ListQueries: Managing Queries”const listQueries = yield* NeptuneGraph.ListQueries(graph);
const { queries } = yield* listQueries({ maxResults: 100 });ResetGraph
Section titled “ResetGraph”Source:
src/AWS/NeptuneGraph/ResetGraph.ts
Runtime binding for the ResetGraph operation (IAM action neptune-graph:ResetGraph),
scoped to one Graph.
Empties all data from the bound graph while keeping the graph itself (and optionally snapshotting first) — e.g. refresh a demo or staging dataset before a re-import. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.ResetGraphHttp).
ResetGraph: Resetting a Graph
Section titled “ResetGraph: Resetting a Graph”const resetGraph = yield* NeptuneGraph.ResetGraph(graph);
yield* resetGraph({ skipSnapshot: true });StartExportTask
Section titled “StartExportTask”Source:
src/AWS/NeptuneGraph/StartExportTask.ts
Runtime binding for the StartExportTask operation (IAM action neptune-graph:StartExportTask),
scoped to one Graph.
Exports the bound graph’s data to Amazon S3 (the graph must be AVAILABLE). The request passes Neptune Analytics a data-access role, so the grant includes iam:PassRole conditioned to neptune-graph.amazonaws.com. Poll progress with GetExportTask. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.StartExportTaskHttp).
StartExportTask: Importing and Exporting Data
Section titled “StartExportTask: Importing and Exporting Data”const startExport = yield* NeptuneGraph.StartExportTask(graph);
const task = yield* startExport({ destination: "s3://my-bucket/exports/", format: "PARQUET", kmsKeyIdentifier: key.keyArn, roleArn: exportRole.roleArn,});StartGraph
Section titled “StartGraph”Source:
src/AWS/NeptuneGraph/StartGraph.ts
Runtime binding for the StartGraph operation (IAM action neptune-graph:StartGraph),
scoped to one Graph.
Restarts the bound graph after it was stopped — m-NCU billing resumes and the graph transitions back to AVAILABLE. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.StartGraphHttp).
StartGraph: Starting and Stopping a Graph
Section titled “StartGraph: Starting and Stopping a Graph”const startGraph = yield* NeptuneGraph.StartGraph(graph);
const result = yield* startGraph();// result.status → transitioning toward AVAILABLEStartImportTask
Section titled “StartImportTask”Source:
src/AWS/NeptuneGraph/StartImportTask.ts
Runtime binding for the StartImportTask operation (IAM action neptune-graph:StartImportTask),
scoped to one Graph.
Starts a bulk import from Amazon S3 into the bound graph (the graph must be empty and AVAILABLE). The request passes Neptune Analytics a data-access role, so the grant includes iam:PassRole conditioned to neptune-graph.amazonaws.com. Poll progress with GetImportTask. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.StartImportTaskHttp).
StartImportTask: Importing and Exporting Data
Section titled “StartImportTask: Importing and Exporting Data”const startImport = yield* NeptuneGraph.StartImportTask(graph);
const task = yield* startImport({ source: "s3://my-bucket/graph-data/", format: "CSV", roleArn: importRole.roleArn,});// task.taskId, task.statusStopGraph
Section titled “StopGraph”Source:
src/AWS/NeptuneGraph/StopGraph.ts
Runtime binding for the StopGraph operation (IAM action neptune-graph:StopGraph),
scoped to one Graph.
Stops the bound graph to pause compute (m-NCU) billing while retaining data — e.g. a scheduler Lambda parking dev graphs overnight. Restart with StartGraph. Provide the implementation with
Effect.provide(AWS.NeptuneGraph.StopGraphHttp).
StopGraph: Starting and Stopping a Graph
Section titled “StopGraph: Starting and Stopping a Graph”const stopGraph = yield* NeptuneGraph.StopGraph(graph);
const result = yield* stopGraph();// result.status → "STOPPING"