AWS SDK for C++  1.8.95
AWS SDK for C++
RDSDataServiceClient.h
Go to the documentation of this file.
1 
6 #pragma once
21 #include <future>
22 #include <functional>
23 
24 namespace Aws
25 {
26 
27 namespace Http
28 {
29  class HttpClient;
30  class HttpClientFactory;
31 } // namespace Http
32 
33 namespace Utils
34 {
35  template< typename R, typename E> class Outcome;
36 namespace Threading
37 {
38  class Executor;
39 } // namespace Threading
40 } // namespace Utils
41 
42 namespace Auth
43 {
44  class AWSCredentials;
45  class AWSCredentialsProvider;
46 } // namespace Auth
47 
48 namespace Client
49 {
50  class RetryStrategy;
51 } // namespace Client
52 
53 namespace RDSDataService
54 {
55 
56 namespace Model
57 {
58  class BatchExecuteStatementRequest;
59  class BeginTransactionRequest;
60  class CommitTransactionRequest;
61  class ExecuteStatementRequest;
63 
69 
70  typedef std::future<BatchExecuteStatementOutcome> BatchExecuteStatementOutcomeCallable;
71  typedef std::future<BeginTransactionOutcome> BeginTransactionOutcomeCallable;
72  typedef std::future<CommitTransactionOutcome> CommitTransactionOutcomeCallable;
73  typedef std::future<ExecuteStatementOutcome> ExecuteStatementOutcomeCallable;
74  typedef std::future<RollbackTransactionOutcome> RollbackTransactionOutcomeCallable;
75 } // namespace Model
76 
78 
79  typedef std::function<void(const RDSDataServiceClient*, const Model::BatchExecuteStatementRequest&, const Model::BatchExecuteStatementOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > BatchExecuteStatementResponseReceivedHandler;
80  typedef std::function<void(const RDSDataServiceClient*, const Model::BeginTransactionRequest&, const Model::BeginTransactionOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > BeginTransactionResponseReceivedHandler;
81  typedef std::function<void(const RDSDataServiceClient*, const Model::CommitTransactionRequest&, const Model::CommitTransactionOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CommitTransactionResponseReceivedHandler;
82  typedef std::function<void(const RDSDataServiceClient*, const Model::ExecuteStatementRequest&, const Model::ExecuteStatementOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ExecuteStatementResponseReceivedHandler;
83  typedef std::function<void(const RDSDataServiceClient*, const Model::RollbackTransactionRequest&, const Model::RollbackTransactionOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RollbackTransactionResponseReceivedHandler;
84 
98  {
99  public:
101 
107 
113 
118  RDSDataServiceClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
120 
121  virtual ~RDSDataServiceClient();
122 
123 
135  virtual Model::BatchExecuteStatementOutcome BatchExecuteStatement(const Model::BatchExecuteStatementRequest& request) const;
136 
150  virtual Model::BatchExecuteStatementOutcomeCallable BatchExecuteStatementCallable(const Model::BatchExecuteStatementRequest& request) const;
151 
165  virtual void BatchExecuteStatementAsync(const Model::BatchExecuteStatementRequest& request, const BatchExecuteStatementResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
166 
181  virtual Model::BeginTransactionOutcome BeginTransaction(const Model::BeginTransactionRequest& request) const;
182 
199  virtual Model::BeginTransactionOutcomeCallable BeginTransactionCallable(const Model::BeginTransactionRequest& request) const;
200 
217  virtual void BeginTransactionAsync(const Model::BeginTransactionRequest& request, const BeginTransactionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
218 
225  virtual Model::CommitTransactionOutcome CommitTransaction(const Model::CommitTransactionRequest& request) const;
226 
235  virtual Model::CommitTransactionOutcomeCallable CommitTransactionCallable(const Model::CommitTransactionRequest& request) const;
236 
245  virtual void CommitTransactionAsync(const Model::CommitTransactionRequest& request, const CommitTransactionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
246 
256  virtual Model::ExecuteStatementOutcome ExecuteStatement(const Model::ExecuteStatementRequest& request) const;
257 
269  virtual Model::ExecuteStatementOutcomeCallable ExecuteStatementCallable(const Model::ExecuteStatementRequest& request) const;
270 
282  virtual void ExecuteStatementAsync(const Model::ExecuteStatementRequest& request, const ExecuteStatementResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
283 
290  virtual Model::RollbackTransactionOutcome RollbackTransaction(const Model::RollbackTransactionRequest& request) const;
291 
300  virtual Model::RollbackTransactionOutcomeCallable RollbackTransactionCallable(const Model::RollbackTransactionRequest& request) const;
301 
310  virtual void RollbackTransactionAsync(const Model::RollbackTransactionRequest& request, const RollbackTransactionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
311 
312 
313  void OverrideEndpoint(const Aws::String& endpoint);
314  private:
315  void init(const Aws::Client::ClientConfiguration& clientConfiguration);
316  void BatchExecuteStatementAsyncHelper(const Model::BatchExecuteStatementRequest& request, const BatchExecuteStatementResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
317  void BeginTransactionAsyncHelper(const Model::BeginTransactionRequest& request, const BeginTransactionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
318  void CommitTransactionAsyncHelper(const Model::CommitTransactionRequest& request, const CommitTransactionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
319  void ExecuteStatementAsyncHelper(const Model::ExecuteStatementRequest& request, const ExecuteStatementResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
320  void RollbackTransactionAsyncHelper(const Model::RollbackTransactionRequest& request, const RollbackTransactionResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
321 
322  Aws::String m_uri;
323  Aws::String m_configScheme;
324  std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
325  };
326 
327 } // namespace RDSDataService
328 } // namespace Aws
std::future< BatchExecuteStatementOutcome > BatchExecuteStatementOutcomeCallable
Aws::Utils::Outcome< BeginTransactionResult, RDSDataServiceError > BeginTransactionOutcome
std::function< void(const RDSDataServiceClient *, const Model::RollbackTransactionRequest &, const Model::RollbackTransactionOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > RollbackTransactionResponseReceivedHandler
std::future< RollbackTransactionOutcome > RollbackTransactionOutcomeCallable
std::function< void(const RDSDataServiceClient *, const Model::CommitTransactionRequest &, const Model::CommitTransactionOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > CommitTransactionResponseReceivedHandler
std::future< BeginTransactionOutcome > BeginTransactionOutcomeCallable
std::function< void(const RDSDataServiceClient *, const Model::ExecuteStatementRequest &, const Model::ExecuteStatementOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ExecuteStatementResponseReceivedHandler
Aws::Utils::Outcome< ExecuteStatementResult, RDSDataServiceError > ExecuteStatementOutcome
Aws::Utils::Outcome< RollbackTransactionResult, RDSDataServiceError > RollbackTransactionOutcome
std::future< CommitTransactionOutcome > CommitTransactionOutcomeCallable
std::function< void(const RDSDataServiceClient *, const Model::BeginTransactionRequest &, const Model::BeginTransactionOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > BeginTransactionResponseReceivedHandler
std::future< ExecuteStatementOutcome > ExecuteStatementOutcomeCallable
#define AWS_RDSDATASERVICE_API
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
std::function< void(const RDSDataServiceClient *, const Model::BatchExecuteStatementRequest &, const Model::BatchExecuteStatementOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > BatchExecuteStatementResponseReceivedHandler
Aws::Utils::Outcome< BatchExecuteStatementResult, RDSDataServiceError > BatchExecuteStatementOutcome
Aws::Utils::Outcome< CommitTransactionResult, RDSDataServiceError > CommitTransactionOutcome