AWS SDK for C++  0.12.9
AWS SDK for C++
ACMClient.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
16 #include <aws/acm/ACM_EXPORTS.h>
17 #include <aws/acm/ACMErrors.h>
28 #include <aws/core/NoResult.h>
31 #include <future>
32 #include <functional>
33 
34 namespace Aws
35 {
36 
37 namespace Http
38 {
39  class HttpClient;
40  class HttpClientFactory;
41 } // namespace Http
42 
43 namespace Utils
44 {
45  template< typename R, typename E> class Outcome;
46 
47 namespace Threading
48 {
49  class Executor;
50 } // namespace Threading
51 
52 namespace Json
53 {
54  class JsonValue;
55 } // namespace Json
56 } // namespace Utils
57 
58 namespace Auth
59 {
60  class AWSCredentials;
62 } // namespace Auth
63 
64 namespace Client
65 {
66  class RetryStrategy;
67 } // namespace Client
68 
69 namespace ACM
70 {
71 
72 namespace Model
73 {
83 
93 
94  typedef std::future<AddTagsToCertificateOutcome> AddTagsToCertificateOutcomeCallable;
95  typedef std::future<DeleteCertificateOutcome> DeleteCertificateOutcomeCallable;
96  typedef std::future<DescribeCertificateOutcome> DescribeCertificateOutcomeCallable;
97  typedef std::future<GetCertificateOutcome> GetCertificateOutcomeCallable;
98  typedef std::future<ListCertificatesOutcome> ListCertificatesOutcomeCallable;
99  typedef std::future<ListTagsForCertificateOutcome> ListTagsForCertificateOutcomeCallable;
100  typedef std::future<RemoveTagsFromCertificateOutcome> RemoveTagsFromCertificateOutcomeCallable;
101  typedef std::future<RequestCertificateOutcome> RequestCertificateOutcomeCallable;
102  typedef std::future<ResendValidationEmailOutcome> ResendValidationEmailOutcomeCallable;
103 } // namespace Model
104 
105  class ACMClient;
106 
107  typedef std::function<void(const ACMClient*, const Model::AddTagsToCertificateRequest&, const Model::AddTagsToCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > AddTagsToCertificateResponseReceivedHandler;
108  typedef std::function<void(const ACMClient*, const Model::DeleteCertificateRequest&, const Model::DeleteCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteCertificateResponseReceivedHandler;
109  typedef std::function<void(const ACMClient*, const Model::DescribeCertificateRequest&, const Model::DescribeCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeCertificateResponseReceivedHandler;
110  typedef std::function<void(const ACMClient*, const Model::GetCertificateRequest&, const Model::GetCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetCertificateResponseReceivedHandler;
111  typedef std::function<void(const ACMClient*, const Model::ListCertificatesRequest&, const Model::ListCertificatesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListCertificatesResponseReceivedHandler;
112  typedef std::function<void(const ACMClient*, const Model::ListTagsForCertificateRequest&, const Model::ListTagsForCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListTagsForCertificateResponseReceivedHandler;
113  typedef std::function<void(const ACMClient*, const Model::RemoveTagsFromCertificateRequest&, const Model::RemoveTagsFromCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RemoveTagsFromCertificateResponseReceivedHandler;
114  typedef std::function<void(const ACMClient*, const Model::RequestCertificateRequest&, const Model::RequestCertificateOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RequestCertificateResponseReceivedHandler;
115  typedef std::function<void(const ACMClient*, const Model::ResendValidationEmailRequest&, const Model::ResendValidationEmailOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ResendValidationEmailResponseReceivedHandler;
116 
131  {
132  public:
134 
139  ACMClient(const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
140 
145  ACMClient(const Auth::AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
146 
151  ACMClient(const std::shared_ptr<Auth::AWSCredentialsProvider>& credentialsProvider,
152  const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
153 
154  virtual ~ACMClient();
155 
174  virtual Model::AddTagsToCertificateOutcome AddTagsToCertificate(const Model::AddTagsToCertificateRequest& request) const;
175 
196  virtual Model::AddTagsToCertificateOutcomeCallable AddTagsToCertificateCallable(const Model::AddTagsToCertificateRequest& request) const;
197 
218  virtual void AddTagsToCertificateAsync(const Model::AddTagsToCertificateRequest& request, const AddTagsToCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
219 
229  virtual Model::DeleteCertificateOutcome DeleteCertificate(const Model::DeleteCertificateRequest& request) const;
230 
242  virtual Model::DeleteCertificateOutcomeCallable DeleteCertificateCallable(const Model::DeleteCertificateRequest& request) const;
243 
255  virtual void DeleteCertificateAsync(const Model::DeleteCertificateRequest& request, const DeleteCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
256 
264  virtual Model::DescribeCertificateOutcome DescribeCertificate(const Model::DescribeCertificateRequest& request) const;
265 
275  virtual Model::DescribeCertificateOutcomeCallable DescribeCertificateCallable(const Model::DescribeCertificateRequest& request) const;
276 
286  virtual void DescribeCertificateAsync(const Model::DescribeCertificateRequest& request, const DescribeCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
287 
297  virtual Model::GetCertificateOutcome GetCertificate(const Model::GetCertificateRequest& request) const;
298 
310  virtual Model::GetCertificateOutcomeCallable GetCertificateCallable(const Model::GetCertificateRequest& request) const;
311 
323  virtual void GetCertificateAsync(const Model::GetCertificateRequest& request, const GetCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
324 
334  virtual Model::ListCertificatesOutcome ListCertificates(const Model::ListCertificatesRequest& request) const;
335 
347  virtual Model::ListCertificatesOutcomeCallable ListCertificatesCallable(const Model::ListCertificatesRequest& request) const;
348 
360  virtual void ListCertificatesAsync(const Model::ListCertificatesRequest& request, const ListCertificatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
361 
368  virtual Model::ListTagsForCertificateOutcome ListTagsForCertificate(const Model::ListTagsForCertificateRequest& request) const;
369 
378  virtual Model::ListTagsForCertificateOutcomeCallable ListTagsForCertificateCallable(const Model::ListTagsForCertificateRequest& request) const;
379 
388  virtual void ListTagsForCertificateAsync(const Model::ListTagsForCertificateRequest& request, const ListTagsForCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
389 
399  virtual Model::RemoveTagsFromCertificateOutcome RemoveTagsFromCertificate(const Model::RemoveTagsFromCertificateRequest& request) const;
400 
412  virtual Model::RemoveTagsFromCertificateOutcomeCallable RemoveTagsFromCertificateCallable(const Model::RemoveTagsFromCertificateRequest& request) const;
413 
425  virtual void RemoveTagsFromCertificateAsync(const Model::RemoveTagsFromCertificateRequest& request, const RemoveTagsFromCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
426 
437  virtual Model::RequestCertificateOutcome RequestCertificate(const Model::RequestCertificateRequest& request) const;
438 
451  virtual Model::RequestCertificateOutcomeCallable RequestCertificateCallable(const Model::RequestCertificateRequest& request) const;
452 
465  virtual void RequestCertificateAsync(const Model::RequestCertificateRequest& request, const RequestCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
466 
478  virtual Model::ResendValidationEmailOutcome ResendValidationEmail(const Model::ResendValidationEmailRequest& request) const;
479 
493  virtual Model::ResendValidationEmailOutcomeCallable ResendValidationEmailCallable(const Model::ResendValidationEmailRequest& request) const;
494 
508  virtual void ResendValidationEmailAsync(const Model::ResendValidationEmailRequest& request, const ResendValidationEmailResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
509 
510 
511  private:
512  void init(const Client::ClientConfiguration& clientConfiguration);
513 
515  void AddTagsToCertificateAsyncHelper(const Model::AddTagsToCertificateRequest& request, const AddTagsToCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
516  void DeleteCertificateAsyncHelper(const Model::DeleteCertificateRequest& request, const DeleteCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
517  void DescribeCertificateAsyncHelper(const Model::DescribeCertificateRequest& request, const DescribeCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
518  void GetCertificateAsyncHelper(const Model::GetCertificateRequest& request, const GetCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
519  void ListCertificatesAsyncHelper(const Model::ListCertificatesRequest& request, const ListCertificatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
520  void ListTagsForCertificateAsyncHelper(const Model::ListTagsForCertificateRequest& request, const ListTagsForCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
521  void RemoveTagsFromCertificateAsyncHelper(const Model::RemoveTagsFromCertificateRequest& request, const RemoveTagsFromCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
522  void RequestCertificateAsyncHelper(const Model::RequestCertificateRequest& request, const RequestCertificateResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
523  void ResendValidationEmailAsyncHelper(const Model::ResendValidationEmailRequest& request, const ResendValidationEmailResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
524 
525  Aws::String m_uri;
526  std::shared_ptr<Utils::Threading::Executor> m_executor;
527  };
528 
529 } // namespace ACM
530 } // namespace Aws
std::function< void(const ACMClient *, const Model::AddTagsToCertificateRequest &, const Model::AddTagsToCertificateOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > AddTagsToCertificateResponseReceivedHandler
Definition: ACMClient.h:105
std::future< RemoveTagsFromCertificateOutcome > RemoveTagsFromCertificateOutcomeCallable
Definition: ACMClient.h:100
std::function< void(const ACMClient *, const Model::ResendValidationEmailRequest &, const Model::ResendValidationEmailOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ResendValidationEmailResponseReceivedHandler
Definition: ACMClient.h:115
std::future< ListTagsForCertificateOutcome > ListTagsForCertificateOutcomeCallable
Definition: ACMClient.h:99
Aws::Utils::Outcome< RequestCertificateResult, Aws::Client::AWSError< ACMErrors > > RequestCertificateOutcome
Definition: ACMClient.h:91
std::function< void(const ACMClient *, const Model::DeleteCertificateRequest &, const Model::DeleteCertificateOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DeleteCertificateResponseReceivedHandler
Definition: ACMClient.h:108
std::future< RequestCertificateOutcome > RequestCertificateOutcomeCallable
Definition: ACMClient.h:101
Aws::Utils::Outcome< ListCertificatesResult, Aws::Client::AWSError< ACMErrors > > ListCertificatesOutcome
Definition: ACMClient.h:88
Aws::Client::AWSJsonClient BASECLASS
Definition: ACMClient.h:133
std::function< void(const ACMClient *, const Model::DescribeCertificateRequest &, const Model::DescribeCertificateOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DescribeCertificateResponseReceivedHandler
Definition: ACMClient.h:109
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< ACMErrors > > ResendValidationEmailOutcome
Definition: ACMClient.h:92
#define AWS_ACM_API
Definition: ACM_EXPORTS.h:34
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< ACMErrors > > DeleteCertificateOutcome
Definition: ACMClient.h:85
std::future< DescribeCertificateOutcome > DescribeCertificateOutcomeCallable
Definition: ACMClient.h:96
Aws::Utils::Outcome< DescribeCertificateResult, Aws::Client::AWSError< ACMErrors > > DescribeCertificateOutcome
Definition: ACMClient.h:86
std::future< GetCertificateOutcome > GetCertificateOutcomeCallable
Definition: ACMClient.h:97
std::function< void(const ACMClient *, const Model::RemoveTagsFromCertificateRequest &, const Model::RemoveTagsFromCertificateOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > RemoveTagsFromCertificateResponseReceivedHandler
Definition: ACMClient.h:113
std::function< void(const ACMClient *, const Model::GetCertificateRequest &, const Model::GetCertificateOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > GetCertificateResponseReceivedHandler
Definition: ACMClient.h:110
Aws::Utils::Outcome< GetCertificateResult, Aws::Client::AWSError< ACMErrors > > GetCertificateOutcome
Definition: ACMClient.h:87
std::future< ListCertificatesOutcome > ListCertificatesOutcomeCallable
Definition: ACMClient.h:98
Aws::Utils::Outcome< ListTagsForCertificateResult, Aws::Client::AWSError< ACMErrors > > ListTagsForCertificateOutcome
Definition: ACMClient.h:89
std::function< void(const ACMClient *, const Model::ListCertificatesRequest &, const Model::ListCertificatesOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ListCertificatesResponseReceivedHandler
Definition: ACMClient.h:111
std::function< void(const ACMClient *, const Model::RequestCertificateRequest &, const Model::RequestCertificateOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > RequestCertificateResponseReceivedHandler
Definition: ACMClient.h:114
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
std::future< DeleteCertificateOutcome > DeleteCertificateOutcomeCallable
Definition: ACMClient.h:95
std::function< void(const ACMClient *, const Model::ListTagsForCertificateRequest &, const Model::ListTagsForCertificateOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ListTagsForCertificateResponseReceivedHandler
Definition: ACMClient.h:112
std::future< ResendValidationEmailOutcome > ResendValidationEmailOutcomeCallable
Definition: ACMClient.h:102
std::future< AddTagsToCertificateOutcome > AddTagsToCertificateOutcomeCallable
Definition: ACMClient.h:94
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< ACMErrors > > AddTagsToCertificateOutcome
Definition: ACMClient.h:82
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< ACMErrors > > RemoveTagsFromCertificateOutcome
Definition: ACMClient.h:90
JSON (JavaScript Object Notation).