Skip to content

Commit b1650d4

Browse files
author
awstools
committed
feat(client-neptune-graph): Adding new APIs in SDK for Amazon Neptune Analytics. These APIs include operations to execute, cancel, list queries and get the graph summary.
1 parent 2093c17 commit b1650d4

36 files changed

+2950
-218
lines changed

clients/client-neptune-graph/README.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
AWS SDK for JavaScript NeptuneGraph Client for Node.js, Browser and React Native.
88

9-
<p>Neptune Analytics is a serverless in-memory graph database service for analytics
10-
that delivers high-performance analytics and real-time queries for any graph type. It
11-
complements the Amazon Neptune Database, an industry-leading managed graph database.</p>
9+
<p>Neptune Analytics is a new analytics database engine for Amazon Neptune that helps customers get to
10+
insights faster by quickly processing large amounts of graph data, invoking popular graph analytic
11+
algorithms in low-latency queries, and getting analytics results in seconds.</p>
1212

1313
## Installing
1414

@@ -212,6 +212,14 @@ CancelImportTask
212212

213213
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/CancelImportTaskCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/CancelImportTaskCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/CancelImportTaskCommandOutput/)
214214

215+
</details>
216+
<details>
217+
<summary>
218+
CancelQuery
219+
</summary>
220+
221+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/CancelQueryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/CancelQueryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/CancelQueryCommandOutput/)
222+
215223
</details>
216224
<details>
217225
<summary>
@@ -268,6 +276,14 @@ DeletePrivateGraphEndpoint
268276

269277
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/DeletePrivateGraphEndpointCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/DeletePrivateGraphEndpointCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/DeletePrivateGraphEndpointCommandOutput/)
270278

279+
</details>
280+
<details>
281+
<summary>
282+
ExecuteQuery
283+
</summary>
284+
285+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/ExecuteQueryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/ExecuteQueryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/ExecuteQueryCommandOutput/)
286+
271287
</details>
272288
<details>
273289
<summary>
@@ -284,6 +300,14 @@ GetGraphSnapshot
284300

285301
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/GetGraphSnapshotCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/GetGraphSnapshotCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/GetGraphSnapshotCommandOutput/)
286302

303+
</details>
304+
<details>
305+
<summary>
306+
GetGraphSummary
307+
</summary>
308+
309+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/GetGraphSummaryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/GetGraphSummaryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/GetGraphSummaryCommandOutput/)
310+
287311
</details>
288312
<details>
289313
<summary>
@@ -300,6 +324,14 @@ GetPrivateGraphEndpoint
300324

301325
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/GetPrivateGraphEndpointCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/GetPrivateGraphEndpointCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/GetPrivateGraphEndpointCommandOutput/)
302326

327+
</details>
328+
<details>
329+
<summary>
330+
GetQuery
331+
</summary>
332+
333+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/GetQueryCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/GetQueryCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/GetQueryCommandOutput/)
334+
303335
</details>
304336
<details>
305337
<summary>
@@ -332,6 +364,14 @@ ListPrivateGraphEndpoints
332364

333365
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/ListPrivateGraphEndpointsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/ListPrivateGraphEndpointsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/ListPrivateGraphEndpointsCommandOutput/)
334366

367+
</details>
368+
<details>
369+
<summary>
370+
ListQueries
371+
</summary>
372+
373+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/neptune-graph/command/ListQueriesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/ListQueriesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-neptune-graph/Interface/ListQueriesCommandOutput/)
374+
335375
</details>
336376
<details>
337377
<summary>

clients/client-neptune-graph/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"@smithy/util-defaults-mode-node": "^2.1.1",
5757
"@smithy/util-endpoints": "^1.1.1",
5858
"@smithy/util-retry": "^2.1.1",
59+
"@smithy/util-stream": "^2.1.1",
5960
"@smithy/util-utf8": "^2.1.1",
6061
"@smithy/util-waiter": "^2.1.1",
6162
"tslib": "^2.5.0"

