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