-
Notifications
You must be signed in to change notification settings - Fork 545
/
ExecuteQueryCommand.ts
125 lines (122 loc) · 4.71 KB
/
ExecuteQueryCommand.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer, StreamingBlobPayloadOutputTypes } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import { ExecuteQueryInput, ExecuteQueryOutput, ExecuteQueryOutputFilterSensitiveLog } from "../models/models_0";
import { NeptuneGraphClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NeptuneGraphClient";
import { de_ExecuteQueryCommand, se_ExecuteQueryCommand } from "../protocols/Aws_restJson1";
/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link ExecuteQueryCommand}.
*/
export interface ExecuteQueryCommandInput extends ExecuteQueryInput {}
/**
* @public
*
* The output of {@link ExecuteQueryCommand}.
*/
export interface ExecuteQueryCommandOutput extends Omit<ExecuteQueryOutput, "payload">, __MetadataBearer {
payload: StreamingBlobPayloadOutputTypes;
}
/**
* <p>Execute an openCypher query.</p>
* <p>
* When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have a policy attached
* that allows one of the following IAM actions in that cluster, depending on the query:
* </p>
* <ul>
* <li>
* <p>neptune-graph:ReadDataViaQuery</p>
* </li>
* <li>
* <p>neptune-graph:WriteDataViaQuery</p>
* </li>
* <li>
* <p>neptune-graph:DeleteDataViaQuery</p>
* </li>
* </ul>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { NeptuneGraphClient, ExecuteQueryCommand } from "@aws-sdk/client-neptune-graph"; // ES Modules import
* // const { NeptuneGraphClient, ExecuteQueryCommand } = require("@aws-sdk/client-neptune-graph"); // CommonJS import
* const client = new NeptuneGraphClient(config);
* const input = { // ExecuteQueryInput
* graphIdentifier: "STRING_VALUE", // required
* queryString: "STRING_VALUE", // required
* language: "OPEN_CYPHER", // required
* parameters: { // DocumentValuedMap
* "<keys>": "DOCUMENT_VALUE",
* },
* planCache: "ENABLED" || "DISABLED" || "AUTO",
* explainMode: "STATIC" || "DETAILS",
* queryTimeoutMilliseconds: Number("int"),
* };
* const command = new ExecuteQueryCommand(input);
* const response = await client.send(command);
* // { // ExecuteQueryOutput
* // payload: "<SdkStream>", // see \@smithy/types -> StreamingBlobPayloadOutputTypes // required
* // };
*
* ```
*
* @param ExecuteQueryCommandInput - {@link ExecuteQueryCommandInput}
* @returns {@link ExecuteQueryCommandOutput}
* @see {@link ExecuteQueryCommandInput} for command's `input` shape.
* @see {@link ExecuteQueryCommandOutput} for command's `response` shape.
* @see {@link NeptuneGraphClientResolvedConfig | config} for NeptuneGraphClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>Raised in case of an authentication or authorization failure.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>Raised when a conflict is encountered.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>A failure occurred on the server.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The exception was interrupted by throttling.</p>
*
* @throws {@link UnprocessableException} (client fault)
* <p>Request cannot be processed due to known reasons. Eg. partition full.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>A resource could not be validated.</p>
*
* @throws {@link NeptuneGraphServiceException}
* <p>Base exception class for all service exceptions from NeptuneGraph service.</p>
*
* @public
*/
export class ExecuteQueryCommand extends $Command
.classBuilder<
ExecuteQueryCommandInput,
ExecuteQueryCommandOutput,
NeptuneGraphClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
ApiType: { type: "staticContextParams", value: `DataPlane` },
})
.m(function (this: any, Command: any, cs: any, config: NeptuneGraphClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AmazonNeptuneGraph", "ExecuteQuery", {})
.n("NeptuneGraphClient", "ExecuteQueryCommand")
.f(void 0, ExecuteQueryOutputFilterSensitiveLog)
.ser(se_ExecuteQueryCommand)
.de(de_ExecuteQueryCommand)
.build() {}