aws-sdk-qldbsession 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 522b84c7773a28e65d501c9c87252bc46948f81a
4
+ data.tar.gz: d474bac277b3912964cfec14edef658dc5eace01
5
+ SHA512:
6
+ metadata.gz: 19cfc5d906b5aefe216e1b2d8e33ea2f63e046b5c73a332bd1cbb8d487fc5f0f23b6c7c05eaa59ddcb505642f9e201278933120e7bee5de4fc47c6e8e8a7db19
7
+ data.tar.gz: 4082d43f1848593ccd1b8689bcaec7ffd58d07c2206a5b90ca48572c1dd5a3f61a44097d64a53f5133cceefbc59018dbb4bc61e791cf7d9d1912941f320bc0e4
@@ -0,0 +1,47 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'aws-sdk-core'
9
+ require 'aws-sigv4'
10
+
11
+ require_relative 'aws-sdk-qldbsession/types'
12
+ require_relative 'aws-sdk-qldbsession/client_api'
13
+ require_relative 'aws-sdk-qldbsession/client'
14
+ require_relative 'aws-sdk-qldbsession/errors'
15
+ require_relative 'aws-sdk-qldbsession/resource'
16
+ require_relative 'aws-sdk-qldbsession/customizations'
17
+
18
+ # This module provides support for Amazon QLDB Session. This module is available in the
19
+ # `aws-sdk-qldbsession` gem.
20
+ #
21
+ # # Client
22
+ #
23
+ # The {Client} class provides one method for each API operation. Operation
24
+ # methods each accept a hash of request parameters and return a response
25
+ # structure.
26
+ #
27
+ # See {Client} for more information.
28
+ #
29
+ # # Errors
30
+ #
31
+ # Errors returned from Amazon QLDB Session all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::QLDBSession::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::QLDBSession
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,401 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ require 'seahorse/client/plugins/content_length.rb'
9
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
10
+ require 'aws-sdk-core/plugins/logging.rb'
11
+ require 'aws-sdk-core/plugins/param_converter.rb'
12
+ require 'aws-sdk-core/plugins/param_validator.rb'
13
+ require 'aws-sdk-core/plugins/user_agent.rb'
14
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
15
+ require 'aws-sdk-core/plugins/retry_errors.rb'
16
+ require 'aws-sdk-core/plugins/global_configuration.rb'
17
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
18
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
19
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
20
+ require 'aws-sdk-core/plugins/response_paging.rb'
21
+ require 'aws-sdk-core/plugins/stub_responses.rb'
22
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
23
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
24
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
25
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
26
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
27
+ require 'aws-sdk-core/plugins/signature_v4.rb'
28
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
29
+
30
+ Aws::Plugins::GlobalConfiguration.add_identifier(:qldbsession)
31
+
32
+ module Aws::QLDBSession
33
+ class Client < Seahorse::Client::Base
34
+
35
+ include Aws::ClientStubs
36
+
37
+ @identifier = :qldbsession
38
+
39
+ set_api(ClientApi::API)
40
+
41
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
42
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
43
+ add_plugin(Aws::Plugins::Logging)
44
+ add_plugin(Aws::Plugins::ParamConverter)
45
+ add_plugin(Aws::Plugins::ParamValidator)
46
+ add_plugin(Aws::Plugins::UserAgent)
47
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
48
+ add_plugin(Aws::Plugins::RetryErrors)
49
+ add_plugin(Aws::Plugins::GlobalConfiguration)
50
+ add_plugin(Aws::Plugins::RegionalEndpoint)
51
+ add_plugin(Aws::Plugins::EndpointDiscovery)
52
+ add_plugin(Aws::Plugins::EndpointPattern)
53
+ add_plugin(Aws::Plugins::ResponsePaging)
54
+ add_plugin(Aws::Plugins::StubResponses)
55
+ add_plugin(Aws::Plugins::IdempotencyToken)
56
+ add_plugin(Aws::Plugins::JsonvalueConverter)
57
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
58
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
59
+ add_plugin(Aws::Plugins::TransferEncoding)
60
+ add_plugin(Aws::Plugins::SignatureV4)
61
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
62
+
63
+ # @overload initialize(options)
64
+ # @param [Hash] options
65
+ # @option options [required, Aws::CredentialProvider] :credentials
66
+ # Your AWS credentials. This can be an instance of any one of the
67
+ # following classes:
68
+ #
69
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
70
+ # credentials.
71
+ #
72
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
73
+ # from an EC2 IMDS on an EC2 instance.
74
+ #
75
+ # * `Aws::SharedCredentials` - Used for loading credentials from a
76
+ # shared file, such as `~/.aws/config`.
77
+ #
78
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
79
+ #
80
+ # When `:credentials` are not configured directly, the following
81
+ # locations will be searched for credentials:
82
+ #
83
+ # * `Aws.config[:credentials]`
84
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
85
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
86
+ # * `~/.aws/credentials`
87
+ # * `~/.aws/config`
88
+ # * EC2 IMDS instance profile - When used by default, the timeouts are
89
+ # very aggressive. Construct and pass an instance of
90
+ # `Aws::InstanceProfileCredentails` to enable retries and extended
91
+ # timeouts.
92
+ #
93
+ # @option options [required, String] :region
94
+ # The AWS region to connect to. The configured `:region` is
95
+ # used to determine the service `:endpoint`. When not passed,
96
+ # a default `:region` is search for in the following locations:
97
+ #
98
+ # * `Aws.config[:region]`
99
+ # * `ENV['AWS_REGION']`
100
+ # * `ENV['AMAZON_REGION']`
101
+ # * `ENV['AWS_DEFAULT_REGION']`
102
+ # * `~/.aws/credentials`
103
+ # * `~/.aws/config`
104
+ #
105
+ # @option options [String] :access_key_id
106
+ #
107
+ # @option options [Boolean] :active_endpoint_cache (false)
108
+ # When set to `true`, a thread polling for endpoints will be running in
109
+ # the background every 60 secs (default). Defaults to `false`.
110
+ #
111
+ # @option options [Boolean] :client_side_monitoring (false)
112
+ # When `true`, client-side metrics will be collected for all API requests from
113
+ # this client.
114
+ #
115
+ # @option options [String] :client_side_monitoring_client_id ("")
116
+ # Allows you to provide an identifier for this client which will be attached to
117
+ # all generated client side metrics. Defaults to an empty string.
118
+ #
119
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
120
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
121
+ # side monitoring agent is running on, where client metrics will be published via UDP.
122
+ #
123
+ # @option options [Integer] :client_side_monitoring_port (31000)
124
+ # Required for publishing client metrics. The port that the client side monitoring
125
+ # agent is running on, where client metrics will be published via UDP.
126
+ #
127
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
128
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
129
+ # will use the Client Side Monitoring Agent Publisher.
130
+ #
131
+ # @option options [Boolean] :convert_params (true)
132
+ # When `true`, an attempt is made to coerce request parameters into
133
+ # the required types.
134
+ #
135
+ # @option options [Boolean] :disable_host_prefix_injection (false)
136
+ # Set to true to disable SDK automatically adding host prefix
137
+ # to default service endpoint when available.
138
+ #
139
+ # @option options [String] :endpoint
140
+ # The client endpoint is normally constructed from the `:region`
141
+ # option. You should only configure an `:endpoint` when connecting
142
+ # to test endpoints. This should be avalid HTTP(S) URI.
143
+ #
144
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
145
+ # Used for the maximum size limit of the LRU cache storing endpoints data
146
+ # for endpoint discovery enabled operations. Defaults to 1000.
147
+ #
148
+ # @option options [Integer] :endpoint_cache_max_threads (10)
149
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
150
+ #
151
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
152
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
153
+ # Use this option to config the time interval in seconds for making
154
+ # requests fetching endpoints information. Defaults to 60 sec.
155
+ #
156
+ # @option options [Boolean] :endpoint_discovery (false)
157
+ # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
158
+ #
159
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
+ # The log formatter.
161
+ #
162
+ # @option options [Symbol] :log_level (:info)
163
+ # The log level to send messages to the `:logger` at.
164
+ #
165
+ # @option options [Logger] :logger
166
+ # The Logger instance to send log messages to. If this option
167
+ # is not set, logging will be disabled.
168
+ #
169
+ # @option options [String] :profile ("default")
170
+ # Used when loading credentials from the shared credentials file
171
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
172
+ #
173
+ # @option options [Float] :retry_base_delay (0.3)
174
+ # The base delay in seconds used by the default backoff function.
175
+ #
176
+ # @option options [Symbol] :retry_jitter (:none)
177
+ # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
178
+ #
179
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
+ #
181
+ # @option options [Integer] :retry_limit (3)
182
+ # The maximum number of times to retry failed requests. Only
183
+ # ~ 500 level server errors and certain ~ 400 level client errors
184
+ # are retried. Generally, these are throttling errors, data
185
+ # checksum errors, networking errors, timeout errors and auth
186
+ # errors from expired credentials.
187
+ #
188
+ # @option options [Integer] :retry_max_delay (0)
189
+ # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
190
+ #
191
+ # @option options [String] :secret_access_key
192
+ #
193
+ # @option options [String] :session_token
194
+ #
195
+ # @option options [Boolean] :simple_json (false)
196
+ # Disables request parameter conversion, validation, and formatting.
197
+ # Also disable response data type conversions. This option is useful
198
+ # when you want to ensure the highest level of performance by
199
+ # avoiding overhead of walking request parameters and response data
200
+ # structures.
201
+ #
202
+ # When `:simple_json` is enabled, the request parameters hash must
203
+ # be formatted exactly as the DynamoDB API expects.
204
+ #
205
+ # @option options [Boolean] :stub_responses (false)
206
+ # Causes the client to return stubbed responses. By default
207
+ # fake responses are generated and returned. You can specify
208
+ # the response data to return or errors to raise by calling
209
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
210
+ #
211
+ # ** Please note ** When response stubbing is enabled, no HTTP
212
+ # requests are made, and retries are disabled.
213
+ #
214
+ # @option options [Boolean] :validate_params (true)
215
+ # When `true`, request parameters are validated before
216
+ # sending the request.
217
+ #
218
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
219
+ # requests through. Formatted like 'http://proxy.com:123'.
220
+ #
221
+ # @option options [Float] :http_open_timeout (15) The number of
222
+ # seconds to wait when opening a HTTP session before rasing a
223
+ # `Timeout::Error`.
224
+ #
225
+ # @option options [Integer] :http_read_timeout (60) The default
226
+ # number of seconds to wait for response data. This value can
227
+ # safely be set
228
+ # per-request on the session yeidled by {#session_for}.
229
+ #
230
+ # @option options [Float] :http_idle_timeout (5) The number of
231
+ # seconds a connection is allowed to sit idble before it is
232
+ # considered stale. Stale connections are closed and removed
233
+ # from the pool before making a request.
234
+ #
235
+ # @option options [Float] :http_continue_timeout (1) The number of
236
+ # seconds to wait for a 100-continue response before sending the
237
+ # request body. This option has no effect unless the request has
238
+ # "Expect" header set to "100-continue". Defaults to `nil` which
239
+ # disables this behaviour. This value can safely be set per
240
+ # request on the session yeidled by {#session_for}.
241
+ #
242
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
243
+ # HTTP debug output will be sent to the `:logger`.
244
+ #
245
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
246
+ # SSL peer certificates are verified when establishing a
247
+ # connection.
248
+ #
249
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
250
+ # certificate authority bundle file that should be used when
251
+ # verifying peer certificates. If you do not pass
252
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
253
+ # will be used if available.
254
+ #
255
+ # @option options [String] :ssl_ca_directory Full path of the
256
+ # directory that contains the unbundled SSL certificate
257
+ # authority files for verifying peer certificates. If you do
258
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
259
+ # system default will be used if available.
260
+ #
261
+ def initialize(*args)
262
+ super
263
+ end
264
+
265
+ # @!group API Operations
266
+
267
+ # Sends a command to an Amazon QLDB ledger.
268
+ #
269
+ # @option params [String] :session_token
270
+ # Specifies the session token for the current command. A session token
271
+ # is constant throughout the life of the session.
272
+ #
273
+ # To obtain a session token, run the `StartSession` command. This
274
+ # `SessionToken` is required for every subsequent command that is issued
275
+ # during the current session.
276
+ #
277
+ # @option params [Types::StartSessionRequest] :start_session
278
+ # Command to start a new session. A session token is obtained as part of
279
+ # the response.
280
+ #
281
+ # @option params [Types::StartTransactionRequest] :start_transaction
282
+ # Command to start a new transaction.
283
+ #
284
+ # @option params [Types::EndSessionRequest] :end_session
285
+ # Command to end the current session.
286
+ #
287
+ # @option params [Types::CommitTransactionRequest] :commit_transaction
288
+ # Command to commit the specified transaction.
289
+ #
290
+ # @option params [Types::AbortTransactionRequest] :abort_transaction
291
+ # Command to abort the current transaction.
292
+ #
293
+ # @option params [Types::ExecuteStatementRequest] :execute_statement
294
+ # Command to execute a statement in the specified transaction.
295
+ #
296
+ # @option params [Types::FetchPageRequest] :fetch_page
297
+ # Command to fetch a page.
298
+ #
299
+ # @return [Types::SendCommandResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
300
+ #
301
+ # * {Types::SendCommandResult#start_session #start_session} => Types::StartSessionResult
302
+ # * {Types::SendCommandResult#start_transaction #start_transaction} => Types::StartTransactionResult
303
+ # * {Types::SendCommandResult#end_session #end_session} => Types::EndSessionResult
304
+ # * {Types::SendCommandResult#commit_transaction #commit_transaction} => Types::CommitTransactionResult
305
+ # * {Types::SendCommandResult#abort_transaction #abort_transaction} => Types::AbortTransactionResult
306
+ # * {Types::SendCommandResult#execute_statement #execute_statement} => Types::ExecuteStatementResult
307
+ # * {Types::SendCommandResult#fetch_page #fetch_page} => Types::FetchPageResult
308
+ #
309
+ # @example Request syntax with placeholder values
310
+ #
311
+ # resp = client.send_command({
312
+ # session_token: "SessionToken",
313
+ # start_session: {
314
+ # ledger_name: "LedgerName", # required
315
+ # },
316
+ # start_transaction: {
317
+ # },
318
+ # end_session: {
319
+ # },
320
+ # commit_transaction: {
321
+ # transaction_id: "TransactionId", # required
322
+ # commit_digest: "data", # required
323
+ # },
324
+ # abort_transaction: {
325
+ # },
326
+ # execute_statement: {
327
+ # transaction_id: "TransactionId", # required
328
+ # statement: "Statement", # required
329
+ # parameters: [
330
+ # {
331
+ # ion_binary: "data",
332
+ # ion_text: "IonText",
333
+ # },
334
+ # ],
335
+ # },
336
+ # fetch_page: {
337
+ # transaction_id: "TransactionId", # required
338
+ # next_page_token: "PageToken", # required
339
+ # },
340
+ # })
341
+ #
342
+ # @example Response structure
343
+ #
344
+ # resp.start_session.session_token #=> String
345
+ # resp.start_transaction.transaction_id #=> String
346
+ # resp.commit_transaction.transaction_id #=> String
347
+ # resp.commit_transaction.commit_digest #=> String
348
+ # resp.execute_statement.first_page.values #=> Array
349
+ # resp.execute_statement.first_page.values[0].ion_binary #=> String
350
+ # resp.execute_statement.first_page.values[0].ion_text #=> String
351
+ # resp.execute_statement.first_page.next_page_token #=> String
352
+ # resp.fetch_page.page.values #=> Array
353
+ # resp.fetch_page.page.values[0].ion_binary #=> String
354
+ # resp.fetch_page.page.values[0].ion_text #=> String
355
+ # resp.fetch_page.page.next_page_token #=> String
356
+ #
357
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/SendCommand AWS API Documentation
358
+ #
359
+ # @overload send_command(params = {})
360
+ # @param [Hash] params ({})
361
+ def send_command(params = {}, options = {})
362
+ req = build_request(:send_command, params)
363
+ req.send_request(options)
364
+ end
365
+
366
+ # @!endgroup
367
+
368
+ # @param params ({})
369
+ # @api private
370
+ def build_request(operation_name, params = {})
371
+ handlers = @handlers.for(operation_name)
372
+ context = Seahorse::Client::RequestContext.new(
373
+ operation_name: operation_name,
374
+ operation: config.api.operation(operation_name),
375
+ client: self,
376
+ params: params,
377
+ config: config)
378
+ context[:gem_name] = 'aws-sdk-qldbsession'
379
+ context[:gem_version] = '1.0.0'
380
+ Seahorse::Client::Request.new(handlers, context)
381
+ end
382
+
383
+ # @api private
384
+ # @deprecated
385
+ def waiter_names
386
+ []
387
+ end
388
+
389
+ class << self
390
+
391
+ # @api private
392
+ attr_reader :identifier
393
+
394
+ # @api private
395
+ def errors_module
396
+ Errors
397
+ end
398
+
399
+ end
400
+ end
401
+ end
@@ -0,0 +1,175 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::QLDBSession
9
+ # @api private
10
+ module ClientApi
11
+
12
+ include Seahorse::Model
13
+
14
+ AbortTransactionRequest = Shapes::StructureShape.new(name: 'AbortTransactionRequest')
15
+ AbortTransactionResult = Shapes::StructureShape.new(name: 'AbortTransactionResult')
16
+ BadRequestException = Shapes::StructureShape.new(name: 'BadRequestException')
17
+ CommitDigest = Shapes::BlobShape.new(name: 'CommitDigest')
18
+ CommitTransactionRequest = Shapes::StructureShape.new(name: 'CommitTransactionRequest')
19
+ CommitTransactionResult = Shapes::StructureShape.new(name: 'CommitTransactionResult')
20
+ EndSessionRequest = Shapes::StructureShape.new(name: 'EndSessionRequest')
21
+ EndSessionResult = Shapes::StructureShape.new(name: 'EndSessionResult')
22
+ ErrorCode = Shapes::StringShape.new(name: 'ErrorCode')
23
+ ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
24
+ ExecuteStatementRequest = Shapes::StructureShape.new(name: 'ExecuteStatementRequest')
25
+ ExecuteStatementResult = Shapes::StructureShape.new(name: 'ExecuteStatementResult')
26
+ FetchPageRequest = Shapes::StructureShape.new(name: 'FetchPageRequest')
27
+ FetchPageResult = Shapes::StructureShape.new(name: 'FetchPageResult')
28
+ InvalidSessionException = Shapes::StructureShape.new(name: 'InvalidSessionException')
29
+ IonBinary = Shapes::BlobShape.new(name: 'IonBinary')
30
+ IonText = Shapes::StringShape.new(name: 'IonText')
31
+ LedgerName = Shapes::StringShape.new(name: 'LedgerName')
32
+ LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
33
+ OccConflictException = Shapes::StructureShape.new(name: 'OccConflictException')
34
+ Page = Shapes::StructureShape.new(name: 'Page')
35
+ PageToken = Shapes::StringShape.new(name: 'PageToken')
36
+ RateExceededException = Shapes::StructureShape.new(name: 'RateExceededException')
37
+ SendCommandRequest = Shapes::StructureShape.new(name: 'SendCommandRequest')
38
+ SendCommandResult = Shapes::StructureShape.new(name: 'SendCommandResult')
39
+ SessionToken = Shapes::StringShape.new(name: 'SessionToken')
40
+ StartSessionRequest = Shapes::StructureShape.new(name: 'StartSessionRequest')
41
+ StartSessionResult = Shapes::StructureShape.new(name: 'StartSessionResult')
42
+ StartTransactionRequest = Shapes::StructureShape.new(name: 'StartTransactionRequest')
43
+ StartTransactionResult = Shapes::StructureShape.new(name: 'StartTransactionResult')
44
+ Statement = Shapes::StringShape.new(name: 'Statement')
45
+ StatementParameters = Shapes::ListShape.new(name: 'StatementParameters')
46
+ TransactionId = Shapes::StringShape.new(name: 'TransactionId')
47
+ ValueHolder = Shapes::StructureShape.new(name: 'ValueHolder')
48
+ ValueHolders = Shapes::ListShape.new(name: 'ValueHolders')
49
+
50
+ AbortTransactionRequest.struct_class = Types::AbortTransactionRequest
51
+
52
+ AbortTransactionResult.struct_class = Types::AbortTransactionResult
53
+
54
+ BadRequestException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
55
+ BadRequestException.add_member(:code, Shapes::ShapeRef.new(shape: ErrorCode, location_name: "Code"))
56
+ BadRequestException.struct_class = Types::BadRequestException
57
+
58
+ CommitTransactionRequest.add_member(:transaction_id, Shapes::ShapeRef.new(shape: TransactionId, required: true, location_name: "TransactionId"))
59
+ CommitTransactionRequest.add_member(:commit_digest, Shapes::ShapeRef.new(shape: CommitDigest, required: true, location_name: "CommitDigest"))
60
+ CommitTransactionRequest.struct_class = Types::CommitTransactionRequest
61
+
62
+ CommitTransactionResult.add_member(:transaction_id, Shapes::ShapeRef.new(shape: TransactionId, location_name: "TransactionId"))
63
+ CommitTransactionResult.add_member(:commit_digest, Shapes::ShapeRef.new(shape: CommitDigest, location_name: "CommitDigest"))
64
+ CommitTransactionResult.struct_class = Types::CommitTransactionResult
65
+
66
+ EndSessionRequest.struct_class = Types::EndSessionRequest
67
+
68
+ EndSessionResult.struct_class = Types::EndSessionResult
69
+
70
+ ExecuteStatementRequest.add_member(:transaction_id, Shapes::ShapeRef.new(shape: TransactionId, required: true, location_name: "TransactionId"))
71
+ ExecuteStatementRequest.add_member(:statement, Shapes::ShapeRef.new(shape: Statement, required: true, location_name: "Statement"))
72
+ ExecuteStatementRequest.add_member(:parameters, Shapes::ShapeRef.new(shape: StatementParameters, location_name: "Parameters"))
73
+ ExecuteStatementRequest.struct_class = Types::ExecuteStatementRequest
74
+
75
+ ExecuteStatementResult.add_member(:first_page, Shapes::ShapeRef.new(shape: Page, location_name: "FirstPage"))
76
+ ExecuteStatementResult.struct_class = Types::ExecuteStatementResult
77
+
78
+ FetchPageRequest.add_member(:transaction_id, Shapes::ShapeRef.new(shape: TransactionId, required: true, location_name: "TransactionId"))
79
+ FetchPageRequest.add_member(:next_page_token, Shapes::ShapeRef.new(shape: PageToken, required: true, location_name: "NextPageToken"))
80
+ FetchPageRequest.struct_class = Types::FetchPageRequest
81
+
82
+ FetchPageResult.add_member(:page, Shapes::ShapeRef.new(shape: Page, location_name: "Page"))
83
+ FetchPageResult.struct_class = Types::FetchPageResult
84
+
85
+ InvalidSessionException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
86
+ InvalidSessionException.add_member(:code, Shapes::ShapeRef.new(shape: ErrorCode, location_name: "Code"))
87
+ InvalidSessionException.struct_class = Types::InvalidSessionException
88
+
89
+ LimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
90
+ LimitExceededException.struct_class = Types::LimitExceededException
91
+
92
+ OccConflictException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
93
+ OccConflictException.struct_class = Types::OccConflictException
94
+
95
+ Page.add_member(:values, Shapes::ShapeRef.new(shape: ValueHolders, location_name: "Values"))
96
+ Page.add_member(:next_page_token, Shapes::ShapeRef.new(shape: PageToken, location_name: "NextPageToken"))
97
+ Page.struct_class = Types::Page
98
+
99
+ RateExceededException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
100
+ RateExceededException.struct_class = Types::RateExceededException
101
+
102
+ SendCommandRequest.add_member(:session_token, Shapes::ShapeRef.new(shape: SessionToken, location_name: "SessionToken"))
103
+ SendCommandRequest.add_member(:start_session, Shapes::ShapeRef.new(shape: StartSessionRequest, location_name: "StartSession"))
104
+ SendCommandRequest.add_member(:start_transaction, Shapes::ShapeRef.new(shape: StartTransactionRequest, location_name: "StartTransaction"))
105
+ SendCommandRequest.add_member(:end_session, Shapes::ShapeRef.new(shape: EndSessionRequest, location_name: "EndSession"))
106
+ SendCommandRequest.add_member(:commit_transaction, Shapes::ShapeRef.new(shape: CommitTransactionRequest, location_name: "CommitTransaction"))
107
+ SendCommandRequest.add_member(:abort_transaction, Shapes::ShapeRef.new(shape: AbortTransactionRequest, location_name: "AbortTransaction"))
108
+ SendCommandRequest.add_member(:execute_statement, Shapes::ShapeRef.new(shape: ExecuteStatementRequest, location_name: "ExecuteStatement"))
109
+ SendCommandRequest.add_member(:fetch_page, Shapes::ShapeRef.new(shape: FetchPageRequest, location_name: "FetchPage"))
110
+ SendCommandRequest.struct_class = Types::SendCommandRequest
111
+
112
+ SendCommandResult.add_member(:start_session, Shapes::ShapeRef.new(shape: StartSessionResult, location_name: "StartSession"))
113
+ SendCommandResult.add_member(:start_transaction, Shapes::ShapeRef.new(shape: StartTransactionResult, location_name: "StartTransaction"))
114
+ SendCommandResult.add_member(:end_session, Shapes::ShapeRef.new(shape: EndSessionResult, location_name: "EndSession"))
115
+ SendCommandResult.add_member(:commit_transaction, Shapes::ShapeRef.new(shape: CommitTransactionResult, location_name: "CommitTransaction"))
116
+ SendCommandResult.add_member(:abort_transaction, Shapes::ShapeRef.new(shape: AbortTransactionResult, location_name: "AbortTransaction"))
117
+ SendCommandResult.add_member(:execute_statement, Shapes::ShapeRef.new(shape: ExecuteStatementResult, location_name: "ExecuteStatement"))
118
+ SendCommandResult.add_member(:fetch_page, Shapes::ShapeRef.new(shape: FetchPageResult, location_name: "FetchPage"))
119
+ SendCommandResult.struct_class = Types::SendCommandResult
120
+
121
+ StartSessionRequest.add_member(:ledger_name, Shapes::ShapeRef.new(shape: LedgerName, required: true, location_name: "LedgerName"))
122
+ StartSessionRequest.struct_class = Types::StartSessionRequest
123
+
124
+ StartSessionResult.add_member(:session_token, Shapes::ShapeRef.new(shape: SessionToken, location_name: "SessionToken"))
125
+ StartSessionResult.struct_class = Types::StartSessionResult
126
+
127
+ StartTransactionRequest.struct_class = Types::StartTransactionRequest
128
+
129
+ StartTransactionResult.add_member(:transaction_id, Shapes::ShapeRef.new(shape: TransactionId, location_name: "TransactionId"))
130
+ StartTransactionResult.struct_class = Types::StartTransactionResult
131
+
132
+ StatementParameters.member = Shapes::ShapeRef.new(shape: ValueHolder)
133
+
134
+ ValueHolder.add_member(:ion_binary, Shapes::ShapeRef.new(shape: IonBinary, location_name: "IonBinary"))
135
+ ValueHolder.add_member(:ion_text, Shapes::ShapeRef.new(shape: IonText, location_name: "IonText"))
136
+ ValueHolder.struct_class = Types::ValueHolder
137
+
138
+ ValueHolders.member = Shapes::ShapeRef.new(shape: ValueHolder)
139
+
140
+
141
+ # @api private
142
+ API = Seahorse::Model::Api.new.tap do |api|
143
+
144
+ api.version = "2019-07-11"
145
+
146
+ api.metadata = {
147
+ "apiVersion" => "2019-07-11",
148
+ "endpointPrefix" => "session.qldb",
149
+ "jsonVersion" => "1.0",
150
+ "protocol" => "json",
151
+ "serviceAbbreviation" => "QLDB Session",
152
+ "serviceFullName" => "Amazon QLDB Session",
153
+ "serviceId" => "QLDB Session",
154
+ "signatureVersion" => "v4",
155
+ "signingName" => "qldb",
156
+ "targetPrefix" => "QLDBSession",
157
+ "uid" => "qldb-session-2019-07-11",
158
+ }
159
+
160
+ api.add_operation(:send_command, Seahorse::Model::Operation.new.tap do |o|
161
+ o.name = "SendCommand"
162
+ o.http_method = "POST"
163
+ o.http_request_uri = "/"
164
+ o.input = Shapes::ShapeRef.new(shape: SendCommandRequest)
165
+ o.output = Shapes::ShapeRef.new(shape: SendCommandResult)
166
+ o.errors << Shapes::ShapeRef.new(shape: BadRequestException)
167
+ o.errors << Shapes::ShapeRef.new(shape: InvalidSessionException)
168
+ o.errors << Shapes::ShapeRef.new(shape: OccConflictException)
169
+ o.errors << Shapes::ShapeRef.new(shape: RateExceededException)
170
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
171
+ end)
172
+ end
173
+
174
+ end
175
+ end
@@ -0,0 +1,104 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::QLDBSession
9
+ module Errors
10
+
11
+ extend Aws::Errors::DynamicErrors
12
+
13
+ class BadRequestException < ServiceError
14
+
15
+ # @param [Seahorse::Client::RequestContext] context
16
+ # @param [String] message
17
+ # @param [Aws::QLDBSession::Types::BadRequestException] data
18
+ def initialize(context, message, data = Aws::EmptyStructure.new)
19
+ super(context, message, data)
20
+ end
21
+
22
+ # @return [String]
23
+ def message
24
+ @message || @data[:message]
25
+ end
26
+
27
+ # @return [String]
28
+ def code
29
+ @code || @data[:code]
30
+ end
31
+
32
+ end
33
+
34
+ class InvalidSessionException < ServiceError
35
+
36
+ # @param [Seahorse::Client::RequestContext] context
37
+ # @param [String] message
38
+ # @param [Aws::QLDBSession::Types::InvalidSessionException] data
39
+ def initialize(context, message, data = Aws::EmptyStructure.new)
40
+ super(context, message, data)
41
+ end
42
+
43
+ # @return [String]
44
+ def message
45
+ @message || @data[:message]
46
+ end
47
+
48
+ # @return [String]
49
+ def code
50
+ @code || @data[:code]
51
+ end
52
+
53
+ end
54
+
55
+ class LimitExceededException < ServiceError
56
+
57
+ # @param [Seahorse::Client::RequestContext] context
58
+ # @param [String] message
59
+ # @param [Aws::QLDBSession::Types::LimitExceededException] data
60
+ def initialize(context, message, data = Aws::EmptyStructure.new)
61
+ super(context, message, data)
62
+ end
63
+
64
+ # @return [String]
65
+ def message
66
+ @message || @data[:message]
67
+ end
68
+
69
+ end
70
+
71
+ class OccConflictException < ServiceError
72
+
73
+ # @param [Seahorse::Client::RequestContext] context
74
+ # @param [String] message
75
+ # @param [Aws::QLDBSession::Types::OccConflictException] data
76
+ def initialize(context, message, data = Aws::EmptyStructure.new)
77
+ super(context, message, data)
78
+ end
79
+
80
+ # @return [String]
81
+ def message
82
+ @message || @data[:message]
83
+ end
84
+
85
+ end
86
+
87
+ class RateExceededException < ServiceError
88
+
89
+ # @param [Seahorse::Client::RequestContext] context
90
+ # @param [String] message
91
+ # @param [Aws::QLDBSession::Types::RateExceededException] data
92
+ def initialize(context, message, data = Aws::EmptyStructure.new)
93
+ super(context, message, data)
94
+ end
95
+
96
+ # @return [String]
97
+ def message
98
+ @message || @data[:message]
99
+ end
100
+
101
+ end
102
+
103
+ end
104
+ end
@@ -0,0 +1,23 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::QLDBSession
9
+ class Resource
10
+
11
+ # @param options ({})
12
+ # @option options [Client] :client
13
+ def initialize(options = {})
14
+ @client = options[:client] || Client.new(options)
15
+ end
16
+
17
+ # @return [Client]
18
+ def client
19
+ @client
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,479 @@
1
+ # WARNING ABOUT GENERATED CODE
2
+ #
3
+ # This file is generated. See the contributing guide for more information:
4
+ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ #
6
+ # WARNING ABOUT GENERATED CODE
7
+
8
+ module Aws::QLDBSession
9
+ module Types
10
+
11
+ # Contains the details of the transaction to abort.
12
+ #
13
+ # @api private
14
+ #
15
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/AbortTransactionRequest AWS API Documentation
16
+ #
17
+ class AbortTransactionRequest < Aws::EmptyStructure; end
18
+
19
+ # Contains the details of the aborted transaction.
20
+ #
21
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/AbortTransactionResult AWS API Documentation
22
+ #
23
+ class AbortTransactionResult < Aws::EmptyStructure; end
24
+
25
+ # Returned if the request is malformed or contains an error such as an
26
+ # invalid parameter value or a missing required parameter.
27
+ #
28
+ # @!attribute [rw] message
29
+ # @return [String]
30
+ #
31
+ # @!attribute [rw] code
32
+ # @return [String]
33
+ #
34
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/BadRequestException AWS API Documentation
35
+ #
36
+ class BadRequestException < Struct.new(
37
+ :message,
38
+ :code)
39
+ include Aws::Structure
40
+ end
41
+
42
+ # Contains the details of the transaction to commit.
43
+ #
44
+ # @note When making an API call, you may pass CommitTransactionRequest
45
+ # data as a hash:
46
+ #
47
+ # {
48
+ # transaction_id: "TransactionId", # required
49
+ # commit_digest: "data", # required
50
+ # }
51
+ #
52
+ # @!attribute [rw] transaction_id
53
+ # Specifies the transaction id of the transaction to commit.
54
+ # @return [String]
55
+ #
56
+ # @!attribute [rw] commit_digest
57
+ # Specifies the commit digest for the transaction to commit. For every
58
+ # active transaction, the commit digest must be passed. QLDB validates
59
+ # `CommitDigest` and rejects the commit with an error if the digest
60
+ # computed on the client does not match the digest computed by QLDB.
61
+ # @return [String]
62
+ #
63
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/CommitTransactionRequest AWS API Documentation
64
+ #
65
+ class CommitTransactionRequest < Struct.new(
66
+ :transaction_id,
67
+ :commit_digest)
68
+ include Aws::Structure
69
+ end
70
+
71
+ # Contains the details of the committed transaction.
72
+ #
73
+ # @!attribute [rw] transaction_id
74
+ # The transaction id of the committed transaction.
75
+ # @return [String]
76
+ #
77
+ # @!attribute [rw] commit_digest
78
+ # The commit digest of the committed transaction.
79
+ # @return [String]
80
+ #
81
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/CommitTransactionResult AWS API Documentation
82
+ #
83
+ class CommitTransactionResult < Struct.new(
84
+ :transaction_id,
85
+ :commit_digest)
86
+ include Aws::Structure
87
+ end
88
+
89
+ # Specifies a request to end the session.
90
+ #
91
+ # @api private
92
+ #
93
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/EndSessionRequest AWS API Documentation
94
+ #
95
+ class EndSessionRequest < Aws::EmptyStructure; end
96
+
97
+ # Contains the details of the ended session.
98
+ #
99
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/EndSessionResult AWS API Documentation
100
+ #
101
+ class EndSessionResult < Aws::EmptyStructure; end
102
+
103
+ # Specifies a request to execute a statement.
104
+ #
105
+ # @note When making an API call, you may pass ExecuteStatementRequest
106
+ # data as a hash:
107
+ #
108
+ # {
109
+ # transaction_id: "TransactionId", # required
110
+ # statement: "Statement", # required
111
+ # parameters: [
112
+ # {
113
+ # ion_binary: "data",
114
+ # ion_text: "IonText",
115
+ # },
116
+ # ],
117
+ # }
118
+ #
119
+ # @!attribute [rw] transaction_id
120
+ # Specifies the transaction id of the request.
121
+ # @return [String]
122
+ #
123
+ # @!attribute [rw] statement
124
+ # Specifies the statement of the request.
125
+ # @return [String]
126
+ #
127
+ # @!attribute [rw] parameters
128
+ # Specifies the parameters for the parameterized statement in the
129
+ # request.
130
+ # @return [Array<Types::ValueHolder>]
131
+ #
132
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/ExecuteStatementRequest AWS API Documentation
133
+ #
134
+ class ExecuteStatementRequest < Struct.new(
135
+ :transaction_id,
136
+ :statement,
137
+ :parameters)
138
+ include Aws::Structure
139
+ end
140
+
141
+ # Contains the details of the executed statement.
142
+ #
143
+ # @!attribute [rw] first_page
144
+ # Contains the details of the first fetched page.
145
+ # @return [Types::Page]
146
+ #
147
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/ExecuteStatementResult AWS API Documentation
148
+ #
149
+ class ExecuteStatementResult < Struct.new(
150
+ :first_page)
151
+ include Aws::Structure
152
+ end
153
+
154
+ # Specifies the details of the page to be fetched.
155
+ #
156
+ # @note When making an API call, you may pass FetchPageRequest
157
+ # data as a hash:
158
+ #
159
+ # {
160
+ # transaction_id: "TransactionId", # required
161
+ # next_page_token: "PageToken", # required
162
+ # }
163
+ #
164
+ # @!attribute [rw] transaction_id
165
+ # Specifies the transaction id of the page to be fetched.
166
+ # @return [String]
167
+ #
168
+ # @!attribute [rw] next_page_token
169
+ # Specifies the next page token of the page to be fetched.
170
+ # @return [String]
171
+ #
172
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/FetchPageRequest AWS API Documentation
173
+ #
174
+ class FetchPageRequest < Struct.new(
175
+ :transaction_id,
176
+ :next_page_token)
177
+ include Aws::Structure
178
+ end
179
+
180
+ # Contains the page that was fetched.
181
+ #
182
+ # @!attribute [rw] page
183
+ # Contains details of the fetched page.
184
+ # @return [Types::Page]
185
+ #
186
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/FetchPageResult AWS API Documentation
187
+ #
188
+ class FetchPageResult < Struct.new(
189
+ :page)
190
+ include Aws::Structure
191
+ end
192
+
193
+ # Returned if the session doesn't exist anymore because it timed-out or
194
+ # expired.
195
+ #
196
+ # @!attribute [rw] message
197
+ # @return [String]
198
+ #
199
+ # @!attribute [rw] code
200
+ # @return [String]
201
+ #
202
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/InvalidSessionException AWS API Documentation
203
+ #
204
+ class InvalidSessionException < Struct.new(
205
+ :message,
206
+ :code)
207
+ include Aws::Structure
208
+ end
209
+
210
+ # Returned if a resource limit such as number of active sessions is
211
+ # exceeded.
212
+ #
213
+ # @!attribute [rw] message
214
+ # @return [String]
215
+ #
216
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/LimitExceededException AWS API Documentation
217
+ #
218
+ class LimitExceededException < Struct.new(
219
+ :message)
220
+ include Aws::Structure
221
+ end
222
+
223
+ # Returned when a transaction cannot be written to the journal due to a
224
+ # failure in the verification phase of Optimistic Concurrency Control.
225
+ #
226
+ # @!attribute [rw] message
227
+ # @return [String]
228
+ #
229
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/OccConflictException AWS API Documentation
230
+ #
231
+ class OccConflictException < Struct.new(
232
+ :message)
233
+ include Aws::Structure
234
+ end
235
+
236
+ # Contains details of the fetched page.
237
+ #
238
+ # @!attribute [rw] values
239
+ # A structure that contains values in multiple encoding formats.
240
+ # @return [Array<Types::ValueHolder>]
241
+ #
242
+ # @!attribute [rw] next_page_token
243
+ # The token of the next page.
244
+ # @return [String]
245
+ #
246
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/Page AWS API Documentation
247
+ #
248
+ class Page < Struct.new(
249
+ :values,
250
+ :next_page_token)
251
+ include Aws::Structure
252
+ end
253
+
254
+ # Returned when the rate of requests exceeds the allowed throughput.
255
+ #
256
+ # @!attribute [rw] message
257
+ # @return [String]
258
+ #
259
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/RateExceededException AWS API Documentation
260
+ #
261
+ class RateExceededException < Struct.new(
262
+ :message)
263
+ include Aws::Structure
264
+ end
265
+
266
+ # @note When making an API call, you may pass SendCommandRequest
267
+ # data as a hash:
268
+ #
269
+ # {
270
+ # session_token: "SessionToken",
271
+ # start_session: {
272
+ # ledger_name: "LedgerName", # required
273
+ # },
274
+ # start_transaction: {
275
+ # },
276
+ # end_session: {
277
+ # },
278
+ # commit_transaction: {
279
+ # transaction_id: "TransactionId", # required
280
+ # commit_digest: "data", # required
281
+ # },
282
+ # abort_transaction: {
283
+ # },
284
+ # execute_statement: {
285
+ # transaction_id: "TransactionId", # required
286
+ # statement: "Statement", # required
287
+ # parameters: [
288
+ # {
289
+ # ion_binary: "data",
290
+ # ion_text: "IonText",
291
+ # },
292
+ # ],
293
+ # },
294
+ # fetch_page: {
295
+ # transaction_id: "TransactionId", # required
296
+ # next_page_token: "PageToken", # required
297
+ # },
298
+ # }
299
+ #
300
+ # @!attribute [rw] session_token
301
+ # Specifies the session token for the current command. A session token
302
+ # is constant throughout the life of the session.
303
+ #
304
+ # To obtain a session token, run the `StartSession` command. This
305
+ # `SessionToken` is required for every subsequent command that is
306
+ # issued during the current session.
307
+ # @return [String]
308
+ #
309
+ # @!attribute [rw] start_session
310
+ # Command to start a new session. A session token is obtained as part
311
+ # of the response.
312
+ # @return [Types::StartSessionRequest]
313
+ #
314
+ # @!attribute [rw] start_transaction
315
+ # Command to start a new transaction.
316
+ # @return [Types::StartTransactionRequest]
317
+ #
318
+ # @!attribute [rw] end_session
319
+ # Command to end the current session.
320
+ # @return [Types::EndSessionRequest]
321
+ #
322
+ # @!attribute [rw] commit_transaction
323
+ # Command to commit the specified transaction.
324
+ # @return [Types::CommitTransactionRequest]
325
+ #
326
+ # @!attribute [rw] abort_transaction
327
+ # Command to abort the current transaction.
328
+ # @return [Types::AbortTransactionRequest]
329
+ #
330
+ # @!attribute [rw] execute_statement
331
+ # Command to execute a statement in the specified transaction.
332
+ # @return [Types::ExecuteStatementRequest]
333
+ #
334
+ # @!attribute [rw] fetch_page
335
+ # Command to fetch a page.
336
+ # @return [Types::FetchPageRequest]
337
+ #
338
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/SendCommandRequest AWS API Documentation
339
+ #
340
+ class SendCommandRequest < Struct.new(
341
+ :session_token,
342
+ :start_session,
343
+ :start_transaction,
344
+ :end_session,
345
+ :commit_transaction,
346
+ :abort_transaction,
347
+ :execute_statement,
348
+ :fetch_page)
349
+ include Aws::Structure
350
+ end
351
+
352
+ # @!attribute [rw] start_session
353
+ # Contains the details of the started session that includes a session
354
+ # token. This `SessionToken` is required for every subsequent command
355
+ # that is issued during the current session.
356
+ # @return [Types::StartSessionResult]
357
+ #
358
+ # @!attribute [rw] start_transaction
359
+ # Contains the details of the started transaction.
360
+ # @return [Types::StartTransactionResult]
361
+ #
362
+ # @!attribute [rw] end_session
363
+ # Contains the details of the ended session.
364
+ # @return [Types::EndSessionResult]
365
+ #
366
+ # @!attribute [rw] commit_transaction
367
+ # Contains the details of the committed transaction.
368
+ # @return [Types::CommitTransactionResult]
369
+ #
370
+ # @!attribute [rw] abort_transaction
371
+ # Contains the details of the aborted transaction.
372
+ # @return [Types::AbortTransactionResult]
373
+ #
374
+ # @!attribute [rw] execute_statement
375
+ # Contains the details of the executed statement.
376
+ # @return [Types::ExecuteStatementResult]
377
+ #
378
+ # @!attribute [rw] fetch_page
379
+ # Contains the details of the fetched page.
380
+ # @return [Types::FetchPageResult]
381
+ #
382
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/SendCommandResult AWS API Documentation
383
+ #
384
+ class SendCommandResult < Struct.new(
385
+ :start_session,
386
+ :start_transaction,
387
+ :end_session,
388
+ :commit_transaction,
389
+ :abort_transaction,
390
+ :execute_statement,
391
+ :fetch_page)
392
+ include Aws::Structure
393
+ end
394
+
395
+ # Specifies a request to start a a new session.
396
+ #
397
+ # @note When making an API call, you may pass StartSessionRequest
398
+ # data as a hash:
399
+ #
400
+ # {
401
+ # ledger_name: "LedgerName", # required
402
+ # }
403
+ #
404
+ # @!attribute [rw] ledger_name
405
+ # The name of the ledger to start a new session against.
406
+ # @return [String]
407
+ #
408
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/StartSessionRequest AWS API Documentation
409
+ #
410
+ class StartSessionRequest < Struct.new(
411
+ :ledger_name)
412
+ include Aws::Structure
413
+ end
414
+
415
+ # Contains the details of the started session.
416
+ #
417
+ # @!attribute [rw] session_token
418
+ # Session token of the started session. This `SessionToken` is
419
+ # required for every subsequent command that is issued during the
420
+ # current session.
421
+ # @return [String]
422
+ #
423
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/StartSessionResult AWS API Documentation
424
+ #
425
+ class StartSessionResult < Struct.new(
426
+ :session_token)
427
+ include Aws::Structure
428
+ end
429
+
430
+ # Specifies a request to start a transaction.
431
+ #
432
+ # @api private
433
+ #
434
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/StartTransactionRequest AWS API Documentation
435
+ #
436
+ class StartTransactionRequest < Aws::EmptyStructure; end
437
+
438
+ # Contains the details of the started transaction.
439
+ #
440
+ # @!attribute [rw] transaction_id
441
+ # The transaction id of the started transaction.
442
+ # @return [String]
443
+ #
444
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/StartTransactionResult AWS API Documentation
445
+ #
446
+ class StartTransactionResult < Struct.new(
447
+ :transaction_id)
448
+ include Aws::Structure
449
+ end
450
+
451
+ # A structure that can contains values in multiple encoding formats.
452
+ #
453
+ # @note When making an API call, you may pass ValueHolder
454
+ # data as a hash:
455
+ #
456
+ # {
457
+ # ion_binary: "data",
458
+ # ion_text: "IonText",
459
+ # }
460
+ #
461
+ # @!attribute [rw] ion_binary
462
+ # An Amazon Ion binary value contained in a `ValueHolder` structure.
463
+ # @return [String]
464
+ #
465
+ # @!attribute [rw] ion_text
466
+ # An Amazon Ion plaintext value contained in a `ValueHolder`
467
+ # structure.
468
+ # @return [String]
469
+ #
470
+ # @see http://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/ValueHolder AWS API Documentation
471
+ #
472
+ class ValueHolder < Struct.new(
473
+ :ion_binary,
474
+ :ion_text)
475
+ include Aws::Structure
476
+ end
477
+
478
+ end
479
+ end
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aws-sdk-qldbsession
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Amazon Web Services
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: aws-sdk-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.61.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.61.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: aws-sigv4
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.1'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.1'
47
+ description: Official AWS Ruby gem for Amazon QLDB Session (QLDB Session). This gem
48
+ is part of the AWS SDK for Ruby.
49
+ email:
50
+ - trevrowe@amazon.com
51
+ executables: []
52
+ extensions: []
53
+ extra_rdoc_files: []
54
+ files:
55
+ - lib/aws-sdk-qldbsession.rb
56
+ - lib/aws-sdk-qldbsession/client.rb
57
+ - lib/aws-sdk-qldbsession/client_api.rb
58
+ - lib/aws-sdk-qldbsession/customizations.rb
59
+ - lib/aws-sdk-qldbsession/errors.rb
60
+ - lib/aws-sdk-qldbsession/resource.rb
61
+ - lib/aws-sdk-qldbsession/types.rb
62
+ homepage: https://github.com/aws/aws-sdk-ruby
63
+ licenses:
64
+ - Apache-2.0
65
+ metadata:
66
+ source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-qldbsession
67
+ changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-qldbsession/CHANGELOG.md
68
+ post_install_message:
69
+ rdoc_options: []
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ requirements: []
83
+ rubyforge_project:
84
+ rubygems_version: 2.5.2.3
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: AWS SDK for Ruby - QLDB Session
88
+ test_files: []