@aws-sdk/client-neptune-graph 3.504.0 → 3.505.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -3
- package/dist-cjs/commands/CancelQueryCommand.js +1 -0
- package/dist-cjs/commands/ExecuteQueryCommand.js +1 -0
- package/dist-cjs/commands/GetGraphSummaryCommand.js +1 -0
- package/dist-cjs/commands/GetQueryCommand.js +1 -0
- package/dist-cjs/commands/ListQueriesCommand.js +1 -0
- package/dist-cjs/index.js +624 -41
- package/dist-cjs/runtimeConfig.shared.js +2 -0
- package/dist-es/NeptuneGraph.js +10 -0
- package/dist-es/commands/CancelQueryCommand.js +25 -0
- package/dist-es/commands/ExecuteQueryCommand.js +26 -0
- package/dist-es/commands/GetGraphSummaryCommand.js +25 -0
- package/dist-es/commands/GetQueryCommand.js +25 -0
- package/dist-es/commands/ListQueriesCommand.js +25 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +91 -29
- package/dist-es/protocols/Aws_restJson1.js +385 -2
- package/dist-es/runtimeConfig.shared.js +2 -0
- package/dist-types/NeptuneGraph.d.ts +38 -3
- package/dist-types/NeptuneGraphClient.d.ts +16 -6
- package/dist-types/commands/CancelImportTaskCommand.d.ts +2 -2
- package/dist-types/commands/CancelQueryCommand.d.ts +72 -0
- package/dist-types/commands/CreateGraphCommand.d.ts +1 -1
- package/dist-types/commands/CreateGraphSnapshotCommand.d.ts +1 -1
- package/dist-types/commands/CreateGraphUsingImportTaskCommand.d.ts +1 -1
- package/dist-types/commands/CreatePrivateGraphEndpointCommand.d.ts +1 -1
- package/dist-types/commands/DeleteGraphCommand.d.ts +1 -1
- package/dist-types/commands/DeleteGraphSnapshotCommand.d.ts +1 -1
- package/dist-types/commands/DeletePrivateGraphEndpointCommand.d.ts +1 -1
- package/dist-types/commands/ExecuteQueryCommand.d.ts +90 -0
- package/dist-types/commands/GetGraphCommand.d.ts +1 -1
- package/dist-types/commands/GetGraphSnapshotCommand.d.ts +1 -1
- package/dist-types/commands/GetGraphSummaryCommand.d.ts +120 -0
- package/dist-types/commands/GetImportTaskCommand.d.ts +1 -1
- package/dist-types/commands/GetPrivateGraphEndpointCommand.d.ts +1 -1
- package/dist-types/commands/GetQueryCommand.d.ts +78 -0
- package/dist-types/commands/ListGraphSnapshotsCommand.d.ts +1 -1
- package/dist-types/commands/ListImportTasksCommand.d.ts +1 -1
- package/dist-types/commands/ListPrivateGraphEndpointsCommand.d.ts +1 -1
- package/dist-types/commands/ListQueriesCommand.d.ts +80 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/commands/ResetGraphCommand.d.ts +1 -1
- package/dist-types/commands/RestoreGraphFromSnapshotCommand.d.ts +1 -1
- package/dist-types/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateGraphCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/index.d.ts +3 -3
- package/dist-types/models/models_0.d.ts +522 -78
- package/dist-types/protocols/Aws_restJson1.d.ts +46 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/ts3.4/NeptuneGraph.d.ts +85 -0
- package/dist-types/ts3.4/NeptuneGraphClient.d.ts +32 -0
- package/dist-types/ts3.4/commands/CancelQueryCommand.d.ts +24 -0
- package/dist-types/ts3.4/commands/ExecuteQueryCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/GetGraphSummaryCommand.d.ts +29 -0
- package/dist-types/ts3.4/commands/GetQueryCommand.d.ts +26 -0
- package/dist-types/ts3.4/commands/ListQueriesCommand.d.ts +26 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +182 -44
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +64 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
- package/package.json +2 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
|
|
2
2
|
import { requestBuilder as rb } from "@smithy/core";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
|
|
4
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
+
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, UnprocessableException, ValidationException, } from "../models/models_0";
|
|
5
6
|
import { NeptuneGraphServiceException as __BaseException } from "../models/NeptuneGraphServiceException";
|
|
6
7
|
export const se_CancelImportTaskCommand = async (input, context) => {
|
|
7
8
|
const b = rb(input, context);
|
|
@@ -12,6 +13,29 @@ export const se_CancelImportTaskCommand = async (input, context) => {
|
|
|
12
13
|
b.m("DELETE").h(headers).b(body);
|
|
13
14
|
return b.build();
|
|
14
15
|
};
|
|
16
|
+
export const se_CancelQueryCommand = async (input, context) => {
|
|
17
|
+
const b = rb(input, context);
|
|
18
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
19
|
+
[_g]: input[_gI],
|
|
20
|
+
});
|
|
21
|
+
b.bp("/queries/{queryId}");
|
|
22
|
+
b.p("queryId", () => input.queryId, "{queryId}", false);
|
|
23
|
+
let body;
|
|
24
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
25
|
+
if (context.disableHostPrefix !== true) {
|
|
26
|
+
resolvedHostname = "{graphIdentifier}." + resolvedHostname;
|
|
27
|
+
if (input.graphIdentifier === undefined) {
|
|
28
|
+
throw new Error("Empty value provided for input host prefix: graphIdentifier.");
|
|
29
|
+
}
|
|
30
|
+
resolvedHostname = resolvedHostname.replace("{graphIdentifier}", input.graphIdentifier);
|
|
31
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
32
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
b.hn(resolvedHostname);
|
|
36
|
+
b.m("DELETE").h(headers).b(body);
|
|
37
|
+
return b.build();
|
|
38
|
+
};
|
|
15
39
|
export const se_CreateGraphCommand = async (input, context) => {
|
|
16
40
|
const b = rb(input, context);
|
|
17
41
|
const headers = {
|
|
@@ -120,6 +144,36 @@ export const se_DeletePrivateGraphEndpointCommand = async (input, context) => {
|
|
|
120
144
|
b.m("DELETE").h(headers).b(body);
|
|
121
145
|
return b.build();
|
|
122
146
|
};
|
|
147
|
+
export const se_ExecuteQueryCommand = async (input, context) => {
|
|
148
|
+
const b = rb(input, context);
|
|
149
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
150
|
+
"content-type": "application/json",
|
|
151
|
+
[_g]: input[_gI],
|
|
152
|
+
});
|
|
153
|
+
b.bp("/queries");
|
|
154
|
+
let body;
|
|
155
|
+
body = JSON.stringify(take(input, {
|
|
156
|
+
explain: [, , `explainMode`],
|
|
157
|
+
language: [],
|
|
158
|
+
planCache: [],
|
|
159
|
+
query: [, , `queryString`],
|
|
160
|
+
queryTimeoutMilliseconds: [],
|
|
161
|
+
}));
|
|
162
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
163
|
+
if (context.disableHostPrefix !== true) {
|
|
164
|
+
resolvedHostname = "{graphIdentifier}." + resolvedHostname;
|
|
165
|
+
if (input.graphIdentifier === undefined) {
|
|
166
|
+
throw new Error("Empty value provided for input host prefix: graphIdentifier.");
|
|
167
|
+
}
|
|
168
|
+
resolvedHostname = resolvedHostname.replace("{graphIdentifier}", input.graphIdentifier);
|
|
169
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
170
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
b.hn(resolvedHostname);
|
|
174
|
+
b.m("POST").h(headers).b(body);
|
|
175
|
+
return b.build();
|
|
176
|
+
};
|
|
123
177
|
export const se_GetGraphCommand = async (input, context) => {
|
|
124
178
|
const b = rb(input, context);
|
|
125
179
|
const headers = {};
|
|
@@ -138,6 +192,31 @@ export const se_GetGraphSnapshotCommand = async (input, context) => {
|
|
|
138
192
|
b.m("GET").h(headers).b(body);
|
|
139
193
|
return b.build();
|
|
140
194
|
};
|
|
195
|
+
export const se_GetGraphSummaryCommand = async (input, context) => {
|
|
196
|
+
const b = rb(input, context);
|
|
197
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
198
|
+
[_g]: input[_gI],
|
|
199
|
+
});
|
|
200
|
+
b.bp("/summary");
|
|
201
|
+
const query = map({
|
|
202
|
+
[_m]: [, input[_m]],
|
|
203
|
+
});
|
|
204
|
+
let body;
|
|
205
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
206
|
+
if (context.disableHostPrefix !== true) {
|
|
207
|
+
resolvedHostname = "{graphIdentifier}." + resolvedHostname;
|
|
208
|
+
if (input.graphIdentifier === undefined) {
|
|
209
|
+
throw new Error("Empty value provided for input host prefix: graphIdentifier.");
|
|
210
|
+
}
|
|
211
|
+
resolvedHostname = resolvedHostname.replace("{graphIdentifier}", input.graphIdentifier);
|
|
212
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
213
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
b.hn(resolvedHostname);
|
|
217
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
218
|
+
return b.build();
|
|
219
|
+
};
|
|
141
220
|
export const se_GetImportTaskCommand = async (input, context) => {
|
|
142
221
|
const b = rb(input, context);
|
|
143
222
|
const headers = {};
|
|
@@ -157,6 +236,29 @@ export const se_GetPrivateGraphEndpointCommand = async (input, context) => {
|
|
|
157
236
|
b.m("GET").h(headers).b(body);
|
|
158
237
|
return b.build();
|
|
159
238
|
};
|
|
239
|
+
export const se_GetQueryCommand = async (input, context) => {
|
|
240
|
+
const b = rb(input, context);
|
|
241
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
242
|
+
[_g]: input[_gI],
|
|
243
|
+
});
|
|
244
|
+
b.bp("/queries/{queryId}");
|
|
245
|
+
b.p("queryId", () => input.queryId, "{queryId}", false);
|
|
246
|
+
let body;
|
|
247
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
248
|
+
if (context.disableHostPrefix !== true) {
|
|
249
|
+
resolvedHostname = "{graphIdentifier}." + resolvedHostname;
|
|
250
|
+
if (input.graphIdentifier === undefined) {
|
|
251
|
+
throw new Error("Empty value provided for input host prefix: graphIdentifier.");
|
|
252
|
+
}
|
|
253
|
+
resolvedHostname = resolvedHostname.replace("{graphIdentifier}", input.graphIdentifier);
|
|
254
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
255
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
b.hn(resolvedHostname);
|
|
259
|
+
b.m("GET").h(headers).b(body);
|
|
260
|
+
return b.build();
|
|
261
|
+
};
|
|
160
262
|
export const se_ListGraphsCommand = async (input, context) => {
|
|
161
263
|
const b = rb(input, context);
|
|
162
264
|
const headers = {};
|
|
@@ -207,6 +309,32 @@ export const se_ListPrivateGraphEndpointsCommand = async (input, context) => {
|
|
|
207
309
|
b.m("GET").h(headers).q(query).b(body);
|
|
208
310
|
return b.build();
|
|
209
311
|
};
|
|
312
|
+
export const se_ListQueriesCommand = async (input, context) => {
|
|
313
|
+
const b = rb(input, context);
|
|
314
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
315
|
+
[_g]: input[_gI],
|
|
316
|
+
});
|
|
317
|
+
b.bp("/queries");
|
|
318
|
+
const query = map({
|
|
319
|
+
[_mR]: [__expectNonNull(input.maxResults, `maxResults`) != null, () => input[_mR].toString()],
|
|
320
|
+
[_s]: [, input[_s]],
|
|
321
|
+
});
|
|
322
|
+
let body;
|
|
323
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
324
|
+
if (context.disableHostPrefix !== true) {
|
|
325
|
+
resolvedHostname = "{graphIdentifier}." + resolvedHostname;
|
|
326
|
+
if (input.graphIdentifier === undefined) {
|
|
327
|
+
throw new Error("Empty value provided for input host prefix: graphIdentifier.");
|
|
328
|
+
}
|
|
329
|
+
resolvedHostname = resolvedHostname.replace("{graphIdentifier}", input.graphIdentifier);
|
|
330
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
331
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
b.hn(resolvedHostname);
|
|
335
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
336
|
+
return b.build();
|
|
337
|
+
};
|
|
210
338
|
export const se_ListTagsForResourceCommand = async (input, context) => {
|
|
211
339
|
const b = rb(input, context);
|
|
212
340
|
const headers = {};
|
|
@@ -344,6 +472,47 @@ const de_CancelImportTaskCommandError = async (output, context) => {
|
|
|
344
472
|
});
|
|
345
473
|
}
|
|
346
474
|
};
|
|
475
|
+
export const de_CancelQueryCommand = async (output, context) => {
|
|
476
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
477
|
+
return de_CancelQueryCommandError(output, context);
|
|
478
|
+
}
|
|
479
|
+
const contents = map({
|
|
480
|
+
$metadata: deserializeMetadata(output),
|
|
481
|
+
});
|
|
482
|
+
await collectBody(output.body, context);
|
|
483
|
+
return contents;
|
|
484
|
+
};
|
|
485
|
+
const de_CancelQueryCommandError = async (output, context) => {
|
|
486
|
+
const parsedOutput = {
|
|
487
|
+
...output,
|
|
488
|
+
body: await parseErrorBody(output.body, context),
|
|
489
|
+
};
|
|
490
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
491
|
+
switch (errorCode) {
|
|
492
|
+
case "AccessDeniedException":
|
|
493
|
+
case "com.amazonaws.neptunegraph#AccessDeniedException":
|
|
494
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
495
|
+
case "InternalServerException":
|
|
496
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
497
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
498
|
+
case "ResourceNotFoundException":
|
|
499
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
500
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
501
|
+
case "ThrottlingException":
|
|
502
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
503
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
504
|
+
case "ValidationException":
|
|
505
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
506
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
507
|
+
default:
|
|
508
|
+
const parsedBody = parsedOutput.body;
|
|
509
|
+
return throwDefaultError({
|
|
510
|
+
output,
|
|
511
|
+
parsedBody,
|
|
512
|
+
errorCode,
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
};
|
|
347
516
|
export const de_CreateGraphCommand = async (output, context) => {
|
|
348
517
|
if (output.statusCode !== 201 && output.statusCode >= 300) {
|
|
349
518
|
return de_CreateGraphCommandError(output, context);
|
|
@@ -717,6 +886,52 @@ const de_DeletePrivateGraphEndpointCommandError = async (output, context) => {
|
|
|
717
886
|
});
|
|
718
887
|
}
|
|
719
888
|
};
|
|
889
|
+
export const de_ExecuteQueryCommand = async (output, context) => {
|
|
890
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
891
|
+
return de_ExecuteQueryCommandError(output, context);
|
|
892
|
+
}
|
|
893
|
+
const contents = map({
|
|
894
|
+
$metadata: deserializeMetadata(output),
|
|
895
|
+
});
|
|
896
|
+
const data = output.body;
|
|
897
|
+
context.sdkStreamMixin(data);
|
|
898
|
+
contents.payload = data;
|
|
899
|
+
return contents;
|
|
900
|
+
};
|
|
901
|
+
const de_ExecuteQueryCommandError = async (output, context) => {
|
|
902
|
+
const parsedOutput = {
|
|
903
|
+
...output,
|
|
904
|
+
body: await parseErrorBody(output.body, context),
|
|
905
|
+
};
|
|
906
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
907
|
+
switch (errorCode) {
|
|
908
|
+
case "AccessDeniedException":
|
|
909
|
+
case "com.amazonaws.neptunegraph#AccessDeniedException":
|
|
910
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
911
|
+
case "ConflictException":
|
|
912
|
+
case "com.amazonaws.neptunegraph#ConflictException":
|
|
913
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
914
|
+
case "InternalServerException":
|
|
915
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
916
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
917
|
+
case "ThrottlingException":
|
|
918
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
919
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
920
|
+
case "UnprocessableException":
|
|
921
|
+
case "com.amazonaws.neptunegraph#UnprocessableException":
|
|
922
|
+
throw await de_UnprocessableExceptionRes(parsedOutput, context);
|
|
923
|
+
case "ValidationException":
|
|
924
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
925
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
926
|
+
default:
|
|
927
|
+
const parsedBody = parsedOutput.body;
|
|
928
|
+
return throwDefaultError({
|
|
929
|
+
output,
|
|
930
|
+
parsedBody,
|
|
931
|
+
errorCode,
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
};
|
|
720
935
|
export const de_GetGraphCommand = async (output, context) => {
|
|
721
936
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
722
937
|
return de_GetGraphCommandError(output, context);
|
|
@@ -821,6 +1036,53 @@ const de_GetGraphSnapshotCommandError = async (output, context) => {
|
|
|
821
1036
|
});
|
|
822
1037
|
}
|
|
823
1038
|
};
|
|
1039
|
+
export const de_GetGraphSummaryCommand = async (output, context) => {
|
|
1040
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1041
|
+
return de_GetGraphSummaryCommandError(output, context);
|
|
1042
|
+
}
|
|
1043
|
+
const contents = map({
|
|
1044
|
+
$metadata: deserializeMetadata(output),
|
|
1045
|
+
});
|
|
1046
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1047
|
+
const doc = take(data, {
|
|
1048
|
+
graphSummary: _json,
|
|
1049
|
+
lastStatisticsComputationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
1050
|
+
version: __expectString,
|
|
1051
|
+
});
|
|
1052
|
+
Object.assign(contents, doc);
|
|
1053
|
+
return contents;
|
|
1054
|
+
};
|
|
1055
|
+
const de_GetGraphSummaryCommandError = async (output, context) => {
|
|
1056
|
+
const parsedOutput = {
|
|
1057
|
+
...output,
|
|
1058
|
+
body: await parseErrorBody(output.body, context),
|
|
1059
|
+
};
|
|
1060
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1061
|
+
switch (errorCode) {
|
|
1062
|
+
case "AccessDeniedException":
|
|
1063
|
+
case "com.amazonaws.neptunegraph#AccessDeniedException":
|
|
1064
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1065
|
+
case "InternalServerException":
|
|
1066
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1067
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1068
|
+
case "ResourceNotFoundException":
|
|
1069
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1070
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1071
|
+
case "ThrottlingException":
|
|
1072
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1073
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1074
|
+
case "ValidationException":
|
|
1075
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1076
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1077
|
+
default:
|
|
1078
|
+
const parsedBody = parsedOutput.body;
|
|
1079
|
+
return throwDefaultError({
|
|
1080
|
+
output,
|
|
1081
|
+
parsedBody,
|
|
1082
|
+
errorCode,
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
};
|
|
824
1086
|
export const de_GetImportTaskCommand = async (output, context) => {
|
|
825
1087
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
826
1088
|
return de_GetImportTaskCommandError(output, context);
|
|
@@ -917,6 +1179,55 @@ const de_GetPrivateGraphEndpointCommandError = async (output, context) => {
|
|
|
917
1179
|
});
|
|
918
1180
|
}
|
|
919
1181
|
};
|
|
1182
|
+
export const de_GetQueryCommand = async (output, context) => {
|
|
1183
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1184
|
+
return de_GetQueryCommandError(output, context);
|
|
1185
|
+
}
|
|
1186
|
+
const contents = map({
|
|
1187
|
+
$metadata: deserializeMetadata(output),
|
|
1188
|
+
});
|
|
1189
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1190
|
+
const doc = take(data, {
|
|
1191
|
+
elapsed: __expectInt32,
|
|
1192
|
+
id: __expectString,
|
|
1193
|
+
queryString: __expectString,
|
|
1194
|
+
state: __expectString,
|
|
1195
|
+
waited: __expectInt32,
|
|
1196
|
+
});
|
|
1197
|
+
Object.assign(contents, doc);
|
|
1198
|
+
return contents;
|
|
1199
|
+
};
|
|
1200
|
+
const de_GetQueryCommandError = async (output, context) => {
|
|
1201
|
+
const parsedOutput = {
|
|
1202
|
+
...output,
|
|
1203
|
+
body: await parseErrorBody(output.body, context),
|
|
1204
|
+
};
|
|
1205
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1206
|
+
switch (errorCode) {
|
|
1207
|
+
case "AccessDeniedException":
|
|
1208
|
+
case "com.amazonaws.neptunegraph#AccessDeniedException":
|
|
1209
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1210
|
+
case "InternalServerException":
|
|
1211
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1212
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1213
|
+
case "ResourceNotFoundException":
|
|
1214
|
+
case "com.amazonaws.neptunegraph#ResourceNotFoundException":
|
|
1215
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1216
|
+
case "ThrottlingException":
|
|
1217
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1218
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1219
|
+
case "ValidationException":
|
|
1220
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1221
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1222
|
+
default:
|
|
1223
|
+
const parsedBody = parsedOutput.body;
|
|
1224
|
+
return throwDefaultError({
|
|
1225
|
+
output,
|
|
1226
|
+
parsedBody,
|
|
1227
|
+
errorCode,
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
};
|
|
920
1231
|
export const de_ListGraphsCommand = async (output, context) => {
|
|
921
1232
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
922
1233
|
return de_ListGraphsCommandError(output, context);
|
|
@@ -1086,6 +1397,48 @@ const de_ListPrivateGraphEndpointsCommandError = async (output, context) => {
|
|
|
1086
1397
|
});
|
|
1087
1398
|
}
|
|
1088
1399
|
};
|
|
1400
|
+
export const de_ListQueriesCommand = async (output, context) => {
|
|
1401
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1402
|
+
return de_ListQueriesCommandError(output, context);
|
|
1403
|
+
}
|
|
1404
|
+
const contents = map({
|
|
1405
|
+
$metadata: deserializeMetadata(output),
|
|
1406
|
+
});
|
|
1407
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1408
|
+
const doc = take(data, {
|
|
1409
|
+
queries: _json,
|
|
1410
|
+
});
|
|
1411
|
+
Object.assign(contents, doc);
|
|
1412
|
+
return contents;
|
|
1413
|
+
};
|
|
1414
|
+
const de_ListQueriesCommandError = async (output, context) => {
|
|
1415
|
+
const parsedOutput = {
|
|
1416
|
+
...output,
|
|
1417
|
+
body: await parseErrorBody(output.body, context),
|
|
1418
|
+
};
|
|
1419
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1420
|
+
switch (errorCode) {
|
|
1421
|
+
case "AccessDeniedException":
|
|
1422
|
+
case "com.amazonaws.neptunegraph#AccessDeniedException":
|
|
1423
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1424
|
+
case "InternalServerException":
|
|
1425
|
+
case "com.amazonaws.neptunegraph#InternalServerException":
|
|
1426
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1427
|
+
case "ThrottlingException":
|
|
1428
|
+
case "com.amazonaws.neptunegraph#ThrottlingException":
|
|
1429
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1430
|
+
case "ValidationException":
|
|
1431
|
+
case "com.amazonaws.neptunegraph#ValidationException":
|
|
1432
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1433
|
+
default:
|
|
1434
|
+
const parsedBody = parsedOutput.body;
|
|
1435
|
+
return throwDefaultError({
|
|
1436
|
+
output,
|
|
1437
|
+
parsedBody,
|
|
1438
|
+
errorCode,
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1089
1442
|
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1090
1443
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1091
1444
|
return de_ListTagsForResourceCommandError(output, context);
|
|
@@ -1385,6 +1738,19 @@ const de_UpdateGraphCommandError = async (output, context) => {
|
|
|
1385
1738
|
}
|
|
1386
1739
|
};
|
|
1387
1740
|
const throwDefaultError = withBaseException(__BaseException);
|
|
1741
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1742
|
+
const contents = map({});
|
|
1743
|
+
const data = parsedOutput.body;
|
|
1744
|
+
const doc = take(data, {
|
|
1745
|
+
message: __expectString,
|
|
1746
|
+
});
|
|
1747
|
+
Object.assign(contents, doc);
|
|
1748
|
+
const exception = new AccessDeniedException({
|
|
1749
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1750
|
+
...contents,
|
|
1751
|
+
});
|
|
1752
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1753
|
+
};
|
|
1388
1754
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1389
1755
|
const contents = map({});
|
|
1390
1756
|
const data = parsedOutput.body;
|
|
@@ -1455,6 +1821,20 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
1455
1821
|
});
|
|
1456
1822
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
1457
1823
|
};
|
|
1824
|
+
const de_UnprocessableExceptionRes = async (parsedOutput, context) => {
|
|
1825
|
+
const contents = map({});
|
|
1826
|
+
const data = parsedOutput.body;
|
|
1827
|
+
const doc = take(data, {
|
|
1828
|
+
message: __expectString,
|
|
1829
|
+
reason: __expectString,
|
|
1830
|
+
});
|
|
1831
|
+
Object.assign(contents, doc);
|
|
1832
|
+
const exception = new UnprocessableException({
|
|
1833
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1834
|
+
...contents,
|
|
1835
|
+
});
|
|
1836
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1837
|
+
};
|
|
1458
1838
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1459
1839
|
const contents = map({});
|
|
1460
1840
|
const data = parsedOutput.body;
|
|
@@ -1512,9 +1892,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1512
1892
|
value !== "" &&
|
|
1513
1893
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1514
1894
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1895
|
+
const _g = "graphidentifier";
|
|
1515
1896
|
const _gI = "graphIdentifier";
|
|
1897
|
+
const _m = "mode";
|
|
1516
1898
|
const _mR = "maxResults";
|
|
1517
1899
|
const _nT = "nextToken";
|
|
1900
|
+
const _s = "state";
|
|
1518
1901
|
const _sS = "skipSnapshot";
|
|
1519
1902
|
const _tK = "tagKeys";
|
|
1520
1903
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NoOpLogger } from "@smithy/smithy-client";
|
|
2
2
|
import { parseUrl } from "@smithy/url-parser";
|
|
3
3
|
import { fromBase64, toBase64 } from "@smithy/util-base64";
|
|
4
|
+
import { sdkStreamMixin } from "@smithy/util-stream";
|
|
4
5
|
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
|
|
5
6
|
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
6
7
|
export const getRuntimeConfig = (config) => {
|
|
@@ -12,6 +13,7 @@ export const getRuntimeConfig = (config) => {
|
|
|
12
13
|
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
13
14
|
extensions: config?.extensions ?? [],
|
|
14
15
|
logger: config?.logger ?? new NoOpLogger(),
|
|
16
|
+
sdkStreamMixin: config?.sdkStreamMixin ?? sdkStreamMixin,
|
|
15
17
|
serviceId: config?.serviceId ?? "Neptune Graph",
|
|
16
18
|
urlParser: config?.urlParser ?? parseUrl,
|
|
17
19
|
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
2
|
import { CancelImportTaskCommandInput, CancelImportTaskCommandOutput } from "./commands/CancelImportTaskCommand";
|
|
3
|
+
import { CancelQueryCommandInput, CancelQueryCommandOutput } from "./commands/CancelQueryCommand";
|
|
3
4
|
import { CreateGraphCommandInput, CreateGraphCommandOutput } from "./commands/CreateGraphCommand";
|
|
4
5
|
import { CreateGraphSnapshotCommandInput, CreateGraphSnapshotCommandOutput } from "./commands/CreateGraphSnapshotCommand";
|
|
5
6
|
import { CreateGraphUsingImportTaskCommandInput, CreateGraphUsingImportTaskCommandOutput } from "./commands/CreateGraphUsingImportTaskCommand";
|
|
@@ -7,14 +8,18 @@ import { CreatePrivateGraphEndpointCommandInput, CreatePrivateGraphEndpointComma
|
|
|
7
8
|
import { DeleteGraphCommandInput, DeleteGraphCommandOutput } from "./commands/DeleteGraphCommand";
|
|
8
9
|
import { DeleteGraphSnapshotCommandInput, DeleteGraphSnapshotCommandOutput } from "./commands/DeleteGraphSnapshotCommand";
|
|
9
10
|
import { DeletePrivateGraphEndpointCommandInput, DeletePrivateGraphEndpointCommandOutput } from "./commands/DeletePrivateGraphEndpointCommand";
|
|
11
|
+
import { ExecuteQueryCommandInput, ExecuteQueryCommandOutput } from "./commands/ExecuteQueryCommand";
|
|
10
12
|
import { GetGraphCommandInput, GetGraphCommandOutput } from "./commands/GetGraphCommand";
|
|
11
13
|
import { GetGraphSnapshotCommandInput, GetGraphSnapshotCommandOutput } from "./commands/GetGraphSnapshotCommand";
|
|
14
|
+
import { GetGraphSummaryCommandInput, GetGraphSummaryCommandOutput } from "./commands/GetGraphSummaryCommand";
|
|
12
15
|
import { GetImportTaskCommandInput, GetImportTaskCommandOutput } from "./commands/GetImportTaskCommand";
|
|
13
16
|
import { GetPrivateGraphEndpointCommandInput, GetPrivateGraphEndpointCommandOutput } from "./commands/GetPrivateGraphEndpointCommand";
|
|
17
|
+
import { GetQueryCommandInput, GetQueryCommandOutput } from "./commands/GetQueryCommand";
|
|
14
18
|
import { ListGraphsCommandInput, ListGraphsCommandOutput } from "./commands/ListGraphsCommand";
|
|
15
19
|
import { ListGraphSnapshotsCommandInput, ListGraphSnapshotsCommandOutput } from "./commands/ListGraphSnapshotsCommand";
|
|
16
20
|
import { ListImportTasksCommandInput, ListImportTasksCommandOutput } from "./commands/ListImportTasksCommand";
|
|
17
21
|
import { ListPrivateGraphEndpointsCommandInput, ListPrivateGraphEndpointsCommandOutput } from "./commands/ListPrivateGraphEndpointsCommand";
|
|
22
|
+
import { ListQueriesCommandInput, ListQueriesCommandOutput } from "./commands/ListQueriesCommand";
|
|
18
23
|
import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
|
|
19
24
|
import { ResetGraphCommandInput, ResetGraphCommandOutput } from "./commands/ResetGraphCommand";
|
|
20
25
|
import { RestoreGraphFromSnapshotCommandInput, RestoreGraphFromSnapshotCommandOutput } from "./commands/RestoreGraphFromSnapshotCommand";
|
|
@@ -29,6 +34,12 @@ export interface NeptuneGraph {
|
|
|
29
34
|
cancelImportTask(args: CancelImportTaskCommandInput, options?: __HttpHandlerOptions): Promise<CancelImportTaskCommandOutput>;
|
|
30
35
|
cancelImportTask(args: CancelImportTaskCommandInput, cb: (err: any, data?: CancelImportTaskCommandOutput) => void): void;
|
|
31
36
|
cancelImportTask(args: CancelImportTaskCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelImportTaskCommandOutput) => void): void;
|
|
37
|
+
/**
|
|
38
|
+
* @see {@link CancelQueryCommand}
|
|
39
|
+
*/
|
|
40
|
+
cancelQuery(args: CancelQueryCommandInput, options?: __HttpHandlerOptions): Promise<CancelQueryCommandOutput>;
|
|
41
|
+
cancelQuery(args: CancelQueryCommandInput, cb: (err: any, data?: CancelQueryCommandOutput) => void): void;
|
|
42
|
+
cancelQuery(args: CancelQueryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelQueryCommandOutput) => void): void;
|
|
32
43
|
/**
|
|
33
44
|
* @see {@link CreateGraphCommand}
|
|
34
45
|
*/
|
|
@@ -71,6 +82,12 @@ export interface NeptuneGraph {
|
|
|
71
82
|
deletePrivateGraphEndpoint(args: DeletePrivateGraphEndpointCommandInput, options?: __HttpHandlerOptions): Promise<DeletePrivateGraphEndpointCommandOutput>;
|
|
72
83
|
deletePrivateGraphEndpoint(args: DeletePrivateGraphEndpointCommandInput, cb: (err: any, data?: DeletePrivateGraphEndpointCommandOutput) => void): void;
|
|
73
84
|
deletePrivateGraphEndpoint(args: DeletePrivateGraphEndpointCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeletePrivateGraphEndpointCommandOutput) => void): void;
|
|
85
|
+
/**
|
|
86
|
+
* @see {@link ExecuteQueryCommand}
|
|
87
|
+
*/
|
|
88
|
+
executeQuery(args: ExecuteQueryCommandInput, options?: __HttpHandlerOptions): Promise<ExecuteQueryCommandOutput>;
|
|
89
|
+
executeQuery(args: ExecuteQueryCommandInput, cb: (err: any, data?: ExecuteQueryCommandOutput) => void): void;
|
|
90
|
+
executeQuery(args: ExecuteQueryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ExecuteQueryCommandOutput) => void): void;
|
|
74
91
|
/**
|
|
75
92
|
* @see {@link GetGraphCommand}
|
|
76
93
|
*/
|
|
@@ -83,6 +100,12 @@ export interface NeptuneGraph {
|
|
|
83
100
|
getGraphSnapshot(args: GetGraphSnapshotCommandInput, options?: __HttpHandlerOptions): Promise<GetGraphSnapshotCommandOutput>;
|
|
84
101
|
getGraphSnapshot(args: GetGraphSnapshotCommandInput, cb: (err: any, data?: GetGraphSnapshotCommandOutput) => void): void;
|
|
85
102
|
getGraphSnapshot(args: GetGraphSnapshotCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetGraphSnapshotCommandOutput) => void): void;
|
|
103
|
+
/**
|
|
104
|
+
* @see {@link GetGraphSummaryCommand}
|
|
105
|
+
*/
|
|
106
|
+
getGraphSummary(args: GetGraphSummaryCommandInput, options?: __HttpHandlerOptions): Promise<GetGraphSummaryCommandOutput>;
|
|
107
|
+
getGraphSummary(args: GetGraphSummaryCommandInput, cb: (err: any, data?: GetGraphSummaryCommandOutput) => void): void;
|
|
108
|
+
getGraphSummary(args: GetGraphSummaryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetGraphSummaryCommandOutput) => void): void;
|
|
86
109
|
/**
|
|
87
110
|
* @see {@link GetImportTaskCommand}
|
|
88
111
|
*/
|
|
@@ -95,6 +118,12 @@ export interface NeptuneGraph {
|
|
|
95
118
|
getPrivateGraphEndpoint(args: GetPrivateGraphEndpointCommandInput, options?: __HttpHandlerOptions): Promise<GetPrivateGraphEndpointCommandOutput>;
|
|
96
119
|
getPrivateGraphEndpoint(args: GetPrivateGraphEndpointCommandInput, cb: (err: any, data?: GetPrivateGraphEndpointCommandOutput) => void): void;
|
|
97
120
|
getPrivateGraphEndpoint(args: GetPrivateGraphEndpointCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetPrivateGraphEndpointCommandOutput) => void): void;
|
|
121
|
+
/**
|
|
122
|
+
* @see {@link GetQueryCommand}
|
|
123
|
+
*/
|
|
124
|
+
getQuery(args: GetQueryCommandInput, options?: __HttpHandlerOptions): Promise<GetQueryCommandOutput>;
|
|
125
|
+
getQuery(args: GetQueryCommandInput, cb: (err: any, data?: GetQueryCommandOutput) => void): void;
|
|
126
|
+
getQuery(args: GetQueryCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetQueryCommandOutput) => void): void;
|
|
98
127
|
/**
|
|
99
128
|
* @see {@link ListGraphsCommand}
|
|
100
129
|
*/
|
|
@@ -119,6 +148,12 @@ export interface NeptuneGraph {
|
|
|
119
148
|
listPrivateGraphEndpoints(args: ListPrivateGraphEndpointsCommandInput, options?: __HttpHandlerOptions): Promise<ListPrivateGraphEndpointsCommandOutput>;
|
|
120
149
|
listPrivateGraphEndpoints(args: ListPrivateGraphEndpointsCommandInput, cb: (err: any, data?: ListPrivateGraphEndpointsCommandOutput) => void): void;
|
|
121
150
|
listPrivateGraphEndpoints(args: ListPrivateGraphEndpointsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListPrivateGraphEndpointsCommandOutput) => void): void;
|
|
151
|
+
/**
|
|
152
|
+
* @see {@link ListQueriesCommand}
|
|
153
|
+
*/
|
|
154
|
+
listQueries(args: ListQueriesCommandInput, options?: __HttpHandlerOptions): Promise<ListQueriesCommandOutput>;
|
|
155
|
+
listQueries(args: ListQueriesCommandInput, cb: (err: any, data?: ListQueriesCommandOutput) => void): void;
|
|
156
|
+
listQueries(args: ListQueriesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListQueriesCommandOutput) => void): void;
|
|
122
157
|
/**
|
|
123
158
|
* @see {@link ListTagsForResourceCommand}
|
|
124
159
|
*/
|
|
@@ -158,9 +193,9 @@ export interface NeptuneGraph {
|
|
|
158
193
|
}
|
|
159
194
|
/**
|
|
160
195
|
* @public
|
|
161
|
-
* <p>Neptune Analytics is a
|
|
162
|
-
*
|
|
163
|
-
*
|
|
196
|
+
* <p>Neptune Analytics is a new analytics database engine for Amazon Neptune that helps customers get to
|
|
197
|
+
* insights faster by quickly processing large amounts of graph data, invoking popular graph analytic
|
|
198
|
+
* algorithms in low-latency queries, and getting analytics results in seconds.</p>
|
|
164
199
|
*/
|
|
165
200
|
export declare class NeptuneGraph extends NeptuneGraphClient implements NeptuneGraph {
|
|
166
201
|
}
|