{ "version":"2.0", "metadata":{ "apiVersion":"2019-07-11", "endpointPrefix":"session.qldb", "jsonVersion":"1.0", "protocol":"json", "serviceAbbreviation":"QLDB Session", "serviceFullName":"Amazon QLDB Session", "serviceId":"QLDB Session", "signatureVersion":"v4", "signingName":"qldb", "targetPrefix":"QLDBSession", "uid":"qldb-session-2019-07-11" }, "operations":{ "SendCommand":{ "name":"SendCommand", "http":{ "method":"POST", "requestUri":"/" }, "input":{"shape":"SendCommandRequest"}, "output":{"shape":"SendCommandResult"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"InvalidSessionException"}, {"shape":"OccConflictException"}, {"shape":"RateExceededException"}, {"shape":"LimitExceededException"}, {"shape":"CapacityExceededException"} ], "documentation":"

Sends a command to an Amazon QLDB ledger.

Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.

" } }, "shapes":{ "AbortTransactionRequest":{ "type":"structure", "members":{ }, "documentation":"

Contains the details of the transaction to abort.

" }, "AbortTransactionResult":{ "type":"structure", "members":{ "TimingInformation":{ "shape":"TimingInformation", "documentation":"

Contains server-side performance information for the command.

" } }, "documentation":"

Contains the details of the aborted transaction.

" }, "BadRequestException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"}, "Code":{"shape":"ErrorCode"} }, "documentation":"

Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

", "exception":true }, "CapacityExceededException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

Returned when the request exceeds the processing capacity of the ledger.

", "exception":true }, "CommitDigest":{"type":"blob"}, "CommitTransactionRequest":{ "type":"structure", "required":[ "TransactionId", "CommitDigest" ], "members":{ "TransactionId":{ "shape":"TransactionId", "documentation":"

Specifies the transaction ID of the transaction to commit.

" }, "CommitDigest":{ "shape":"CommitDigest", "documentation":"

Specifies the commit digest for the transaction to commit. For every active transaction, the commit digest must be passed. QLDB validates CommitDigest and rejects the commit with an error if the digest computed on the client does not match the digest computed by QLDB.

The purpose of the CommitDigest 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.

" } }, "documentation":"

Contains the details of the transaction to commit.

" }, "CommitTransactionResult":{ "type":"structure", "members":{ "TransactionId":{ "shape":"TransactionId", "documentation":"

The transaction ID of the committed transaction.

" }, "CommitDigest":{ "shape":"CommitDigest", "documentation":"

The commit digest of the committed transaction.

" }, "TimingInformation":{ "shape":"TimingInformation", "documentation":"

Contains server-side performance information for the command.

" }, "ConsumedIOs":{ "shape":"IOUsage", "documentation":"

Contains metrics about the number of I/O requests that were consumed.

" } }, "documentation":"

Contains the details of the committed transaction.

" }, "EndSessionRequest":{ "type":"structure", "members":{ }, "documentation":"

Specifies a request to end the session.

" }, "EndSessionResult":{ "type":"structure", "members":{ "TimingInformation":{ "shape":"TimingInformation", "documentation":"

Contains server-side performance information for the command.

" } }, "documentation":"

Contains the details of the ended session.

" }, "ErrorCode":{"type":"string"}, "ErrorMessage":{"type":"string"}, "ExecuteStatementRequest":{ "type":"structure", "required":[ "TransactionId", "Statement" ], "members":{ "TransactionId":{ "shape":"TransactionId", "documentation":"

Specifies the transaction ID of the request.

" }, "Statement":{ "shape":"Statement", "documentation":"

Specifies the statement of the request.

" }, "Parameters":{ "shape":"StatementParameters", "documentation":"

Specifies the parameters for the parameterized statement in the request.

" } }, "documentation":"

Specifies a request to execute a statement.

" }, "ExecuteStatementResult":{ "type":"structure", "members":{ "FirstPage":{ "shape":"Page", "documentation":"

Contains the details of the first fetched page.

" }, "TimingInformation":{ "shape":"TimingInformation", "documentation":"

Contains server-side performance information for the command.

" }, "ConsumedIOs":{ "shape":"IOUsage", "documentation":"

Contains metrics about the number of I/O requests that were consumed.

" } }, "documentation":"

Contains the details of the executed statement.

" }, "FetchPageRequest":{ "type":"structure", "required":[ "TransactionId", "NextPageToken" ], "members":{ "TransactionId":{ "shape":"TransactionId", "documentation":"

Specifies the transaction ID of the page to be fetched.

" }, "NextPageToken":{ "shape":"PageToken", "documentation":"

Specifies the next page token of the page to be fetched.

" } }, "documentation":"

Specifies the details of the page to be fetched.

" }, "FetchPageResult":{ "type":"structure", "members":{ "Page":{ "shape":"Page", "documentation":"

Contains details of the fetched page.

" }, "TimingInformation":{ "shape":"TimingInformation", "documentation":"

Contains server-side performance information for the command.

" }, "ConsumedIOs":{ "shape":"IOUsage", "documentation":"

Contains metrics about the number of I/O requests that were consumed.

" } }, "documentation":"

Contains the page that was fetched.

" }, "IOUsage":{ "type":"structure", "members":{ "ReadIOs":{ "shape":"ReadIOs", "documentation":"

The number of read I/O requests that the command made.

" }, "WriteIOs":{ "shape":"WriteIOs", "documentation":"

The number of write I/O requests that the command made.

" } }, "documentation":"

Contains I/O usage metrics for a command that was invoked.

" }, "InvalidSessionException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"}, "Code":{"shape":"ErrorCode"} }, "documentation":"

Returned if the session doesn't exist anymore because it timed out or expired.

", "exception":true }, "IonBinary":{ "type":"blob", "max":131072, "min":1 }, "IonText":{ "type":"string", "max":1048576, "min":1 }, "LedgerName":{ "type":"string", "max":32, "min":1, "pattern":"(?!^.*--)(?!^[0-9]+$)(?!^-)(?!.*-$)^[A-Za-z0-9-]+$" }, "LimitExceededException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

Returned if a resource limit such as number of active sessions is exceeded.

", "exception":true }, "OccConflictException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

Returned when a transaction cannot be written to the journal due to a failure in the verification phase of optimistic concurrency control (OCC).

", "exception":true }, "Page":{ "type":"structure", "members":{ "Values":{ "shape":"ValueHolders", "documentation":"

A structure that contains values in multiple encoding formats.

" }, "NextPageToken":{ "shape":"PageToken", "documentation":"

The token of the next page.

" } }, "documentation":"

Contains details of the fetched page.

" }, "PageToken":{ "type":"string", "max":1024, "min":4, "pattern":"^[A-Za-z-0-9+/=]+$" }, "ProcessingTimeMilliseconds":{"type":"long"}, "RateExceededException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

Returned when the rate of requests exceeds the allowed throughput.

", "exception":true }, "ReadIOs":{"type":"long"}, "SendCommandRequest":{ "type":"structure", "members":{ "SessionToken":{ "shape":"SessionToken", "documentation":"

Specifies the session token for the current command. A session token is constant throughout the life of the session.

To obtain a session token, run the StartSession command. This SessionToken is required for every subsequent command that is issued during the current session.

" }, "StartSession":{ "shape":"StartSessionRequest", "documentation":"

Command to start a new session. A session token is obtained as part of the response.

" }, "StartTransaction":{ "shape":"StartTransactionRequest", "documentation":"

Command to start a new transaction.

" }, "EndSession":{ "shape":"EndSessionRequest", "documentation":"

Command to end the current session.

" }, "CommitTransaction":{ "shape":"CommitTransactionRequest", "documentation":"

Command to commit the specified transaction.

" }, "AbortTransaction":{ "shape":"AbortTransactionRequest", "documentation":"

Command to abort the current transaction.

" }, "ExecuteStatement":{ "shape":"ExecuteStatementRequest", "documentation":"

Command to execute a statement in the specified transaction.

" }, "FetchPage":{ "shape":"FetchPageRequest", "documentation":"

Command to fetch a page.

" } } }, "SendCommandResult":{ "type":"structure", "members":{ "StartSession":{ "shape":"StartSessionResult", "documentation":"

Contains the details of the started session that includes a session token. This SessionToken is required for every subsequent command that is issued during the current session.

" }, "StartTransaction":{ "shape":"StartTransactionResult", "documentation":"

Contains the details of the started transaction.

" }, "EndSession":{ "shape":"EndSessionResult", "documentation":"

Contains the details of the ended session.

" }, "CommitTransaction":{ "shape":"CommitTransactionResult", "documentation":"

Contains the details of the committed transaction.

" }, "AbortTransaction":{ "shape":"AbortTransactionResult", "documentation":"

Contains the details of the aborted transaction.

" }, "ExecuteStatement":{ "shape":"ExecuteStatementResult", "documentation":"

Contains the details of the executed statement.

" }, "FetchPage":{ "shape":"FetchPageResult", "documentation":"

Contains the details of the fetched page.

" } } }, "SessionToken":{ "type":"string", "max":1024, "min":4, "pattern":"^[A-Za-z-0-9+/=]+$" }, "StartSessionRequest":{ "type":"structure", "required":["LedgerName"], "members":{ "LedgerName":{ "shape":"LedgerName", "documentation":"

The name of the ledger to start a new session against.

" } }, "documentation":"

Specifies a request to start a new session.

" }, "StartSessionResult":{ "type":"structure", "members":{ "SessionToken":{ "shape":"SessionToken", "documentation":"

Session token of the started session. This SessionToken is required for every subsequent command that is issued during the current session.

" }, "TimingInformation":{ "shape":"TimingInformation", "documentation":"

Contains server-side performance information for the command.

" } }, "documentation":"

Contains the details of the started session.

" }, "StartTransactionRequest":{ "type":"structure", "members":{ }, "documentation":"

Specifies a request to start a transaction.

" }, "StartTransactionResult":{ "type":"structure", "members":{ "TransactionId":{ "shape":"TransactionId", "documentation":"

The transaction ID of the started transaction.

" }, "TimingInformation":{ "shape":"TimingInformation", "documentation":"

Contains server-side performance information for the command.

" } }, "documentation":"

Contains the details of the started transaction.

" }, "Statement":{ "type":"string", "max":100000, "min":1 }, "StatementParameters":{ "type":"list", "member":{"shape":"ValueHolder"} }, "TimingInformation":{ "type":"structure", "members":{ "ProcessingTimeMilliseconds":{ "shape":"ProcessingTimeMilliseconds", "documentation":"

The amount of time that QLDB spent on processing the command, measured in milliseconds.

" } }, "documentation":"

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.

" }, "TransactionId":{ "type":"string", "max":22, "min":22, "pattern":"^[A-Za-z-0-9]+$" }, "ValueHolder":{ "type":"structure", "members":{ "IonBinary":{ "shape":"IonBinary", "documentation":"

An Amazon Ion binary value contained in a ValueHolder structure.

" }, "IonText":{ "shape":"IonText", "documentation":"

An Amazon Ion plaintext value contained in a ValueHolder structure.

" } }, "documentation":"

A structure that can contain a value in multiple encoding formats.

" }, "ValueHolders":{ "type":"list", "member":{"shape":"ValueHolder"} }, "WriteIOs":{"type":"long"} }, "documentation":"

The transactional data APIs for Amazon QLDB

Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.

" }