AWS SDK for C++  0.14.3
AWS SDK for C++
EFSClient.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
29 #include <aws/core/NoResult.h>
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 EFS
71 {
72 
73 namespace Model
74 {
77  class CreateTagsRequest;
80  class DeleteTagsRequest;
84  class DescribeTagsRequest;
86 
98 
99  typedef std::future<CreateFileSystemOutcome> CreateFileSystemOutcomeCallable;
100  typedef std::future<CreateMountTargetOutcome> CreateMountTargetOutcomeCallable;
101  typedef std::future<CreateTagsOutcome> CreateTagsOutcomeCallable;
102  typedef std::future<DeleteFileSystemOutcome> DeleteFileSystemOutcomeCallable;
103  typedef std::future<DeleteMountTargetOutcome> DeleteMountTargetOutcomeCallable;
104  typedef std::future<DeleteTagsOutcome> DeleteTagsOutcomeCallable;
105  typedef std::future<DescribeFileSystemsOutcome> DescribeFileSystemsOutcomeCallable;
106  typedef std::future<DescribeMountTargetSecurityGroupsOutcome> DescribeMountTargetSecurityGroupsOutcomeCallable;
107  typedef std::future<DescribeMountTargetsOutcome> DescribeMountTargetsOutcomeCallable;
108  typedef std::future<DescribeTagsOutcome> DescribeTagsOutcomeCallable;
109  typedef std::future<ModifyMountTargetSecurityGroupsOutcome> ModifyMountTargetSecurityGroupsOutcomeCallable;
110 } // namespace Model
111 
112  class EFSClient;
113 
114  typedef std::function<void(const EFSClient*, const Model::CreateFileSystemRequest&, const Model::CreateFileSystemOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateFileSystemResponseReceivedHandler;
115  typedef std::function<void(const EFSClient*, const Model::CreateMountTargetRequest&, const Model::CreateMountTargetOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateMountTargetResponseReceivedHandler;
116  typedef std::function<void(const EFSClient*, const Model::CreateTagsRequest&, const Model::CreateTagsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateTagsResponseReceivedHandler;
117  typedef std::function<void(const EFSClient*, const Model::DeleteFileSystemRequest&, const Model::DeleteFileSystemOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteFileSystemResponseReceivedHandler;
118  typedef std::function<void(const EFSClient*, const Model::DeleteMountTargetRequest&, const Model::DeleteMountTargetOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteMountTargetResponseReceivedHandler;
119  typedef std::function<void(const EFSClient*, const Model::DeleteTagsRequest&, const Model::DeleteTagsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteTagsResponseReceivedHandler;
120  typedef std::function<void(const EFSClient*, const Model::DescribeFileSystemsRequest&, const Model::DescribeFileSystemsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeFileSystemsResponseReceivedHandler;
121  typedef std::function<void(const EFSClient*, const Model::DescribeMountTargetSecurityGroupsRequest&, const Model::DescribeMountTargetSecurityGroupsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeMountTargetSecurityGroupsResponseReceivedHandler;
122  typedef std::function<void(const EFSClient*, const Model::DescribeMountTargetsRequest&, const Model::DescribeMountTargetsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeMountTargetsResponseReceivedHandler;
123  typedef std::function<void(const EFSClient*, const Model::DescribeTagsRequest&, const Model::DescribeTagsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeTagsResponseReceivedHandler;
124  typedef std::function<void(const EFSClient*, const Model::ModifyMountTargetSecurityGroupsRequest&, const Model::ModifyMountTargetSecurityGroupsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ModifyMountTargetSecurityGroupsResponseReceivedHandler;
125 
130  {
131  public:
133 
138  EFSClient(const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
139 
144  EFSClient(const Auth::AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
145 
150  EFSClient(const std::shared_ptr<Auth::AWSCredentialsProvider>& credentialsProvider,
151  const Client::ClientConfiguration& clientConfiguration = Client::ClientConfiguration());
152 
153  virtual ~EFSClient();
154 
196  virtual Model::CreateFileSystemOutcome CreateFileSystem(const Model::CreateFileSystemRequest& request) const;
197 
241  virtual Model::CreateFileSystemOutcomeCallable CreateFileSystemCallable(const Model::CreateFileSystemRequest& request) const;
242 
286  virtual void CreateFileSystemAsync(const Model::CreateFileSystemRequest& request, const CreateFileSystemResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
287 
362  virtual Model::CreateMountTargetOutcome CreateMountTarget(const Model::CreateMountTargetRequest& request) const;
363 
440  virtual Model::CreateMountTargetOutcomeCallable CreateMountTargetCallable(const Model::CreateMountTargetRequest& request) const;
441 
518  virtual void CreateMountTargetAsync(const Model::CreateMountTargetRequest& request, const CreateMountTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
519 
529  virtual Model::CreateTagsOutcome CreateTags(const Model::CreateTagsRequest& request) const;
530 
542  virtual Model::CreateTagsOutcomeCallable CreateTagsCallable(const Model::CreateTagsRequest& request) const;
543 
555  virtual void CreateTagsAsync(const Model::CreateTagsRequest& request, const CreateTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
556 
572  virtual Model::DeleteFileSystemOutcome DeleteFileSystem(const Model::DeleteFileSystemRequest& request) const;
573 
591  virtual Model::DeleteFileSystemOutcomeCallable DeleteFileSystemCallable(const Model::DeleteFileSystemRequest& request) const;
592 
610  virtual void DeleteFileSystemAsync(const Model::DeleteFileSystemRequest& request, const DeleteFileSystemResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
611 
632  virtual Model::DeleteMountTargetOutcome DeleteMountTarget(const Model::DeleteMountTargetRequest& request) const;
633 
656  virtual Model::DeleteMountTargetOutcomeCallable DeleteMountTargetCallable(const Model::DeleteMountTargetRequest& request) const;
657 
680  virtual void DeleteMountTargetAsync(const Model::DeleteMountTargetRequest& request, const DeleteMountTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
681 
692  virtual Model::DeleteTagsOutcome DeleteTags(const Model::DeleteTagsRequest& request) const;
693 
706  virtual Model::DeleteTagsOutcomeCallable DeleteTagsCallable(const Model::DeleteTagsRequest& request) const;
707 
720  virtual void DeleteTagsAsync(const Model::DeleteTagsRequest& request, const DeleteTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
721 
746  virtual Model::DescribeFileSystemsOutcome DescribeFileSystems(const Model::DescribeFileSystemsRequest& request) const;
747 
774  virtual Model::DescribeFileSystemsOutcomeCallable DescribeFileSystemsCallable(const Model::DescribeFileSystemsRequest& request) const;
775 
802  virtual void DescribeFileSystemsAsync(const Model::DescribeFileSystemsRequest& request, const DescribeFileSystemsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
803 
815  virtual Model::DescribeMountTargetSecurityGroupsOutcome DescribeMountTargetSecurityGroups(const Model::DescribeMountTargetSecurityGroupsRequest& request) const;
816 
830  virtual Model::DescribeMountTargetSecurityGroupsOutcomeCallable DescribeMountTargetSecurityGroupsCallable(const Model::DescribeMountTargetSecurityGroupsRequest& request) const;
831 
845  virtual void DescribeMountTargetSecurityGroupsAsync(const Model::DescribeMountTargetSecurityGroupsRequest& request, const DescribeMountTargetSecurityGroupsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
846 
856  virtual Model::DescribeMountTargetsOutcome DescribeMountTargets(const Model::DescribeMountTargetsRequest& request) const;
857 
869  virtual Model::DescribeMountTargetsOutcomeCallable DescribeMountTargetsCallable(const Model::DescribeMountTargetsRequest& request) const;
870 
882  virtual void DescribeMountTargetsAsync(const Model::DescribeMountTargetsRequest& request, const DescribeMountTargetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
883 
891  virtual Model::DescribeTagsOutcome DescribeTags(const Model::DescribeTagsRequest& request) const;
892 
902  virtual Model::DescribeTagsOutcomeCallable DescribeTagsCallable(const Model::DescribeTagsRequest& request) const;
903 
913  virtual void DescribeTagsAsync(const Model::DescribeTagsRequest& request, const DescribeTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
914 
929  virtual Model::ModifyMountTargetSecurityGroupsOutcome ModifyMountTargetSecurityGroups(const Model::ModifyMountTargetSecurityGroupsRequest& request) const;
930 
947  virtual Model::ModifyMountTargetSecurityGroupsOutcomeCallable ModifyMountTargetSecurityGroupsCallable(const Model::ModifyMountTargetSecurityGroupsRequest& request) const;
948 
965  virtual void ModifyMountTargetSecurityGroupsAsync(const Model::ModifyMountTargetSecurityGroupsRequest& request, const ModifyMountTargetSecurityGroupsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
966 
967 
968  private:
969  void init(const Client::ClientConfiguration& clientConfiguration);
970 
972  void CreateFileSystemAsyncHelper(const Model::CreateFileSystemRequest& request, const CreateFileSystemResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
973  void CreateMountTargetAsyncHelper(const Model::CreateMountTargetRequest& request, const CreateMountTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
974  void CreateTagsAsyncHelper(const Model::CreateTagsRequest& request, const CreateTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
975  void DeleteFileSystemAsyncHelper(const Model::DeleteFileSystemRequest& request, const DeleteFileSystemResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
976  void DeleteMountTargetAsyncHelper(const Model::DeleteMountTargetRequest& request, const DeleteMountTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
977  void DeleteTagsAsyncHelper(const Model::DeleteTagsRequest& request, const DeleteTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
978  void DescribeFileSystemsAsyncHelper(const Model::DescribeFileSystemsRequest& request, const DescribeFileSystemsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
979  void DescribeMountTargetSecurityGroupsAsyncHelper(const Model::DescribeMountTargetSecurityGroupsRequest& request, const DescribeMountTargetSecurityGroupsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
980  void DescribeMountTargetsAsyncHelper(const Model::DescribeMountTargetsRequest& request, const DescribeMountTargetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
981  void DescribeTagsAsyncHelper(const Model::DescribeTagsRequest& request, const DescribeTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
982  void ModifyMountTargetSecurityGroupsAsyncHelper(const Model::ModifyMountTargetSecurityGroupsRequest& request, const ModifyMountTargetSecurityGroupsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
983 
984  Aws::String m_uri;
985  std::shared_ptr<Utils::Threading::Executor> m_executor;
986  };
987 
988 } // namespace EFS
989 } // namespace Aws
std::function< void(const EFSClient *, const Model::ModifyMountTargetSecurityGroupsRequest &, const Model::ModifyMountTargetSecurityGroupsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > ModifyMountTargetSecurityGroupsResponseReceivedHandler
Definition: EFSClient.h:124
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< EFSErrors > > DeleteFileSystemOutcome
Definition: EFSClient.h:90
std::future< DeleteFileSystemOutcome > DeleteFileSystemOutcomeCallable
Definition: EFSClient.h:102
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< EFSErrors > > DeleteMountTargetOutcome
Definition: EFSClient.h:91
std::function< void(const EFSClient *, const Model::DescribeTagsRequest &, const Model::DescribeTagsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DescribeTagsResponseReceivedHandler
Definition: EFSClient.h:123
std::future< CreateMountTargetOutcome > CreateMountTargetOutcomeCallable
Definition: EFSClient.h:100
Aws::Utils::Outcome< DescribeTagsResult, Aws::Client::AWSError< EFSErrors > > DescribeTagsOutcome
Definition: EFSClient.h:96
std::function< void(const EFSClient *, const Model::DeleteFileSystemRequest &, const Model::DeleteFileSystemOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DeleteFileSystemResponseReceivedHandler
Definition: EFSClient.h:117
std::future< DescribeMountTargetsOutcome > DescribeMountTargetsOutcomeCallable
Definition: EFSClient.h:107
std::future< DescribeTagsOutcome > DescribeTagsOutcomeCallable
Definition: EFSClient.h:108
std::future< DescribeFileSystemsOutcome > DescribeFileSystemsOutcomeCallable
Definition: EFSClient.h:105
Aws::Client::AWSJsonClient BASECLASS
Definition: EFSClient.h:132
Aws::Utils::Outcome< DescribeMountTargetsResult, Aws::Client::AWSError< EFSErrors > > DescribeMountTargetsOutcome
Definition: EFSClient.h:95
Aws::Utils::Outcome< DescribeMountTargetSecurityGroupsResult, Aws::Client::AWSError< EFSErrors > > DescribeMountTargetSecurityGroupsOutcome
Definition: EFSClient.h:94
#define AWS_EFS_API
Definition: EFS_EXPORTS.h:37
Aws::Utils::Outcome< CreateFileSystemResult, Aws::Client::AWSError< EFSErrors > > CreateFileSystemOutcome
Definition: EFSClient.h:85
Aws::Utils::Outcome< DescribeFileSystemsResult, Aws::Client::AWSError< EFSErrors > > DescribeFileSystemsOutcome
Definition: EFSClient.h:93
std::function< void(const EFSClient *, const Model::CreateMountTargetRequest &, const Model::CreateMountTargetOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > CreateMountTargetResponseReceivedHandler
Definition: EFSClient.h:115
std::function< void(const EFSClient *, const Model::CreateFileSystemRequest &, const Model::CreateFileSystemOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > CreateFileSystemResponseReceivedHandler
Definition: EFSClient.h:112
Aws::Utils::Outcome< CreateMountTargetResult, Aws::Client::AWSError< EFSErrors > > CreateMountTargetOutcome
Definition: EFSClient.h:88
std::function< void(const EFSClient *, const Model::DescribeMountTargetSecurityGroupsRequest &, const Model::DescribeMountTargetSecurityGroupsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DescribeMountTargetSecurityGroupsResponseReceivedHandler
Definition: EFSClient.h:121
std::function< void(const EFSClient *, const Model::DeleteMountTargetRequest &, const Model::DeleteMountTargetOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DeleteMountTargetResponseReceivedHandler
Definition: EFSClient.h:118
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< EFSErrors > > DeleteTagsOutcome
Definition: EFSClient.h:92
std::future< DescribeMountTargetSecurityGroupsOutcome > DescribeMountTargetSecurityGroupsOutcomeCallable
Definition: EFSClient.h:106
std::future< DeleteMountTargetOutcome > DeleteMountTargetOutcomeCallable
Definition: EFSClient.h:103
std::future< DeleteTagsOutcome > DeleteTagsOutcomeCallable
Definition: EFSClient.h:104
std::future< CreateTagsOutcome > CreateTagsOutcomeCallable
Definition: EFSClient.h:101
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< EFSErrors > > CreateTagsOutcome
Definition: EFSClient.h:89
std::function< void(const EFSClient *, const Model::DescribeMountTargetsRequest &, const Model::DescribeMountTargetsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DescribeMountTargetsResponseReceivedHandler
Definition: EFSClient.h:122
std::future< CreateFileSystemOutcome > CreateFileSystemOutcomeCallable
Definition: EFSClient.h:99
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
std::function< void(const EFSClient *, const Model::CreateTagsRequest &, const Model::CreateTagsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > CreateTagsResponseReceivedHandler
Definition: EFSClient.h:116
std::function< void(const EFSClient *, const Model::DescribeFileSystemsRequest &, const Model::DescribeFileSystemsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DescribeFileSystemsResponseReceivedHandler
Definition: EFSClient.h:120
std::function< void(const EFSClient *, const Model::DeleteTagsRequest &, const Model::DeleteTagsOutcome &, const std::shared_ptr< const Aws::Client::AsyncCallerContext > &) > DeleteTagsResponseReceivedHandler
Definition: EFSClient.h:119
std::future< ModifyMountTargetSecurityGroupsOutcome > ModifyMountTargetSecurityGroupsOutcomeCallable
Definition: EFSClient.h:109
Aws::Utils::Outcome< NoResult, Aws::Client::AWSError< EFSErrors > > ModifyMountTargetSecurityGroupsOutcome
Definition: EFSClient.h:97
JSON (JavaScript Object Notation).