AWS SDK for C++  0.12.9
AWS SDK for C++
FirehoseClient.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
32 #include <future>
33 #include <functional>
34 
35 namespace Aws
36 {
37 
38 namespace Http
39 {
40  class HttpClient;
41  class HttpClientFactory;
42 } // namespace Http
43 
44 namespace Utils
45 {
46  template< typename R, typename E> class Outcome;
47 
48 namespace Threading
49 {
50  class Executor;
51 } // namespace Threading
52 
53 namespace Json
54 {
55  class JsonValue;
56 } // namespace Json
57 } // namespace Utils
58 
59 namespace Auth
60 {
61  class AWSCredentials;
62  class AWSCredentialsProvider;
63 } // namespace Auth
64 
65 namespace Client
66 {
67  class RetryStrategy;
68 } // namespace Client
69 
70 namespace Firehose
71 {
72 
73 namespace Model
74 {
79  class PutRecordRequest;
82 
90 
91  typedef std::future<CreateDeliveryStreamOutcome> CreateDeliveryStreamOutcomeCallable;
92  typedef std::future<DeleteDeliveryStreamOutcome> DeleteDeliveryStreamOutcomeCallable;
93  typedef std::future<DescribeDeliveryStreamOutcome> DescribeDeliveryStreamOutcomeCallable;
94  typedef std::future<ListDeliveryStreamsOutcome> ListDeliveryStreamsOutcomeCallable;
95  typedef std::future<PutRecordOutcome> PutRecordOutcomeCallable;
96  typedef std::future<PutRecordBatchOutcome> PutRecordBatchOutcomeCallable;
97  typedef std::future<UpdateDestinationOutcome> UpdateDestinationOutcomeCallable;
98 } // namespace Model
99 
101 
102  typedef std::function<void(const FirehoseClient*, const Model::CreateDeliveryStreamRequest&, const Model::CreateDeliveryStreamOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateDeliveryStreamResponseReceivedHandler;
103  typedef std::function<void(const FirehoseClient*, const Model::DeleteDeliveryStreamRequest&, const Model::DeleteDeliveryStreamOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteDeliveryStreamResponseReceivedHandler;
104  typedef std::function<void(const FirehoseClient*, const Model::DescribeDeliveryStreamRequest&, const Model::DescribeDeliveryStreamOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeDeliveryStreamResponseReceivedHandler;
105  typedef std::function<void(const FirehoseClient*, const Model::ListDeliveryStreamsRequest&, const Model::ListDeliveryStreamsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListDeliveryStreamsResponseReceivedHandler;
106  typedef std::function<void(const FirehoseClient*, const Model::PutRecordRequest&, const Model::PutRecordOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutRecordResponseReceivedHandler;
107  typedef std::function<void(const FirehoseClient*, const Model::PutRecordBatchRequest&, const Model::PutRecordBatchOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutRecordBatchResponseReceivedHandler;
108  typedef std::function<void(const FirehoseClient*, const Model::UpdateDestinationRequest&, const Model::UpdateDestinationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateDestinationResponseReceivedHandler;
109 
117  {
118  public:
120 
126 
131  FirehoseClient(const Auth::AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
132 
137  FirehoseClient(const std::shared_ptr<Auth::AWSCredentialsProvider>& credentialsProvider,
138  const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
139 
140  virtual ~FirehoseClient();
141 
187  virtual Model::CreateDeliveryStreamOutcome CreateDeliveryStream(const Model::CreateDeliveryStreamRequest& request) const;
188 
236  virtual Model::CreateDeliveryStreamOutcomeCallable CreateDeliveryStreamCallable(const Model::CreateDeliveryStreamRequest& request) const;
237 
285  virtual void CreateDeliveryStreamAsync(const Model::CreateDeliveryStreamRequest& request, const CreateDeliveryStreamResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
286 
299  virtual Model::DeleteDeliveryStreamOutcome DeleteDeliveryStream(const Model::DeleteDeliveryStreamRequest& request) const;
300 
315  virtual Model::DeleteDeliveryStreamOutcomeCallable DeleteDeliveryStreamCallable(const Model::DeleteDeliveryStreamRequest& request) const;
316 
331  virtual void DeleteDeliveryStreamAsync(const Model::DeleteDeliveryStreamRequest& request, const DeleteDeliveryStreamResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
332 
339  virtual Model::DescribeDeliveryStreamOutcome DescribeDeliveryStream(const Model::DescribeDeliveryStreamRequest& request) const;
340 
349  virtual Model::DescribeDeliveryStreamOutcomeCallable DescribeDeliveryStreamCallable(const Model::DescribeDeliveryStreamRequest& request) const;
350 
359  virtual void DescribeDeliveryStreamAsync(const Model::DescribeDeliveryStreamRequest& request, const DescribeDeliveryStreamResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
360 
371  virtual Model::ListDeliveryStreamsOutcome ListDeliveryStreams(const Model::ListDeliveryStreamsRequest& request) const;
372 
385  virtual Model::ListDeliveryStreamsOutcomeCallable ListDeliveryStreamsCallable(const Model::ListDeliveryStreamsRequest& request) const;
386 
399  virtual void ListDeliveryStreamsAsync(const Model::ListDeliveryStreamsRequest& request, const ListDeliveryStreamsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
400 
430  virtual Model::PutRecordOutcome PutRecord(const Model::PutRecordRequest& request) const;
431 
463  virtual Model::PutRecordOutcomeCallable PutRecordCallable(const Model::PutRecordRequest& request) const;
464 
496  virtual void PutRecordAsync(const Model::PutRecordRequest& request, const PutRecordResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
497 
550  virtual Model::PutRecordBatchOutcome PutRecordBatch(const Model::PutRecordBatchRequest& request) const;
551 
606  virtual Model::PutRecordBatchOutcomeCallable PutRecordBatchCallable(const Model::PutRecordBatchRequest& request) const;
607 
662  virtual void PutRecordBatchAsync(const Model::PutRecordBatchRequest& request, const PutRecordBatchResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
663 
694  virtual Model::UpdateDestinationOutcome UpdateDestination(const Model::UpdateDestinationRequest& request) const;
695 
728  virtual Model::UpdateDestinationOutcomeCallable UpdateDestinationCallable(const Model::UpdateDestinationRequest& request) const;
729 
762  virtual void UpdateDestinationAsync(const Model::UpdateDestinationRequest& request, const UpdateDestinationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
763 
764 
765  private:
766  void init(const Client::ClientConfiguration& clientConfiguration);
767 
769  void CreateDeliveryStreamAsyncHelper(const Model::CreateDeliveryStreamRequest& request, const CreateDeliveryStreamResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
770  void DeleteDeliveryStreamAsyncHelper(const Model::DeleteDeliveryStreamRequest& request, const DeleteDeliveryStreamResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
771  void DescribeDeliveryStreamAsyncHelper(const Model::DescribeDeliveryStreamRequest& request, const DescribeDeliveryStreamResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
772  void ListDeliveryStreamsAsyncHelper(const Model::ListDeliveryStreamsRequest& request, const ListDeliveryStreamsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
773  void PutRecordAsyncHelper(const Model::PutRecordRequest& request, const PutRecordResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
774  void PutRecordBatchAsyncHelper(const Model::PutRecordBatchRequest& request, const PutRecordBatchResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
775  void UpdateDestinationAsyncHelper(const Model::UpdateDestinationRequest& request, const UpdateDestinationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
776 
777  Aws::String m_uri;
778  std::shared_ptr<Utils::Threading::Executor> m_executor;
779  };
780 
781 } // namespace Firehose
782 } // namespace Aws
Aws::Utils::Outcome< DescribeDeliveryStreamResult, Aws::Client::AWSError< FirehoseErrors > > DescribeDeliveryStreamOutcome
std::function< void(const FirehoseClient *, const Model::PutRecordRequest &, const Model::PutRecordOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > PutRecordResponseReceivedHandler
std::function< void(const FirehoseClient *, const Model::PutRecordBatchRequest &, const Model::PutRecordBatchOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > PutRecordBatchResponseReceivedHandler
#define AWS_FIREHOSE_API
Aws::Utils::Outcome< DeleteDeliveryStreamResult, Aws::Client::AWSError< FirehoseErrors > > DeleteDeliveryStreamOutcome
std::future< DescribeDeliveryStreamOutcome > DescribeDeliveryStreamOutcomeCallable
std::future< DeleteDeliveryStreamOutcome > DeleteDeliveryStreamOutcomeCallable
Aws::Utils::Outcome< UpdateDestinationResult, Aws::Client::AWSError< FirehoseErrors > > UpdateDestinationOutcome
std::function< void(const FirehoseClient *, const Model::CreateDeliveryStreamRequest &, const Model::CreateDeliveryStreamOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > CreateDeliveryStreamResponseReceivedHandler
std::function< void(const FirehoseClient *, const Model::ListDeliveryStreamsRequest &, const Model::ListDeliveryStreamsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ListDeliveryStreamsResponseReceivedHandler
Aws::Utils::Outcome< ListDeliveryStreamsResult, Aws::Client::AWSError< FirehoseErrors > > ListDeliveryStreamsOutcome
std::future< PutRecordBatchOutcome > PutRecordBatchOutcomeCallable
Aws::Utils::Outcome< PutRecordResult, Aws::Client::AWSError< FirehoseErrors > > PutRecordOutcome
std::function< void(const FirehoseClient *, const Model::UpdateDestinationRequest &, const Model::UpdateDestinationOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > UpdateDestinationResponseReceivedHandler
std::future< UpdateDestinationOutcome > UpdateDestinationOutcomeCallable
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Client::AWSJsonClient BASECLASS
std::function< void(const FirehoseClient *, const Model::DeleteDeliveryStreamRequest &, const Model::DeleteDeliveryStreamOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DeleteDeliveryStreamResponseReceivedHandler
Aws::Utils::Outcome< CreateDeliveryStreamResult, Aws::Client::AWSError< FirehoseErrors > > CreateDeliveryStreamOutcome
std::future< PutRecordOutcome > PutRecordOutcomeCallable
std::future< ListDeliveryStreamsOutcome > ListDeliveryStreamsOutcomeCallable
std::future< CreateDeliveryStreamOutcome > CreateDeliveryStreamOutcomeCallable
Aws::Utils::Outcome< PutRecordBatchResult, Aws::Client::AWSError< FirehoseErrors > > PutRecordBatchOutcome
std::function< void(const FirehoseClient *, const Model::DescribeDeliveryStreamRequest &, const Model::DescribeDeliveryStreamOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DescribeDeliveryStreamResponseReceivedHandler
JSON (JavaScript Object Notation).