1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/core/utils/Outcome.h>
7 #include <aws/core/auth/AWSAuthSigner.h>
8 #include <aws/core/client/CoreErrors.h>
9 #include <aws/core/client/RetryStrategy.h>
10 #include <aws/core/http/HttpClient.h>
11 #include <aws/core/http/HttpResponse.h>
12 #include <aws/core/http/HttpClientFactory.h>
13 #include <aws/core/auth/AWSCredentialsProviderChain.h>
14 #include <aws/core/utils/json/JsonSerializer.h>
15 #include <aws/core/utils/memory/stl/AWSStringStream.h>
16 #include <aws/core/utils/threading/Executor.h>
17 #include <aws/core/utils/DNS.h>
18 #include <aws/core/utils/logging/LogMacros.h>
19 
20 #include <aws/securityhub/SecurityHubClient.h>
21 #include <aws/securityhub/SecurityHubEndpoint.h>
22 #include <aws/securityhub/SecurityHubErrorMarshaller.h>
23 #include <aws/securityhub/model/AcceptAdministratorInvitationRequest.h>
24 #include <aws/securityhub/model/BatchDisableStandardsRequest.h>
25 #include <aws/securityhub/model/BatchEnableStandardsRequest.h>
26 #include <aws/securityhub/model/BatchImportFindingsRequest.h>
27 #include <aws/securityhub/model/BatchUpdateFindingsRequest.h>
28 #include <aws/securityhub/model/CreateActionTargetRequest.h>
29 #include <aws/securityhub/model/CreateFindingAggregatorRequest.h>
30 #include <aws/securityhub/model/CreateInsightRequest.h>
31 #include <aws/securityhub/model/CreateMembersRequest.h>
32 #include <aws/securityhub/model/DeclineInvitationsRequest.h>
33 #include <aws/securityhub/model/DeleteActionTargetRequest.h>
34 #include <aws/securityhub/model/DeleteFindingAggregatorRequest.h>
35 #include <aws/securityhub/model/DeleteInsightRequest.h>
36 #include <aws/securityhub/model/DeleteInvitationsRequest.h>
37 #include <aws/securityhub/model/DeleteMembersRequest.h>
38 #include <aws/securityhub/model/DescribeActionTargetsRequest.h>
39 #include <aws/securityhub/model/DescribeHubRequest.h>
40 #include <aws/securityhub/model/DescribeOrganizationConfigurationRequest.h>
41 #include <aws/securityhub/model/DescribeProductsRequest.h>
42 #include <aws/securityhub/model/DescribeStandardsRequest.h>
43 #include <aws/securityhub/model/DescribeStandardsControlsRequest.h>
44 #include <aws/securityhub/model/DisableImportFindingsForProductRequest.h>
45 #include <aws/securityhub/model/DisableOrganizationAdminAccountRequest.h>
46 #include <aws/securityhub/model/DisableSecurityHubRequest.h>
47 #include <aws/securityhub/model/DisassociateFromAdministratorAccountRequest.h>
48 #include <aws/securityhub/model/DisassociateMembersRequest.h>
49 #include <aws/securityhub/model/EnableImportFindingsForProductRequest.h>
50 #include <aws/securityhub/model/EnableOrganizationAdminAccountRequest.h>
51 #include <aws/securityhub/model/EnableSecurityHubRequest.h>
52 #include <aws/securityhub/model/GetAdministratorAccountRequest.h>
53 #include <aws/securityhub/model/GetEnabledStandardsRequest.h>
54 #include <aws/securityhub/model/GetFindingAggregatorRequest.h>
55 #include <aws/securityhub/model/GetFindingsRequest.h>
56 #include <aws/securityhub/model/GetInsightResultsRequest.h>
57 #include <aws/securityhub/model/GetInsightsRequest.h>
58 #include <aws/securityhub/model/GetInvitationsCountRequest.h>
59 #include <aws/securityhub/model/GetMembersRequest.h>
60 #include <aws/securityhub/model/InviteMembersRequest.h>
61 #include <aws/securityhub/model/ListEnabledProductsForImportRequest.h>
62 #include <aws/securityhub/model/ListFindingAggregatorsRequest.h>
63 #include <aws/securityhub/model/ListInvitationsRequest.h>
64 #include <aws/securityhub/model/ListMembersRequest.h>
65 #include <aws/securityhub/model/ListOrganizationAdminAccountsRequest.h>
66 #include <aws/securityhub/model/ListTagsForResourceRequest.h>
67 #include <aws/securityhub/model/TagResourceRequest.h>
68 #include <aws/securityhub/model/UntagResourceRequest.h>
69 #include <aws/securityhub/model/UpdateActionTargetRequest.h>
70 #include <aws/securityhub/model/UpdateFindingAggregatorRequest.h>
71 #include <aws/securityhub/model/UpdateFindingsRequest.h>
72 #include <aws/securityhub/model/UpdateInsightRequest.h>
73 #include <aws/securityhub/model/UpdateOrganizationConfigurationRequest.h>
74 #include <aws/securityhub/model/UpdateSecurityHubConfigurationRequest.h>
75 #include <aws/securityhub/model/UpdateStandardsControlRequest.h>
76 
77 using namespace Aws;
78 using namespace Aws::Auth;
79 using namespace Aws::Client;
80 using namespace Aws::SecurityHub;
81 using namespace Aws::SecurityHub::Model;
82 using namespace Aws::Http;
83 using namespace Aws::Utils::Json;
84 
85 static const char* SERVICE_NAME = "securityhub";
86 static const char* ALLOCATION_TAG = "SecurityHubClient";
87 
88 
SecurityHubClient(const Client::ClientConfiguration & clientConfiguration)89 SecurityHubClient::SecurityHubClient(const Client::ClientConfiguration& clientConfiguration) :
90   BASECLASS(clientConfiguration,
91     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
92         SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
93     Aws::MakeShared<SecurityHubErrorMarshaller>(ALLOCATION_TAG)),
94     m_executor(clientConfiguration.executor)
95 {
96   init(clientConfiguration);
97 }
98 
SecurityHubClient(const AWSCredentials & credentials,const Client::ClientConfiguration & clientConfiguration)99 SecurityHubClient::SecurityHubClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
100   BASECLASS(clientConfiguration,
101     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
102          SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
103     Aws::MakeShared<SecurityHubErrorMarshaller>(ALLOCATION_TAG)),
104     m_executor(clientConfiguration.executor)
105 {
106   init(clientConfiguration);
107 }
108 
SecurityHubClient(const std::shared_ptr<AWSCredentialsProvider> & credentialsProvider,const Client::ClientConfiguration & clientConfiguration)109 SecurityHubClient::SecurityHubClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
110   const Client::ClientConfiguration& clientConfiguration) :
111   BASECLASS(clientConfiguration,
112     Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
113          SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
114     Aws::MakeShared<SecurityHubErrorMarshaller>(ALLOCATION_TAG)),
115     m_executor(clientConfiguration.executor)
116 {
117   init(clientConfiguration);
118 }
119 
~SecurityHubClient()120 SecurityHubClient::~SecurityHubClient()
121 {
122 }
123 
init(const Client::ClientConfiguration & config)124 void SecurityHubClient::init(const Client::ClientConfiguration& config)
125 {
126   SetServiceClientName("SecurityHub");
127   m_configScheme = SchemeMapper::ToString(config.scheme);
128   if (config.endpointOverride.empty())
129   {
130       m_uri = m_configScheme + "://" + SecurityHubEndpoint::ForRegion(config.region, config.useDualStack);
131   }
132   else
133   {
134       OverrideEndpoint(config.endpointOverride);
135   }
136 }
137 
OverrideEndpoint(const Aws::String & endpoint)138 void SecurityHubClient::OverrideEndpoint(const Aws::String& endpoint)
139 {
140   if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
141   {
142       m_uri = endpoint;
143   }
144   else
145   {
146       m_uri = m_configScheme + "://" + endpoint;
147   }
148 }
149 
AcceptAdministratorInvitation(const AcceptAdministratorInvitationRequest & request) const150 AcceptAdministratorInvitationOutcome SecurityHubClient::AcceptAdministratorInvitation(const AcceptAdministratorInvitationRequest& request) const
151 {
152   Aws::Http::URI uri = m_uri;
153   uri.AddPathSegments("/administrator");
154   return AcceptAdministratorInvitationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
155 }
156 
AcceptAdministratorInvitationCallable(const AcceptAdministratorInvitationRequest & request) const157 AcceptAdministratorInvitationOutcomeCallable SecurityHubClient::AcceptAdministratorInvitationCallable(const AcceptAdministratorInvitationRequest& request) const
158 {
159   auto task = Aws::MakeShared< std::packaged_task< AcceptAdministratorInvitationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->AcceptAdministratorInvitation(request); } );
160   auto packagedFunction = [task]() { (*task)(); };
161   m_executor->Submit(packagedFunction);
162   return task->get_future();
163 }
164 
AcceptAdministratorInvitationAsync(const AcceptAdministratorInvitationRequest & request,const AcceptAdministratorInvitationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const165 void SecurityHubClient::AcceptAdministratorInvitationAsync(const AcceptAdministratorInvitationRequest& request, const AcceptAdministratorInvitationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
166 {
167   m_executor->Submit( [this, request, handler, context](){ this->AcceptAdministratorInvitationAsyncHelper( request, handler, context ); } );
168 }
169 
AcceptAdministratorInvitationAsyncHelper(const AcceptAdministratorInvitationRequest & request,const AcceptAdministratorInvitationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const170 void SecurityHubClient::AcceptAdministratorInvitationAsyncHelper(const AcceptAdministratorInvitationRequest& request, const AcceptAdministratorInvitationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
171 {
172   handler(this, request, AcceptAdministratorInvitation(request), context);
173 }
174 
BatchDisableStandards(const BatchDisableStandardsRequest & request) const175 BatchDisableStandardsOutcome SecurityHubClient::BatchDisableStandards(const BatchDisableStandardsRequest& request) const
176 {
177   Aws::Http::URI uri = m_uri;
178   uri.AddPathSegments("/standards/deregister");
179   return BatchDisableStandardsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
180 }
181 
BatchDisableStandardsCallable(const BatchDisableStandardsRequest & request) const182 BatchDisableStandardsOutcomeCallable SecurityHubClient::BatchDisableStandardsCallable(const BatchDisableStandardsRequest& request) const
183 {
184   auto task = Aws::MakeShared< std::packaged_task< BatchDisableStandardsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchDisableStandards(request); } );
185   auto packagedFunction = [task]() { (*task)(); };
186   m_executor->Submit(packagedFunction);
187   return task->get_future();
188 }
189 
BatchDisableStandardsAsync(const BatchDisableStandardsRequest & request,const BatchDisableStandardsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const190 void SecurityHubClient::BatchDisableStandardsAsync(const BatchDisableStandardsRequest& request, const BatchDisableStandardsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
191 {
192   m_executor->Submit( [this, request, handler, context](){ this->BatchDisableStandardsAsyncHelper( request, handler, context ); } );
193 }
194 
BatchDisableStandardsAsyncHelper(const BatchDisableStandardsRequest & request,const BatchDisableStandardsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const195 void SecurityHubClient::BatchDisableStandardsAsyncHelper(const BatchDisableStandardsRequest& request, const BatchDisableStandardsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
196 {
197   handler(this, request, BatchDisableStandards(request), context);
198 }
199 
BatchEnableStandards(const BatchEnableStandardsRequest & request) const200 BatchEnableStandardsOutcome SecurityHubClient::BatchEnableStandards(const BatchEnableStandardsRequest& request) const
201 {
202   Aws::Http::URI uri = m_uri;
203   uri.AddPathSegments("/standards/register");
204   return BatchEnableStandardsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
205 }
206 
BatchEnableStandardsCallable(const BatchEnableStandardsRequest & request) const207 BatchEnableStandardsOutcomeCallable SecurityHubClient::BatchEnableStandardsCallable(const BatchEnableStandardsRequest& request) const
208 {
209   auto task = Aws::MakeShared< std::packaged_task< BatchEnableStandardsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchEnableStandards(request); } );
210   auto packagedFunction = [task]() { (*task)(); };
211   m_executor->Submit(packagedFunction);
212   return task->get_future();
213 }
214 
BatchEnableStandardsAsync(const BatchEnableStandardsRequest & request,const BatchEnableStandardsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const215 void SecurityHubClient::BatchEnableStandardsAsync(const BatchEnableStandardsRequest& request, const BatchEnableStandardsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
216 {
217   m_executor->Submit( [this, request, handler, context](){ this->BatchEnableStandardsAsyncHelper( request, handler, context ); } );
218 }
219 
BatchEnableStandardsAsyncHelper(const BatchEnableStandardsRequest & request,const BatchEnableStandardsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const220 void SecurityHubClient::BatchEnableStandardsAsyncHelper(const BatchEnableStandardsRequest& request, const BatchEnableStandardsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
221 {
222   handler(this, request, BatchEnableStandards(request), context);
223 }
224 
BatchImportFindings(const BatchImportFindingsRequest & request) const225 BatchImportFindingsOutcome SecurityHubClient::BatchImportFindings(const BatchImportFindingsRequest& request) const
226 {
227   Aws::Http::URI uri = m_uri;
228   uri.AddPathSegments("/findings/import");
229   return BatchImportFindingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
230 }
231 
BatchImportFindingsCallable(const BatchImportFindingsRequest & request) const232 BatchImportFindingsOutcomeCallable SecurityHubClient::BatchImportFindingsCallable(const BatchImportFindingsRequest& request) const
233 {
234   auto task = Aws::MakeShared< std::packaged_task< BatchImportFindingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchImportFindings(request); } );
235   auto packagedFunction = [task]() { (*task)(); };
236   m_executor->Submit(packagedFunction);
237   return task->get_future();
238 }
239 
BatchImportFindingsAsync(const BatchImportFindingsRequest & request,const BatchImportFindingsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const240 void SecurityHubClient::BatchImportFindingsAsync(const BatchImportFindingsRequest& request, const BatchImportFindingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
241 {
242   m_executor->Submit( [this, request, handler, context](){ this->BatchImportFindingsAsyncHelper( request, handler, context ); } );
243 }
244 
BatchImportFindingsAsyncHelper(const BatchImportFindingsRequest & request,const BatchImportFindingsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const245 void SecurityHubClient::BatchImportFindingsAsyncHelper(const BatchImportFindingsRequest& request, const BatchImportFindingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
246 {
247   handler(this, request, BatchImportFindings(request), context);
248 }
249 
BatchUpdateFindings(const BatchUpdateFindingsRequest & request) const250 BatchUpdateFindingsOutcome SecurityHubClient::BatchUpdateFindings(const BatchUpdateFindingsRequest& request) const
251 {
252   Aws::Http::URI uri = m_uri;
253   uri.AddPathSegments("/findings/batchupdate");
254   return BatchUpdateFindingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
255 }
256 
BatchUpdateFindingsCallable(const BatchUpdateFindingsRequest & request) const257 BatchUpdateFindingsOutcomeCallable SecurityHubClient::BatchUpdateFindingsCallable(const BatchUpdateFindingsRequest& request) const
258 {
259   auto task = Aws::MakeShared< std::packaged_task< BatchUpdateFindingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchUpdateFindings(request); } );
260   auto packagedFunction = [task]() { (*task)(); };
261   m_executor->Submit(packagedFunction);
262   return task->get_future();
263 }
264 
BatchUpdateFindingsAsync(const BatchUpdateFindingsRequest & request,const BatchUpdateFindingsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const265 void SecurityHubClient::BatchUpdateFindingsAsync(const BatchUpdateFindingsRequest& request, const BatchUpdateFindingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
266 {
267   m_executor->Submit( [this, request, handler, context](){ this->BatchUpdateFindingsAsyncHelper( request, handler, context ); } );
268 }
269 
BatchUpdateFindingsAsyncHelper(const BatchUpdateFindingsRequest & request,const BatchUpdateFindingsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const270 void SecurityHubClient::BatchUpdateFindingsAsyncHelper(const BatchUpdateFindingsRequest& request, const BatchUpdateFindingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
271 {
272   handler(this, request, BatchUpdateFindings(request), context);
273 }
274 
CreateActionTarget(const CreateActionTargetRequest & request) const275 CreateActionTargetOutcome SecurityHubClient::CreateActionTarget(const CreateActionTargetRequest& request) const
276 {
277   Aws::Http::URI uri = m_uri;
278   uri.AddPathSegments("/actionTargets");
279   return CreateActionTargetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
280 }
281 
CreateActionTargetCallable(const CreateActionTargetRequest & request) const282 CreateActionTargetOutcomeCallable SecurityHubClient::CreateActionTargetCallable(const CreateActionTargetRequest& request) const
283 {
284   auto task = Aws::MakeShared< std::packaged_task< CreateActionTargetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateActionTarget(request); } );
285   auto packagedFunction = [task]() { (*task)(); };
286   m_executor->Submit(packagedFunction);
287   return task->get_future();
288 }
289 
CreateActionTargetAsync(const CreateActionTargetRequest & request,const CreateActionTargetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const290 void SecurityHubClient::CreateActionTargetAsync(const CreateActionTargetRequest& request, const CreateActionTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
291 {
292   m_executor->Submit( [this, request, handler, context](){ this->CreateActionTargetAsyncHelper( request, handler, context ); } );
293 }
294 
CreateActionTargetAsyncHelper(const CreateActionTargetRequest & request,const CreateActionTargetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const295 void SecurityHubClient::CreateActionTargetAsyncHelper(const CreateActionTargetRequest& request, const CreateActionTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
296 {
297   handler(this, request, CreateActionTarget(request), context);
298 }
299 
CreateFindingAggregator(const CreateFindingAggregatorRequest & request) const300 CreateFindingAggregatorOutcome SecurityHubClient::CreateFindingAggregator(const CreateFindingAggregatorRequest& request) const
301 {
302   Aws::Http::URI uri = m_uri;
303   uri.AddPathSegments("/findingAggregator/create");
304   return CreateFindingAggregatorOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
305 }
306 
CreateFindingAggregatorCallable(const CreateFindingAggregatorRequest & request) const307 CreateFindingAggregatorOutcomeCallable SecurityHubClient::CreateFindingAggregatorCallable(const CreateFindingAggregatorRequest& request) const
308 {
309   auto task = Aws::MakeShared< std::packaged_task< CreateFindingAggregatorOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateFindingAggregator(request); } );
310   auto packagedFunction = [task]() { (*task)(); };
311   m_executor->Submit(packagedFunction);
312   return task->get_future();
313 }
314 
CreateFindingAggregatorAsync(const CreateFindingAggregatorRequest & request,const CreateFindingAggregatorResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const315 void SecurityHubClient::CreateFindingAggregatorAsync(const CreateFindingAggregatorRequest& request, const CreateFindingAggregatorResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
316 {
317   m_executor->Submit( [this, request, handler, context](){ this->CreateFindingAggregatorAsyncHelper( request, handler, context ); } );
318 }
319 
CreateFindingAggregatorAsyncHelper(const CreateFindingAggregatorRequest & request,const CreateFindingAggregatorResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const320 void SecurityHubClient::CreateFindingAggregatorAsyncHelper(const CreateFindingAggregatorRequest& request, const CreateFindingAggregatorResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
321 {
322   handler(this, request, CreateFindingAggregator(request), context);
323 }
324 
CreateInsight(const CreateInsightRequest & request) const325 CreateInsightOutcome SecurityHubClient::CreateInsight(const CreateInsightRequest& request) const
326 {
327   Aws::Http::URI uri = m_uri;
328   uri.AddPathSegments("/insights");
329   return CreateInsightOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
330 }
331 
CreateInsightCallable(const CreateInsightRequest & request) const332 CreateInsightOutcomeCallable SecurityHubClient::CreateInsightCallable(const CreateInsightRequest& request) const
333 {
334   auto task = Aws::MakeShared< std::packaged_task< CreateInsightOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateInsight(request); } );
335   auto packagedFunction = [task]() { (*task)(); };
336   m_executor->Submit(packagedFunction);
337   return task->get_future();
338 }
339 
CreateInsightAsync(const CreateInsightRequest & request,const CreateInsightResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const340 void SecurityHubClient::CreateInsightAsync(const CreateInsightRequest& request, const CreateInsightResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
341 {
342   m_executor->Submit( [this, request, handler, context](){ this->CreateInsightAsyncHelper( request, handler, context ); } );
343 }
344 
CreateInsightAsyncHelper(const CreateInsightRequest & request,const CreateInsightResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const345 void SecurityHubClient::CreateInsightAsyncHelper(const CreateInsightRequest& request, const CreateInsightResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
346 {
347   handler(this, request, CreateInsight(request), context);
348 }
349 
CreateMembers(const CreateMembersRequest & request) const350 CreateMembersOutcome SecurityHubClient::CreateMembers(const CreateMembersRequest& request) const
351 {
352   Aws::Http::URI uri = m_uri;
353   uri.AddPathSegments("/members");
354   return CreateMembersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
355 }
356 
CreateMembersCallable(const CreateMembersRequest & request) const357 CreateMembersOutcomeCallable SecurityHubClient::CreateMembersCallable(const CreateMembersRequest& request) const
358 {
359   auto task = Aws::MakeShared< std::packaged_task< CreateMembersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateMembers(request); } );
360   auto packagedFunction = [task]() { (*task)(); };
361   m_executor->Submit(packagedFunction);
362   return task->get_future();
363 }
364 
CreateMembersAsync(const CreateMembersRequest & request,const CreateMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const365 void SecurityHubClient::CreateMembersAsync(const CreateMembersRequest& request, const CreateMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
366 {
367   m_executor->Submit( [this, request, handler, context](){ this->CreateMembersAsyncHelper( request, handler, context ); } );
368 }
369 
CreateMembersAsyncHelper(const CreateMembersRequest & request,const CreateMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const370 void SecurityHubClient::CreateMembersAsyncHelper(const CreateMembersRequest& request, const CreateMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
371 {
372   handler(this, request, CreateMembers(request), context);
373 }
374 
DeclineInvitations(const DeclineInvitationsRequest & request) const375 DeclineInvitationsOutcome SecurityHubClient::DeclineInvitations(const DeclineInvitationsRequest& request) const
376 {
377   Aws::Http::URI uri = m_uri;
378   uri.AddPathSegments("/invitations/decline");
379   return DeclineInvitationsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
380 }
381 
DeclineInvitationsCallable(const DeclineInvitationsRequest & request) const382 DeclineInvitationsOutcomeCallable SecurityHubClient::DeclineInvitationsCallable(const DeclineInvitationsRequest& request) const
383 {
384   auto task = Aws::MakeShared< std::packaged_task< DeclineInvitationsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeclineInvitations(request); } );
385   auto packagedFunction = [task]() { (*task)(); };
386   m_executor->Submit(packagedFunction);
387   return task->get_future();
388 }
389 
DeclineInvitationsAsync(const DeclineInvitationsRequest & request,const DeclineInvitationsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const390 void SecurityHubClient::DeclineInvitationsAsync(const DeclineInvitationsRequest& request, const DeclineInvitationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
391 {
392   m_executor->Submit( [this, request, handler, context](){ this->DeclineInvitationsAsyncHelper( request, handler, context ); } );
393 }
394 
DeclineInvitationsAsyncHelper(const DeclineInvitationsRequest & request,const DeclineInvitationsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const395 void SecurityHubClient::DeclineInvitationsAsyncHelper(const DeclineInvitationsRequest& request, const DeclineInvitationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
396 {
397   handler(this, request, DeclineInvitations(request), context);
398 }
399 
DeleteActionTarget(const DeleteActionTargetRequest & request) const400 DeleteActionTargetOutcome SecurityHubClient::DeleteActionTarget(const DeleteActionTargetRequest& request) const
401 {
402   if (!request.ActionTargetArnHasBeenSet())
403   {
404     AWS_LOGSTREAM_ERROR("DeleteActionTarget", "Required field: ActionTargetArn, is not set");
405     return DeleteActionTargetOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ActionTargetArn]", false));
406   }
407   Aws::Http::URI uri = m_uri;
408   uri.AddPathSegments("/actionTargets/");
409   uri.AddPathSegments(request.GetActionTargetArn());
410   return DeleteActionTargetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
411 }
412 
DeleteActionTargetCallable(const DeleteActionTargetRequest & request) const413 DeleteActionTargetOutcomeCallable SecurityHubClient::DeleteActionTargetCallable(const DeleteActionTargetRequest& request) const
414 {
415   auto task = Aws::MakeShared< std::packaged_task< DeleteActionTargetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteActionTarget(request); } );
416   auto packagedFunction = [task]() { (*task)(); };
417   m_executor->Submit(packagedFunction);
418   return task->get_future();
419 }
420 
DeleteActionTargetAsync(const DeleteActionTargetRequest & request,const DeleteActionTargetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const421 void SecurityHubClient::DeleteActionTargetAsync(const DeleteActionTargetRequest& request, const DeleteActionTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
422 {
423   m_executor->Submit( [this, request, handler, context](){ this->DeleteActionTargetAsyncHelper( request, handler, context ); } );
424 }
425 
DeleteActionTargetAsyncHelper(const DeleteActionTargetRequest & request,const DeleteActionTargetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const426 void SecurityHubClient::DeleteActionTargetAsyncHelper(const DeleteActionTargetRequest& request, const DeleteActionTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
427 {
428   handler(this, request, DeleteActionTarget(request), context);
429 }
430 
DeleteFindingAggregator(const DeleteFindingAggregatorRequest & request) const431 DeleteFindingAggregatorOutcome SecurityHubClient::DeleteFindingAggregator(const DeleteFindingAggregatorRequest& request) const
432 {
433   if (!request.FindingAggregatorArnHasBeenSet())
434   {
435     AWS_LOGSTREAM_ERROR("DeleteFindingAggregator", "Required field: FindingAggregatorArn, is not set");
436     return DeleteFindingAggregatorOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FindingAggregatorArn]", false));
437   }
438   Aws::Http::URI uri = m_uri;
439   uri.AddPathSegments("/findingAggregator/delete/");
440   uri.AddPathSegments(request.GetFindingAggregatorArn());
441   return DeleteFindingAggregatorOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
442 }
443 
DeleteFindingAggregatorCallable(const DeleteFindingAggregatorRequest & request) const444 DeleteFindingAggregatorOutcomeCallable SecurityHubClient::DeleteFindingAggregatorCallable(const DeleteFindingAggregatorRequest& request) const
445 {
446   auto task = Aws::MakeShared< std::packaged_task< DeleteFindingAggregatorOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteFindingAggregator(request); } );
447   auto packagedFunction = [task]() { (*task)(); };
448   m_executor->Submit(packagedFunction);
449   return task->get_future();
450 }
451 
DeleteFindingAggregatorAsync(const DeleteFindingAggregatorRequest & request,const DeleteFindingAggregatorResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const452 void SecurityHubClient::DeleteFindingAggregatorAsync(const DeleteFindingAggregatorRequest& request, const DeleteFindingAggregatorResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
453 {
454   m_executor->Submit( [this, request, handler, context](){ this->DeleteFindingAggregatorAsyncHelper( request, handler, context ); } );
455 }
456 
DeleteFindingAggregatorAsyncHelper(const DeleteFindingAggregatorRequest & request,const DeleteFindingAggregatorResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const457 void SecurityHubClient::DeleteFindingAggregatorAsyncHelper(const DeleteFindingAggregatorRequest& request, const DeleteFindingAggregatorResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
458 {
459   handler(this, request, DeleteFindingAggregator(request), context);
460 }
461 
DeleteInsight(const DeleteInsightRequest & request) const462 DeleteInsightOutcome SecurityHubClient::DeleteInsight(const DeleteInsightRequest& request) const
463 {
464   if (!request.InsightArnHasBeenSet())
465   {
466     AWS_LOGSTREAM_ERROR("DeleteInsight", "Required field: InsightArn, is not set");
467     return DeleteInsightOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [InsightArn]", false));
468   }
469   Aws::Http::URI uri = m_uri;
470   uri.AddPathSegments("/insights/");
471   uri.AddPathSegments(request.GetInsightArn());
472   return DeleteInsightOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
473 }
474 
DeleteInsightCallable(const DeleteInsightRequest & request) const475 DeleteInsightOutcomeCallable SecurityHubClient::DeleteInsightCallable(const DeleteInsightRequest& request) const
476 {
477   auto task = Aws::MakeShared< std::packaged_task< DeleteInsightOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteInsight(request); } );
478   auto packagedFunction = [task]() { (*task)(); };
479   m_executor->Submit(packagedFunction);
480   return task->get_future();
481 }
482 
DeleteInsightAsync(const DeleteInsightRequest & request,const DeleteInsightResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const483 void SecurityHubClient::DeleteInsightAsync(const DeleteInsightRequest& request, const DeleteInsightResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
484 {
485   m_executor->Submit( [this, request, handler, context](){ this->DeleteInsightAsyncHelper( request, handler, context ); } );
486 }
487 
DeleteInsightAsyncHelper(const DeleteInsightRequest & request,const DeleteInsightResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const488 void SecurityHubClient::DeleteInsightAsyncHelper(const DeleteInsightRequest& request, const DeleteInsightResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
489 {
490   handler(this, request, DeleteInsight(request), context);
491 }
492 
DeleteInvitations(const DeleteInvitationsRequest & request) const493 DeleteInvitationsOutcome SecurityHubClient::DeleteInvitations(const DeleteInvitationsRequest& request) const
494 {
495   Aws::Http::URI uri = m_uri;
496   uri.AddPathSegments("/invitations/delete");
497   return DeleteInvitationsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
498 }
499 
DeleteInvitationsCallable(const DeleteInvitationsRequest & request) const500 DeleteInvitationsOutcomeCallable SecurityHubClient::DeleteInvitationsCallable(const DeleteInvitationsRequest& request) const
501 {
502   auto task = Aws::MakeShared< std::packaged_task< DeleteInvitationsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteInvitations(request); } );
503   auto packagedFunction = [task]() { (*task)(); };
504   m_executor->Submit(packagedFunction);
505   return task->get_future();
506 }
507 
DeleteInvitationsAsync(const DeleteInvitationsRequest & request,const DeleteInvitationsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const508 void SecurityHubClient::DeleteInvitationsAsync(const DeleteInvitationsRequest& request, const DeleteInvitationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
509 {
510   m_executor->Submit( [this, request, handler, context](){ this->DeleteInvitationsAsyncHelper( request, handler, context ); } );
511 }
512 
DeleteInvitationsAsyncHelper(const DeleteInvitationsRequest & request,const DeleteInvitationsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const513 void SecurityHubClient::DeleteInvitationsAsyncHelper(const DeleteInvitationsRequest& request, const DeleteInvitationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
514 {
515   handler(this, request, DeleteInvitations(request), context);
516 }
517 
DeleteMembers(const DeleteMembersRequest & request) const518 DeleteMembersOutcome SecurityHubClient::DeleteMembers(const DeleteMembersRequest& request) const
519 {
520   Aws::Http::URI uri = m_uri;
521   uri.AddPathSegments("/members/delete");
522   return DeleteMembersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
523 }
524 
DeleteMembersCallable(const DeleteMembersRequest & request) const525 DeleteMembersOutcomeCallable SecurityHubClient::DeleteMembersCallable(const DeleteMembersRequest& request) const
526 {
527   auto task = Aws::MakeShared< std::packaged_task< DeleteMembersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DeleteMembers(request); } );
528   auto packagedFunction = [task]() { (*task)(); };
529   m_executor->Submit(packagedFunction);
530   return task->get_future();
531 }
532 
DeleteMembersAsync(const DeleteMembersRequest & request,const DeleteMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const533 void SecurityHubClient::DeleteMembersAsync(const DeleteMembersRequest& request, const DeleteMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
534 {
535   m_executor->Submit( [this, request, handler, context](){ this->DeleteMembersAsyncHelper( request, handler, context ); } );
536 }
537 
DeleteMembersAsyncHelper(const DeleteMembersRequest & request,const DeleteMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const538 void SecurityHubClient::DeleteMembersAsyncHelper(const DeleteMembersRequest& request, const DeleteMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
539 {
540   handler(this, request, DeleteMembers(request), context);
541 }
542 
DescribeActionTargets(const DescribeActionTargetsRequest & request) const543 DescribeActionTargetsOutcome SecurityHubClient::DescribeActionTargets(const DescribeActionTargetsRequest& request) const
544 {
545   Aws::Http::URI uri = m_uri;
546   uri.AddPathSegments("/actionTargets/get");
547   return DescribeActionTargetsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
548 }
549 
DescribeActionTargetsCallable(const DescribeActionTargetsRequest & request) const550 DescribeActionTargetsOutcomeCallable SecurityHubClient::DescribeActionTargetsCallable(const DescribeActionTargetsRequest& request) const
551 {
552   auto task = Aws::MakeShared< std::packaged_task< DescribeActionTargetsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeActionTargets(request); } );
553   auto packagedFunction = [task]() { (*task)(); };
554   m_executor->Submit(packagedFunction);
555   return task->get_future();
556 }
557 
DescribeActionTargetsAsync(const DescribeActionTargetsRequest & request,const DescribeActionTargetsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const558 void SecurityHubClient::DescribeActionTargetsAsync(const DescribeActionTargetsRequest& request, const DescribeActionTargetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
559 {
560   m_executor->Submit( [this, request, handler, context](){ this->DescribeActionTargetsAsyncHelper( request, handler, context ); } );
561 }
562 
DescribeActionTargetsAsyncHelper(const DescribeActionTargetsRequest & request,const DescribeActionTargetsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const563 void SecurityHubClient::DescribeActionTargetsAsyncHelper(const DescribeActionTargetsRequest& request, const DescribeActionTargetsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
564 {
565   handler(this, request, DescribeActionTargets(request), context);
566 }
567 
DescribeHub(const DescribeHubRequest & request) const568 DescribeHubOutcome SecurityHubClient::DescribeHub(const DescribeHubRequest& request) const
569 {
570   Aws::Http::URI uri = m_uri;
571   uri.AddPathSegments("/accounts");
572   return DescribeHubOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
573 }
574 
DescribeHubCallable(const DescribeHubRequest & request) const575 DescribeHubOutcomeCallable SecurityHubClient::DescribeHubCallable(const DescribeHubRequest& request) const
576 {
577   auto task = Aws::MakeShared< std::packaged_task< DescribeHubOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeHub(request); } );
578   auto packagedFunction = [task]() { (*task)(); };
579   m_executor->Submit(packagedFunction);
580   return task->get_future();
581 }
582 
DescribeHubAsync(const DescribeHubRequest & request,const DescribeHubResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const583 void SecurityHubClient::DescribeHubAsync(const DescribeHubRequest& request, const DescribeHubResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
584 {
585   m_executor->Submit( [this, request, handler, context](){ this->DescribeHubAsyncHelper( request, handler, context ); } );
586 }
587 
DescribeHubAsyncHelper(const DescribeHubRequest & request,const DescribeHubResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const588 void SecurityHubClient::DescribeHubAsyncHelper(const DescribeHubRequest& request, const DescribeHubResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
589 {
590   handler(this, request, DescribeHub(request), context);
591 }
592 
DescribeOrganizationConfiguration(const DescribeOrganizationConfigurationRequest & request) const593 DescribeOrganizationConfigurationOutcome SecurityHubClient::DescribeOrganizationConfiguration(const DescribeOrganizationConfigurationRequest& request) const
594 {
595   Aws::Http::URI uri = m_uri;
596   uri.AddPathSegments("/organization/configuration");
597   return DescribeOrganizationConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
598 }
599 
DescribeOrganizationConfigurationCallable(const DescribeOrganizationConfigurationRequest & request) const600 DescribeOrganizationConfigurationOutcomeCallable SecurityHubClient::DescribeOrganizationConfigurationCallable(const DescribeOrganizationConfigurationRequest& request) const
601 {
602   auto task = Aws::MakeShared< std::packaged_task< DescribeOrganizationConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeOrganizationConfiguration(request); } );
603   auto packagedFunction = [task]() { (*task)(); };
604   m_executor->Submit(packagedFunction);
605   return task->get_future();
606 }
607 
DescribeOrganizationConfigurationAsync(const DescribeOrganizationConfigurationRequest & request,const DescribeOrganizationConfigurationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const608 void SecurityHubClient::DescribeOrganizationConfigurationAsync(const DescribeOrganizationConfigurationRequest& request, const DescribeOrganizationConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
609 {
610   m_executor->Submit( [this, request, handler, context](){ this->DescribeOrganizationConfigurationAsyncHelper( request, handler, context ); } );
611 }
612 
DescribeOrganizationConfigurationAsyncHelper(const DescribeOrganizationConfigurationRequest & request,const DescribeOrganizationConfigurationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const613 void SecurityHubClient::DescribeOrganizationConfigurationAsyncHelper(const DescribeOrganizationConfigurationRequest& request, const DescribeOrganizationConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
614 {
615   handler(this, request, DescribeOrganizationConfiguration(request), context);
616 }
617 
DescribeProducts(const DescribeProductsRequest & request) const618 DescribeProductsOutcome SecurityHubClient::DescribeProducts(const DescribeProductsRequest& request) const
619 {
620   Aws::Http::URI uri = m_uri;
621   uri.AddPathSegments("/products");
622   return DescribeProductsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
623 }
624 
DescribeProductsCallable(const DescribeProductsRequest & request) const625 DescribeProductsOutcomeCallable SecurityHubClient::DescribeProductsCallable(const DescribeProductsRequest& request) const
626 {
627   auto task = Aws::MakeShared< std::packaged_task< DescribeProductsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeProducts(request); } );
628   auto packagedFunction = [task]() { (*task)(); };
629   m_executor->Submit(packagedFunction);
630   return task->get_future();
631 }
632 
DescribeProductsAsync(const DescribeProductsRequest & request,const DescribeProductsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const633 void SecurityHubClient::DescribeProductsAsync(const DescribeProductsRequest& request, const DescribeProductsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
634 {
635   m_executor->Submit( [this, request, handler, context](){ this->DescribeProductsAsyncHelper( request, handler, context ); } );
636 }
637 
DescribeProductsAsyncHelper(const DescribeProductsRequest & request,const DescribeProductsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const638 void SecurityHubClient::DescribeProductsAsyncHelper(const DescribeProductsRequest& request, const DescribeProductsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
639 {
640   handler(this, request, DescribeProducts(request), context);
641 }
642 
DescribeStandards(const DescribeStandardsRequest & request) const643 DescribeStandardsOutcome SecurityHubClient::DescribeStandards(const DescribeStandardsRequest& request) const
644 {
645   Aws::Http::URI uri = m_uri;
646   uri.AddPathSegments("/standards");
647   return DescribeStandardsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
648 }
649 
DescribeStandardsCallable(const DescribeStandardsRequest & request) const650 DescribeStandardsOutcomeCallable SecurityHubClient::DescribeStandardsCallable(const DescribeStandardsRequest& request) const
651 {
652   auto task = Aws::MakeShared< std::packaged_task< DescribeStandardsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeStandards(request); } );
653   auto packagedFunction = [task]() { (*task)(); };
654   m_executor->Submit(packagedFunction);
655   return task->get_future();
656 }
657 
DescribeStandardsAsync(const DescribeStandardsRequest & request,const DescribeStandardsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const658 void SecurityHubClient::DescribeStandardsAsync(const DescribeStandardsRequest& request, const DescribeStandardsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
659 {
660   m_executor->Submit( [this, request, handler, context](){ this->DescribeStandardsAsyncHelper( request, handler, context ); } );
661 }
662 
DescribeStandardsAsyncHelper(const DescribeStandardsRequest & request,const DescribeStandardsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const663 void SecurityHubClient::DescribeStandardsAsyncHelper(const DescribeStandardsRequest& request, const DescribeStandardsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
664 {
665   handler(this, request, DescribeStandards(request), context);
666 }
667 
DescribeStandardsControls(const DescribeStandardsControlsRequest & request) const668 DescribeStandardsControlsOutcome SecurityHubClient::DescribeStandardsControls(const DescribeStandardsControlsRequest& request) const
669 {
670   if (!request.StandardsSubscriptionArnHasBeenSet())
671   {
672     AWS_LOGSTREAM_ERROR("DescribeStandardsControls", "Required field: StandardsSubscriptionArn, is not set");
673     return DescribeStandardsControlsOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [StandardsSubscriptionArn]", false));
674   }
675   Aws::Http::URI uri = m_uri;
676   uri.AddPathSegments("/standards/controls/");
677   uri.AddPathSegments(request.GetStandardsSubscriptionArn());
678   return DescribeStandardsControlsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
679 }
680 
DescribeStandardsControlsCallable(const DescribeStandardsControlsRequest & request) const681 DescribeStandardsControlsOutcomeCallable SecurityHubClient::DescribeStandardsControlsCallable(const DescribeStandardsControlsRequest& request) const
682 {
683   auto task = Aws::MakeShared< std::packaged_task< DescribeStandardsControlsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeStandardsControls(request); } );
684   auto packagedFunction = [task]() { (*task)(); };
685   m_executor->Submit(packagedFunction);
686   return task->get_future();
687 }
688 
DescribeStandardsControlsAsync(const DescribeStandardsControlsRequest & request,const DescribeStandardsControlsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const689 void SecurityHubClient::DescribeStandardsControlsAsync(const DescribeStandardsControlsRequest& request, const DescribeStandardsControlsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
690 {
691   m_executor->Submit( [this, request, handler, context](){ this->DescribeStandardsControlsAsyncHelper( request, handler, context ); } );
692 }
693 
DescribeStandardsControlsAsyncHelper(const DescribeStandardsControlsRequest & request,const DescribeStandardsControlsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const694 void SecurityHubClient::DescribeStandardsControlsAsyncHelper(const DescribeStandardsControlsRequest& request, const DescribeStandardsControlsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
695 {
696   handler(this, request, DescribeStandardsControls(request), context);
697 }
698 
DisableImportFindingsForProduct(const DisableImportFindingsForProductRequest & request) const699 DisableImportFindingsForProductOutcome SecurityHubClient::DisableImportFindingsForProduct(const DisableImportFindingsForProductRequest& request) const
700 {
701   if (!request.ProductSubscriptionArnHasBeenSet())
702   {
703     AWS_LOGSTREAM_ERROR("DisableImportFindingsForProduct", "Required field: ProductSubscriptionArn, is not set");
704     return DisableImportFindingsForProductOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ProductSubscriptionArn]", false));
705   }
706   Aws::Http::URI uri = m_uri;
707   uri.AddPathSegments("/productSubscriptions/");
708   uri.AddPathSegments(request.GetProductSubscriptionArn());
709   return DisableImportFindingsForProductOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
710 }
711 
DisableImportFindingsForProductCallable(const DisableImportFindingsForProductRequest & request) const712 DisableImportFindingsForProductOutcomeCallable SecurityHubClient::DisableImportFindingsForProductCallable(const DisableImportFindingsForProductRequest& request) const
713 {
714   auto task = Aws::MakeShared< std::packaged_task< DisableImportFindingsForProductOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DisableImportFindingsForProduct(request); } );
715   auto packagedFunction = [task]() { (*task)(); };
716   m_executor->Submit(packagedFunction);
717   return task->get_future();
718 }
719 
DisableImportFindingsForProductAsync(const DisableImportFindingsForProductRequest & request,const DisableImportFindingsForProductResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const720 void SecurityHubClient::DisableImportFindingsForProductAsync(const DisableImportFindingsForProductRequest& request, const DisableImportFindingsForProductResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
721 {
722   m_executor->Submit( [this, request, handler, context](){ this->DisableImportFindingsForProductAsyncHelper( request, handler, context ); } );
723 }
724 
DisableImportFindingsForProductAsyncHelper(const DisableImportFindingsForProductRequest & request,const DisableImportFindingsForProductResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const725 void SecurityHubClient::DisableImportFindingsForProductAsyncHelper(const DisableImportFindingsForProductRequest& request, const DisableImportFindingsForProductResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
726 {
727   handler(this, request, DisableImportFindingsForProduct(request), context);
728 }
729 
DisableOrganizationAdminAccount(const DisableOrganizationAdminAccountRequest & request) const730 DisableOrganizationAdminAccountOutcome SecurityHubClient::DisableOrganizationAdminAccount(const DisableOrganizationAdminAccountRequest& request) const
731 {
732   Aws::Http::URI uri = m_uri;
733   uri.AddPathSegments("/organization/admin/disable");
734   return DisableOrganizationAdminAccountOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
735 }
736 
DisableOrganizationAdminAccountCallable(const DisableOrganizationAdminAccountRequest & request) const737 DisableOrganizationAdminAccountOutcomeCallable SecurityHubClient::DisableOrganizationAdminAccountCallable(const DisableOrganizationAdminAccountRequest& request) const
738 {
739   auto task = Aws::MakeShared< std::packaged_task< DisableOrganizationAdminAccountOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DisableOrganizationAdminAccount(request); } );
740   auto packagedFunction = [task]() { (*task)(); };
741   m_executor->Submit(packagedFunction);
742   return task->get_future();
743 }
744 
DisableOrganizationAdminAccountAsync(const DisableOrganizationAdminAccountRequest & request,const DisableOrganizationAdminAccountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const745 void SecurityHubClient::DisableOrganizationAdminAccountAsync(const DisableOrganizationAdminAccountRequest& request, const DisableOrganizationAdminAccountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
746 {
747   m_executor->Submit( [this, request, handler, context](){ this->DisableOrganizationAdminAccountAsyncHelper( request, handler, context ); } );
748 }
749 
DisableOrganizationAdminAccountAsyncHelper(const DisableOrganizationAdminAccountRequest & request,const DisableOrganizationAdminAccountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const750 void SecurityHubClient::DisableOrganizationAdminAccountAsyncHelper(const DisableOrganizationAdminAccountRequest& request, const DisableOrganizationAdminAccountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
751 {
752   handler(this, request, DisableOrganizationAdminAccount(request), context);
753 }
754 
DisableSecurityHub(const DisableSecurityHubRequest & request) const755 DisableSecurityHubOutcome SecurityHubClient::DisableSecurityHub(const DisableSecurityHubRequest& request) const
756 {
757   Aws::Http::URI uri = m_uri;
758   uri.AddPathSegments("/accounts");
759   return DisableSecurityHubOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
760 }
761 
DisableSecurityHubCallable(const DisableSecurityHubRequest & request) const762 DisableSecurityHubOutcomeCallable SecurityHubClient::DisableSecurityHubCallable(const DisableSecurityHubRequest& request) const
763 {
764   auto task = Aws::MakeShared< std::packaged_task< DisableSecurityHubOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DisableSecurityHub(request); } );
765   auto packagedFunction = [task]() { (*task)(); };
766   m_executor->Submit(packagedFunction);
767   return task->get_future();
768 }
769 
DisableSecurityHubAsync(const DisableSecurityHubRequest & request,const DisableSecurityHubResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const770 void SecurityHubClient::DisableSecurityHubAsync(const DisableSecurityHubRequest& request, const DisableSecurityHubResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
771 {
772   m_executor->Submit( [this, request, handler, context](){ this->DisableSecurityHubAsyncHelper( request, handler, context ); } );
773 }
774 
DisableSecurityHubAsyncHelper(const DisableSecurityHubRequest & request,const DisableSecurityHubResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const775 void SecurityHubClient::DisableSecurityHubAsyncHelper(const DisableSecurityHubRequest& request, const DisableSecurityHubResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
776 {
777   handler(this, request, DisableSecurityHub(request), context);
778 }
779 
DisassociateFromAdministratorAccount(const DisassociateFromAdministratorAccountRequest & request) const780 DisassociateFromAdministratorAccountOutcome SecurityHubClient::DisassociateFromAdministratorAccount(const DisassociateFromAdministratorAccountRequest& request) const
781 {
782   Aws::Http::URI uri = m_uri;
783   uri.AddPathSegments("/administrator/disassociate");
784   return DisassociateFromAdministratorAccountOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
785 }
786 
DisassociateFromAdministratorAccountCallable(const DisassociateFromAdministratorAccountRequest & request) const787 DisassociateFromAdministratorAccountOutcomeCallable SecurityHubClient::DisassociateFromAdministratorAccountCallable(const DisassociateFromAdministratorAccountRequest& request) const
788 {
789   auto task = Aws::MakeShared< std::packaged_task< DisassociateFromAdministratorAccountOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DisassociateFromAdministratorAccount(request); } );
790   auto packagedFunction = [task]() { (*task)(); };
791   m_executor->Submit(packagedFunction);
792   return task->get_future();
793 }
794 
DisassociateFromAdministratorAccountAsync(const DisassociateFromAdministratorAccountRequest & request,const DisassociateFromAdministratorAccountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const795 void SecurityHubClient::DisassociateFromAdministratorAccountAsync(const DisassociateFromAdministratorAccountRequest& request, const DisassociateFromAdministratorAccountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
796 {
797   m_executor->Submit( [this, request, handler, context](){ this->DisassociateFromAdministratorAccountAsyncHelper( request, handler, context ); } );
798 }
799 
DisassociateFromAdministratorAccountAsyncHelper(const DisassociateFromAdministratorAccountRequest & request,const DisassociateFromAdministratorAccountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const800 void SecurityHubClient::DisassociateFromAdministratorAccountAsyncHelper(const DisassociateFromAdministratorAccountRequest& request, const DisassociateFromAdministratorAccountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
801 {
802   handler(this, request, DisassociateFromAdministratorAccount(request), context);
803 }
804 
DisassociateMembers(const DisassociateMembersRequest & request) const805 DisassociateMembersOutcome SecurityHubClient::DisassociateMembers(const DisassociateMembersRequest& request) const
806 {
807   Aws::Http::URI uri = m_uri;
808   uri.AddPathSegments("/members/disassociate");
809   return DisassociateMembersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
810 }
811 
DisassociateMembersCallable(const DisassociateMembersRequest & request) const812 DisassociateMembersOutcomeCallable SecurityHubClient::DisassociateMembersCallable(const DisassociateMembersRequest& request) const
813 {
814   auto task = Aws::MakeShared< std::packaged_task< DisassociateMembersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DisassociateMembers(request); } );
815   auto packagedFunction = [task]() { (*task)(); };
816   m_executor->Submit(packagedFunction);
817   return task->get_future();
818 }
819 
DisassociateMembersAsync(const DisassociateMembersRequest & request,const DisassociateMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const820 void SecurityHubClient::DisassociateMembersAsync(const DisassociateMembersRequest& request, const DisassociateMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
821 {
822   m_executor->Submit( [this, request, handler, context](){ this->DisassociateMembersAsyncHelper( request, handler, context ); } );
823 }
824 
DisassociateMembersAsyncHelper(const DisassociateMembersRequest & request,const DisassociateMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const825 void SecurityHubClient::DisassociateMembersAsyncHelper(const DisassociateMembersRequest& request, const DisassociateMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
826 {
827   handler(this, request, DisassociateMembers(request), context);
828 }
829 
EnableImportFindingsForProduct(const EnableImportFindingsForProductRequest & request) const830 EnableImportFindingsForProductOutcome SecurityHubClient::EnableImportFindingsForProduct(const EnableImportFindingsForProductRequest& request) const
831 {
832   Aws::Http::URI uri = m_uri;
833   uri.AddPathSegments("/productSubscriptions");
834   return EnableImportFindingsForProductOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
835 }
836 
EnableImportFindingsForProductCallable(const EnableImportFindingsForProductRequest & request) const837 EnableImportFindingsForProductOutcomeCallable SecurityHubClient::EnableImportFindingsForProductCallable(const EnableImportFindingsForProductRequest& request) const
838 {
839   auto task = Aws::MakeShared< std::packaged_task< EnableImportFindingsForProductOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->EnableImportFindingsForProduct(request); } );
840   auto packagedFunction = [task]() { (*task)(); };
841   m_executor->Submit(packagedFunction);
842   return task->get_future();
843 }
844 
EnableImportFindingsForProductAsync(const EnableImportFindingsForProductRequest & request,const EnableImportFindingsForProductResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const845 void SecurityHubClient::EnableImportFindingsForProductAsync(const EnableImportFindingsForProductRequest& request, const EnableImportFindingsForProductResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
846 {
847   m_executor->Submit( [this, request, handler, context](){ this->EnableImportFindingsForProductAsyncHelper( request, handler, context ); } );
848 }
849 
EnableImportFindingsForProductAsyncHelper(const EnableImportFindingsForProductRequest & request,const EnableImportFindingsForProductResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const850 void SecurityHubClient::EnableImportFindingsForProductAsyncHelper(const EnableImportFindingsForProductRequest& request, const EnableImportFindingsForProductResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
851 {
852   handler(this, request, EnableImportFindingsForProduct(request), context);
853 }
854 
EnableOrganizationAdminAccount(const EnableOrganizationAdminAccountRequest & request) const855 EnableOrganizationAdminAccountOutcome SecurityHubClient::EnableOrganizationAdminAccount(const EnableOrganizationAdminAccountRequest& request) const
856 {
857   Aws::Http::URI uri = m_uri;
858   uri.AddPathSegments("/organization/admin/enable");
859   return EnableOrganizationAdminAccountOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
860 }
861 
EnableOrganizationAdminAccountCallable(const EnableOrganizationAdminAccountRequest & request) const862 EnableOrganizationAdminAccountOutcomeCallable SecurityHubClient::EnableOrganizationAdminAccountCallable(const EnableOrganizationAdminAccountRequest& request) const
863 {
864   auto task = Aws::MakeShared< std::packaged_task< EnableOrganizationAdminAccountOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->EnableOrganizationAdminAccount(request); } );
865   auto packagedFunction = [task]() { (*task)(); };
866   m_executor->Submit(packagedFunction);
867   return task->get_future();
868 }
869 
EnableOrganizationAdminAccountAsync(const EnableOrganizationAdminAccountRequest & request,const EnableOrganizationAdminAccountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const870 void SecurityHubClient::EnableOrganizationAdminAccountAsync(const EnableOrganizationAdminAccountRequest& request, const EnableOrganizationAdminAccountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
871 {
872   m_executor->Submit( [this, request, handler, context](){ this->EnableOrganizationAdminAccountAsyncHelper( request, handler, context ); } );
873 }
874 
EnableOrganizationAdminAccountAsyncHelper(const EnableOrganizationAdminAccountRequest & request,const EnableOrganizationAdminAccountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const875 void SecurityHubClient::EnableOrganizationAdminAccountAsyncHelper(const EnableOrganizationAdminAccountRequest& request, const EnableOrganizationAdminAccountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
876 {
877   handler(this, request, EnableOrganizationAdminAccount(request), context);
878 }
879 
EnableSecurityHub(const EnableSecurityHubRequest & request) const880 EnableSecurityHubOutcome SecurityHubClient::EnableSecurityHub(const EnableSecurityHubRequest& request) const
881 {
882   Aws::Http::URI uri = m_uri;
883   uri.AddPathSegments("/accounts");
884   return EnableSecurityHubOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
885 }
886 
EnableSecurityHubCallable(const EnableSecurityHubRequest & request) const887 EnableSecurityHubOutcomeCallable SecurityHubClient::EnableSecurityHubCallable(const EnableSecurityHubRequest& request) const
888 {
889   auto task = Aws::MakeShared< std::packaged_task< EnableSecurityHubOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->EnableSecurityHub(request); } );
890   auto packagedFunction = [task]() { (*task)(); };
891   m_executor->Submit(packagedFunction);
892   return task->get_future();
893 }
894 
EnableSecurityHubAsync(const EnableSecurityHubRequest & request,const EnableSecurityHubResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const895 void SecurityHubClient::EnableSecurityHubAsync(const EnableSecurityHubRequest& request, const EnableSecurityHubResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
896 {
897   m_executor->Submit( [this, request, handler, context](){ this->EnableSecurityHubAsyncHelper( request, handler, context ); } );
898 }
899 
EnableSecurityHubAsyncHelper(const EnableSecurityHubRequest & request,const EnableSecurityHubResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const900 void SecurityHubClient::EnableSecurityHubAsyncHelper(const EnableSecurityHubRequest& request, const EnableSecurityHubResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
901 {
902   handler(this, request, EnableSecurityHub(request), context);
903 }
904 
GetAdministratorAccount(const GetAdministratorAccountRequest & request) const905 GetAdministratorAccountOutcome SecurityHubClient::GetAdministratorAccount(const GetAdministratorAccountRequest& request) const
906 {
907   Aws::Http::URI uri = m_uri;
908   uri.AddPathSegments("/administrator");
909   return GetAdministratorAccountOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
910 }
911 
GetAdministratorAccountCallable(const GetAdministratorAccountRequest & request) const912 GetAdministratorAccountOutcomeCallable SecurityHubClient::GetAdministratorAccountCallable(const GetAdministratorAccountRequest& request) const
913 {
914   auto task = Aws::MakeShared< std::packaged_task< GetAdministratorAccountOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetAdministratorAccount(request); } );
915   auto packagedFunction = [task]() { (*task)(); };
916   m_executor->Submit(packagedFunction);
917   return task->get_future();
918 }
919 
GetAdministratorAccountAsync(const GetAdministratorAccountRequest & request,const GetAdministratorAccountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const920 void SecurityHubClient::GetAdministratorAccountAsync(const GetAdministratorAccountRequest& request, const GetAdministratorAccountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
921 {
922   m_executor->Submit( [this, request, handler, context](){ this->GetAdministratorAccountAsyncHelper( request, handler, context ); } );
923 }
924 
GetAdministratorAccountAsyncHelper(const GetAdministratorAccountRequest & request,const GetAdministratorAccountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const925 void SecurityHubClient::GetAdministratorAccountAsyncHelper(const GetAdministratorAccountRequest& request, const GetAdministratorAccountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
926 {
927   handler(this, request, GetAdministratorAccount(request), context);
928 }
929 
GetEnabledStandards(const GetEnabledStandardsRequest & request) const930 GetEnabledStandardsOutcome SecurityHubClient::GetEnabledStandards(const GetEnabledStandardsRequest& request) const
931 {
932   Aws::Http::URI uri = m_uri;
933   uri.AddPathSegments("/standards/get");
934   return GetEnabledStandardsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
935 }
936 
GetEnabledStandardsCallable(const GetEnabledStandardsRequest & request) const937 GetEnabledStandardsOutcomeCallable SecurityHubClient::GetEnabledStandardsCallable(const GetEnabledStandardsRequest& request) const
938 {
939   auto task = Aws::MakeShared< std::packaged_task< GetEnabledStandardsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetEnabledStandards(request); } );
940   auto packagedFunction = [task]() { (*task)(); };
941   m_executor->Submit(packagedFunction);
942   return task->get_future();
943 }
944 
GetEnabledStandardsAsync(const GetEnabledStandardsRequest & request,const GetEnabledStandardsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const945 void SecurityHubClient::GetEnabledStandardsAsync(const GetEnabledStandardsRequest& request, const GetEnabledStandardsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
946 {
947   m_executor->Submit( [this, request, handler, context](){ this->GetEnabledStandardsAsyncHelper( request, handler, context ); } );
948 }
949 
GetEnabledStandardsAsyncHelper(const GetEnabledStandardsRequest & request,const GetEnabledStandardsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const950 void SecurityHubClient::GetEnabledStandardsAsyncHelper(const GetEnabledStandardsRequest& request, const GetEnabledStandardsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
951 {
952   handler(this, request, GetEnabledStandards(request), context);
953 }
954 
GetFindingAggregator(const GetFindingAggregatorRequest & request) const955 GetFindingAggregatorOutcome SecurityHubClient::GetFindingAggregator(const GetFindingAggregatorRequest& request) const
956 {
957   if (!request.FindingAggregatorArnHasBeenSet())
958   {
959     AWS_LOGSTREAM_ERROR("GetFindingAggregator", "Required field: FindingAggregatorArn, is not set");
960     return GetFindingAggregatorOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [FindingAggregatorArn]", false));
961   }
962   Aws::Http::URI uri = m_uri;
963   uri.AddPathSegments("/findingAggregator/get/");
964   uri.AddPathSegments(request.GetFindingAggregatorArn());
965   return GetFindingAggregatorOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
966 }
967 
GetFindingAggregatorCallable(const GetFindingAggregatorRequest & request) const968 GetFindingAggregatorOutcomeCallable SecurityHubClient::GetFindingAggregatorCallable(const GetFindingAggregatorRequest& request) const
969 {
970   auto task = Aws::MakeShared< std::packaged_task< GetFindingAggregatorOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetFindingAggregator(request); } );
971   auto packagedFunction = [task]() { (*task)(); };
972   m_executor->Submit(packagedFunction);
973   return task->get_future();
974 }
975 
GetFindingAggregatorAsync(const GetFindingAggregatorRequest & request,const GetFindingAggregatorResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const976 void SecurityHubClient::GetFindingAggregatorAsync(const GetFindingAggregatorRequest& request, const GetFindingAggregatorResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
977 {
978   m_executor->Submit( [this, request, handler, context](){ this->GetFindingAggregatorAsyncHelper( request, handler, context ); } );
979 }
980 
GetFindingAggregatorAsyncHelper(const GetFindingAggregatorRequest & request,const GetFindingAggregatorResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const981 void SecurityHubClient::GetFindingAggregatorAsyncHelper(const GetFindingAggregatorRequest& request, const GetFindingAggregatorResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
982 {
983   handler(this, request, GetFindingAggregator(request), context);
984 }
985 
GetFindings(const GetFindingsRequest & request) const986 GetFindingsOutcome SecurityHubClient::GetFindings(const GetFindingsRequest& request) const
987 {
988   Aws::Http::URI uri = m_uri;
989   uri.AddPathSegments("/findings");
990   return GetFindingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
991 }
992 
GetFindingsCallable(const GetFindingsRequest & request) const993 GetFindingsOutcomeCallable SecurityHubClient::GetFindingsCallable(const GetFindingsRequest& request) const
994 {
995   auto task = Aws::MakeShared< std::packaged_task< GetFindingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetFindings(request); } );
996   auto packagedFunction = [task]() { (*task)(); };
997   m_executor->Submit(packagedFunction);
998   return task->get_future();
999 }
1000 
GetFindingsAsync(const GetFindingsRequest & request,const GetFindingsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1001 void SecurityHubClient::GetFindingsAsync(const GetFindingsRequest& request, const GetFindingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1002 {
1003   m_executor->Submit( [this, request, handler, context](){ this->GetFindingsAsyncHelper( request, handler, context ); } );
1004 }
1005 
GetFindingsAsyncHelper(const GetFindingsRequest & request,const GetFindingsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1006 void SecurityHubClient::GetFindingsAsyncHelper(const GetFindingsRequest& request, const GetFindingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1007 {
1008   handler(this, request, GetFindings(request), context);
1009 }
1010 
GetInsightResults(const GetInsightResultsRequest & request) const1011 GetInsightResultsOutcome SecurityHubClient::GetInsightResults(const GetInsightResultsRequest& request) const
1012 {
1013   if (!request.InsightArnHasBeenSet())
1014   {
1015     AWS_LOGSTREAM_ERROR("GetInsightResults", "Required field: InsightArn, is not set");
1016     return GetInsightResultsOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [InsightArn]", false));
1017   }
1018   Aws::Http::URI uri = m_uri;
1019   uri.AddPathSegments("/insights/results/");
1020   uri.AddPathSegments(request.GetInsightArn());
1021   return GetInsightResultsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
1022 }
1023 
GetInsightResultsCallable(const GetInsightResultsRequest & request) const1024 GetInsightResultsOutcomeCallable SecurityHubClient::GetInsightResultsCallable(const GetInsightResultsRequest& request) const
1025 {
1026   auto task = Aws::MakeShared< std::packaged_task< GetInsightResultsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetInsightResults(request); } );
1027   auto packagedFunction = [task]() { (*task)(); };
1028   m_executor->Submit(packagedFunction);
1029   return task->get_future();
1030 }
1031 
GetInsightResultsAsync(const GetInsightResultsRequest & request,const GetInsightResultsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1032 void SecurityHubClient::GetInsightResultsAsync(const GetInsightResultsRequest& request, const GetInsightResultsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1033 {
1034   m_executor->Submit( [this, request, handler, context](){ this->GetInsightResultsAsyncHelper( request, handler, context ); } );
1035 }
1036 
GetInsightResultsAsyncHelper(const GetInsightResultsRequest & request,const GetInsightResultsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1037 void SecurityHubClient::GetInsightResultsAsyncHelper(const GetInsightResultsRequest& request, const GetInsightResultsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1038 {
1039   handler(this, request, GetInsightResults(request), context);
1040 }
1041 
GetInsights(const GetInsightsRequest & request) const1042 GetInsightsOutcome SecurityHubClient::GetInsights(const GetInsightsRequest& request) const
1043 {
1044   Aws::Http::URI uri = m_uri;
1045   uri.AddPathSegments("/insights/get");
1046   return GetInsightsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
1047 }
1048 
GetInsightsCallable(const GetInsightsRequest & request) const1049 GetInsightsOutcomeCallable SecurityHubClient::GetInsightsCallable(const GetInsightsRequest& request) const
1050 {
1051   auto task = Aws::MakeShared< std::packaged_task< GetInsightsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetInsights(request); } );
1052   auto packagedFunction = [task]() { (*task)(); };
1053   m_executor->Submit(packagedFunction);
1054   return task->get_future();
1055 }
1056 
GetInsightsAsync(const GetInsightsRequest & request,const GetInsightsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1057 void SecurityHubClient::GetInsightsAsync(const GetInsightsRequest& request, const GetInsightsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1058 {
1059   m_executor->Submit( [this, request, handler, context](){ this->GetInsightsAsyncHelper( request, handler, context ); } );
1060 }
1061 
GetInsightsAsyncHelper(const GetInsightsRequest & request,const GetInsightsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1062 void SecurityHubClient::GetInsightsAsyncHelper(const GetInsightsRequest& request, const GetInsightsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1063 {
1064   handler(this, request, GetInsights(request), context);
1065 }
1066 
GetInvitationsCount(const GetInvitationsCountRequest & request) const1067 GetInvitationsCountOutcome SecurityHubClient::GetInvitationsCount(const GetInvitationsCountRequest& request) const
1068 {
1069   Aws::Http::URI uri = m_uri;
1070   uri.AddPathSegments("/invitations/count");
1071   return GetInvitationsCountOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
1072 }
1073 
GetInvitationsCountCallable(const GetInvitationsCountRequest & request) const1074 GetInvitationsCountOutcomeCallable SecurityHubClient::GetInvitationsCountCallable(const GetInvitationsCountRequest& request) const
1075 {
1076   auto task = Aws::MakeShared< std::packaged_task< GetInvitationsCountOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetInvitationsCount(request); } );
1077   auto packagedFunction = [task]() { (*task)(); };
1078   m_executor->Submit(packagedFunction);
1079   return task->get_future();
1080 }
1081 
GetInvitationsCountAsync(const GetInvitationsCountRequest & request,const GetInvitationsCountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1082 void SecurityHubClient::GetInvitationsCountAsync(const GetInvitationsCountRequest& request, const GetInvitationsCountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1083 {
1084   m_executor->Submit( [this, request, handler, context](){ this->GetInvitationsCountAsyncHelper( request, handler, context ); } );
1085 }
1086 
GetInvitationsCountAsyncHelper(const GetInvitationsCountRequest & request,const GetInvitationsCountResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1087 void SecurityHubClient::GetInvitationsCountAsyncHelper(const GetInvitationsCountRequest& request, const GetInvitationsCountResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1088 {
1089   handler(this, request, GetInvitationsCount(request), context);
1090 }
1091 
GetMembers(const GetMembersRequest & request) const1092 GetMembersOutcome SecurityHubClient::GetMembers(const GetMembersRequest& request) const
1093 {
1094   Aws::Http::URI uri = m_uri;
1095   uri.AddPathSegments("/members/get");
1096   return GetMembersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
1097 }
1098 
GetMembersCallable(const GetMembersRequest & request) const1099 GetMembersOutcomeCallable SecurityHubClient::GetMembersCallable(const GetMembersRequest& request) const
1100 {
1101   auto task = Aws::MakeShared< std::packaged_task< GetMembersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetMembers(request); } );
1102   auto packagedFunction = [task]() { (*task)(); };
1103   m_executor->Submit(packagedFunction);
1104   return task->get_future();
1105 }
1106 
GetMembersAsync(const GetMembersRequest & request,const GetMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1107 void SecurityHubClient::GetMembersAsync(const GetMembersRequest& request, const GetMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1108 {
1109   m_executor->Submit( [this, request, handler, context](){ this->GetMembersAsyncHelper( request, handler, context ); } );
1110 }
1111 
GetMembersAsyncHelper(const GetMembersRequest & request,const GetMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1112 void SecurityHubClient::GetMembersAsyncHelper(const GetMembersRequest& request, const GetMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1113 {
1114   handler(this, request, GetMembers(request), context);
1115 }
1116 
InviteMembers(const InviteMembersRequest & request) const1117 InviteMembersOutcome SecurityHubClient::InviteMembers(const InviteMembersRequest& request) const
1118 {
1119   Aws::Http::URI uri = m_uri;
1120   uri.AddPathSegments("/members/invite");
1121   return InviteMembersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
1122 }
1123 
InviteMembersCallable(const InviteMembersRequest & request) const1124 InviteMembersOutcomeCallable SecurityHubClient::InviteMembersCallable(const InviteMembersRequest& request) const
1125 {
1126   auto task = Aws::MakeShared< std::packaged_task< InviteMembersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->InviteMembers(request); } );
1127   auto packagedFunction = [task]() { (*task)(); };
1128   m_executor->Submit(packagedFunction);
1129   return task->get_future();
1130 }
1131 
InviteMembersAsync(const InviteMembersRequest & request,const InviteMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1132 void SecurityHubClient::InviteMembersAsync(const InviteMembersRequest& request, const InviteMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1133 {
1134   m_executor->Submit( [this, request, handler, context](){ this->InviteMembersAsyncHelper( request, handler, context ); } );
1135 }
1136 
InviteMembersAsyncHelper(const InviteMembersRequest & request,const InviteMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1137 void SecurityHubClient::InviteMembersAsyncHelper(const InviteMembersRequest& request, const InviteMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1138 {
1139   handler(this, request, InviteMembers(request), context);
1140 }
1141 
ListEnabledProductsForImport(const ListEnabledProductsForImportRequest & request) const1142 ListEnabledProductsForImportOutcome SecurityHubClient::ListEnabledProductsForImport(const ListEnabledProductsForImportRequest& request) const
1143 {
1144   Aws::Http::URI uri = m_uri;
1145   uri.AddPathSegments("/productSubscriptions");
1146   return ListEnabledProductsForImportOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
1147 }
1148 
ListEnabledProductsForImportCallable(const ListEnabledProductsForImportRequest & request) const1149 ListEnabledProductsForImportOutcomeCallable SecurityHubClient::ListEnabledProductsForImportCallable(const ListEnabledProductsForImportRequest& request) const
1150 {
1151   auto task = Aws::MakeShared< std::packaged_task< ListEnabledProductsForImportOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListEnabledProductsForImport(request); } );
1152   auto packagedFunction = [task]() { (*task)(); };
1153   m_executor->Submit(packagedFunction);
1154   return task->get_future();
1155 }
1156 
ListEnabledProductsForImportAsync(const ListEnabledProductsForImportRequest & request,const ListEnabledProductsForImportResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1157 void SecurityHubClient::ListEnabledProductsForImportAsync(const ListEnabledProductsForImportRequest& request, const ListEnabledProductsForImportResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1158 {
1159   m_executor->Submit( [this, request, handler, context](){ this->ListEnabledProductsForImportAsyncHelper( request, handler, context ); } );
1160 }
1161 
ListEnabledProductsForImportAsyncHelper(const ListEnabledProductsForImportRequest & request,const ListEnabledProductsForImportResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1162 void SecurityHubClient::ListEnabledProductsForImportAsyncHelper(const ListEnabledProductsForImportRequest& request, const ListEnabledProductsForImportResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1163 {
1164   handler(this, request, ListEnabledProductsForImport(request), context);
1165 }
1166 
ListFindingAggregators(const ListFindingAggregatorsRequest & request) const1167 ListFindingAggregatorsOutcome SecurityHubClient::ListFindingAggregators(const ListFindingAggregatorsRequest& request) const
1168 {
1169   Aws::Http::URI uri = m_uri;
1170   uri.AddPathSegments("/findingAggregator/list");
1171   return ListFindingAggregatorsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
1172 }
1173 
ListFindingAggregatorsCallable(const ListFindingAggregatorsRequest & request) const1174 ListFindingAggregatorsOutcomeCallable SecurityHubClient::ListFindingAggregatorsCallable(const ListFindingAggregatorsRequest& request) const
1175 {
1176   auto task = Aws::MakeShared< std::packaged_task< ListFindingAggregatorsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListFindingAggregators(request); } );
1177   auto packagedFunction = [task]() { (*task)(); };
1178   m_executor->Submit(packagedFunction);
1179   return task->get_future();
1180 }
1181 
ListFindingAggregatorsAsync(const ListFindingAggregatorsRequest & request,const ListFindingAggregatorsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1182 void SecurityHubClient::ListFindingAggregatorsAsync(const ListFindingAggregatorsRequest& request, const ListFindingAggregatorsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1183 {
1184   m_executor->Submit( [this, request, handler, context](){ this->ListFindingAggregatorsAsyncHelper( request, handler, context ); } );
1185 }
1186 
ListFindingAggregatorsAsyncHelper(const ListFindingAggregatorsRequest & request,const ListFindingAggregatorsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1187 void SecurityHubClient::ListFindingAggregatorsAsyncHelper(const ListFindingAggregatorsRequest& request, const ListFindingAggregatorsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1188 {
1189   handler(this, request, ListFindingAggregators(request), context);
1190 }
1191 
ListInvitations(const ListInvitationsRequest & request) const1192 ListInvitationsOutcome SecurityHubClient::ListInvitations(const ListInvitationsRequest& request) const
1193 {
1194   Aws::Http::URI uri = m_uri;
1195   uri.AddPathSegments("/invitations");
1196   return ListInvitationsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
1197 }
1198 
ListInvitationsCallable(const ListInvitationsRequest & request) const1199 ListInvitationsOutcomeCallable SecurityHubClient::ListInvitationsCallable(const ListInvitationsRequest& request) const
1200 {
1201   auto task = Aws::MakeShared< std::packaged_task< ListInvitationsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListInvitations(request); } );
1202   auto packagedFunction = [task]() { (*task)(); };
1203   m_executor->Submit(packagedFunction);
1204   return task->get_future();
1205 }
1206 
ListInvitationsAsync(const ListInvitationsRequest & request,const ListInvitationsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1207 void SecurityHubClient::ListInvitationsAsync(const ListInvitationsRequest& request, const ListInvitationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1208 {
1209   m_executor->Submit( [this, request, handler, context](){ this->ListInvitationsAsyncHelper( request, handler, context ); } );
1210 }
1211 
ListInvitationsAsyncHelper(const ListInvitationsRequest & request,const ListInvitationsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1212 void SecurityHubClient::ListInvitationsAsyncHelper(const ListInvitationsRequest& request, const ListInvitationsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1213 {
1214   handler(this, request, ListInvitations(request), context);
1215 }
1216 
ListMembers(const ListMembersRequest & request) const1217 ListMembersOutcome SecurityHubClient::ListMembers(const ListMembersRequest& request) const
1218 {
1219   Aws::Http::URI uri = m_uri;
1220   uri.AddPathSegments("/members");
1221   return ListMembersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
1222 }
1223 
ListMembersCallable(const ListMembersRequest & request) const1224 ListMembersOutcomeCallable SecurityHubClient::ListMembersCallable(const ListMembersRequest& request) const
1225 {
1226   auto task = Aws::MakeShared< std::packaged_task< ListMembersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListMembers(request); } );
1227   auto packagedFunction = [task]() { (*task)(); };
1228   m_executor->Submit(packagedFunction);
1229   return task->get_future();
1230 }
1231 
ListMembersAsync(const ListMembersRequest & request,const ListMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1232 void SecurityHubClient::ListMembersAsync(const ListMembersRequest& request, const ListMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1233 {
1234   m_executor->Submit( [this, request, handler, context](){ this->ListMembersAsyncHelper( request, handler, context ); } );
1235 }
1236 
ListMembersAsyncHelper(const ListMembersRequest & request,const ListMembersResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1237 void SecurityHubClient::ListMembersAsyncHelper(const ListMembersRequest& request, const ListMembersResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1238 {
1239   handler(this, request, ListMembers(request), context);
1240 }
1241 
ListOrganizationAdminAccounts(const ListOrganizationAdminAccountsRequest & request) const1242 ListOrganizationAdminAccountsOutcome SecurityHubClient::ListOrganizationAdminAccounts(const ListOrganizationAdminAccountsRequest& request) const
1243 {
1244   Aws::Http::URI uri = m_uri;
1245   uri.AddPathSegments("/organization/admin");
1246   return ListOrganizationAdminAccountsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
1247 }
1248 
ListOrganizationAdminAccountsCallable(const ListOrganizationAdminAccountsRequest & request) const1249 ListOrganizationAdminAccountsOutcomeCallable SecurityHubClient::ListOrganizationAdminAccountsCallable(const ListOrganizationAdminAccountsRequest& request) const
1250 {
1251   auto task = Aws::MakeShared< std::packaged_task< ListOrganizationAdminAccountsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListOrganizationAdminAccounts(request); } );
1252   auto packagedFunction = [task]() { (*task)(); };
1253   m_executor->Submit(packagedFunction);
1254   return task->get_future();
1255 }
1256 
ListOrganizationAdminAccountsAsync(const ListOrganizationAdminAccountsRequest & request,const ListOrganizationAdminAccountsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1257 void SecurityHubClient::ListOrganizationAdminAccountsAsync(const ListOrganizationAdminAccountsRequest& request, const ListOrganizationAdminAccountsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1258 {
1259   m_executor->Submit( [this, request, handler, context](){ this->ListOrganizationAdminAccountsAsyncHelper( request, handler, context ); } );
1260 }
1261 
ListOrganizationAdminAccountsAsyncHelper(const ListOrganizationAdminAccountsRequest & request,const ListOrganizationAdminAccountsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1262 void SecurityHubClient::ListOrganizationAdminAccountsAsyncHelper(const ListOrganizationAdminAccountsRequest& request, const ListOrganizationAdminAccountsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1263 {
1264   handler(this, request, ListOrganizationAdminAccounts(request), context);
1265 }
1266 
ListTagsForResource(const ListTagsForResourceRequest & request) const1267 ListTagsForResourceOutcome SecurityHubClient::ListTagsForResource(const ListTagsForResourceRequest& request) const
1268 {
1269   if (!request.ResourceArnHasBeenSet())
1270   {
1271     AWS_LOGSTREAM_ERROR("ListTagsForResource", "Required field: ResourceArn, is not set");
1272     return ListTagsForResourceOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
1273   }
1274   Aws::Http::URI uri = m_uri;
1275   uri.AddPathSegments("/tags/");
1276   uri.AddPathSegment(request.GetResourceArn());
1277   return ListTagsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
1278 }
1279 
ListTagsForResourceCallable(const ListTagsForResourceRequest & request) const1280 ListTagsForResourceOutcomeCallable SecurityHubClient::ListTagsForResourceCallable(const ListTagsForResourceRequest& request) const
1281 {
1282   auto task = Aws::MakeShared< std::packaged_task< ListTagsForResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListTagsForResource(request); } );
1283   auto packagedFunction = [task]() { (*task)(); };
1284   m_executor->Submit(packagedFunction);
1285   return task->get_future();
1286 }
1287 
ListTagsForResourceAsync(const ListTagsForResourceRequest & request,const ListTagsForResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1288 void SecurityHubClient::ListTagsForResourceAsync(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1289 {
1290   m_executor->Submit( [this, request, handler, context](){ this->ListTagsForResourceAsyncHelper( request, handler, context ); } );
1291 }
1292 
ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest & request,const ListTagsForResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1293 void SecurityHubClient::ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1294 {
1295   handler(this, request, ListTagsForResource(request), context);
1296 }
1297 
TagResource(const TagResourceRequest & request) const1298 TagResourceOutcome SecurityHubClient::TagResource(const TagResourceRequest& request) const
1299 {
1300   if (!request.ResourceArnHasBeenSet())
1301   {
1302     AWS_LOGSTREAM_ERROR("TagResource", "Required field: ResourceArn, is not set");
1303     return TagResourceOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
1304   }
1305   Aws::Http::URI uri = m_uri;
1306   uri.AddPathSegments("/tags/");
1307   uri.AddPathSegment(request.GetResourceArn());
1308   return TagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
1309 }
1310 
TagResourceCallable(const TagResourceRequest & request) const1311 TagResourceOutcomeCallable SecurityHubClient::TagResourceCallable(const TagResourceRequest& request) const
1312 {
1313   auto task = Aws::MakeShared< std::packaged_task< TagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->TagResource(request); } );
1314   auto packagedFunction = [task]() { (*task)(); };
1315   m_executor->Submit(packagedFunction);
1316   return task->get_future();
1317 }
1318 
TagResourceAsync(const TagResourceRequest & request,const TagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1319 void SecurityHubClient::TagResourceAsync(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1320 {
1321   m_executor->Submit( [this, request, handler, context](){ this->TagResourceAsyncHelper( request, handler, context ); } );
1322 }
1323 
TagResourceAsyncHelper(const TagResourceRequest & request,const TagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1324 void SecurityHubClient::TagResourceAsyncHelper(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1325 {
1326   handler(this, request, TagResource(request), context);
1327 }
1328 
UntagResource(const UntagResourceRequest & request) const1329 UntagResourceOutcome SecurityHubClient::UntagResource(const UntagResourceRequest& request) const
1330 {
1331   if (!request.ResourceArnHasBeenSet())
1332   {
1333     AWS_LOGSTREAM_ERROR("UntagResource", "Required field: ResourceArn, is not set");
1334     return UntagResourceOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ResourceArn]", false));
1335   }
1336   if (!request.TagKeysHasBeenSet())
1337   {
1338     AWS_LOGSTREAM_ERROR("UntagResource", "Required field: TagKeys, is not set");
1339     return UntagResourceOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [TagKeys]", false));
1340   }
1341   Aws::Http::URI uri = m_uri;
1342   uri.AddPathSegments("/tags/");
1343   uri.AddPathSegment(request.GetResourceArn());
1344   return UntagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_DELETE, Aws::Auth::SIGV4_SIGNER));
1345 }
1346 
UntagResourceCallable(const UntagResourceRequest & request) const1347 UntagResourceOutcomeCallable SecurityHubClient::UntagResourceCallable(const UntagResourceRequest& request) const
1348 {
1349   auto task = Aws::MakeShared< std::packaged_task< UntagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UntagResource(request); } );
1350   auto packagedFunction = [task]() { (*task)(); };
1351   m_executor->Submit(packagedFunction);
1352   return task->get_future();
1353 }
1354 
UntagResourceAsync(const UntagResourceRequest & request,const UntagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1355 void SecurityHubClient::UntagResourceAsync(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1356 {
1357   m_executor->Submit( [this, request, handler, context](){ this->UntagResourceAsyncHelper( request, handler, context ); } );
1358 }
1359 
UntagResourceAsyncHelper(const UntagResourceRequest & request,const UntagResourceResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1360 void SecurityHubClient::UntagResourceAsyncHelper(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1361 {
1362   handler(this, request, UntagResource(request), context);
1363 }
1364 
UpdateActionTarget(const UpdateActionTargetRequest & request) const1365 UpdateActionTargetOutcome SecurityHubClient::UpdateActionTarget(const UpdateActionTargetRequest& request) const
1366 {
1367   if (!request.ActionTargetArnHasBeenSet())
1368   {
1369     AWS_LOGSTREAM_ERROR("UpdateActionTarget", "Required field: ActionTargetArn, is not set");
1370     return UpdateActionTargetOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [ActionTargetArn]", false));
1371   }
1372   Aws::Http::URI uri = m_uri;
1373   uri.AddPathSegments("/actionTargets/");
1374   uri.AddPathSegments(request.GetActionTargetArn());
1375   return UpdateActionTargetOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
1376 }
1377 
UpdateActionTargetCallable(const UpdateActionTargetRequest & request) const1378 UpdateActionTargetOutcomeCallable SecurityHubClient::UpdateActionTargetCallable(const UpdateActionTargetRequest& request) const
1379 {
1380   auto task = Aws::MakeShared< std::packaged_task< UpdateActionTargetOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateActionTarget(request); } );
1381   auto packagedFunction = [task]() { (*task)(); };
1382   m_executor->Submit(packagedFunction);
1383   return task->get_future();
1384 }
1385 
UpdateActionTargetAsync(const UpdateActionTargetRequest & request,const UpdateActionTargetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1386 void SecurityHubClient::UpdateActionTargetAsync(const UpdateActionTargetRequest& request, const UpdateActionTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1387 {
1388   m_executor->Submit( [this, request, handler, context](){ this->UpdateActionTargetAsyncHelper( request, handler, context ); } );
1389 }
1390 
UpdateActionTargetAsyncHelper(const UpdateActionTargetRequest & request,const UpdateActionTargetResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1391 void SecurityHubClient::UpdateActionTargetAsyncHelper(const UpdateActionTargetRequest& request, const UpdateActionTargetResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1392 {
1393   handler(this, request, UpdateActionTarget(request), context);
1394 }
1395 
UpdateFindingAggregator(const UpdateFindingAggregatorRequest & request) const1396 UpdateFindingAggregatorOutcome SecurityHubClient::UpdateFindingAggregator(const UpdateFindingAggregatorRequest& request) const
1397 {
1398   Aws::Http::URI uri = m_uri;
1399   uri.AddPathSegments("/findingAggregator/update");
1400   return UpdateFindingAggregatorOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
1401 }
1402 
UpdateFindingAggregatorCallable(const UpdateFindingAggregatorRequest & request) const1403 UpdateFindingAggregatorOutcomeCallable SecurityHubClient::UpdateFindingAggregatorCallable(const UpdateFindingAggregatorRequest& request) const
1404 {
1405   auto task = Aws::MakeShared< std::packaged_task< UpdateFindingAggregatorOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateFindingAggregator(request); } );
1406   auto packagedFunction = [task]() { (*task)(); };
1407   m_executor->Submit(packagedFunction);
1408   return task->get_future();
1409 }
1410 
UpdateFindingAggregatorAsync(const UpdateFindingAggregatorRequest & request,const UpdateFindingAggregatorResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1411 void SecurityHubClient::UpdateFindingAggregatorAsync(const UpdateFindingAggregatorRequest& request, const UpdateFindingAggregatorResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1412 {
1413   m_executor->Submit( [this, request, handler, context](){ this->UpdateFindingAggregatorAsyncHelper( request, handler, context ); } );
1414 }
1415 
UpdateFindingAggregatorAsyncHelper(const UpdateFindingAggregatorRequest & request,const UpdateFindingAggregatorResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1416 void SecurityHubClient::UpdateFindingAggregatorAsyncHelper(const UpdateFindingAggregatorRequest& request, const UpdateFindingAggregatorResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1417 {
1418   handler(this, request, UpdateFindingAggregator(request), context);
1419 }
1420 
UpdateFindings(const UpdateFindingsRequest & request) const1421 UpdateFindingsOutcome SecurityHubClient::UpdateFindings(const UpdateFindingsRequest& request) const
1422 {
1423   Aws::Http::URI uri = m_uri;
1424   uri.AddPathSegments("/findings");
1425   return UpdateFindingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
1426 }
1427 
UpdateFindingsCallable(const UpdateFindingsRequest & request) const1428 UpdateFindingsOutcomeCallable SecurityHubClient::UpdateFindingsCallable(const UpdateFindingsRequest& request) const
1429 {
1430   auto task = Aws::MakeShared< std::packaged_task< UpdateFindingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateFindings(request); } );
1431   auto packagedFunction = [task]() { (*task)(); };
1432   m_executor->Submit(packagedFunction);
1433   return task->get_future();
1434 }
1435 
UpdateFindingsAsync(const UpdateFindingsRequest & request,const UpdateFindingsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1436 void SecurityHubClient::UpdateFindingsAsync(const UpdateFindingsRequest& request, const UpdateFindingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1437 {
1438   m_executor->Submit( [this, request, handler, context](){ this->UpdateFindingsAsyncHelper( request, handler, context ); } );
1439 }
1440 
UpdateFindingsAsyncHelper(const UpdateFindingsRequest & request,const UpdateFindingsResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1441 void SecurityHubClient::UpdateFindingsAsyncHelper(const UpdateFindingsRequest& request, const UpdateFindingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1442 {
1443   handler(this, request, UpdateFindings(request), context);
1444 }
1445 
UpdateInsight(const UpdateInsightRequest & request) const1446 UpdateInsightOutcome SecurityHubClient::UpdateInsight(const UpdateInsightRequest& request) const
1447 {
1448   if (!request.InsightArnHasBeenSet())
1449   {
1450     AWS_LOGSTREAM_ERROR("UpdateInsight", "Required field: InsightArn, is not set");
1451     return UpdateInsightOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [InsightArn]", false));
1452   }
1453   Aws::Http::URI uri = m_uri;
1454   uri.AddPathSegments("/insights/");
1455   uri.AddPathSegments(request.GetInsightArn());
1456   return UpdateInsightOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
1457 }
1458 
UpdateInsightCallable(const UpdateInsightRequest & request) const1459 UpdateInsightOutcomeCallable SecurityHubClient::UpdateInsightCallable(const UpdateInsightRequest& request) const
1460 {
1461   auto task = Aws::MakeShared< std::packaged_task< UpdateInsightOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateInsight(request); } );
1462   auto packagedFunction = [task]() { (*task)(); };
1463   m_executor->Submit(packagedFunction);
1464   return task->get_future();
1465 }
1466 
UpdateInsightAsync(const UpdateInsightRequest & request,const UpdateInsightResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1467 void SecurityHubClient::UpdateInsightAsync(const UpdateInsightRequest& request, const UpdateInsightResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1468 {
1469   m_executor->Submit( [this, request, handler, context](){ this->UpdateInsightAsyncHelper( request, handler, context ); } );
1470 }
1471 
UpdateInsightAsyncHelper(const UpdateInsightRequest & request,const UpdateInsightResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1472 void SecurityHubClient::UpdateInsightAsyncHelper(const UpdateInsightRequest& request, const UpdateInsightResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1473 {
1474   handler(this, request, UpdateInsight(request), context);
1475 }
1476 
UpdateOrganizationConfiguration(const UpdateOrganizationConfigurationRequest & request) const1477 UpdateOrganizationConfigurationOutcome SecurityHubClient::UpdateOrganizationConfiguration(const UpdateOrganizationConfigurationRequest& request) const
1478 {
1479   Aws::Http::URI uri = m_uri;
1480   uri.AddPathSegments("/organization/configuration");
1481   return UpdateOrganizationConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
1482 }
1483 
UpdateOrganizationConfigurationCallable(const UpdateOrganizationConfigurationRequest & request) const1484 UpdateOrganizationConfigurationOutcomeCallable SecurityHubClient::UpdateOrganizationConfigurationCallable(const UpdateOrganizationConfigurationRequest& request) const
1485 {
1486   auto task = Aws::MakeShared< std::packaged_task< UpdateOrganizationConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateOrganizationConfiguration(request); } );
1487   auto packagedFunction = [task]() { (*task)(); };
1488   m_executor->Submit(packagedFunction);
1489   return task->get_future();
1490 }
1491 
UpdateOrganizationConfigurationAsync(const UpdateOrganizationConfigurationRequest & request,const UpdateOrganizationConfigurationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1492 void SecurityHubClient::UpdateOrganizationConfigurationAsync(const UpdateOrganizationConfigurationRequest& request, const UpdateOrganizationConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1493 {
1494   m_executor->Submit( [this, request, handler, context](){ this->UpdateOrganizationConfigurationAsyncHelper( request, handler, context ); } );
1495 }
1496 
UpdateOrganizationConfigurationAsyncHelper(const UpdateOrganizationConfigurationRequest & request,const UpdateOrganizationConfigurationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1497 void SecurityHubClient::UpdateOrganizationConfigurationAsyncHelper(const UpdateOrganizationConfigurationRequest& request, const UpdateOrganizationConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1498 {
1499   handler(this, request, UpdateOrganizationConfiguration(request), context);
1500 }
1501 
UpdateSecurityHubConfiguration(const UpdateSecurityHubConfigurationRequest & request) const1502 UpdateSecurityHubConfigurationOutcome SecurityHubClient::UpdateSecurityHubConfiguration(const UpdateSecurityHubConfigurationRequest& request) const
1503 {
1504   Aws::Http::URI uri = m_uri;
1505   uri.AddPathSegments("/accounts");
1506   return UpdateSecurityHubConfigurationOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
1507 }
1508 
UpdateSecurityHubConfigurationCallable(const UpdateSecurityHubConfigurationRequest & request) const1509 UpdateSecurityHubConfigurationOutcomeCallable SecurityHubClient::UpdateSecurityHubConfigurationCallable(const UpdateSecurityHubConfigurationRequest& request) const
1510 {
1511   auto task = Aws::MakeShared< std::packaged_task< UpdateSecurityHubConfigurationOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateSecurityHubConfiguration(request); } );
1512   auto packagedFunction = [task]() { (*task)(); };
1513   m_executor->Submit(packagedFunction);
1514   return task->get_future();
1515 }
1516 
UpdateSecurityHubConfigurationAsync(const UpdateSecurityHubConfigurationRequest & request,const UpdateSecurityHubConfigurationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1517 void SecurityHubClient::UpdateSecurityHubConfigurationAsync(const UpdateSecurityHubConfigurationRequest& request, const UpdateSecurityHubConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1518 {
1519   m_executor->Submit( [this, request, handler, context](){ this->UpdateSecurityHubConfigurationAsyncHelper( request, handler, context ); } );
1520 }
1521 
UpdateSecurityHubConfigurationAsyncHelper(const UpdateSecurityHubConfigurationRequest & request,const UpdateSecurityHubConfigurationResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1522 void SecurityHubClient::UpdateSecurityHubConfigurationAsyncHelper(const UpdateSecurityHubConfigurationRequest& request, const UpdateSecurityHubConfigurationResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1523 {
1524   handler(this, request, UpdateSecurityHubConfiguration(request), context);
1525 }
1526 
UpdateStandardsControl(const UpdateStandardsControlRequest & request) const1527 UpdateStandardsControlOutcome SecurityHubClient::UpdateStandardsControl(const UpdateStandardsControlRequest& request) const
1528 {
1529   if (!request.StandardsControlArnHasBeenSet())
1530   {
1531     AWS_LOGSTREAM_ERROR("UpdateStandardsControl", "Required field: StandardsControlArn, is not set");
1532     return UpdateStandardsControlOutcome(Aws::Client::AWSError<SecurityHubErrors>(SecurityHubErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [StandardsControlArn]", false));
1533   }
1534   Aws::Http::URI uri = m_uri;
1535   uri.AddPathSegments("/standards/control/");
1536   uri.AddPathSegments(request.GetStandardsControlArn());
1537   return UpdateStandardsControlOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PATCH, Aws::Auth::SIGV4_SIGNER));
1538 }
1539 
UpdateStandardsControlCallable(const UpdateStandardsControlRequest & request) const1540 UpdateStandardsControlOutcomeCallable SecurityHubClient::UpdateStandardsControlCallable(const UpdateStandardsControlRequest& request) const
1541 {
1542   auto task = Aws::MakeShared< std::packaged_task< UpdateStandardsControlOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdateStandardsControl(request); } );
1543   auto packagedFunction = [task]() { (*task)(); };
1544   m_executor->Submit(packagedFunction);
1545   return task->get_future();
1546 }
1547 
UpdateStandardsControlAsync(const UpdateStandardsControlRequest & request,const UpdateStandardsControlResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1548 void SecurityHubClient::UpdateStandardsControlAsync(const UpdateStandardsControlRequest& request, const UpdateStandardsControlResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1549 {
1550   m_executor->Submit( [this, request, handler, context](){ this->UpdateStandardsControlAsyncHelper( request, handler, context ); } );
1551 }
1552 
UpdateStandardsControlAsyncHelper(const UpdateStandardsControlRequest & request,const UpdateStandardsControlResponseReceivedHandler & handler,const std::shared_ptr<const Aws::Client::AsyncCallerContext> & context) const1553 void SecurityHubClient::UpdateStandardsControlAsyncHelper(const UpdateStandardsControlRequest& request, const UpdateStandardsControlResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
1554 {
1555   handler(this, request, UpdateStandardsControl(request), context);
1556 }
1557 
1558