aws_sdk_proton/waiters/
service_updated.rs1#[deprecated(note = "AWS Proton is not accepting new customers.", since = "10/07/2025")]
15#[derive(::std::clone::Clone, ::std::fmt::Debug)]
16pub struct ServiceUpdatedFluentBuilder {
17 handle: ::std::sync::Arc<crate::client::Handle>,
18 inner: crate::operation::get_service::builders::GetServiceInputBuilder,
19}
20impl ServiceUpdatedFluentBuilder {
21 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
23 Self {
24 handle,
25 inner: ::std::default::Default::default(),
26 }
27 }
28 pub fn as_input(&self) -> &crate::operation::get_service::builders::GetServiceInputBuilder {
30 &self.inner
31 }
32 pub async fn wait(
34 self,
35 max_wait: ::std::time::Duration,
36 ) -> ::std::result::Result<crate::waiters::service_updated::ServiceUpdatedFinalPoll, crate::waiters::service_updated::WaitUntilServiceUpdatedError>
37 {
38 let input = self
39 .inner
40 .build()
41 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
42 let runtime_plugins = crate::operation::get_service::GetService::operation_runtime_plugins(
43 self.handle.runtime_plugins.clone(),
44 &self.handle.conf,
45 ::std::option::Option::None,
46 )
47 .with_operation_plugin(crate::sdk_feature_tracker::waiter::WaiterFeatureTrackerRuntimePlugin::new());
48 let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
49 let runtime_components_builder = runtime_plugins
50 .apply_client_configuration(&mut cfg)
51 .map_err(::aws_smithy_runtime_api::client::waiters::error::WaiterError::construction_failure)?;
52 let time_components = runtime_components_builder.into_time_components();
53 let sleep_impl = time_components.sleep_impl().expect("a sleep impl is required by waiters");
54 let time_source = time_components.time_source().expect("a time source is required by waiters");
55
56 let acceptor = move |result: ::std::result::Result<
57 &crate::operation::get_service::GetServiceOutput,
58 &crate::operation::get_service::GetServiceError,
59 >| {
60 if crate::waiters::matchers::match_get_service_2fa8e698c4f041742(result) {
62 return ::aws_smithy_runtime::client::waiters::AcceptorState::Success;
63 }
64 if crate::waiters::matchers::match_get_service_4db8e3fbb4b0e28e9(result) {
66 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
67 }
68 if crate::waiters::matchers::match_get_service_1c25d8f6b67efecce(result) {
70 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
71 }
72 if crate::waiters::matchers::match_get_service_6310802c4721a37d3(result) {
74 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
75 }
76 if crate::waiters::matchers::match_get_service_55d0862750015e99e(result) {
78 return ::aws_smithy_runtime::client::waiters::AcceptorState::Failure;
79 }
80 ::aws_smithy_runtime::client::waiters::AcceptorState::NoAcceptorsMatched
81 };
82 let operation = move || {
83 let input = input.clone();
84 let runtime_plugins = runtime_plugins.clone();
85 async move { crate::operation::get_service::GetService::orchestrate(&runtime_plugins, input).await }
86 };
87 let orchestrator = ::aws_smithy_runtime::client::waiters::WaiterOrchestrator::builder()
88 .min_delay(::std::time::Duration::from_secs(5))
89 .max_delay(::std::time::Duration::from_secs(4999))
90 .max_wait(max_wait)
91 .time_source(time_source)
92 .sleep_impl(sleep_impl)
93 .acceptor(acceptor)
94 .operation(operation)
95 .build();
96 ::aws_smithy_runtime::client::waiters::attach_waiter_tracing_span(orchestrator.orchestrate()).await
97 }
98 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.inner = self.inner.name(input.into());
101 self
102 }
103 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.inner = self.inner.set_name(input);
106 self
107 }
108 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
110 self.inner.get_name()
111 }
112}
113
114pub type ServiceUpdatedFinalPoll = ::aws_smithy_runtime_api::client::waiters::FinalPoll<
116 crate::operation::get_service::GetServiceOutput,
117 ::aws_smithy_runtime_api::client::result::SdkError<
118 crate::operation::get_service::GetServiceError,
119 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
120 >,
121>;
122
123pub type WaitUntilServiceUpdatedError = ::aws_smithy_runtime_api::client::waiters::error::WaiterError<
125 crate::operation::get_service::GetServiceOutput,
126 crate::operation::get_service::GetServiceError,
127>;