Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5d631f1
Updated waiter template to accept a templated PathMatcher per accepto…
sbaluja Mar 16, 2026
b246899
Waiter codegen project
sbaluja Mar 16, 2026
19bc266
Waiter codegen tests
sbaluja Mar 16, 2026
f700f38
Update crtp client inheritance & python script for smithy codegen
sbaluja Mar 16, 2026
783be61
Add proper state chaining in Waiter.h
sbaluja Mar 16, 2026
ba9349d
Add mapping for lost c2j errors to error code
sbaluja Mar 16, 2026
5cbf5ec
Updated clients
sbaluja Mar 17, 2026
9c4b029
Add namespace mapping to WaiterCodeGenPlugin
sbaluja Mar 17, 2026
9370dfe
generate Waiter.h for clients that don't have waiters modeled
sbaluja Mar 17, 2026
40911e0
Seperate different acceptors into seperate structs/classes
sbaluja Mar 17, 2026
b177281
Update codegen to use new Acceptor structs
sbaluja Mar 18, 2026
f2e44ae
Return Optional<Shape> in private methods of CollectionElementTypeRes…
sbaluja Mar 18, 2026
afa51ac
Add userAgent metrics for waiters
sbaluja Mar 18, 2026
f00cbb5
Updated waiters
sbaluja Mar 18, 2026
6bf3525
Transition the waiter to the failure state if none of the acceptors a…
sbaluja Mar 18, 2026
dbffbb8
change std::vector to Aws::Vector (why do i forget this everytime)
sbaluja Mar 18, 2026
5ae8e83
Updated waiter files
sbaluja Mar 18, 2026
8529c18
Include handling for smithy 1.0 enum modeling (string shape with enum…
sbaluja Mar 18, 2026
9e44c7e
Resolve cpp type from FilterPredicateEmitter for inner types instead …
sbaluja Mar 19, 2026
88107c9
Updated waiters
sbaluja Mar 19, 2026
802694f
Resolve enum for filterOperandEmitter paths
sbaluja Mar 19, 2026
b3ce9aa
Fix type resolution for map types
sbaluja Mar 19, 2026
1d479bd
Empty waiter generation for legacy services (no smithy model)
sbaluja Mar 19, 2026
8e774b6
Add medialive XXXSdkResult.h mappings
sbaluja Mar 19, 2026
8e1df58
Enum resolution for ScalarEmitters (OR edge case)
sbaluja Mar 20, 2026
2788e39
dont generate waiters for deprecated operations
sbaluja Mar 23, 2026
c754c7f
fix .template dependent compilation error
sbaluja Mar 23, 2026
7f7d767
Refactor client integ tests that use polling logic to use waiters now
sbaluja Mar 23, 2026
c31cdc1
Fix windows ambigious lambda constructor issue
sbaluja Mar 23, 2026
5eab42b
Explicitly define bool return type for pathMatcher lambdas
sbaluja Mar 23, 2026
688851d
Updated waiters
sbaluja Mar 23, 2026
a686cc0
Fix map collision for waiter name's that are generated and stored
sbaluja Mar 24, 2026
9ef2fb9
Updated waiters
sbaluja Mar 24, 2026
1f0be13
Fix namespace mapping default to be '{}' (dev purposes)
sbaluja Mar 24, 2026
8e5b6a6
Remove && for pathacceptor argument
sbaluja Mar 24, 2026
bb4f2d9
cast std::count_if to size_t since it returns a signed value
sbaluja Mar 24, 2026
6ff5b99
Updated waiters
sbaluja Mar 24, 2026
cdc547f
ONLY static cast when we are comparing to a collection.size()
sbaluja Mar 24, 2026
c5ef048
Updated waiters
sbaluja Mar 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/AWSMigrationHub/MigrationHubPaginationBase.h>
#include <aws/AWSMigrationHub/MigrationHubServiceClientModel.h>
#include <aws/AWSMigrationHub/MigrationHubWaiter.h>
#include <aws/AWSMigrationHub/MigrationHub_EXPORTS.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/client/AWSClientAsyncCRTP.h>
Expand All @@ -24,7 +25,8 @@ namespace MigrationHub {
*/
class AWS_MIGRATIONHUB_API MigrationHubClient : public Aws::Client::AWSJsonClient,
public Aws::Client::ClientWithAsyncTemplateMethods<MigrationHubClient>,
public MigrationHubPaginationBase<MigrationHubClient> {
public MigrationHubPaginationBase<MigrationHubClient>,
public MigrationHubWaiter<MigrationHubClient> {
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* GetServiceName();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/AWSMigrationHub/MigrationHubClient.h>
#include <aws/core/utils/Waiter.h>
#include <aws/core/utils/memory/AWSMemory.h>

#include <algorithm>

namespace Aws {
namespace MigrationHub {

template <typename DerivedClient = MigrationHubClient>
class MigrationHubWaiter {
public:
};
} // namespace MigrationHub
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/accessanalyzer/AccessAnalyzerPaginationBase.h>
#include <aws/accessanalyzer/AccessAnalyzerServiceClientModel.h>
#include <aws/accessanalyzer/AccessAnalyzerWaiter.h>
#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/client/AWSClientAsyncCRTP.h>
Expand Down Expand Up @@ -49,7 +50,8 @@ namespace AccessAnalyzer {
*/
class AWS_ACCESSANALYZER_API AccessAnalyzerClient : public Aws::Client::AWSJsonClient,
public Aws::Client::ClientWithAsyncTemplateMethods<AccessAnalyzerClient>,
public AccessAnalyzerPaginationBase<AccessAnalyzerClient> {
public AccessAnalyzerPaginationBase<AccessAnalyzerClient>,
public AccessAnalyzerWaiter<AccessAnalyzerClient> {
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* GetServiceName();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/accessanalyzer/AccessAnalyzerClient.h>
#include <aws/core/utils/Waiter.h>
#include <aws/core/utils/memory/AWSMemory.h>

#include <algorithm>

namespace Aws {
namespace AccessAnalyzer {

template <typename DerivedClient = AccessAnalyzerClient>
class AccessAnalyzerWaiter {
public:
};
} // namespace AccessAnalyzer
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/account/AccountPaginationBase.h>
#include <aws/account/AccountServiceClientModel.h>
#include <aws/account/AccountWaiter.h>
#include <aws/account/Account_EXPORTS.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/client/AWSClientAsyncCRTP.h>
Expand All @@ -19,7 +20,8 @@ namespace Account {
*/
class AWS_ACCOUNT_API AccountClient : public Aws::Client::AWSJsonClient,
public Aws::Client::ClientWithAsyncTemplateMethods<AccountClient>,
public AccountPaginationBase<AccountClient> {
public AccountPaginationBase<AccountClient>,
public AccountWaiter<AccountClient> {
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* GetServiceName();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/account/AccountClient.h>
#include <aws/core/utils/Waiter.h>
#include <aws/core/utils/memory/AWSMemory.h>

#include <algorithm>

namespace Aws {
namespace Account {

template <typename DerivedClient = AccountClient>
class AccountWaiter {
public:
};
} // namespace Account
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/acm-pca/ACMPCAPaginationBase.h>
#include <aws/acm-pca/ACMPCAServiceClientModel.h>
#include <aws/acm-pca/ACMPCAWaiter.h>
#include <aws/acm-pca/ACMPCA_EXPORTS.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/client/AWSClientAsyncCRTP.h>
Expand Down Expand Up @@ -40,7 +41,8 @@ namespace ACMPCA {
*/
class AWS_ACMPCA_API ACMPCAClient : public Aws::Client::AWSJsonClient,
public Aws::Client::ClientWithAsyncTemplateMethods<ACMPCAClient>,
public ACMPCAPaginationBase<ACMPCAClient> {
public ACMPCAPaginationBase<ACMPCAClient>,
public ACMPCAWaiter<ACMPCAClient> {
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* GetServiceName();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/acm-pca/ACMPCAClient.h>
#include <aws/acm-pca/model/AuditReportStatus.h>
#include <aws/acm-pca/model/DescribeCertificateAuthorityAuditReportRequest.h>
#include <aws/acm-pca/model/DescribeCertificateAuthorityAuditReportResult.h>
#include <aws/acm-pca/model/GetCertificateAuthorityCsrRequest.h>
#include <aws/acm-pca/model/GetCertificateAuthorityCsrResult.h>
#include <aws/acm-pca/model/GetCertificateRequest.h>
#include <aws/acm-pca/model/GetCertificateResult.h>
#include <aws/core/utils/Waiter.h>
#include <aws/core/utils/memory/AWSMemory.h>

#include <algorithm>

namespace Aws {
namespace ACMPCA {

template <typename DerivedClient = ACMPCAClient>
class ACMPCAWaiter {
public:
Aws::Utils::WaiterOutcome<Model::DescribeCertificateAuthorityAuditReportOutcome> WaitUntilAuditReportCreated(
const Model::DescribeCertificateAuthorityAuditReportRequest& request) {
using OutcomeT = Model::DescribeCertificateAuthorityAuditReportOutcome;
using RequestT = Model::DescribeCertificateAuthorityAuditReportRequest;
Aws::Vector<Aws::UniquePtr<Aws::Utils::Acceptor<OutcomeT>>> acceptors;
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::PathAcceptor<OutcomeT>>(
"AuditReportCreatedWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("SUCCESS"),
[](const Model::DescribeCertificateAuthorityAuditReportOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
if (!outcome.IsSuccess()) return false;
const auto& result = outcome.GetResult();
return Model::AuditReportStatusMapper::GetNameForAuditReportStatus(result.GetAuditReportStatus()) == expected.get<Aws::String>();
}));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::PathAcceptor<OutcomeT>>(
"AuditReportCreatedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("FAILED"),
[](const Model::DescribeCertificateAuthorityAuditReportOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
if (!outcome.IsSuccess()) return false;
const auto& result = outcome.GetResult();
return Model::AuditReportStatusMapper::GetNameForAuditReportStatus(result.GetAuditReportStatus()) == expected.get<Aws::String>();
}));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::ErrorAcceptor<OutcomeT>>(
"AuditReportCreatedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("AccessDeniedException")));

auto operation = [this](const RequestT& req) {
return static_cast<DerivedClient*>(this)->DescribeCertificateAuthorityAuditReport(req);
};
Aws::Utils::Waiter<RequestT, OutcomeT> waiter(3, 60, std::move(acceptors), operation, "WaitUntilAuditReportCreated");
return waiter.Wait(request);
}

Aws::Utils::WaiterOutcome<Model::GetCertificateOutcome> WaitUntilCertificateIssued(const Model::GetCertificateRequest& request) {
using OutcomeT = Model::GetCertificateOutcome;
using RequestT = Model::GetCertificateRequest;
Aws::Vector<Aws::UniquePtr<Aws::Utils::Acceptor<OutcomeT>>> acceptors;
acceptors.emplace_back(
Aws::MakeUnique<Aws::Utils::ErrorAcceptor<OutcomeT>>("CertificateIssuedWaiter", Aws::Utils::WaiterState::SUCCESS, false));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::ErrorAcceptor<OutcomeT>>("CertificateIssuedWaiter", Aws::Utils::WaiterState::RETRY,
Aws::String("RequestInProgressException")));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::ErrorAcceptor<OutcomeT>>("CertificateIssuedWaiter", Aws::Utils::WaiterState::FAILURE,
Aws::String("AccessDeniedException")));

auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetCertificate(req); };
Aws::Utils::Waiter<RequestT, OutcomeT> waiter(1, 60, std::move(acceptors), operation, "WaitUntilCertificateIssued");
return waiter.Wait(request);
}

Aws::Utils::WaiterOutcome<Model::GetCertificateAuthorityCsrOutcome> WaitUntilCertificateAuthorityCSRCreated(
const Model::GetCertificateAuthorityCsrRequest& request) {
using OutcomeT = Model::GetCertificateAuthorityCsrOutcome;
using RequestT = Model::GetCertificateAuthorityCsrRequest;
Aws::Vector<Aws::UniquePtr<Aws::Utils::Acceptor<OutcomeT>>> acceptors;
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::ErrorAcceptor<OutcomeT>>("CertificateAuthorityCSRCreatedWaiter",
Aws::Utils::WaiterState::SUCCESS, false));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::ErrorAcceptor<OutcomeT>>(
"CertificateAuthorityCSRCreatedWaiter", Aws::Utils::WaiterState::RETRY, Aws::String("RequestInProgressException")));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::ErrorAcceptor<OutcomeT>>(
"CertificateAuthorityCSRCreatedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("AccessDeniedException")));

auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->GetCertificateAuthorityCsr(req); };
Aws::Utils::Waiter<RequestT, OutcomeT> waiter(3, 60, std::move(acceptors), operation, "WaitUntilCertificateAuthorityCSRCreated");
return waiter.Wait(request);
}
};
} // namespace ACMPCA
} // namespace Aws
4 changes: 3 additions & 1 deletion generated/src/aws-cpp-sdk-acm/include/aws/acm/ACMClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/acm/ACMPaginationBase.h>
#include <aws/acm/ACMServiceClientModel.h>
#include <aws/acm/ACMWaiter.h>
#include <aws/acm/ACM_EXPORTS.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/client/AWSClientAsyncCRTP.h>
Expand All @@ -23,7 +24,8 @@ namespace ACM {
*/
class AWS_ACM_API ACMClient : public Aws::Client::AWSJsonClient,
public Aws::Client::ClientWithAsyncTemplateMethods<ACMClient>,
public ACMPaginationBase<ACMClient> {
public ACMPaginationBase<ACMClient>,
public ACMWaiter<ACMClient> {
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* GetServiceName();
Expand Down
67 changes: 67 additions & 0 deletions generated/src/aws-cpp-sdk-acm/include/aws/acm/ACMWaiter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/acm/ACMClient.h>
#include <aws/acm/model/CertificateStatus.h>
#include <aws/acm/model/DescribeCertificateRequest.h>
#include <aws/acm/model/DescribeCertificateResult.h>
#include <aws/acm/model/DomainStatus.h>
#include <aws/core/utils/Waiter.h>
#include <aws/core/utils/memory/AWSMemory.h>

#include <algorithm>

namespace Aws {
namespace ACM {

template <typename DerivedClient = ACMClient>
class ACMWaiter {
public:
Aws::Utils::WaiterOutcome<Model::DescribeCertificateOutcome> WaitUntilCertificateValidated(
const Model::DescribeCertificateRequest& request) {
using OutcomeT = Model::DescribeCertificateOutcome;
using RequestT = Model::DescribeCertificateRequest;
Aws::Vector<Aws::UniquePtr<Aws::Utils::Acceptor<OutcomeT>>> acceptors;
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::PathAcceptor<OutcomeT>>(
"CertificateValidatedWaiter", Aws::Utils::WaiterState::SUCCESS, Aws::String("SUCCESS"),
[](const Model::DescribeCertificateOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
if (!outcome.IsSuccess()) return false;
const auto& result = outcome.GetResult();
return std::all_of(result.GetCertificate().GetDomainValidationOptions().begin(),
result.GetCertificate().GetDomainValidationOptions().end(), [&](const Model::DomainValidation& item) {
return Model::DomainStatusMapper::GetNameForDomainStatus(item.GetValidationStatus()) ==
expected.get<Aws::String>();
});
}));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::PathAcceptor<OutcomeT>>(
"CertificateValidatedWaiter", Aws::Utils::WaiterState::RETRY, Aws::String("PENDING_VALIDATION"),
[](const Model::DescribeCertificateOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
if (!outcome.IsSuccess()) return false;
const auto& result = outcome.GetResult();
return std::any_of(result.GetCertificate().GetDomainValidationOptions().begin(),
result.GetCertificate().GetDomainValidationOptions().end(), [&](const Model::DomainValidation& item) {
return Model::DomainStatusMapper::GetNameForDomainStatus(item.GetValidationStatus()) ==
expected.get<Aws::String>();
});
}));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::PathAcceptor<OutcomeT>>(
"CertificateValidatedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("FAILED"),
[](const Model::DescribeCertificateOutcome& outcome, const Aws::Utils::ExpectedValue& expected) -> bool {
if (!outcome.IsSuccess()) return false;
const auto& result = outcome.GetResult();
return Model::CertificateStatusMapper::GetNameForCertificateStatus(result.GetCertificate().GetStatus()) ==
expected.get<Aws::String>();
}));
acceptors.emplace_back(Aws::MakeUnique<Aws::Utils::ErrorAcceptor<OutcomeT>>(
"CertificateValidatedWaiter", Aws::Utils::WaiterState::FAILURE, Aws::String("ResourceNotFoundException")));

auto operation = [this](const RequestT& req) { return static_cast<DerivedClient*>(this)->DescribeCertificate(req); };
Aws::Utils::Waiter<RequestT, OutcomeT> waiter(60, 2, std::move(acceptors), operation, "WaitUntilCertificateValidated");
return waiter.Wait(request);
}
};
} // namespace ACM
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/aiops/AIOpsPaginationBase.h>
#include <aws/aiops/AIOpsServiceClientModel.h>
#include <aws/aiops/AIOpsWaiter.h>
#include <aws/aiops/AIOps_EXPORTS.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/client/AWSClientAsyncCRTP.h>
Expand All @@ -25,7 +26,8 @@ namespace AIOps {
*/
class AWS_AIOPS_API AIOpsClient : public Aws::Client::AWSJsonClient,
public Aws::Client::ClientWithAsyncTemplateMethods<AIOpsClient>,
public AIOpsPaginationBase<AIOpsClient> {
public AIOpsPaginationBase<AIOpsClient>,
public AIOpsWaiter<AIOpsClient> {
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* GetServiceName();
Expand Down
21 changes: 21 additions & 0 deletions generated/src/aws-cpp-sdk-aiops/include/aws/aiops/AIOpsWaiter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/aiops/AIOpsClient.h>
#include <aws/core/utils/Waiter.h>
#include <aws/core/utils/memory/AWSMemory.h>

#include <algorithm>

namespace Aws {
namespace AIOps {

template <typename DerivedClient = AIOpsClient>
class AIOpsWaiter {
public:
};
} // namespace AIOps
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#pragma once
#include <aws/amp/PrometheusServicePaginationBase.h>
#include <aws/amp/PrometheusServiceServiceClientModel.h>
#include <aws/amp/PrometheusServiceWaiter.h>
#include <aws/amp/PrometheusService_EXPORTS.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/client/AWSClientAsyncCRTP.h>
Expand Down Expand Up @@ -34,7 +35,8 @@ namespace PrometheusService {
*/
class AWS_PROMETHEUSSERVICE_API PrometheusServiceClient : public Aws::Client::AWSJsonClient,
public Aws::Client::ClientWithAsyncTemplateMethods<PrometheusServiceClient>,
public PrometheusServicePaginationBase<PrometheusServiceClient> {
public PrometheusServicePaginationBase<PrometheusServiceClient>,
public PrometheusServiceWaiter<PrometheusServiceClient> {
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* GetServiceName();
Expand Down
Loading
Loading