1{ 2 "version":"2.0", 3 "metadata":{ 4 "apiVersion":"2019-07-11", 5 "endpointPrefix":"session.qldb", 6 "jsonVersion":"1.0", 7 "protocol":"json", 8 "serviceAbbreviation":"QLDB Session", 9 "serviceFullName":"Amazon QLDB Session", 10 "serviceId":"QLDB Session", 11 "signatureVersion":"v4", 12 "signingName":"qldb", 13 "targetPrefix":"QLDBSession", 14 "uid":"qldb-session-2019-07-11" 15 }, 16 "operations":{ 17 "SendCommand":{ 18 "name":"SendCommand", 19 "http":{ 20 "method":"POST", 21 "requestUri":"/" 22 }, 23 "input":{"shape":"SendCommandRequest"}, 24 "output":{"shape":"SendCommandResult"}, 25 "errors":[ 26 {"shape":"BadRequestException"}, 27 {"shape":"InvalidSessionException"}, 28 {"shape":"OccConflictException"}, 29 {"shape":"RateExceededException"}, 30 {"shape":"LimitExceededException"}, 31 {"shape":"CapacityExceededException"} 32 ], 33 "documentation":"<p>Sends a command to an Amazon QLDB ledger.</p> <note> <p>Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.</p> <ul> <li> <p>If you are working with an AWS SDK, use the QLDB driver. The driver provides a high-level abstraction layer above this <i>QLDB Session</i> data plane and manages <code>SendCommand</code> API calls for you. For information and a list of supported programming languages, see <a href=\"https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-driver.html\">Getting started with the driver</a> in the <i>Amazon QLDB Developer Guide</i>.</p> </li> <li> <p>If you are working with the AWS Command Line Interface (AWS CLI), use the QLDB shell. The shell is a command line interface that uses the QLDB driver to interact with a ledger. For information, see <a href=\"https://docs.aws.amazon.com/qldb/latest/developerguide/data-shell.html\">Accessing Amazon QLDB using the QLDB shell</a>.</p> </li> </ul> </note>" 34 } 35 }, 36 "shapes":{ 37 "AbortTransactionRequest":{ 38 "type":"structure", 39 "members":{ 40 }, 41 "documentation":"<p>Contains the details of the transaction to abort.</p>" 42 }, 43 "AbortTransactionResult":{ 44 "type":"structure", 45 "members":{ 46 "TimingInformation":{ 47 "shape":"TimingInformation", 48 "documentation":"<p>Contains server-side performance information for the command.</p>" 49 } 50 }, 51 "documentation":"<p>Contains the details of the aborted transaction.</p>" 52 }, 53 "BadRequestException":{ 54 "type":"structure", 55 "members":{ 56 "Message":{"shape":"ErrorMessage"}, 57 "Code":{"shape":"ErrorCode"} 58 }, 59 "documentation":"<p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>", 60 "exception":true 61 }, 62 "CapacityExceededException":{ 63 "type":"structure", 64 "members":{ 65 "Message":{"shape":"ErrorMessage"} 66 }, 67 "documentation":"<p>Returned when the request exceeds the processing capacity of the ledger.</p>", 68 "exception":true 69 }, 70 "CommitDigest":{"type":"blob"}, 71 "CommitTransactionRequest":{ 72 "type":"structure", 73 "required":[ 74 "TransactionId", 75 "CommitDigest" 76 ], 77 "members":{ 78 "TransactionId":{ 79 "shape":"TransactionId", 80 "documentation":"<p>Specifies the transaction ID of the transaction to commit.</p>" 81 }, 82 "CommitDigest":{ 83 "shape":"CommitDigest", 84 "documentation":"<p>Specifies the commit digest for the transaction to commit. For every active transaction, the commit digest must be passed. QLDB validates <code>CommitDigest</code> and rejects the commit with an error if the digest computed on the client does not match the digest computed by QLDB.</p> <p>The purpose of the <code>CommitDigest</code> parameter is to ensure that QLDB commits a transaction if and only if the server has processed the exact set of statements sent by the client, in the same order that client sent them, and with no duplicates.</p>" 85 } 86 }, 87 "documentation":"<p>Contains the details of the transaction to commit.</p>" 88 }, 89 "CommitTransactionResult":{ 90 "type":"structure", 91 "members":{ 92 "TransactionId":{ 93 "shape":"TransactionId", 94 "documentation":"<p>The transaction ID of the committed transaction.</p>" 95 }, 96 "CommitDigest":{ 97 "shape":"CommitDigest", 98 "documentation":"<p>The commit digest of the committed transaction.</p>" 99 }, 100 "TimingInformation":{ 101 "shape":"TimingInformation", 102 "documentation":"<p>Contains server-side performance information for the command.</p>" 103 }, 104 "ConsumedIOs":{ 105 "shape":"IOUsage", 106 "documentation":"<p>Contains metrics about the number of I/O requests that were consumed.</p>" 107 } 108 }, 109 "documentation":"<p>Contains the details of the committed transaction.</p>" 110 }, 111 "EndSessionRequest":{ 112 "type":"structure", 113 "members":{ 114 }, 115 "documentation":"<p>Specifies a request to end the session.</p>" 116 }, 117 "EndSessionResult":{ 118 "type":"structure", 119 "members":{ 120 "TimingInformation":{ 121 "shape":"TimingInformation", 122 "documentation":"<p>Contains server-side performance information for the command.</p>" 123 } 124 }, 125 "documentation":"<p>Contains the details of the ended session.</p>" 126 }, 127 "ErrorCode":{"type":"string"}, 128 "ErrorMessage":{"type":"string"}, 129 "ExecuteStatementRequest":{ 130 "type":"structure", 131 "required":[ 132 "TransactionId", 133 "Statement" 134 ], 135 "members":{ 136 "TransactionId":{ 137 "shape":"TransactionId", 138 "documentation":"<p>Specifies the transaction ID of the request.</p>" 139 }, 140 "Statement":{ 141 "shape":"Statement", 142 "documentation":"<p>Specifies the statement of the request.</p>" 143 }, 144 "Parameters":{ 145 "shape":"StatementParameters", 146 "documentation":"<p>Specifies the parameters for the parameterized statement in the request.</p>" 147 } 148 }, 149 "documentation":"<p>Specifies a request to execute a statement.</p>" 150 }, 151 "ExecuteStatementResult":{ 152 "type":"structure", 153 "members":{ 154 "FirstPage":{ 155 "shape":"Page", 156 "documentation":"<p>Contains the details of the first fetched page.</p>" 157 }, 158 "TimingInformation":{ 159 "shape":"TimingInformation", 160 "documentation":"<p>Contains server-side performance information for the command.</p>" 161 }, 162 "ConsumedIOs":{ 163 "shape":"IOUsage", 164 "documentation":"<p>Contains metrics about the number of I/O requests that were consumed.</p>" 165 } 166 }, 167 "documentation":"<p>Contains the details of the executed statement.</p>" 168 }, 169 "FetchPageRequest":{ 170 "type":"structure", 171 "required":[ 172 "TransactionId", 173 "NextPageToken" 174 ], 175 "members":{ 176 "TransactionId":{ 177 "shape":"TransactionId", 178 "documentation":"<p>Specifies the transaction ID of the page to be fetched.</p>" 179 }, 180 "NextPageToken":{ 181 "shape":"PageToken", 182 "documentation":"<p>Specifies the next page token of the page to be fetched.</p>" 183 } 184 }, 185 "documentation":"<p>Specifies the details of the page to be fetched.</p>" 186 }, 187 "FetchPageResult":{ 188 "type":"structure", 189 "members":{ 190 "Page":{ 191 "shape":"Page", 192 "documentation":"<p>Contains details of the fetched page.</p>" 193 }, 194 "TimingInformation":{ 195 "shape":"TimingInformation", 196 "documentation":"<p>Contains server-side performance information for the command.</p>" 197 }, 198 "ConsumedIOs":{ 199 "shape":"IOUsage", 200 "documentation":"<p>Contains metrics about the number of I/O requests that were consumed.</p>" 201 } 202 }, 203 "documentation":"<p>Contains the page that was fetched.</p>" 204 }, 205 "IOUsage":{ 206 "type":"structure", 207 "members":{ 208 "ReadIOs":{ 209 "shape":"ReadIOs", 210 "documentation":"<p>The number of read I/O requests that the command made.</p>" 211 }, 212 "WriteIOs":{ 213 "shape":"WriteIOs", 214 "documentation":"<p>The number of write I/O requests that the command made.</p>" 215 } 216 }, 217 "documentation":"<p>Contains I/O usage metrics for a command that was invoked.</p>" 218 }, 219 "InvalidSessionException":{ 220 "type":"structure", 221 "members":{ 222 "Message":{"shape":"ErrorMessage"}, 223 "Code":{"shape":"ErrorCode"} 224 }, 225 "documentation":"<p>Returned if the session doesn't exist anymore because it timed out or expired.</p>", 226 "exception":true 227 }, 228 "IonBinary":{ 229 "type":"blob", 230 "max":131072, 231 "min":1 232 }, 233 "IonText":{ 234 "type":"string", 235 "max":1048576, 236 "min":1 237 }, 238 "LedgerName":{ 239 "type":"string", 240 "max":32, 241 "min":1, 242 "pattern":"(?!^.*--)(?!^[0-9]+$)(?!^-)(?!.*-$)^[A-Za-z0-9-]+$" 243 }, 244 "LimitExceededException":{ 245 "type":"structure", 246 "members":{ 247 "Message":{"shape":"ErrorMessage"} 248 }, 249 "documentation":"<p>Returned if a resource limit such as number of active sessions is exceeded.</p>", 250 "exception":true 251 }, 252 "OccConflictException":{ 253 "type":"structure", 254 "members":{ 255 "Message":{"shape":"ErrorMessage"} 256 }, 257 "documentation":"<p>Returned when a transaction cannot be written to the journal due to a failure in the verification phase of <i>optimistic concurrency control</i> (OCC).</p>", 258 "exception":true 259 }, 260 "Page":{ 261 "type":"structure", 262 "members":{ 263 "Values":{ 264 "shape":"ValueHolders", 265 "documentation":"<p>A structure that contains values in multiple encoding formats.</p>" 266 }, 267 "NextPageToken":{ 268 "shape":"PageToken", 269 "documentation":"<p>The token of the next page.</p>" 270 } 271 }, 272 "documentation":"<p>Contains details of the fetched page.</p>" 273 }, 274 "PageToken":{ 275 "type":"string", 276 "max":1024, 277 "min":4, 278 "pattern":"^[A-Za-z-0-9+/=]+$" 279 }, 280 "ProcessingTimeMilliseconds":{"type":"long"}, 281 "RateExceededException":{ 282 "type":"structure", 283 "members":{ 284 "Message":{"shape":"ErrorMessage"} 285 }, 286 "documentation":"<p>Returned when the rate of requests exceeds the allowed throughput.</p>", 287 "exception":true 288 }, 289 "ReadIOs":{"type":"long"}, 290 "SendCommandRequest":{ 291 "type":"structure", 292 "members":{ 293 "SessionToken":{ 294 "shape":"SessionToken", 295 "documentation":"<p>Specifies the session token for the current command. A session token is constant throughout the life of the session.</p> <p>To obtain a session token, run the <code>StartSession</code> command. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>" 296 }, 297 "StartSession":{ 298 "shape":"StartSessionRequest", 299 "documentation":"<p>Command to start a new session. A session token is obtained as part of the response.</p>" 300 }, 301 "StartTransaction":{ 302 "shape":"StartTransactionRequest", 303 "documentation":"<p>Command to start a new transaction.</p>" 304 }, 305 "EndSession":{ 306 "shape":"EndSessionRequest", 307 "documentation":"<p>Command to end the current session.</p>" 308 }, 309 "CommitTransaction":{ 310 "shape":"CommitTransactionRequest", 311 "documentation":"<p>Command to commit the specified transaction.</p>" 312 }, 313 "AbortTransaction":{ 314 "shape":"AbortTransactionRequest", 315 "documentation":"<p>Command to abort the current transaction.</p>" 316 }, 317 "ExecuteStatement":{ 318 "shape":"ExecuteStatementRequest", 319 "documentation":"<p>Command to execute a statement in the specified transaction.</p>" 320 }, 321 "FetchPage":{ 322 "shape":"FetchPageRequest", 323 "documentation":"<p>Command to fetch a page.</p>" 324 } 325 } 326 }, 327 "SendCommandResult":{ 328 "type":"structure", 329 "members":{ 330 "StartSession":{ 331 "shape":"StartSessionResult", 332 "documentation":"<p>Contains the details of the started session that includes a session token. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>" 333 }, 334 "StartTransaction":{ 335 "shape":"StartTransactionResult", 336 "documentation":"<p>Contains the details of the started transaction.</p>" 337 }, 338 "EndSession":{ 339 "shape":"EndSessionResult", 340 "documentation":"<p>Contains the details of the ended session.</p>" 341 }, 342 "CommitTransaction":{ 343 "shape":"CommitTransactionResult", 344 "documentation":"<p>Contains the details of the committed transaction.</p>" 345 }, 346 "AbortTransaction":{ 347 "shape":"AbortTransactionResult", 348 "documentation":"<p>Contains the details of the aborted transaction.</p>" 349 }, 350 "ExecuteStatement":{ 351 "shape":"ExecuteStatementResult", 352 "documentation":"<p>Contains the details of the executed statement.</p>" 353 }, 354 "FetchPage":{ 355 "shape":"FetchPageResult", 356 "documentation":"<p>Contains the details of the fetched page.</p>" 357 } 358 } 359 }, 360 "SessionToken":{ 361 "type":"string", 362 "max":1024, 363 "min":4, 364 "pattern":"^[A-Za-z-0-9+/=]+$" 365 }, 366 "StartSessionRequest":{ 367 "type":"structure", 368 "required":["LedgerName"], 369 "members":{ 370 "LedgerName":{ 371 "shape":"LedgerName", 372 "documentation":"<p>The name of the ledger to start a new session against.</p>" 373 } 374 }, 375 "documentation":"<p>Specifies a request to start a new session.</p>" 376 }, 377 "StartSessionResult":{ 378 "type":"structure", 379 "members":{ 380 "SessionToken":{ 381 "shape":"SessionToken", 382 "documentation":"<p>Session token of the started session. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>" 383 }, 384 "TimingInformation":{ 385 "shape":"TimingInformation", 386 "documentation":"<p>Contains server-side performance information for the command.</p>" 387 } 388 }, 389 "documentation":"<p>Contains the details of the started session.</p>" 390 }, 391 "StartTransactionRequest":{ 392 "type":"structure", 393 "members":{ 394 }, 395 "documentation":"<p>Specifies a request to start a transaction.</p>" 396 }, 397 "StartTransactionResult":{ 398 "type":"structure", 399 "members":{ 400 "TransactionId":{ 401 "shape":"TransactionId", 402 "documentation":"<p>The transaction ID of the started transaction.</p>" 403 }, 404 "TimingInformation":{ 405 "shape":"TimingInformation", 406 "documentation":"<p>Contains server-side performance information for the command.</p>" 407 } 408 }, 409 "documentation":"<p>Contains the details of the started transaction.</p>" 410 }, 411 "Statement":{ 412 "type":"string", 413 "max":100000, 414 "min":1 415 }, 416 "StatementParameters":{ 417 "type":"list", 418 "member":{"shape":"ValueHolder"} 419 }, 420 "TimingInformation":{ 421 "type":"structure", 422 "members":{ 423 "ProcessingTimeMilliseconds":{ 424 "shape":"ProcessingTimeMilliseconds", 425 "documentation":"<p>The amount of time that QLDB spent on processing the command, measured in milliseconds.</p>" 426 } 427 }, 428 "documentation":"<p>Contains server-side performance information for a command. Amazon QLDB captures timing information between the times when it receives the request and when it sends the corresponding response.</p>" 429 }, 430 "TransactionId":{ 431 "type":"string", 432 "max":22, 433 "min":22, 434 "pattern":"^[A-Za-z-0-9]+$" 435 }, 436 "ValueHolder":{ 437 "type":"structure", 438 "members":{ 439 "IonBinary":{ 440 "shape":"IonBinary", 441 "documentation":"<p>An Amazon Ion binary value contained in a <code>ValueHolder</code> structure.</p>" 442 }, 443 "IonText":{ 444 "shape":"IonText", 445 "documentation":"<p>An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.</p>" 446 } 447 }, 448 "documentation":"<p>A structure that can contain a value in multiple encoding formats.</p>" 449 }, 450 "ValueHolders":{ 451 "type":"list", 452 "member":{"shape":"ValueHolder"} 453 }, 454 "WriteIOs":{"type":"long"} 455 }, 456 "documentation":"<p>The transactional data APIs for Amazon QLDB</p> <note> <p>Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.</p> <ul> <li> <p>If you are working with an AWS SDK, use the QLDB driver. The driver provides a high-level abstraction layer above this <i>QLDB Session</i> data plane and manages <code>SendCommand</code> API calls for you. For information and a list of supported programming languages, see <a href=\"https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-driver.html\">Getting started with the driver</a> in the <i>Amazon QLDB Developer Guide</i>.</p> </li> <li> <p>If you are working with the AWS Command Line Interface (AWS CLI), use the QLDB shell. The shell is a command line interface that uses the QLDB driver to interact with a ledger. For information, see <a href=\"https://docs.aws.amazon.com/qldb/latest/developerguide/data-shell.html\">Accessing Amazon QLDB using the QLDB shell</a>.</p> </li> </ul> </note>" 457} 458