Skip to main content

aws_sdk_cloudfront/operation/
update_distribution.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `UpdateDistribution`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct UpdateDistribution;
6impl UpdateDistribution {
7    /// Creates a new `UpdateDistribution`
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_distribution::UpdateDistributionInput,
14    ) -> ::std::result::Result<
15        crate::operation::update_distribution::UpdateDistributionOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::update_distribution::UpdateDistributionError,
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_distribution::UpdateDistributionError>()
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_distribution::UpdateDistributionOutput>()
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_distribution::UpdateDistributionInput,
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("CloudFront", "UpdateDistribution", input, runtime_plugins, stop_point)
55            // Create a parent span for the entire operation. Includes a random, internal-only,
56            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
57            .instrument(::tracing::debug_span!(
58                "CloudFront.UpdateDistribution",
59                "rpc.service" = "CloudFront",
60                "rpc.method" = "UpdateDistribution",
61                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62                "rpc.system" = "aws-api",
63            ))
64            .await
65    }
66
67    pub(crate) fn operation_runtime_plugins(
68        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69        client_config: &crate::config::Config,
70        config_override: ::std::option::Option<crate::config::Builder>,
71    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74        if let ::std::option::Option::Some(config_override) = config_override {
75            for plugin in config_override.runtime_plugins.iter().cloned() {
76                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77            }
78            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79                config_override,
80                client_config.config.clone(),
81                &client_config.runtime_components,
82            ));
83        }
84        runtime_plugins
85    }
86}
87impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateDistribution {
88    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateDistribution");
90
91        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92            UpdateDistributionRequestSerializer,
93        ));
94        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95            UpdateDistributionResponseDeserializer,
96        ));
97
98        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99            crate::config::auth::Params::builder()
100                .operation_name("UpdateDistribution")
101                .build()
102                .expect("required fields set"),
103        ));
104
105        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
106        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
107            "UpdateDistribution",
108            "CloudFront",
109        ));
110        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
111        signing_options.double_uri_encode = true;
112        signing_options.content_sha256_header = false;
113        signing_options.normalize_uri_path = true;
114        signing_options.payload_override = None;
115
116        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
117            signing_options,
118            ..::std::default::Default::default()
119        });
120
121        ::std::option::Option::Some(cfg.freeze())
122    }
123
124    fn runtime_components(
125        &self,
126        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
127    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
128        #[allow(unused_mut)]
129        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateDistribution")
130            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
131                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
132            ))
133            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
134                UpdateDistributionEndpointParamsInterceptor,
135            ))
136            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
137                crate::operation::update_distribution::UpdateDistributionError,
138            >::new())
139            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
140                crate::operation::update_distribution::UpdateDistributionError,
141            >::new())
142            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
143                crate::operation::update_distribution::UpdateDistributionError,
144            >::new());
145
146        ::std::borrow::Cow::Owned(rcb)
147    }
148}
149
150#[derive(Debug)]
151struct UpdateDistributionResponseDeserializer;
152impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateDistributionResponseDeserializer {
153    fn deserialize_nonstreaming_with_config(
154        &self,
155        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
156        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
157    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
158        let (success, status) = (response.status().is_success(), response.status().as_u16());
159        let headers = response.headers();
160        let body = response.body().bytes().expect("body loaded");
161        #[allow(unused_mut)]
162        let mut force_error = false;
163        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
164        let parse_result = if !success && status != 200 || force_error {
165            crate::protocol_serde::shape_update_distribution::de_update_distribution_http_error(status, headers, body)
166        } else {
167            crate::protocol_serde::shape_update_distribution::de_update_distribution_http_response(status, headers, body)
168        };
169        crate::protocol_serde::type_erase_result(parse_result)
170    }
171}
172#[derive(Debug)]
173struct UpdateDistributionRequestSerializer;
174impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateDistributionRequestSerializer {
175    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
176    fn serialize_input(
177        &self,
178        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
179        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
180    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
181        let input = input
182            .downcast::<crate::operation::update_distribution::UpdateDistributionInput>()
183            .expect("correct type");
184        let _header_serialization_settings = _cfg
185            .load::<crate::serialization_settings::HeaderSerializationSettings>()
186            .cloned()
187            .unwrap_or_default();
188        let mut request_builder = {
189            #[allow(clippy::uninlined_format_args)]
190            fn uri_base(
191                _input: &crate::operation::update_distribution::UpdateDistributionInput,
192                output: &mut ::std::string::String,
193            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
194                use ::std::fmt::Write as _;
195                let input_1 = &_input.id;
196                let input_1 = input_1
197                    .as_ref()
198                    .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("id", "cannot be empty or unset"))?;
199                let id = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
200                if id.is_empty() {
201                    return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
202                        "id",
203                        "cannot be empty or unset",
204                    ));
205                }
206                ::std::write!(output, "/2020-05-31/distribution/{Id}/config", Id = id).expect("formatting should succeed");
207                ::std::result::Result::Ok(())
208            }
209            #[allow(clippy::unnecessary_wraps)]
210            fn update_http_builder(
211                input: &crate::operation::update_distribution::UpdateDistributionInput,
212                builder: ::http_1x::request::Builder,
213            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
214                let mut uri = ::std::string::String::new();
215                uri_base(input, &mut uri)?;
216                let builder = crate::protocol_serde::shape_update_distribution::ser_update_distribution_headers(input, builder)?;
217                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
218            }
219            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
220            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/xml");
221            builder
222        };
223        let body = ::aws_smithy_types::body::SdkBody::from(
224            crate::protocol_serde::shape_update_distribution_input::ser_distribution_config_http_payload(&input.distribution_config)?,
225        );
226        if let Some(content_length) = body.content_length() {
227            let content_length = content_length.to_string();
228            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
229        }
230        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
231    }
232}
233#[derive(Debug)]
234struct UpdateDistributionEndpointParamsInterceptor;
235
236#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
237impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateDistributionEndpointParamsInterceptor {
238    fn name(&self) -> &'static str {
239        "UpdateDistributionEndpointParamsInterceptor"
240    }
241
242    fn read_before_execution(
243        &self,
244        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
245            '_,
246            ::aws_smithy_runtime_api::client::interceptors::context::Input,
247            ::aws_smithy_runtime_api::client::interceptors::context::Output,
248            ::aws_smithy_runtime_api::client::interceptors::context::Error,
249        >,
250        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
251    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
252        let _input = context
253            .input()
254            .downcast_ref::<UpdateDistributionInput>()
255            .ok_or("failed to downcast to UpdateDistributionInput")?;
256
257        let params = crate::config::endpoint::Params::builder()
258            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
259            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
260            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
261            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
262            .build()
263            .map_err(|err| {
264                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
265            })?;
266        cfg.interceptor_state()
267            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
268        ::std::result::Result::Ok(())
269    }
270}
271
272// The get_* functions below are generated from JMESPath expressions in the
273// operationContextParams trait. They target the operation's input shape.
274
275/// Error type for the `UpdateDistributionError` operation.
276#[non_exhaustive]
277#[derive(::std::fmt::Debug)]
278pub enum UpdateDistributionError {
279    /// <p>Access denied.</p>
280    AccessDenied(crate::types::error::AccessDenied),
281    /// <p>The CNAME specified is already defined for CloudFront.</p>
282    CnameAlreadyExists(crate::types::error::CnameAlreadyExists),
283    /// <p>You cannot delete a continuous deployment policy that is associated with a primary distribution.</p>
284    ContinuousDeploymentPolicyInUse(crate::types::error::ContinuousDeploymentPolicyInUse),
285    /// <p>The entity was not found.</p>
286    EntityNotFound(crate::types::error::EntityNotFound),
287    /// <p>The specified configuration for field-level encryption can't be associated with the specified cache behavior.</p>
288    IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(crate::types::error::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior),
289    /// <p>An origin cannot contain both an origin access control (OAC) and an origin access identity (OAI).</p>
290    IllegalOriginAccessConfiguration(crate::types::error::IllegalOriginAccessConfiguration),
291    /// <p>The update contains modifications that are not allowed.</p>
292    IllegalUpdate(crate::types::error::IllegalUpdate),
293    /// <p>The value of <code>Quantity</code> and the size of <code>Items</code> don't match.</p>
294    InconsistentQuantities(crate::types::error::InconsistentQuantities),
295    /// <p>An argument is invalid.</p>
296    InvalidArgument(crate::types::error::InvalidArgument),
297    /// <p>The default root object file name is too big or contains an invalid character.</p>
298    InvalidDefaultRootObject(crate::types::error::InvalidDefaultRootObject),
299    /// <p>An origin access control is associated with an origin whose domain name is not supported.</p>
300    InvalidDomainNameForOriginAccessControl(crate::types::error::InvalidDomainNameForOriginAccessControl),
301    /// <p>An invalid error code was specified.</p>
302    InvalidErrorCode(crate::types::error::InvalidErrorCode),
303    /// <p>Your request contains forward cookies option which doesn't match with the expectation for the <code>whitelisted</code> list of cookie names. Either list of cookie names has been specified when not allowed or list of cookie names is missing when expected.</p>
304    InvalidForwardCookies(crate::types::error::InvalidForwardCookies),
305    /// <p>A CloudFront function association is invalid.</p>
306    InvalidFunctionAssociation(crate::types::error::InvalidFunctionAssociation),
307    /// <p>The specified geo restriction parameter is not valid.</p>
308    InvalidGeoRestrictionParameter(crate::types::error::InvalidGeoRestrictionParameter),
309    /// <p>The headers specified are not valid for an Amazon S3 origin.</p>
310    InvalidHeadersForS3Origin(crate::types::error::InvalidHeadersForS3Origin),
311    /// <p>The <code>If-Match</code> version is missing or not valid.</p>
312    InvalidIfMatchVersion(crate::types::error::InvalidIfMatchVersion),
313    /// <p>The specified Lambda@Edge function association is invalid.</p>
314    InvalidLambdaFunctionAssociation(crate::types::error::InvalidLambdaFunctionAssociation),
315    /// <p>The location code specified is not valid.</p>
316    InvalidLocationCode(crate::types::error::InvalidLocationCode),
317    /// <p>The minimum protocol version specified is not valid.</p>
318    InvalidMinimumProtocolVersion(crate::types::error::InvalidMinimumProtocolVersion),
319    /// <p>The origin access control is not valid.</p>
320    InvalidOriginAccessControl(crate::types::error::InvalidOriginAccessControl),
321    /// <p>The origin access identity is not valid or doesn't exist.</p>
322    InvalidOriginAccessIdentity(crate::types::error::InvalidOriginAccessIdentity),
323    /// <p>The keep alive timeout specified for the origin is not valid.</p>
324    InvalidOriginKeepaliveTimeout(crate::types::error::InvalidOriginKeepaliveTimeout),
325    /// <p>The read timeout specified for the origin is not valid.</p>
326    InvalidOriginReadTimeout(crate::types::error::InvalidOriginReadTimeout),
327    /// <p>The query string parameters specified are not valid.</p>
328    InvalidQueryStringParameters(crate::types::error::InvalidQueryStringParameters),
329    /// <p>The relative path is too big, is not URL-encoded, or does not begin with a slash (/).</p>
330    InvalidRelativePath(crate::types::error::InvalidRelativePath),
331    /// <p>This operation requires the HTTPS protocol. Ensure that you specify the HTTPS protocol in your request, or omit the <code>RequiredProtocols</code> element from your distribution configuration.</p>
332    InvalidRequiredProtocol(crate::types::error::InvalidRequiredProtocol),
333    /// <p>A response code is not valid.</p>
334    InvalidResponseCode(crate::types::error::InvalidResponseCode),
335    /// <p>The TTL order specified is not valid.</p>
336    InvalidTtlOrder(crate::types::error::InvalidTtlOrder),
337    /// <p>A viewer certificate specified is not valid.</p>
338    InvalidViewerCertificate(crate::types::error::InvalidViewerCertificate),
339    /// <p>A web ACL ID specified is not valid. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example <code>arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a</code>. To specify a web ACL created using WAF Classic, use the ACL ID, for example <code>473e64fd-f30b-4765-81a0-62ad96dd167a</code>.</p>
340    InvalidWebAclId(crate::types::error::InvalidWebAclId),
341    /// <p>This operation requires a body. Ensure that the body is present and the <code>Content-Type</code> header is set.</p>
342    MissingBody(crate::types::error::MissingBody),
343    /// <p>The cache policy does not exist.</p>
344    NoSuchCachePolicy(crate::types::error::NoSuchCachePolicy),
345    /// <p>The continuous deployment policy doesn't exist.</p>
346    NoSuchContinuousDeploymentPolicy(crate::types::error::NoSuchContinuousDeploymentPolicy),
347    /// <p>The specified distribution does not exist.</p>
348    NoSuchDistribution(crate::types::error::NoSuchDistribution),
349    /// <p>The specified configuration for field-level encryption doesn't exist.</p>
350    NoSuchFieldLevelEncryptionConfig(crate::types::error::NoSuchFieldLevelEncryptionConfig),
351    /// <p>No origin exists with the specified <code>Origin Id</code>.</p>
352    NoSuchOrigin(crate::types::error::NoSuchOrigin),
353    /// <p>The origin request policy does not exist.</p>
354    NoSuchOriginRequestPolicy(crate::types::error::NoSuchOriginRequestPolicy),
355    /// <p>The real-time log configuration does not exist.</p>
356    NoSuchRealtimeLogConfig(crate::types::error::NoSuchRealtimeLogConfig),
357    /// <p>The response headers policy does not exist.</p>
358    NoSuchResponseHeadersPolicy(crate::types::error::NoSuchResponseHeadersPolicy),
359    /// <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
360    PreconditionFailed(crate::types::error::PreconditionFailed),
361    /// <p>The specified real-time log configuration belongs to a different Amazon Web Services account.</p>
362    RealtimeLogConfigOwnerMismatch(crate::types::error::RealtimeLogConfigOwnerMismatch),
363    /// <p>A continuous deployment policy for this staging distribution already exists.</p>
364    StagingDistributionInUse(crate::types::error::StagingDistributionInUse),
365    /// <p>You cannot create more cache behaviors for the distribution.</p>
366    TooManyCacheBehaviors(crate::types::error::TooManyCacheBehaviors),
367    /// <p>You cannot create anymore custom SSL/TLS certificates.</p>
368    TooManyCertificates(crate::types::error::TooManyCertificates),
369    /// <p>Your request contains more cookie names in the whitelist than are allowed per cache behavior.</p>
370    TooManyCookieNamesInWhiteList(crate::types::error::TooManyCookieNamesInWhiteList),
371    /// <p>Your request contains more CNAMEs than are allowed per distribution.</p>
372    TooManyDistributionCnamEs(crate::types::error::TooManyDistributionCnamEs),
373    /// <p>The maximum number of distributions have been associated with the specified cache policy. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
374    TooManyDistributionsAssociatedToCachePolicy(crate::types::error::TooManyDistributionsAssociatedToCachePolicy),
375    /// <p>The maximum number of distributions have been associated with the specified configuration for field-level encryption.</p>
376    TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(crate::types::error::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig),
377    /// <p>The number of distributions that reference this key group is more than the maximum allowed. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
378    TooManyDistributionsAssociatedToKeyGroup(crate::types::error::TooManyDistributionsAssociatedToKeyGroup),
379    /// <p>The maximum number of distributions have been associated with the specified origin access control.</p>
380    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
381    TooManyDistributionsAssociatedToOriginAccessControl(crate::types::error::TooManyDistributionsAssociatedToOriginAccessControl),
382    /// <p>The maximum number of distributions have been associated with the specified origin request policy. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
383    TooManyDistributionsAssociatedToOriginRequestPolicy(crate::types::error::TooManyDistributionsAssociatedToOriginRequestPolicy),
384    /// <p>The maximum number of distributions have been associated with the specified response headers policy.</p>
385    /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
386    TooManyDistributionsAssociatedToResponseHeadersPolicy(crate::types::error::TooManyDistributionsAssociatedToResponseHeadersPolicy),
387    /// <p>You have reached the maximum number of distributions that are associated with a CloudFront function. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
388    TooManyDistributionsWithFunctionAssociations(crate::types::error::TooManyDistributionsWithFunctionAssociations),
389    /// <p>Processing your request would cause the maximum number of distributions with Lambda@Edge function associations per owner to be exceeded.</p>
390    TooManyDistributionsWithLambdaAssociations(crate::types::error::TooManyDistributionsWithLambdaAssociations),
391    /// <p>The maximum number of distributions have been associated with the specified Lambda@Edge function.</p>
392    TooManyDistributionsWithSingleFunctionArn(crate::types::error::TooManyDistributionsWithSingleFunctionArn),
393    /// <p>You have reached the maximum number of CloudFront function associations for this distribution. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
394    TooManyFunctionAssociations(crate::types::error::TooManyFunctionAssociations),
395    /// <p>Your request contains too many headers in forwarded values.</p>
396    TooManyHeadersInForwardedValues(crate::types::error::TooManyHeadersInForwardedValues),
397    /// <p>The number of key groups referenced by this distribution is more than the maximum allowed. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html">Quotas</a> (formerly known as limits) in the <i>Amazon CloudFront Developer Guide</i>.</p>
398    TooManyKeyGroupsAssociatedToDistribution(crate::types::error::TooManyKeyGroupsAssociatedToDistribution),
399    /// <p>Your request contains more Lambda@Edge function associations than are allowed per distribution.</p>
400    TooManyLambdaFunctionAssociations(crate::types::error::TooManyLambdaFunctionAssociations),
401    /// <p>Your request contains too many origin custom headers.</p>
402    TooManyOriginCustomHeaders(crate::types::error::TooManyOriginCustomHeaders),
403    /// <p>Processing your request would cause you to exceed the maximum number of origin groups allowed.</p>
404    TooManyOriginGroupsPerDistribution(crate::types::error::TooManyOriginGroupsPerDistribution),
405    /// <p>You cannot create more origins for the distribution.</p>
406    TooManyOrigins(crate::types::error::TooManyOrigins),
407    /// <p>Your request contains too many query string parameters.</p>
408    TooManyQueryStringParameters(crate::types::error::TooManyQueryStringParameters),
409    /// <p>Your request contains more trusted signers than are allowed per distribution.</p>
410    TooManyTrustedSigners(crate::types::error::TooManyTrustedSigners),
411    /// <p>The specified key group does not exist.</p>
412    TrustedKeyGroupDoesNotExist(crate::types::error::TrustedKeyGroupDoesNotExist),
413    /// <p>One or more of your trusted signers don't exist.</p>
414    TrustedSignerDoesNotExist(crate::types::error::TrustedSignerDoesNotExist),
415    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
416    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
417    variable wildcard pattern and check `.code()`:
418     \
419    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
420     \
421    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateDistributionError) for what information is available for the error.")]
422    Unhandled(crate::error::sealed_unhandled::Unhandled),
423}
424impl UpdateDistributionError {
425    /// Creates the `UpdateDistributionError::Unhandled` variant from any error type.
426    pub fn unhandled(
427        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
428    ) -> Self {
429        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
430            source: err.into(),
431            meta: ::std::default::Default::default(),
432        })
433    }
434
435    /// Creates the `UpdateDistributionError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
436    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
437        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
438            source: err.clone().into(),
439            meta: err,
440        })
441    }
442    ///
443    /// Returns error metadata, which includes the error code, message,
444    /// request ID, and potentially additional information.
445    ///
446    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
447        match self {
448            Self::AccessDenied(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
449            Self::CnameAlreadyExists(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
450            Self::ContinuousDeploymentPolicyInUse(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
451            Self::EntityNotFound(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
452            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(e) => {
453                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e)
454            }
455            Self::IllegalOriginAccessConfiguration(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
456            Self::IllegalUpdate(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
457            Self::InconsistentQuantities(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
458            Self::InvalidArgument(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
459            Self::InvalidDefaultRootObject(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
460            Self::InvalidDomainNameForOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
461            Self::InvalidErrorCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
462            Self::InvalidForwardCookies(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
463            Self::InvalidFunctionAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
464            Self::InvalidGeoRestrictionParameter(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
465            Self::InvalidHeadersForS3Origin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
466            Self::InvalidIfMatchVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
467            Self::InvalidLambdaFunctionAssociation(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
468            Self::InvalidLocationCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
469            Self::InvalidMinimumProtocolVersion(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
470            Self::InvalidOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
471            Self::InvalidOriginAccessIdentity(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
472            Self::InvalidOriginKeepaliveTimeout(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
473            Self::InvalidOriginReadTimeout(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
474            Self::InvalidQueryStringParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
475            Self::InvalidRelativePath(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
476            Self::InvalidRequiredProtocol(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
477            Self::InvalidResponseCode(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
478            Self::InvalidTtlOrder(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
479            Self::InvalidViewerCertificate(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
480            Self::InvalidWebAclId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
481            Self::MissingBody(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
482            Self::NoSuchCachePolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
483            Self::NoSuchContinuousDeploymentPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
484            Self::NoSuchDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
485            Self::NoSuchFieldLevelEncryptionConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
486            Self::NoSuchOrigin(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
487            Self::NoSuchOriginRequestPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
488            Self::NoSuchRealtimeLogConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
489            Self::NoSuchResponseHeadersPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490            Self::PreconditionFailed(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491            Self::RealtimeLogConfigOwnerMismatch(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492            Self::StagingDistributionInUse(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
493            Self::TooManyCacheBehaviors(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494            Self::TooManyCertificates(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495            Self::TooManyCookieNamesInWhiteList(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496            Self::TooManyDistributionCnamEs(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
497            Self::TooManyDistributionsAssociatedToCachePolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
498            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
499            Self::TooManyDistributionsAssociatedToKeyGroup(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
500            Self::TooManyDistributionsAssociatedToOriginAccessControl(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
501            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
502            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
503            Self::TooManyDistributionsWithFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
504            Self::TooManyDistributionsWithLambdaAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
505            Self::TooManyDistributionsWithSingleFunctionArn(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
506            Self::TooManyFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
507            Self::TooManyHeadersInForwardedValues(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
508            Self::TooManyKeyGroupsAssociatedToDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
509            Self::TooManyLambdaFunctionAssociations(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
510            Self::TooManyOriginCustomHeaders(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
511            Self::TooManyOriginGroupsPerDistribution(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
512            Self::TooManyOrigins(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
513            Self::TooManyQueryStringParameters(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
514            Self::TooManyTrustedSigners(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
515            Self::TrustedKeyGroupDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
516            Self::TrustedSignerDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
517            Self::Unhandled(e) => &e.meta,
518        }
519    }
520    /// Returns `true` if the error kind is `UpdateDistributionError::AccessDenied`.
521    pub fn is_access_denied(&self) -> bool {
522        matches!(self, Self::AccessDenied(_))
523    }
524    /// Returns `true` if the error kind is `UpdateDistributionError::CnameAlreadyExists`.
525    pub fn is_cname_already_exists(&self) -> bool {
526        matches!(self, Self::CnameAlreadyExists(_))
527    }
528    /// Returns `true` if the error kind is `UpdateDistributionError::ContinuousDeploymentPolicyInUse`.
529    pub fn is_continuous_deployment_policy_in_use(&self) -> bool {
530        matches!(self, Self::ContinuousDeploymentPolicyInUse(_))
531    }
532    /// Returns `true` if the error kind is `UpdateDistributionError::EntityNotFound`.
533    pub fn is_entity_not_found(&self) -> bool {
534        matches!(self, Self::EntityNotFound(_))
535    }
536    /// Returns `true` if the error kind is `UpdateDistributionError::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior`.
537    pub fn is_illegal_field_level_encryption_config_association_with_cache_behavior(&self) -> bool {
538        matches!(self, Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_))
539    }
540    /// Returns `true` if the error kind is `UpdateDistributionError::IllegalOriginAccessConfiguration`.
541    pub fn is_illegal_origin_access_configuration(&self) -> bool {
542        matches!(self, Self::IllegalOriginAccessConfiguration(_))
543    }
544    /// Returns `true` if the error kind is `UpdateDistributionError::IllegalUpdate`.
545    pub fn is_illegal_update(&self) -> bool {
546        matches!(self, Self::IllegalUpdate(_))
547    }
548    /// Returns `true` if the error kind is `UpdateDistributionError::InconsistentQuantities`.
549    pub fn is_inconsistent_quantities(&self) -> bool {
550        matches!(self, Self::InconsistentQuantities(_))
551    }
552    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidArgument`.
553    pub fn is_invalid_argument(&self) -> bool {
554        matches!(self, Self::InvalidArgument(_))
555    }
556    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidDefaultRootObject`.
557    pub fn is_invalid_default_root_object(&self) -> bool {
558        matches!(self, Self::InvalidDefaultRootObject(_))
559    }
560    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidDomainNameForOriginAccessControl`.
561    pub fn is_invalid_domain_name_for_origin_access_control(&self) -> bool {
562        matches!(self, Self::InvalidDomainNameForOriginAccessControl(_))
563    }
564    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidErrorCode`.
565    pub fn is_invalid_error_code(&self) -> bool {
566        matches!(self, Self::InvalidErrorCode(_))
567    }
568    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidForwardCookies`.
569    pub fn is_invalid_forward_cookies(&self) -> bool {
570        matches!(self, Self::InvalidForwardCookies(_))
571    }
572    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidFunctionAssociation`.
573    pub fn is_invalid_function_association(&self) -> bool {
574        matches!(self, Self::InvalidFunctionAssociation(_))
575    }
576    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidGeoRestrictionParameter`.
577    pub fn is_invalid_geo_restriction_parameter(&self) -> bool {
578        matches!(self, Self::InvalidGeoRestrictionParameter(_))
579    }
580    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidHeadersForS3Origin`.
581    pub fn is_invalid_headers_for_s3_origin(&self) -> bool {
582        matches!(self, Self::InvalidHeadersForS3Origin(_))
583    }
584    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidIfMatchVersion`.
585    pub fn is_invalid_if_match_version(&self) -> bool {
586        matches!(self, Self::InvalidIfMatchVersion(_))
587    }
588    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidLambdaFunctionAssociation`.
589    pub fn is_invalid_lambda_function_association(&self) -> bool {
590        matches!(self, Self::InvalidLambdaFunctionAssociation(_))
591    }
592    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidLocationCode`.
593    pub fn is_invalid_location_code(&self) -> bool {
594        matches!(self, Self::InvalidLocationCode(_))
595    }
596    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidMinimumProtocolVersion`.
597    pub fn is_invalid_minimum_protocol_version(&self) -> bool {
598        matches!(self, Self::InvalidMinimumProtocolVersion(_))
599    }
600    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidOriginAccessControl`.
601    pub fn is_invalid_origin_access_control(&self) -> bool {
602        matches!(self, Self::InvalidOriginAccessControl(_))
603    }
604    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidOriginAccessIdentity`.
605    pub fn is_invalid_origin_access_identity(&self) -> bool {
606        matches!(self, Self::InvalidOriginAccessIdentity(_))
607    }
608    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidOriginKeepaliveTimeout`.
609    pub fn is_invalid_origin_keepalive_timeout(&self) -> bool {
610        matches!(self, Self::InvalidOriginKeepaliveTimeout(_))
611    }
612    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidOriginReadTimeout`.
613    pub fn is_invalid_origin_read_timeout(&self) -> bool {
614        matches!(self, Self::InvalidOriginReadTimeout(_))
615    }
616    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidQueryStringParameters`.
617    pub fn is_invalid_query_string_parameters(&self) -> bool {
618        matches!(self, Self::InvalidQueryStringParameters(_))
619    }
620    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidRelativePath`.
621    pub fn is_invalid_relative_path(&self) -> bool {
622        matches!(self, Self::InvalidRelativePath(_))
623    }
624    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidRequiredProtocol`.
625    pub fn is_invalid_required_protocol(&self) -> bool {
626        matches!(self, Self::InvalidRequiredProtocol(_))
627    }
628    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidResponseCode`.
629    pub fn is_invalid_response_code(&self) -> bool {
630        matches!(self, Self::InvalidResponseCode(_))
631    }
632    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidTtlOrder`.
633    pub fn is_invalid_ttl_order(&self) -> bool {
634        matches!(self, Self::InvalidTtlOrder(_))
635    }
636    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidViewerCertificate`.
637    pub fn is_invalid_viewer_certificate(&self) -> bool {
638        matches!(self, Self::InvalidViewerCertificate(_))
639    }
640    /// Returns `true` if the error kind is `UpdateDistributionError::InvalidWebAclId`.
641    pub fn is_invalid_web_acl_id(&self) -> bool {
642        matches!(self, Self::InvalidWebAclId(_))
643    }
644    /// Returns `true` if the error kind is `UpdateDistributionError::MissingBody`.
645    pub fn is_missing_body(&self) -> bool {
646        matches!(self, Self::MissingBody(_))
647    }
648    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchCachePolicy`.
649    pub fn is_no_such_cache_policy(&self) -> bool {
650        matches!(self, Self::NoSuchCachePolicy(_))
651    }
652    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchContinuousDeploymentPolicy`.
653    pub fn is_no_such_continuous_deployment_policy(&self) -> bool {
654        matches!(self, Self::NoSuchContinuousDeploymentPolicy(_))
655    }
656    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchDistribution`.
657    pub fn is_no_such_distribution(&self) -> bool {
658        matches!(self, Self::NoSuchDistribution(_))
659    }
660    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchFieldLevelEncryptionConfig`.
661    pub fn is_no_such_field_level_encryption_config(&self) -> bool {
662        matches!(self, Self::NoSuchFieldLevelEncryptionConfig(_))
663    }
664    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchOrigin`.
665    pub fn is_no_such_origin(&self) -> bool {
666        matches!(self, Self::NoSuchOrigin(_))
667    }
668    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchOriginRequestPolicy`.
669    pub fn is_no_such_origin_request_policy(&self) -> bool {
670        matches!(self, Self::NoSuchOriginRequestPolicy(_))
671    }
672    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchRealtimeLogConfig`.
673    pub fn is_no_such_realtime_log_config(&self) -> bool {
674        matches!(self, Self::NoSuchRealtimeLogConfig(_))
675    }
676    /// Returns `true` if the error kind is `UpdateDistributionError::NoSuchResponseHeadersPolicy`.
677    pub fn is_no_such_response_headers_policy(&self) -> bool {
678        matches!(self, Self::NoSuchResponseHeadersPolicy(_))
679    }
680    /// Returns `true` if the error kind is `UpdateDistributionError::PreconditionFailed`.
681    pub fn is_precondition_failed(&self) -> bool {
682        matches!(self, Self::PreconditionFailed(_))
683    }
684    /// Returns `true` if the error kind is `UpdateDistributionError::RealtimeLogConfigOwnerMismatch`.
685    pub fn is_realtime_log_config_owner_mismatch(&self) -> bool {
686        matches!(self, Self::RealtimeLogConfigOwnerMismatch(_))
687    }
688    /// Returns `true` if the error kind is `UpdateDistributionError::StagingDistributionInUse`.
689    pub fn is_staging_distribution_in_use(&self) -> bool {
690        matches!(self, Self::StagingDistributionInUse(_))
691    }
692    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyCacheBehaviors`.
693    pub fn is_too_many_cache_behaviors(&self) -> bool {
694        matches!(self, Self::TooManyCacheBehaviors(_))
695    }
696    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyCertificates`.
697    pub fn is_too_many_certificates(&self) -> bool {
698        matches!(self, Self::TooManyCertificates(_))
699    }
700    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyCookieNamesInWhiteList`.
701    pub fn is_too_many_cookie_names_in_white_list(&self) -> bool {
702        matches!(self, Self::TooManyCookieNamesInWhiteList(_))
703    }
704    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionCnamEs`.
705    pub fn is_too_many_distribution_cnam_es(&self) -> bool {
706        matches!(self, Self::TooManyDistributionCnamEs(_))
707    }
708    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToCachePolicy`.
709    pub fn is_too_many_distributions_associated_to_cache_policy(&self) -> bool {
710        matches!(self, Self::TooManyDistributionsAssociatedToCachePolicy(_))
711    }
712    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig`.
713    pub fn is_too_many_distributions_associated_to_field_level_encryption_config(&self) -> bool {
714        matches!(self, Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_))
715    }
716    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToKeyGroup`.
717    pub fn is_too_many_distributions_associated_to_key_group(&self) -> bool {
718        matches!(self, Self::TooManyDistributionsAssociatedToKeyGroup(_))
719    }
720    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToOriginAccessControl`.
721    pub fn is_too_many_distributions_associated_to_origin_access_control(&self) -> bool {
722        matches!(self, Self::TooManyDistributionsAssociatedToOriginAccessControl(_))
723    }
724    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToOriginRequestPolicy`.
725    pub fn is_too_many_distributions_associated_to_origin_request_policy(&self) -> bool {
726        matches!(self, Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_))
727    }
728    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsAssociatedToResponseHeadersPolicy`.
729    pub fn is_too_many_distributions_associated_to_response_headers_policy(&self) -> bool {
730        matches!(self, Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_))
731    }
732    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsWithFunctionAssociations`.
733    pub fn is_too_many_distributions_with_function_associations(&self) -> bool {
734        matches!(self, Self::TooManyDistributionsWithFunctionAssociations(_))
735    }
736    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsWithLambdaAssociations`.
737    pub fn is_too_many_distributions_with_lambda_associations(&self) -> bool {
738        matches!(self, Self::TooManyDistributionsWithLambdaAssociations(_))
739    }
740    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyDistributionsWithSingleFunctionArn`.
741    pub fn is_too_many_distributions_with_single_function_arn(&self) -> bool {
742        matches!(self, Self::TooManyDistributionsWithSingleFunctionArn(_))
743    }
744    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyFunctionAssociations`.
745    pub fn is_too_many_function_associations(&self) -> bool {
746        matches!(self, Self::TooManyFunctionAssociations(_))
747    }
748    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyHeadersInForwardedValues`.
749    pub fn is_too_many_headers_in_forwarded_values(&self) -> bool {
750        matches!(self, Self::TooManyHeadersInForwardedValues(_))
751    }
752    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyKeyGroupsAssociatedToDistribution`.
753    pub fn is_too_many_key_groups_associated_to_distribution(&self) -> bool {
754        matches!(self, Self::TooManyKeyGroupsAssociatedToDistribution(_))
755    }
756    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyLambdaFunctionAssociations`.
757    pub fn is_too_many_lambda_function_associations(&self) -> bool {
758        matches!(self, Self::TooManyLambdaFunctionAssociations(_))
759    }
760    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyOriginCustomHeaders`.
761    pub fn is_too_many_origin_custom_headers(&self) -> bool {
762        matches!(self, Self::TooManyOriginCustomHeaders(_))
763    }
764    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyOriginGroupsPerDistribution`.
765    pub fn is_too_many_origin_groups_per_distribution(&self) -> bool {
766        matches!(self, Self::TooManyOriginGroupsPerDistribution(_))
767    }
768    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyOrigins`.
769    pub fn is_too_many_origins(&self) -> bool {
770        matches!(self, Self::TooManyOrigins(_))
771    }
772    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyQueryStringParameters`.
773    pub fn is_too_many_query_string_parameters(&self) -> bool {
774        matches!(self, Self::TooManyQueryStringParameters(_))
775    }
776    /// Returns `true` if the error kind is `UpdateDistributionError::TooManyTrustedSigners`.
777    pub fn is_too_many_trusted_signers(&self) -> bool {
778        matches!(self, Self::TooManyTrustedSigners(_))
779    }
780    /// Returns `true` if the error kind is `UpdateDistributionError::TrustedKeyGroupDoesNotExist`.
781    pub fn is_trusted_key_group_does_not_exist(&self) -> bool {
782        matches!(self, Self::TrustedKeyGroupDoesNotExist(_))
783    }
784    /// Returns `true` if the error kind is `UpdateDistributionError::TrustedSignerDoesNotExist`.
785    pub fn is_trusted_signer_does_not_exist(&self) -> bool {
786        matches!(self, Self::TrustedSignerDoesNotExist(_))
787    }
788}
789impl ::std::error::Error for UpdateDistributionError {
790    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
791        match self {
792            Self::AccessDenied(_inner) => ::std::option::Option::Some(_inner),
793            Self::CnameAlreadyExists(_inner) => ::std::option::Option::Some(_inner),
794            Self::ContinuousDeploymentPolicyInUse(_inner) => ::std::option::Option::Some(_inner),
795            Self::EntityNotFound(_inner) => ::std::option::Option::Some(_inner),
796            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => ::std::option::Option::Some(_inner),
797            Self::IllegalOriginAccessConfiguration(_inner) => ::std::option::Option::Some(_inner),
798            Self::IllegalUpdate(_inner) => ::std::option::Option::Some(_inner),
799            Self::InconsistentQuantities(_inner) => ::std::option::Option::Some(_inner),
800            Self::InvalidArgument(_inner) => ::std::option::Option::Some(_inner),
801            Self::InvalidDefaultRootObject(_inner) => ::std::option::Option::Some(_inner),
802            Self::InvalidDomainNameForOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
803            Self::InvalidErrorCode(_inner) => ::std::option::Option::Some(_inner),
804            Self::InvalidForwardCookies(_inner) => ::std::option::Option::Some(_inner),
805            Self::InvalidFunctionAssociation(_inner) => ::std::option::Option::Some(_inner),
806            Self::InvalidGeoRestrictionParameter(_inner) => ::std::option::Option::Some(_inner),
807            Self::InvalidHeadersForS3Origin(_inner) => ::std::option::Option::Some(_inner),
808            Self::InvalidIfMatchVersion(_inner) => ::std::option::Option::Some(_inner),
809            Self::InvalidLambdaFunctionAssociation(_inner) => ::std::option::Option::Some(_inner),
810            Self::InvalidLocationCode(_inner) => ::std::option::Option::Some(_inner),
811            Self::InvalidMinimumProtocolVersion(_inner) => ::std::option::Option::Some(_inner),
812            Self::InvalidOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
813            Self::InvalidOriginAccessIdentity(_inner) => ::std::option::Option::Some(_inner),
814            Self::InvalidOriginKeepaliveTimeout(_inner) => ::std::option::Option::Some(_inner),
815            Self::InvalidOriginReadTimeout(_inner) => ::std::option::Option::Some(_inner),
816            Self::InvalidQueryStringParameters(_inner) => ::std::option::Option::Some(_inner),
817            Self::InvalidRelativePath(_inner) => ::std::option::Option::Some(_inner),
818            Self::InvalidRequiredProtocol(_inner) => ::std::option::Option::Some(_inner),
819            Self::InvalidResponseCode(_inner) => ::std::option::Option::Some(_inner),
820            Self::InvalidTtlOrder(_inner) => ::std::option::Option::Some(_inner),
821            Self::InvalidViewerCertificate(_inner) => ::std::option::Option::Some(_inner),
822            Self::InvalidWebAclId(_inner) => ::std::option::Option::Some(_inner),
823            Self::MissingBody(_inner) => ::std::option::Option::Some(_inner),
824            Self::NoSuchCachePolicy(_inner) => ::std::option::Option::Some(_inner),
825            Self::NoSuchContinuousDeploymentPolicy(_inner) => ::std::option::Option::Some(_inner),
826            Self::NoSuchDistribution(_inner) => ::std::option::Option::Some(_inner),
827            Self::NoSuchFieldLevelEncryptionConfig(_inner) => ::std::option::Option::Some(_inner),
828            Self::NoSuchOrigin(_inner) => ::std::option::Option::Some(_inner),
829            Self::NoSuchOriginRequestPolicy(_inner) => ::std::option::Option::Some(_inner),
830            Self::NoSuchRealtimeLogConfig(_inner) => ::std::option::Option::Some(_inner),
831            Self::NoSuchResponseHeadersPolicy(_inner) => ::std::option::Option::Some(_inner),
832            Self::PreconditionFailed(_inner) => ::std::option::Option::Some(_inner),
833            Self::RealtimeLogConfigOwnerMismatch(_inner) => ::std::option::Option::Some(_inner),
834            Self::StagingDistributionInUse(_inner) => ::std::option::Option::Some(_inner),
835            Self::TooManyCacheBehaviors(_inner) => ::std::option::Option::Some(_inner),
836            Self::TooManyCertificates(_inner) => ::std::option::Option::Some(_inner),
837            Self::TooManyCookieNamesInWhiteList(_inner) => ::std::option::Option::Some(_inner),
838            Self::TooManyDistributionCnamEs(_inner) => ::std::option::Option::Some(_inner),
839            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => ::std::option::Option::Some(_inner),
840            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => ::std::option::Option::Some(_inner),
841            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => ::std::option::Option::Some(_inner),
842            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => ::std::option::Option::Some(_inner),
843            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => ::std::option::Option::Some(_inner),
844            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => ::std::option::Option::Some(_inner),
845            Self::TooManyDistributionsWithFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
846            Self::TooManyDistributionsWithLambdaAssociations(_inner) => ::std::option::Option::Some(_inner),
847            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => ::std::option::Option::Some(_inner),
848            Self::TooManyFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
849            Self::TooManyHeadersInForwardedValues(_inner) => ::std::option::Option::Some(_inner),
850            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => ::std::option::Option::Some(_inner),
851            Self::TooManyLambdaFunctionAssociations(_inner) => ::std::option::Option::Some(_inner),
852            Self::TooManyOriginCustomHeaders(_inner) => ::std::option::Option::Some(_inner),
853            Self::TooManyOriginGroupsPerDistribution(_inner) => ::std::option::Option::Some(_inner),
854            Self::TooManyOrigins(_inner) => ::std::option::Option::Some(_inner),
855            Self::TooManyQueryStringParameters(_inner) => ::std::option::Option::Some(_inner),
856            Self::TooManyTrustedSigners(_inner) => ::std::option::Option::Some(_inner),
857            Self::TrustedKeyGroupDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
858            Self::TrustedSignerDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
859            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
860        }
861    }
862}
863impl ::std::fmt::Display for UpdateDistributionError {
864    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
865        match self {
866            Self::AccessDenied(_inner) => _inner.fmt(f),
867            Self::CnameAlreadyExists(_inner) => _inner.fmt(f),
868            Self::ContinuousDeploymentPolicyInUse(_inner) => _inner.fmt(f),
869            Self::EntityNotFound(_inner) => _inner.fmt(f),
870            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => _inner.fmt(f),
871            Self::IllegalOriginAccessConfiguration(_inner) => _inner.fmt(f),
872            Self::IllegalUpdate(_inner) => _inner.fmt(f),
873            Self::InconsistentQuantities(_inner) => _inner.fmt(f),
874            Self::InvalidArgument(_inner) => _inner.fmt(f),
875            Self::InvalidDefaultRootObject(_inner) => _inner.fmt(f),
876            Self::InvalidDomainNameForOriginAccessControl(_inner) => _inner.fmt(f),
877            Self::InvalidErrorCode(_inner) => _inner.fmt(f),
878            Self::InvalidForwardCookies(_inner) => _inner.fmt(f),
879            Self::InvalidFunctionAssociation(_inner) => _inner.fmt(f),
880            Self::InvalidGeoRestrictionParameter(_inner) => _inner.fmt(f),
881            Self::InvalidHeadersForS3Origin(_inner) => _inner.fmt(f),
882            Self::InvalidIfMatchVersion(_inner) => _inner.fmt(f),
883            Self::InvalidLambdaFunctionAssociation(_inner) => _inner.fmt(f),
884            Self::InvalidLocationCode(_inner) => _inner.fmt(f),
885            Self::InvalidMinimumProtocolVersion(_inner) => _inner.fmt(f),
886            Self::InvalidOriginAccessControl(_inner) => _inner.fmt(f),
887            Self::InvalidOriginAccessIdentity(_inner) => _inner.fmt(f),
888            Self::InvalidOriginKeepaliveTimeout(_inner) => _inner.fmt(f),
889            Self::InvalidOriginReadTimeout(_inner) => _inner.fmt(f),
890            Self::InvalidQueryStringParameters(_inner) => _inner.fmt(f),
891            Self::InvalidRelativePath(_inner) => _inner.fmt(f),
892            Self::InvalidRequiredProtocol(_inner) => _inner.fmt(f),
893            Self::InvalidResponseCode(_inner) => _inner.fmt(f),
894            Self::InvalidTtlOrder(_inner) => _inner.fmt(f),
895            Self::InvalidViewerCertificate(_inner) => _inner.fmt(f),
896            Self::InvalidWebAclId(_inner) => _inner.fmt(f),
897            Self::MissingBody(_inner) => _inner.fmt(f),
898            Self::NoSuchCachePolicy(_inner) => _inner.fmt(f),
899            Self::NoSuchContinuousDeploymentPolicy(_inner) => _inner.fmt(f),
900            Self::NoSuchDistribution(_inner) => _inner.fmt(f),
901            Self::NoSuchFieldLevelEncryptionConfig(_inner) => _inner.fmt(f),
902            Self::NoSuchOrigin(_inner) => _inner.fmt(f),
903            Self::NoSuchOriginRequestPolicy(_inner) => _inner.fmt(f),
904            Self::NoSuchRealtimeLogConfig(_inner) => _inner.fmt(f),
905            Self::NoSuchResponseHeadersPolicy(_inner) => _inner.fmt(f),
906            Self::PreconditionFailed(_inner) => _inner.fmt(f),
907            Self::RealtimeLogConfigOwnerMismatch(_inner) => _inner.fmt(f),
908            Self::StagingDistributionInUse(_inner) => _inner.fmt(f),
909            Self::TooManyCacheBehaviors(_inner) => _inner.fmt(f),
910            Self::TooManyCertificates(_inner) => _inner.fmt(f),
911            Self::TooManyCookieNamesInWhiteList(_inner) => _inner.fmt(f),
912            Self::TooManyDistributionCnamEs(_inner) => _inner.fmt(f),
913            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => _inner.fmt(f),
914            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => _inner.fmt(f),
915            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => _inner.fmt(f),
916            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => _inner.fmt(f),
917            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => _inner.fmt(f),
918            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => _inner.fmt(f),
919            Self::TooManyDistributionsWithFunctionAssociations(_inner) => _inner.fmt(f),
920            Self::TooManyDistributionsWithLambdaAssociations(_inner) => _inner.fmt(f),
921            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => _inner.fmt(f),
922            Self::TooManyFunctionAssociations(_inner) => _inner.fmt(f),
923            Self::TooManyHeadersInForwardedValues(_inner) => _inner.fmt(f),
924            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => _inner.fmt(f),
925            Self::TooManyLambdaFunctionAssociations(_inner) => _inner.fmt(f),
926            Self::TooManyOriginCustomHeaders(_inner) => _inner.fmt(f),
927            Self::TooManyOriginGroupsPerDistribution(_inner) => _inner.fmt(f),
928            Self::TooManyOrigins(_inner) => _inner.fmt(f),
929            Self::TooManyQueryStringParameters(_inner) => _inner.fmt(f),
930            Self::TooManyTrustedSigners(_inner) => _inner.fmt(f),
931            Self::TrustedKeyGroupDoesNotExist(_inner) => _inner.fmt(f),
932            Self::TrustedSignerDoesNotExist(_inner) => _inner.fmt(f),
933            Self::Unhandled(_inner) => {
934                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
935                    write!(f, "unhandled error ({code})")
936                } else {
937                    f.write_str("unhandled error")
938                }
939            }
940        }
941    }
942}
943impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateDistributionError {
944    fn code(&self) -> ::std::option::Option<&str> {
945        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
946    }
947    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
948        ::std::option::Option::None
949    }
950}
951impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateDistributionError {
952    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
953        match self {
954            Self::AccessDenied(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
955            Self::CnameAlreadyExists(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
956            Self::ContinuousDeploymentPolicyInUse(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
957            Self::EntityNotFound(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
958            Self::IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(_inner) => {
959                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
960            }
961            Self::IllegalOriginAccessConfiguration(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
962            Self::IllegalUpdate(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
963            Self::InconsistentQuantities(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
964            Self::InvalidArgument(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
965            Self::InvalidDefaultRootObject(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
966            Self::InvalidDomainNameForOriginAccessControl(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
967            Self::InvalidErrorCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
968            Self::InvalidForwardCookies(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
969            Self::InvalidFunctionAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
970            Self::InvalidGeoRestrictionParameter(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
971            Self::InvalidHeadersForS3Origin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
972            Self::InvalidIfMatchVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
973            Self::InvalidLambdaFunctionAssociation(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
974            Self::InvalidLocationCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
975            Self::InvalidMinimumProtocolVersion(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
976            Self::InvalidOriginAccessControl(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
977            Self::InvalidOriginAccessIdentity(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
978            Self::InvalidOriginKeepaliveTimeout(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
979            Self::InvalidOriginReadTimeout(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
980            Self::InvalidQueryStringParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
981            Self::InvalidRelativePath(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
982            Self::InvalidRequiredProtocol(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
983            Self::InvalidResponseCode(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
984            Self::InvalidTtlOrder(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
985            Self::InvalidViewerCertificate(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
986            Self::InvalidWebAclId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
987            Self::MissingBody(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
988            Self::NoSuchCachePolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
989            Self::NoSuchContinuousDeploymentPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
990            Self::NoSuchDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
991            Self::NoSuchFieldLevelEncryptionConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
992            Self::NoSuchOrigin(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
993            Self::NoSuchOriginRequestPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
994            Self::NoSuchRealtimeLogConfig(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
995            Self::NoSuchResponseHeadersPolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
996            Self::PreconditionFailed(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
997            Self::RealtimeLogConfigOwnerMismatch(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
998            Self::StagingDistributionInUse(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
999            Self::TooManyCacheBehaviors(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1000            Self::TooManyCertificates(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1001            Self::TooManyCookieNamesInWhiteList(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1002            Self::TooManyDistributionCnamEs(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1003            Self::TooManyDistributionsAssociatedToCachePolicy(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1004            Self::TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(_inner) => {
1005                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1006            }
1007            Self::TooManyDistributionsAssociatedToKeyGroup(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1008            Self::TooManyDistributionsAssociatedToOriginAccessControl(_inner) => {
1009                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1010            }
1011            Self::TooManyDistributionsAssociatedToOriginRequestPolicy(_inner) => {
1012                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1013            }
1014            Self::TooManyDistributionsAssociatedToResponseHeadersPolicy(_inner) => {
1015                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
1016            }
1017            Self::TooManyDistributionsWithFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1018            Self::TooManyDistributionsWithLambdaAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1019            Self::TooManyDistributionsWithSingleFunctionArn(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1020            Self::TooManyFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1021            Self::TooManyHeadersInForwardedValues(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1022            Self::TooManyKeyGroupsAssociatedToDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1023            Self::TooManyLambdaFunctionAssociations(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1024            Self::TooManyOriginCustomHeaders(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1025            Self::TooManyOriginGroupsPerDistribution(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1026            Self::TooManyOrigins(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1027            Self::TooManyQueryStringParameters(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1028            Self::TooManyTrustedSigners(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1029            Self::TrustedKeyGroupDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1030            Self::TrustedSignerDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
1031            Self::Unhandled(_inner) => &_inner.meta,
1032        }
1033    }
1034}
1035impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateDistributionError {
1036    fn create_unhandled_error(
1037        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
1038        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
1039    ) -> Self {
1040        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
1041            source,
1042            meta: meta.unwrap_or_default(),
1043        })
1044    }
1045}
1046impl ::aws_types::request_id::RequestId for crate::operation::update_distribution::UpdateDistributionError {
1047    fn request_id(&self) -> Option<&str> {
1048        self.meta().request_id()
1049    }
1050}
1051
1052pub use crate::operation::update_distribution::_update_distribution_input::UpdateDistributionInput;
1053
1054pub use crate::operation::update_distribution::_update_distribution_output::UpdateDistributionOutput;
1055
1056mod _update_distribution_input;
1057
1058mod _update_distribution_output;
1059
1060/// Builders
1061pub mod builders;