clients/client-neptune-graph/src/NeptuneGraph.ts

Lines changed: 79 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
CancelImportTaskCommandInput,
88
CancelImportTaskCommandOutput,
99
} from "./commands/CancelImportTaskCommand";
10+
import { CancelQueryCommand, CancelQueryCommandInput, CancelQueryCommandOutput } from "./commands/CancelQueryCommand";
1011
import { CreateGraphCommand, CreateGraphCommandInput, CreateGraphCommandOutput } from "./commands/CreateGraphCommand";
1112
import {
1213
CreateGraphSnapshotCommand,
@@ -34,12 +35,22 @@ import {
3435
DeletePrivateGraphEndpointCommandInput,
3536
DeletePrivateGraphEndpointCommandOutput,
3637
} from "./commands/DeletePrivateGraphEndpointCommand";
38+
import {
39+
ExecuteQueryCommand,
40+
ExecuteQueryCommandInput,
41+
ExecuteQueryCommandOutput,
42+
} from "./commands/ExecuteQueryCommand";
3743
import { GetGraphCommand, GetGraphCommandInput, GetGraphCommandOutput } from "./commands/GetGraphCommand";
3844
import {
3945
GetGraphSnapshotCommand,
4046
GetGraphSnapshotCommandInput,
4147
GetGraphSnapshotCommandOutput,
4248
} from "./commands/GetGraphSnapshotCommand";
49+
import {
50+
GetGraphSummaryCommand,
51+
GetGraphSummaryCommandInput,
52+
GetGraphSummaryCommandOutput,
53+
} from "./commands/GetGraphSummaryCommand";
4354
import {
4455
GetImportTaskCommand,
4556
GetImportTaskCommandInput,
@@ -50,6 +61,7 @@ import {
5061
GetPrivateGraphEndpointCommandInput,
5162
GetPrivateGraphEndpointCommandOutput,
5263
} from "./commands/GetPrivateGraphEndpointCommand";
64+
import { GetQueryCommand, GetQueryCommandInput, GetQueryCommandOutput } from "./commands/GetQueryCommand";
5365
import { ListGraphsCommand, ListGraphsCommandInput, ListGraphsCommandOutput } from "./commands/ListGraphsCommand";
5466
import {
5567
ListGraphSnapshotsCommand,
@@ -66,6 +78,7 @@ import {
6678
ListPrivateGraphEndpointsCommandInput,
6779
ListPrivateGraphEndpointsCommandOutput,
6880
} from "./commands/ListPrivateGraphEndpointsCommand";
81+
import { ListQueriesCommand, ListQueriesCommandInput, ListQueriesCommandOutput } from "./commands/ListQueriesCommand";
6982
import {
7083
ListTagsForResourceCommand,
7184
ListTagsForResourceCommandInput,
@@ -88,21 +101,26 @@ import { NeptuneGraphClient, NeptuneGraphClientConfig } from "./NeptuneGraphClie
88101

89102
const commands = {
90103
CancelImportTaskCommand,
104+
CancelQueryCommand,
91105
CreateGraphCommand,
92106
CreateGraphSnapshotCommand,
93107
CreateGraphUsingImportTaskCommand,
94108
CreatePrivateGraphEndpointCommand,
95109
DeleteGraphCommand,
96110
DeleteGraphSnapshotCommand,
97111
DeletePrivateGraphEndpointCommand,
112+
ExecuteQueryCommand,
98113
GetGraphCommand,
99114
GetGraphSnapshotCommand,
115+
GetGraphSummaryCommand,
100116
GetImportTaskCommand,
101117
GetPrivateGraphEndpointCommand,
118+
GetQueryCommand,
102119
ListGraphsCommand,
103120
ListGraphSnapshotsCommand,
104121
ListImportTasksCommand,
105122
ListPrivateGraphEndpointsCommand,
123+
ListQueriesCommand,
106124
ListTagsForResourceCommand,
107125
ResetGraphCommand,
108126
RestoreGraphFromSnapshotCommand,
@@ -129,6 +147,17 @@ export interface NeptuneGraph {
129147
cb: (err: any, data?: CancelImportTaskCommandOutput) => void
130148
): void;
131149

150+
/**
151+
* @see {@link CancelQueryCommand}
152+
*/
153+
cancelQuery(args: CancelQueryCommandInput, options?: __HttpHandlerOptions): Promise<CancelQueryCommandOutput>;
154+
cancelQuery(args: CancelQueryCommandInput, cb: (err: any, data?: CancelQueryCommandOutput) => void): void;
155+
cancelQuery(
156+
args: CancelQueryCommandInput,
157+
options: __HttpHandlerOptions,
158+
cb: (err: any, data?: CancelQueryCommandOutput) => void
159+
): void;
160+
132161
/**
133162
* @see {@link CreateGraphCommand}
134163
*/
@@ -236,6 +265,17 @@ export interface NeptuneGraph {
236265
cb: (err: any, data?: DeletePrivateGraphEndpointCommandOutput) => void
237266
): void;
238267

268+
/**
269+
* @see {@link ExecuteQueryCommand}
270+
*/
271+
executeQuery(args: ExecuteQueryCommandInput, options?: __HttpHandlerOptions): Promise<ExecuteQueryCommandOutput>;
272+
executeQuery(args: ExecuteQueryCommandInput, cb: (err: any, data?: ExecuteQueryCommandOutput) => void): void;
273+
executeQuery(
274+
args: ExecuteQueryCommandInput,
275+
options: __HttpHandlerOptions,
276+
cb: (err: any, data?: ExecuteQueryCommandOutput) => void
277+
): void;
278+
239279
/**
240280
* @see {@link GetGraphCommand}
241281
*/
@@ -264,6 +304,20 @@ export interface NeptuneGraph {
264304
cb: (err: any, data?: GetGraphSnapshotCommandOutput) => void
265305
): void;
266306

307+
/**
308+
* @see {@link GetGraphSummaryCommand}
309+
*/
310+
getGraphSummary(
311+
args: GetGraphSummaryCommandInput,
312+
options?: __HttpHandlerOptions
313+
): Promise<GetGraphSummaryCommandOutput>;
314+
getGraphSummary(args: GetGraphSummaryCommandInput, cb: (err: any, data?: GetGraphSummaryCommandOutput) => void): void;
315+
getGraphSummary(
316+
args: GetGraphSummaryCommandInput,
317+
options: __HttpHandlerOptions,
318+
cb: (err: any, data?: GetGraphSummaryCommandOutput) => void
319+
): void;
320+
267321
/**
268322
* @see {@link GetImportTaskCommand}
269323
*/
@@ -292,6 +346,17 @@ export interface NeptuneGraph {
292346
cb: (err: any, data?: GetPrivateGraphEndpointCommandOutput) => void
293347
): void;
294348

349+
/**
350+
* @see {@link GetQueryCommand}
351+
*/
352+
getQuery(args: GetQueryCommandInput, options?: __HttpHandlerOptions): Promise<GetQueryCommandOutput>;
353+
getQuery(args: GetQueryCommandInput, cb: (err: any, data?: GetQueryCommandOutput) => void): void;
354+
getQuery(
355+
args: GetQueryCommandInput,
356+
options: __HttpHandlerOptions,
357+
cb: (err: any, data?: GetQueryCommandOutput) => void
358+
): void;
359+
295360
/**
296361
* @see {@link ListGraphsCommand}
297362
*/
@@ -351,6 +416,17 @@ export interface NeptuneGraph {
351416
cb: (err: any, data?: ListPrivateGraphEndpointsCommandOutput) => void
352417
): void;
353418

419+
/**
420+
* @see {@link ListQueriesCommand}
421+
*/
422+
listQueries(args: ListQueriesCommandInput, options?: __HttpHandlerOptions): Promise<ListQueriesCommandOutput>;
423+
listQueries(args: ListQueriesCommandInput, cb: (err: any, data?: ListQueriesCommandOutput) => void): void;
424+
listQueries(
425+
args: ListQueriesCommandInput,
426+
options: __HttpHandlerOptions,
427+
cb: (err: any, data?: ListQueriesCommandOutput) => void
428+
): void;
429+
354430
/**
355431
* @see {@link ListTagsForResourceCommand}
356432
*/
@@ -432,9 +508,9 @@ export interface NeptuneGraph {
432508

433509
/**
434510
* @public
435-
* <p>Neptune Analytics is a serverless in-memory graph database service for analytics
436-
* that delivers high-performance analytics and real-time queries for any graph type. It
437-
* complements the Amazon Neptune Database, an industry-leading managed graph database.</p>
511+
* <p>Neptune Analytics is a new analytics database engine for Amazon Neptune that helps customers get to
512+
* insights faster by quickly processing large amounts of graph data, invoking popular graph analytic
513+
* algorithms in low-latency queries, and getting analytics results in seconds.</p>
438514
*/
439515
export class NeptuneGraph extends NeptuneGraphClient implements NeptuneGraph {}
440516
createAggregatedClient(commands, NeptuneGraph);

clients/client-neptune-graph/src/NeptuneGraphClient.ts

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ import {
4343
Logger as __Logger,
4444
Provider as __Provider,
4545
Provider,
46+
SdkStreamMixinInjector as __SdkStreamMixinInjector,
4647
StreamCollector as __StreamCollector,
4748
UrlParser as __UrlParser,
4849
UserAgent as __UserAgent,
4950
} from "@smithy/types";
5051

5152
import { CancelImportTaskCommandInput, CancelImportTaskCommandOutput } from "./commands/CancelImportTaskCommand";
53+
import { CancelQueryCommandInput, CancelQueryCommandOutput } from "./commands/CancelQueryCommand";
5254
import { CreateGraphCommandInput, CreateGraphCommandOutput } from "./commands/CreateGraphCommand";
5355
import {
5456
CreateGraphSnapshotCommandInput,
@@ -71,20 +73,24 @@ import {
7173
DeletePrivateGraphEndpointCommandInput,
7274
DeletePrivateGraphEndpointCommandOutput,
7375
} from "./commands/DeletePrivateGraphEndpointCommand";
76+
import { ExecuteQueryCommandInput, ExecuteQueryCommandOutput } from "./commands/ExecuteQueryCommand";
7477
import { GetGraphCommandInput, GetGraphCommandOutput } from "./commands/GetGraphCommand";
7578
import { GetGraphSnapshotCommandInput, GetGraphSnapshotCommandOutput } from "./commands/GetGraphSnapshotCommand";
79+
import { GetGraphSummaryCommandInput, GetGraphSummaryCommandOutput } from "./commands/GetGraphSummaryCommand";
7680
import { GetImportTaskCommandInput, GetImportTaskCommandOutput } from "./commands/GetImportTaskCommand";
7781
import {
7882
GetPrivateGraphEndpointCommandInput,
7983
GetPrivateGraphEndpointCommandOutput,
8084
} from "./commands/GetPrivateGraphEndpointCommand";
85+
import { GetQueryCommandInput, GetQueryCommandOutput } from "./commands/GetQueryCommand";
8186
import { ListGraphsCommandInput, ListGraphsCommandOutput } from "./commands/ListGraphsCommand";
8287
import { ListGraphSnapshotsCommandInput, ListGraphSnapshotsCommandOutput } from "./commands/ListGraphSnapshotsCommand";
8388
import { ListImportTasksCommandInput, ListImportTasksCommandOutput } from "./commands/ListImportTasksCommand";
8489
import {
8590
ListPrivateGraphEndpointsCommandInput,
8691
ListPrivateGraphEndpointsCommandOutput,
8792
} from "./commands/ListPrivateGraphEndpointsCommand";
93+
import { ListQueriesCommandInput, ListQueriesCommandOutput } from "./commands/ListQueriesCommand";
8894
import {
8995
ListTagsForResourceCommandInput,
9096
ListTagsForResourceCommandOutput,
@@ -113,21 +119,26 @@ export { __Client };
113119
*/
114120
export type ServiceInputTypes =
115121
| CancelImportTaskCommandInput
122+
| CancelQueryCommandInput
116123
| CreateGraphCommandInput
117124
| CreateGraphSnapshotCommandInput
118125
| CreateGraphUsingImportTaskCommandInput
119126
| CreatePrivateGraphEndpointCommandInput
120127
| DeleteGraphCommandInput
121128
| DeleteGraphSnapshotCommandInput
122129
| DeletePrivateGraphEndpointCommandInput
130+
| ExecuteQueryCommandInput
123131
| GetGraphCommandInput
124132
| GetGraphSnapshotCommandInput
133+
| GetGraphSummaryCommandInput
125134
| GetImportTaskCommandInput
126135
| GetPrivateGraphEndpointCommandInput
136+
| GetQueryCommandInput
127137
| ListGraphSnapshotsCommandInput
128138
| ListGraphsCommandInput
129139
| ListImportTasksCommandInput
130140
| ListPrivateGraphEndpointsCommandInput
141+
| ListQueriesCommandInput
131142
| ListTagsForResourceCommandInput
132143
| ResetGraphCommandInput
133144
| RestoreGraphFromSnapshotCommandInput
@@ -140,21 +151,26 @@ export type ServiceInputTypes =
140151
*/
141152
export type ServiceOutputTypes =
142153
| CancelImportTaskCommandOutput
154+
| CancelQueryCommandOutput
143155
| CreateGraphCommandOutput
144156
| CreateGraphSnapshotCommandOutput
145157
| CreateGraphUsingImportTaskCommandOutput
146158
| CreatePrivateGraphEndpointCommandOutput
147159
| DeleteGraphCommandOutput
148160
| DeleteGraphSnapshotCommandOutput
149161
| DeletePrivateGraphEndpointCommandOutput
162+
| ExecuteQueryCommandOutput
150163
| GetGraphCommandOutput
151164
| GetGraphSnapshotCommandOutput
165+
| GetGraphSummaryCommandOutput
152166
| GetImportTaskCommandOutput
153167
| GetPrivateGraphEndpointCommandOutput
168+
| GetQueryCommandOutput
154169
| ListGraphSnapshotsCommandOutput
155170
| ListGraphsCommandOutput
156171
| ListImportTasksCommandOutput
157172
| ListPrivateGraphEndpointsCommandOutput
173+
| ListQueriesCommandOutput
158174
| ListTagsForResourceCommandOutput
159175
| ResetGraphCommandOutput
160176
| RestoreGraphFromSnapshotCommandOutput
@@ -291,6 +307,12 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
291307
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
292308
*/
293309
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
310+
311+
/**
312+
* The internal function that inject utilities to runtime-specific stream to help users consume the data
313+
* @internal
314+
*/
315+
sdkStreamMixin?: __SdkStreamMixinInjector;
294316
}
295317

296318
/**
@@ -334,9 +356,9 @@ export interface NeptuneGraphClientResolvedConfig extends NeptuneGraphClientReso
334356

335357
/**
336358
* @public
337-
* <p>Neptune Analytics is a serverless in-memory graph database service for analytics
338-
* that delivers high-performance analytics and real-time queries for any graph type. It
339-
* complements the Amazon Neptune Database, an industry-leading managed graph database.</p>
359+
* <p>Neptune Analytics is a new analytics database engine for Amazon Neptune that helps customers get to
360+
* insights faster by quickly processing large amounts of graph data, invoking popular graph analytic
361+
* algorithms in low-latency queries, and getting analytics results in seconds.</p>
340362
*/
341363
export class NeptuneGraphClient extends __Client<
342364
__HttpHandlerOptions,

0 commit comments

Comments
 (0)