aws_sdk_cloudfront/operation/
create_distribution.rs

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