AWS SDK for C++  0.12.9
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 
186  virtual Model::CreateFileSystemOutcome CreateFileSystem(const Model::CreateFileSystemRequest& request) const;
187 
221  virtual Model::CreateFileSystemOutcomeCallable CreateFileSystemCallable(const Model::CreateFileSystemRequest& request) const;
222 
256  virtual void CreateFileSystemAsync(const Model::CreateFileSystemRequest& request, const CreateFileSystemResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
257 
331  virtual Model::CreateMountTargetOutcome CreateMountTarget(const Model::CreateMountTargetRequest& request) const;
332 
408  virtual Model::CreateMountTargetOutcomeCallable CreateMountTargetCallable(const Model::CreateMountTargetRequest& request) const;
409 
485  virtual void CreateMountTargetAsync(const Model::CreateMountTargetRequest& request, const CreateMountTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
486 
496  virtual Model::CreateTagsOutcome CreateTags(const Model::CreateTagsRequest& request) const;
497 
509  virtual Model::CreateTagsOutcomeCallable CreateTagsCallable(const Model::CreateTagsRequest& request) const;
510 
522  virtual void CreateTagsAsync(const Model::CreateTagsRequest& request, const CreateTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
523 
538  virtual Model::DeleteFileSystemOutcome DeleteFileSystem(const Model::DeleteFileSystemRequest& request) const;
539 
556  virtual Model::DeleteFileSystemOutcomeCallable DeleteFileSystemCallable(const Model::DeleteFileSystemRequest& request) const;
557 
574  virtual void DeleteFileSystemAsync(const Model::DeleteFileSystemRequest& request, const DeleteFileSystemResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
575 
595  virtual Model::DeleteMountTargetOutcome DeleteMountTarget(const Model::DeleteMountTargetRequest& request) const;
596 
618  virtual Model::DeleteMountTargetOutcomeCallable DeleteMountTargetCallable(const Model::DeleteMountTargetRequest& request) const;
619 
641  virtual void DeleteMountTargetAsync(const Model::DeleteMountTargetRequest& request, const DeleteMountTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
642 
652  virtual Model::DeleteTagsOutcome DeleteTags(const Model::DeleteTagsRequest& request) const;
653 
665  virtual Model::DeleteTagsOutcomeCallable DeleteTagsCallable(const Model::DeleteTagsRequest& request) const;
666 
678  virtual void DeleteTagsAsync(const Model::DeleteTagsRequest& request, const DeleteTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
679 
704  virtual Model::DescribeFileSystemsOutcome DescribeFileSystems(const Model::DescribeFileSystemsRequest& request) const;
705 
732  virtual Model::DescribeFileSystemsOutcomeCallable DescribeFileSystemsCallable(const Model::DescribeFileSystemsRequest& request) const;
733 
760  virtual void DescribeFileSystemsAsync(const Model::DescribeFileSystemsRequest& request, const DescribeFileSystemsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
761 
772  virtual Model::DescribeMountTargetSecurityGroupsOutcome DescribeMountTargetSecurityGroups(const Model::DescribeMountTargetSecurityGroupsRequest& request) const;
773 
786  virtual Model::DescribeMountTargetSecurityGroupsOutcomeCallable DescribeMountTargetSecurityGroupsCallable(const Model::DescribeMountTargetSecurityGroupsRequest& request) const;
787 
800  virtual void DescribeMountTargetSecurityGroupsAsync(const Model::DescribeMountTargetSecurityGroupsRequest& request, const DescribeMountTargetSecurityGroupsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
801 
811  virtual Model::DescribeMountTargetsOutcome DescribeMountTargets(const Model::DescribeMountTargetsRequest& request) const;
812 
824  virtual Model::DescribeMountTargetsOutcomeCallable DescribeMountTargetsCallable(const Model::DescribeMountTargetsRequest& request) const;
825 
837  virtual void DescribeMountTargetsAsync(const Model::DescribeMountTargetsRequest& request, const DescribeMountTargetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
838 
846  virtual Model::DescribeTagsOutcome DescribeTags(const Model::DescribeTagsRequest& request) const;
847 
857  virtual Model::DescribeTagsOutcomeCallable DescribeTagsCallable(const Model::DescribeTagsRequest& request) const;
858 
868  virtual void DescribeTagsAsync(const Model::DescribeTagsRequest& request, const DescribeTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
869 
884  virtual Model::ModifyMountTargetSecurityGroupsOutcome ModifyMountTargetSecurityGroups(const Model::ModifyMountTargetSecurityGroupsRequest& request) const;
885 
902  virtual Model::ModifyMountTargetSecurityGroupsOutcomeCallable ModifyMountTargetSecurityGroupsCallable(const Model::ModifyMountTargetSecurityGroupsRequest& request) const;
903 
920  virtual void ModifyMountTargetSecurityGroupsAsync(const Model::ModifyMountTargetSecurityGroupsRequest& request, const ModifyMountTargetSecurityGroupsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
921 
922 
923  private:
924  void init(const Client::ClientConfiguration& clientConfiguration);
925 
927  void CreateFileSystemAsyncHelper(const Model::CreateFileSystemRequest& request, const CreateFileSystemResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
928  void CreateMountTargetAsyncHelper(const Model::CreateMountTargetRequest& request, const CreateMountTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
929  void CreateTagsAsyncHelper(const Model::CreateTagsRequest& request, const CreateTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
930  void DeleteFileSystemAsyncHelper(const Model::DeleteFileSystemRequest& request, const DeleteFileSystemResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
931  void DeleteMountTargetAsyncHelper(const Model::DeleteMountTargetRequest& request, const DeleteMountTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
932  void DeleteTagsAsyncHelper(const Model::DeleteTagsRequest& request, const DeleteTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
933  void DescribeFileSystemsAsyncHelper(const Model::DescribeFileSystemsRequest& request, const DescribeFileSystemsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
934  void DescribeMountTargetSecurityGroupsAsyncHelper(const Model::DescribeMountTargetSecurityGroupsRequest& request, const DescribeMountTargetSecurityGroupsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
935  void DescribeMountTargetsAsyncHelper(const Model::DescribeMountTargetsRequest& request, const DescribeMountTargetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
936  void DescribeTagsAsyncHelper(const Model::DescribeTagsRequest& request, const DescribeTagsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
937  void ModifyMountTargetSecurityGroupsAsyncHelper(const Model::ModifyMountTargetSecurityGroupsRequest& request, const ModifyMountTargetSecurityGroupsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
938 
939  Aws::String m_uri;
940  std::shared_ptr<Utils::Threading::Executor> m_executor;
941  };
942 
943 } // namespace EFS
944 } // 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:34
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).