AWS SDK for C++

AWS SDK for C++ Version 1.11.906

Loading...
Searching...
No Matches
LambdaWebWaiter.h
1
6#pragma once
7#include <aws/core/utils/Waiter.h>
8#include <aws/core/utils/memory/AWSMemory.h>
9#include <aws/lambda-web/LambdaWebClient.h>
10#include <aws/lambda-web/model/EndpointState.h>
11#include <aws/lambda-web/model/EndpointUpdateStatus.h>
12#include <aws/lambda-web/model/FunctionState.h>
13#include <aws/lambda-web/model/GetWebFunctionEndpointRequest.h>
14#include <aws/lambda-web/model/GetWebFunctionEndpointResult.h>
15#include <aws/lambda-web/model/GetWebFunctionRequest.h>
16#include <aws/lambda-web/model/GetWebFunctionResult.h>
17#include <aws/lambda-web/model/GetWebFunctionRevisionRequest.h>
18#include <aws/lambda-web/model/GetWebFunctionRevisionResult.h>
19#include <aws/lambda-web/model/RevisionState.h>
20
21#include <algorithm>
22
23namespace Aws {
24namespace LambdaWeb {
25
26template <typename DerivedClient = LambdaWebClient>
28 public:
30 using OutcomeT = Model::GetWebFunctionOutcome;
31 using RequestT = Model::GetWebFunctionRequest;
34 "WebFunctionActiveWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("Active"),
35 [](const Model::GetWebFunctionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
36 if (!outcome.IsSuccess()) return false;
37 const auto& result = outcome.GetResult();
38 return Model::FunctionStateMapper::GetNameForFunctionState(result.GetState()) == expected.get<Aws::String>();
39 }));
41 "WebFunctionActiveWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("Failed"),
42 [](const Model::GetWebFunctionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
43 if (!outcome.IsSuccess()) return false;
44 const auto& result = outcome.GetResult();
45 return Model::FunctionStateMapper::GetNameForFunctionState(result.GetState()) == expected.get<Aws::String>();
46 }));
48 "WebFunctionActiveWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("Deleting"),
49 [](const Model::GetWebFunctionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
50 if (!outcome.IsSuccess()) return false;
51 const auto& result = outcome.GetResult();
52 return Model::FunctionStateMapper::GetNameForFunctionState(result.GetState()) == expected.get<Aws::String>();
53 }));
55 "WebFunctionActiveWaiter", Aws::Utils::WaiterState::RETRY, Aws::String("Pending"),
56 [](const Model::GetWebFunctionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
57 if (!outcome.IsSuccess()) return false;
58 const auto& result = outcome.GetResult();
59 return Model::FunctionStateMapper::GetNameForFunctionState(result.GetState()) == expected.get<Aws::String>();
60 }));
61
62 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetWebFunction(req); };
63 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(1, 300, std::move(acceptors), operation, "WaitUntilWebFunctionActive");
64 return waiter.Wait(request);
65 }
66
68 using OutcomeT = Model::GetWebFunctionOutcome;
69 using RequestT = Model::GetWebFunctionRequest;
72 "WebFunctionDeletedWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("ResourceNotFoundException")));
74 "WebFunctionDeletedWaiter", Aws::Utils::WaiterState::RETRY, Aws::String("Deleting"),
75 [](const Model::GetWebFunctionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
76 if (!outcome.IsSuccess()) return false;
77 const auto& result = outcome.GetResult();
78 return Model::FunctionStateMapper::GetNameForFunctionState(result.GetState()) == expected.get<Aws::String>();
79 }));
80
81 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetWebFunction(req); };
82 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(1, 300, std::move(acceptors), operation, "WaitUntilWebFunctionDeleted");
83 return waiter.Wait(request);
84 }
85
92 "WebFunctionEndpointActiveWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("Active"),
93 [](const Model::GetWebFunctionEndpointOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
94 if (!outcome.IsSuccess()) return false;
95 const auto& result = outcome.GetResult();
96 return Model::EndpointStateMapper::GetNameForEndpointState(result.GetState()) == expected.get<Aws::String>();
97 }));
99 "WebFunctionEndpointActiveWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("Failed"),
100 [](const Model::GetWebFunctionEndpointOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
101 if (!outcome.IsSuccess()) return false;
102 const auto& result = outcome.GetResult();
103 return Model::EndpointStateMapper::GetNameForEndpointState(result.GetState()) == expected.get<Aws::String>();
104 }));
106 "WebFunctionEndpointActiveWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("Deleting"),
107 [](const Model::GetWebFunctionEndpointOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
108 if (!outcome.IsSuccess()) return false;
109 const auto& result = outcome.GetResult();
110 return Model::EndpointStateMapper::GetNameForEndpointState(result.GetState()) == expected.get<Aws::String>();
111 }));
113 "WebFunctionEndpointActiveWaiter", Aws::Utils::WaiterState::RETRY, Aws::String("Pending"),
114 [](const Model::GetWebFunctionEndpointOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
115 if (!outcome.IsSuccess()) return false;
116 const auto& result = outcome.GetResult();
117 return Model::EndpointStateMapper::GetNameForEndpointState(result.GetState()) == expected.get<Aws::String>();
118 }));
119
120 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetWebFunctionEndpoint(req); };
121 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(1, 300, std::move(acceptors), operation, "WaitUntilWebFunctionEndpointActive");
122 return waiter.Wait(request);
123 }
124
131 "WebFunctionEndpointDeletedWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("ResourceNotFoundException")));
133 "WebFunctionEndpointDeletedWaiter", Aws::Utils::WaiterState::RETRY, Aws::String("Deleting"),
134 [](const Model::GetWebFunctionEndpointOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
135 if (!outcome.IsSuccess()) return false;
136 const auto& result = outcome.GetResult();
137 return Model::EndpointStateMapper::GetNameForEndpointState(result.GetState()) == expected.get<Aws::String>();
138 }));
139
140 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetWebFunctionEndpoint(req); };
141 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(1, 300, std::move(acceptors), operation, "WaitUntilWebFunctionEndpointDeleted");
142 return waiter.Wait(request);
143 }
144
151 "WebFunctionEndpointUpdatedWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("Successful"),
152 [](const Model::GetWebFunctionEndpointOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
153 if (!outcome.IsSuccess()) return false;
154 const auto& result = outcome.GetResult();
155 return Model::EndpointUpdateStatusMapper::GetNameForEndpointUpdateStatus(result.GetUpdateStatus()) == expected.get<Aws::String>();
156 }));
158 "WebFunctionEndpointUpdatedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("Failed"),
159 [](const Model::GetWebFunctionEndpointOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
160 if (!outcome.IsSuccess()) return false;
161 const auto& result = outcome.GetResult();
162 return Model::EndpointUpdateStatusMapper::GetNameForEndpointUpdateStatus(result.GetUpdateStatus()) == expected.get<Aws::String>();
163 }));
165 "WebFunctionEndpointUpdatedWaiter", Aws::Utils::WaiterState::RETRY, Aws::String("InProgress"),
166 [](const Model::GetWebFunctionEndpointOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
167 if (!outcome.IsSuccess()) return false;
168 const auto& result = outcome.GetResult();
169 return Model::EndpointUpdateStatusMapper::GetNameForEndpointUpdateStatus(result.GetUpdateStatus()) == expected.get<Aws::String>();
170 }));
171
172 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetWebFunctionEndpoint(req); };
173 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(1, 300, std::move(acceptors), operation, "WaitUntilWebFunctionEndpointUpdated");
174 return waiter.Wait(request);
175 }
176
183 "WebFunctionRevisionActiveWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("Active"),
184 [](const Model::GetWebFunctionRevisionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
185 if (!outcome.IsSuccess()) return false;
186 const auto& result = outcome.GetResult();
187 return Model::RevisionStateMapper::GetNameForRevisionState(result.GetState()) == expected.get<Aws::String>();
188 }));
190 "WebFunctionRevisionActiveWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("Failed"),
191 [](const Model::GetWebFunctionRevisionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
192 if (!outcome.IsSuccess()) return false;
193 const auto& result = outcome.GetResult();
194 return Model::RevisionStateMapper::GetNameForRevisionState(result.GetState()) == expected.get<Aws::String>();
195 }));
197 "WebFunctionRevisionActiveWaiter", Aws::Utils::WaiterState::RETRY, Aws::String("Pending"),
198 [](const Model::GetWebFunctionRevisionOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
199 if (!outcome.IsSuccess()) return false;
200 const auto& result = outcome.GetResult();
201 return Model::RevisionStateMapper::GetNameForRevisionState(result.GetState()) == expected.get<Aws::String>();
202 }));
203
204 auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetWebFunctionRevision(req); };
205 Aws::Utils::Waiter<RequestT, OutcomeT> waiter(1, 300, std::move(acceptors), operation, "WaitUntilWebFunctionRevisionActive");
206 return waiter.Wait(request);
207 }
208};
209} // namespace LambdaWeb
210} // namespace Aws
Aws::Utils::WaiterOutcome< Model::GetWebFunctionOutcome > WaitUntilWebFunctionActive(const Model::GetWebFunctionRequest &request)
Aws::Utils::WaiterOutcome< Model::GetWebFunctionEndpointOutcome > WaitUntilWebFunctionEndpointDeleted(const Model::GetWebFunctionEndpointRequest &request)
Aws::Utils::WaiterOutcome< Model::GetWebFunctionOutcome > WaitUntilWebFunctionDeleted(const Model::GetWebFunctionRequest &request)
Aws::Utils::WaiterOutcome< Model::GetWebFunctionEndpointOutcome > WaitUntilWebFunctionEndpointActive(const Model::GetWebFunctionEndpointRequest &request)
Aws::Utils::WaiterOutcome< Model::GetWebFunctionEndpointOutcome > WaitUntilWebFunctionEndpointUpdated(const Model::GetWebFunctionEndpointRequest &request)
Aws::Utils::WaiterOutcome< Model::GetWebFunctionRevisionOutcome > WaitUntilWebFunctionRevisionActive(const Model::GetWebFunctionRevisionRequest &request)
bool IsSuccess() const
const R & GetResult() const
WaiterOutcome< OutcomeT > Wait(const RequestT &request)
AWS_LAMBDAWEB_API Aws::String GetNameForEndpointState(EndpointState value)
AWS_LAMBDAWEB_API Aws::String GetNameForEndpointUpdateStatus(EndpointUpdateStatus value)
AWS_LAMBDAWEB_API Aws::String GetNameForFunctionState(FunctionState value)
AWS_LAMBDAWEB_API Aws::String GetNameForRevisionState(RevisionState value)
Aws::Utils::Outcome< GetWebFunctionRevisionResult, LambdaWebError > GetWebFunctionRevisionOutcome
Aws::Utils::Outcome< GetWebFunctionEndpointResult, LambdaWebError > GetWebFunctionEndpointOutcome
Aws::Utils::Outcome< GetWebFunctionResult, LambdaWebError > GetWebFunctionOutcome
Crt::Variant< int, bool, Aws::String > ExpectedValue
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
UniquePtr< T > MakeUnique(const char *allocationTag, ArgTypes &&... args)
std::vector< T, Aws::Allocator< T > > Vector