Skip to main content

aws_sdk_imagebuilder/operation/
update_lifecycle_policy.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `UpdateLifecyclePolicy`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateLifecyclePolicy;
6impl UpdateLifecyclePolicy {
7    /// Creates a new `UpdateLifecyclePolicy`
8    pub fn new() -> Self {
9        Self
10    }
11    pub(crate) async fn orchestrate(
12        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13        input: crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyInput,
14    ) -> ::std::result::Result<
15        crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError,
18            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19        >,
20    > {
21        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22            ::aws_smithy_runtime_api::client::interceptors::context::Error,
23            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24        >| {
25            err.map_service_error(|err| {
26                err.downcast::<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError>()
27                    .expect("correct error type")
28            })
29        };
30        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31            .await
32            .map_err(map_err)?;
33        let output = context.finalize().map_err(map_err)?;
34        ::std::result::Result::Ok(
35            output
36                .downcast::<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyOutput>()
37                .expect("correct output type"),
38        )
39    }
40
41    pub(crate) async fn orchestrate_with_stop_point(
42        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43        input: crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyInput,
44        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45    ) -> ::std::result::Result<
46        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47        ::aws_smithy_runtime_api::client::result::SdkError<
48            ::aws_smithy_runtime_api::client::interceptors::context::Error,
49            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50        >,
51    > {
52        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53        use ::tracing::Instrument;
54        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
55            "imagebuilder",
56            "UpdateLifecyclePolicy",
57            input,
58            runtime_plugins,
59            stop_point,
60        )
61        // Create a parent span for the entire operation. Includes a random, internal-only,
62        // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
63        .instrument(::tracing::debug_span!(
64            "imagebuilder.UpdateLifecyclePolicy",
65            "rpc.service" = "imagebuilder",
66            "rpc.method" = "UpdateLifecyclePolicy",
67            "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
68            "rpc.system" = "aws-api",
69        ))
70        .await
71    }
72
73    pub(crate) fn operation_runtime_plugins(
74        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
75        client_config: &crate::config::Config,
76        config_override: ::std::option::Option<crate::config::Builder>,
77    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
78        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
79        runtime_plugins = runtime_plugins.with_operation_plugin(crate::client_idempotency_token::IdempotencyTokenRuntimePlugin::new(
80            |token_provider, input| {
81                let input: &mut crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyInput = input.downcast_mut().expect("correct type");
82                if input.client_token.is_none() {
83                    input.client_token = ::std::option::Option::Some(token_provider.make_idempotency_token());
84                }
85            },
86        ));
87        if let ::std::option::Option::Some(config_override) = config_override {
88            for plugin in config_override.runtime_plugins.iter().cloned() {
89                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
90            }
91            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
92                config_override,
93                client_config.config.clone(),
94                &client_config.runtime_components,
95            ));
96        }
97        runtime_plugins
98    }
99}
100impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateLifecyclePolicy {
101    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
102        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateLifecyclePolicy");
103
104        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
105            UpdateLifecyclePolicyRequestSerializer,
106        ));
107        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
108            UpdateLifecyclePolicyResponseDeserializer,
109        ));
110
111        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
112            crate::config::auth::Params::builder()
113                .operation_name("UpdateLifecyclePolicy")
114                .build()
115                .expect("required fields set"),
116        ));
117
118        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
119            "UpdateLifecyclePolicy",
120            "imagebuilder",
121        ));
122        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
123        signing_options.double_uri_encode = true;
124        signing_options.content_sha256_header = false;
125        signing_options.normalize_uri_path = true;
126        signing_options.payload_override = None;
127
128        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
129            signing_options,
130            ..::std::default::Default::default()
131        });
132
133        ::std::option::Option::Some(cfg.freeze())
134    }
135
136    fn runtime_components(
137        &self,
138        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
139    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
140        #[allow(unused_mut)]
141        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateLifecyclePolicy")
142            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
143                UpdateLifecyclePolicyTelemetryInputCaptureInterceptor,
144            ))
145            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
146                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
147            ))
148            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
149                UpdateLifecyclePolicyEndpointParamsInterceptor,
150            ))
151            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
152                crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError,
153            >::new())
154            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
155                crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError,
156            >::new())
157            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
158                crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError,
159            >::new())
160            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
161                crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError,
162            >::new());
163
164        ::std::borrow::Cow::Owned(rcb)
165    }
166}
167
168#[derive(Debug)]
169struct UpdateLifecyclePolicyTelemetryInputCaptureInterceptor;
170
171#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
172impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateLifecyclePolicyTelemetryInputCaptureInterceptor {
173    fn name(&self) -> &'static str {
174        "UpdateLifecyclePolicyTelemetryInputCaptureInterceptor"
175    }
176
177    fn read_before_execution(
178        &self,
179        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
180            '_,
181            ::aws_smithy_runtime_api::client::interceptors::context::Input,
182            ::aws_smithy_runtime_api::client::interceptors::context::Output,
183            ::aws_smithy_runtime_api::client::interceptors::context::Error,
184        >,
185        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
186    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
187        // Nothing to do unless the customer opted in by naming members to record.
188        let ::std::option::Option::Some(requested) = cfg
189            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
190            .filter(|r| !r.is_empty())
191        else {
192            return ::std::result::Result::Ok(());
193        };
194
195        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateLifecyclePolicyInput>() else {
196            // A mismatched input is not this interceptor's concern; skip quietly.
197            return ::std::result::Result::Ok(());
198        };
199
200        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
201        if requested.should_capture("lifecyclePolicyArn") {
202            if let ::std::option::Option::Some(value) = input.lifecycle_policy_arn.as_deref() {
203                captured.insert("lifecyclePolicyArn", value);
204            }
205        }
206        if requested.should_capture("description") {
207            if let ::std::option::Option::Some(value) = input.description.as_deref() {
208                captured.insert("description", value);
209            }
210        }
211        if requested.should_capture("executionRole") {
212            if let ::std::option::Option::Some(value) = input.execution_role.as_deref() {
213                captured.insert("executionRole", value);
214            }
215        }
216        if requested.should_capture("clientToken") {
217            if let ::std::option::Option::Some(value) = input.client_token.as_deref() {
218                captured.insert("clientToken", value);
219            }
220        }
221
222        cfg.interceptor_state().store_put(captured);
223        ::std::result::Result::Ok(())
224    }
225}
226#[derive(Debug)]
227struct UpdateLifecyclePolicyResponseDeserializer;
228impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateLifecyclePolicyResponseDeserializer {
229    fn deserialize_nonstreaming_with_config(
230        &self,
231        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
232        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
233    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
234        let (success, status) = (response.status().is_success(), response.status().as_u16());
235        let headers = response.headers();
236        let body = response.body().bytes().expect("body loaded");
237        #[allow(unused_mut)]
238        let mut force_error = false;
239        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
240        let parse_result = if !success && status != 200 || force_error {
241            crate::protocol_serde::shape_update_lifecycle_policy::de_update_lifecycle_policy_http_error(status, headers, body)
242        } else {
243            crate::protocol_serde::shape_update_lifecycle_policy::de_update_lifecycle_policy_http_response(status, headers, body)
244        };
245        crate::protocol_serde::type_erase_result(parse_result)
246    }
247}
248#[derive(Debug)]
249struct UpdateLifecyclePolicyRequestSerializer;
250impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateLifecyclePolicyRequestSerializer {
251    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
252    fn serialize_input(
253        &self,
254        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
255        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
256    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
257        let input = input
258            .downcast::<crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyInput>()
259            .expect("correct type");
260        let _header_serialization_settings = _cfg
261            .load::<crate::serialization_settings::HeaderSerializationSettings>()
262            .cloned()
263            .unwrap_or_default();
264        let mut request_builder = {
265            #[allow(clippy::uninlined_format_args)]
266            fn uri_base(
267                _input: &crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyInput,
268                output: &mut ::std::string::String,
269            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
270                use ::std::fmt::Write as _;
271                ::std::write!(output, "/UpdateLifecyclePolicy").expect("formatting should succeed");
272                ::std::result::Result::Ok(())
273            }
274            #[allow(clippy::unnecessary_wraps)]
275            fn update_http_builder(
276                input: &crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyInput,
277                builder: ::http_1x::request::Builder,
278            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
279                let mut uri = ::std::string::String::new();
280                uri_base(input, &mut uri)?;
281                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
282            }
283            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
284            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/json");
285            builder
286        };
287        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_update_lifecycle_policy::ser_update_lifecycle_policy_input(
288            &input,
289        )?);
290        if let Some(content_length) = body.content_length() {
291            let content_length = content_length.to_string();
292            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
293        }
294        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
295    }
296}
297#[derive(Debug)]
298struct UpdateLifecyclePolicyEndpointParamsInterceptor;
299
300#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
301impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateLifecyclePolicyEndpointParamsInterceptor {
302    fn name(&self) -> &'static str {
303        "UpdateLifecyclePolicyEndpointParamsInterceptor"
304    }
305
306    fn read_before_execution(
307        &self,
308        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
309            '_,
310            ::aws_smithy_runtime_api::client::interceptors::context::Input,
311            ::aws_smithy_runtime_api::client::interceptors::context::Output,
312            ::aws_smithy_runtime_api::client::interceptors::context::Error,
313        >,
314        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
315    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
316        let _input = context
317            .input()
318            .downcast_ref::<UpdateLifecyclePolicyInput>()
319            .ok_or("failed to downcast to UpdateLifecyclePolicyInput")?;
320
321        let params = crate::config::endpoint::Params::builder()
322            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
323            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
324            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
325            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
326            .build()
327            .map_err(|err| {
328                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
329            })?;
330        cfg.interceptor_state()
331            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
332        ::std::result::Result::Ok(())
333    }
334}
335
336// The get_* functions below are generated from JMESPath expressions in the
337// operationContextParams trait. They target the operation's input shape.
338
339/// Error type for the `UpdateLifecyclePolicyError` operation.
340#[non_exhaustive]
341#[derive(::std::fmt::Debug)]
342pub enum UpdateLifecyclePolicyError {
343    /// <p>You have exceeded the permitted request rate for the specific operation.</p>
344    CallRateLimitExceededException(crate::types::error::CallRateLimitExceededException),
345    /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an invalid resource identifier.</p>
346    ClientException(crate::types::error::ClientException),
347    /// <p>You are not authorized to perform the requested operation.</p>
348    ForbiddenException(crate::types::error::ForbiddenException),
349    /// <p>You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.</p>
350    IdempotentParameterMismatchException(crate::types::error::IdempotentParameterMismatchException),
351    /// <p>You have specified two or more mutually exclusive parameters. Review the error message for details.</p>
352    InvalidParameterCombinationException(crate::types::error::InvalidParameterCombinationException),
353    /// <p>You have requested an action that that the service doesn't support.</p>
354    InvalidRequestException(crate::types::error::InvalidRequestException),
355    /// <p>The resource that you are trying to operate on is currently in use. Review the message details and retry later.</p>
356    ResourceInUseException(crate::types::error::ResourceInUseException),
357    /// <p>This exception is thrown when the service encounters an unrecoverable exception.</p>
358    ServiceException(crate::types::error::ServiceException),
359    /// <p>The service is unable to process your request at this time.</p>
360    ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
361    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
362    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
363    variable wildcard pattern and check `.code()`:
364     \
365    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
366     \
367    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateLifecyclePolicyError) for what information is available for the error.")]
368    Unhandled(crate::error::sealed_unhandled::Unhandled),
369}
370impl UpdateLifecyclePolicyError {
371    /// Creates the `UpdateLifecyclePolicyError::Unhandled` variant from any error type.
372    pub fn unhandled(
373        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
374    ) -> Self {
375        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
376            source: err.into(),
377            meta: ::std::default::Default::default(),
378        })
379    }
380
381    /// Creates the `UpdateLifecyclePolicyError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
382    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
383        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
384            source: err.clone().into(),
385            meta: err,
386        })
387    }
388    ///
389    /// Returns error metadata, which includes the error code, message,
390    /// request ID, and potentially additional information.
391    ///
392    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
393        match self {
394            Self::CallRateLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
395            Self::ClientException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
396            Self::ForbiddenException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
397            Self::IdempotentParameterMismatchException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
398            Self::InvalidParameterCombinationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
399            Self::InvalidRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
400            Self::ResourceInUseException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
401            Self::ServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
402            Self::ServiceUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
403            Self::Unhandled(e) => &e.meta,
404        }
405    }
406    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::CallRateLimitExceededException`.
407    pub fn is_call_rate_limit_exceeded_exception(&self) -> bool {
408        matches!(self, Self::CallRateLimitExceededException(_))
409    }
410    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::ClientException`.
411    pub fn is_client_exception(&self) -> bool {
412        matches!(self, Self::ClientException(_))
413    }
414    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::ForbiddenException`.
415    pub fn is_forbidden_exception(&self) -> bool {
416        matches!(self, Self::ForbiddenException(_))
417    }
418    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::IdempotentParameterMismatchException`.
419    pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
420        matches!(self, Self::IdempotentParameterMismatchException(_))
421    }
422    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::InvalidParameterCombinationException`.
423    pub fn is_invalid_parameter_combination_exception(&self) -> bool {
424        matches!(self, Self::InvalidParameterCombinationException(_))
425    }
426    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::InvalidRequestException`.
427    pub fn is_invalid_request_exception(&self) -> bool {
428        matches!(self, Self::InvalidRequestException(_))
429    }
430    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::ResourceInUseException`.
431    pub fn is_resource_in_use_exception(&self) -> bool {
432        matches!(self, Self::ResourceInUseException(_))
433    }
434    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::ServiceException`.
435    pub fn is_service_exception(&self) -> bool {
436        matches!(self, Self::ServiceException(_))
437    }
438    /// Returns `true` if the error kind is `UpdateLifecyclePolicyError::ServiceUnavailableException`.
439    pub fn is_service_unavailable_exception(&self) -> bool {
440        matches!(self, Self::ServiceUnavailableException(_))
441    }
442}
443impl ::std::error::Error for UpdateLifecyclePolicyError {
444    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
445        match self {
446            Self::CallRateLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
447            Self::ClientException(_inner) => ::std::option::Option::Some(_inner),
448            Self::ForbiddenException(_inner) => ::std::option::Option::Some(_inner),
449            Self::IdempotentParameterMismatchException(_inner) => ::std::option::Option::Some(_inner),
450            Self::InvalidParameterCombinationException(_inner) => ::std::option::Option::Some(_inner),
451            Self::InvalidRequestException(_inner) => ::std::option::Option::Some(_inner),
452            Self::ResourceInUseException(_inner) => ::std::option::Option::Some(_inner),
453            Self::ServiceException(_inner) => ::std::option::Option::Some(_inner),
454            Self::ServiceUnavailableException(_inner) => ::std::option::Option::Some(_inner),
455            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
456        }
457    }
458}
459impl ::std::fmt::Display for UpdateLifecyclePolicyError {
460    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
461        match self {
462            Self::CallRateLimitExceededException(_inner) => _inner.fmt(f),
463            Self::ClientException(_inner) => _inner.fmt(f),
464            Self::ForbiddenException(_inner) => _inner.fmt(f),
465            Self::IdempotentParameterMismatchException(_inner) => _inner.fmt(f),
466            Self::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
467            Self::InvalidRequestException(_inner) => _inner.fmt(f),
468            Self::ResourceInUseException(_inner) => _inner.fmt(f),
469            Self::ServiceException(_inner) => _inner.fmt(f),
470            Self::ServiceUnavailableException(_inner) => _inner.fmt(f),
471            Self::Unhandled(_inner) => {
472                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
473                    write!(f, "unhandled error ({code})")
474                } else {
475                    f.write_str("unhandled error")
476                }
477            }
478        }
479    }
480}
481impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateLifecyclePolicyError {
482    fn code(&self) -> ::std::option::Option<&str> {
483        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
484    }
485    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
486        ::std::option::Option::None
487    }
488}
489impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateLifecyclePolicyError {
490    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
491        match self {
492            Self::CallRateLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
493            Self::ClientException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
494            Self::ForbiddenException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
495            Self::IdempotentParameterMismatchException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
496            Self::InvalidParameterCombinationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
497            Self::InvalidRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
498            Self::ResourceInUseException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
499            Self::ServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
500            Self::ServiceUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
501            Self::Unhandled(_inner) => &_inner.meta,
502        }
503    }
504}
505impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateLifecyclePolicyError {
506    fn create_unhandled_error(
507        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
508        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
509    ) -> Self {
510        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
511            source,
512            meta: meta.unwrap_or_default(),
513        })
514    }
515}
516impl ::aws_types::request_id::RequestId for crate::operation::update_lifecycle_policy::UpdateLifecyclePolicyError {
517    fn request_id(&self) -> Option<&str> {
518        self.meta().request_id()
519    }
520}
521
522pub use crate::operation::update_lifecycle_policy::_update_lifecycle_policy_input::UpdateLifecyclePolicyInput;
523
524pub use crate::operation::update_lifecycle_policy::_update_lifecycle_policy_output::UpdateLifecyclePolicyOutput;
525
526mod _update_lifecycle_policy_input;
527
528mod _update_lifecycle_policy_output;
529
530/// Builders
531pub mod builders;