Skip to main content

aws_sdk_codedeploy/operation/
create_deployment_group.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `CreateDeploymentGroup`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CreateDeploymentGroup;
6impl CreateDeploymentGroup {
7    /// Creates a new `CreateDeploymentGroup`
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_deployment_group::CreateDeploymentGroupInput,
14    ) -> ::std::result::Result<
15        crate::operation::create_deployment_group::CreateDeploymentGroupOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::create_deployment_group::CreateDeploymentGroupError,
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_deployment_group::CreateDeploymentGroupError>()
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_deployment_group::CreateDeploymentGroupOutput>()
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_deployment_group::CreateDeploymentGroupInput,
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("CodeDeploy", "CreateDeploymentGroup", 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                "CodeDeploy.CreateDeploymentGroup",
59                "rpc.service" = "CodeDeploy",
60                "rpc.method" = "CreateDeploymentGroup",
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 CreateDeploymentGroup {
88    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateDeploymentGroup");
90
91        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92            CreateDeploymentGroupRequestSerializer,
93        ));
94        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95            CreateDeploymentGroupResponseDeserializer,
96        ));
97
98        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99            crate::config::auth::Params::builder()
100                .operation_name("CreateDeploymentGroup")
101                .build()
102                .expect("required fields set"),
103        ));
104
105        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
106            "CreateDeploymentGroup",
107            "CodeDeploy",
108        ));
109        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
110        signing_options.double_uri_encode = true;
111        signing_options.content_sha256_header = false;
112        signing_options.normalize_uri_path = true;
113        signing_options.payload_override = None;
114
115        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
116            signing_options,
117            ..::std::default::Default::default()
118        });
119
120        ::std::option::Option::Some(cfg.freeze())
121    }
122
123    fn runtime_components(
124        &self,
125        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
126    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
127        #[allow(unused_mut)]
128        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateDeploymentGroup")
129            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
130                CreateDeploymentGroupTelemetryInputCaptureInterceptor,
131            ))
132            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
133                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
134            ))
135            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
136                CreateDeploymentGroupEndpointParamsInterceptor,
137            ))
138            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
139                crate::operation::create_deployment_group::CreateDeploymentGroupError,
140            >::new())
141            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
142                crate::operation::create_deployment_group::CreateDeploymentGroupError,
143            >::new())
144            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
145                crate::operation::create_deployment_group::CreateDeploymentGroupError,
146            >::new());
147
148        ::std::borrow::Cow::Owned(rcb)
149    }
150}
151
152#[derive(Debug)]
153struct CreateDeploymentGroupTelemetryInputCaptureInterceptor;
154
155#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
156impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDeploymentGroupTelemetryInputCaptureInterceptor {
157    fn name(&self) -> &'static str {
158        "CreateDeploymentGroupTelemetryInputCaptureInterceptor"
159    }
160
161    fn read_before_execution(
162        &self,
163        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
164            '_,
165            ::aws_smithy_runtime_api::client::interceptors::context::Input,
166            ::aws_smithy_runtime_api::client::interceptors::context::Output,
167            ::aws_smithy_runtime_api::client::interceptors::context::Error,
168        >,
169        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
170    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
171        // Nothing to do unless the customer opted in by naming members to record.
172        let ::std::option::Option::Some(requested) = cfg
173            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
174            .filter(|r| !r.is_empty())
175        else {
176            return ::std::result::Result::Ok(());
177        };
178
179        let ::std::option::Option::Some(input) = context.input().downcast_ref::<CreateDeploymentGroupInput>() else {
180            // A mismatched input is not this interceptor's concern; skip quietly.
181            return ::std::result::Result::Ok(());
182        };
183
184        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
185        if requested.should_capture("applicationName") {
186            if let ::std::option::Option::Some(value) = input.application_name.as_deref() {
187                captured.insert("applicationName", value);
188            }
189        }
190        if requested.should_capture("deploymentGroupName") {
191            if let ::std::option::Option::Some(value) = input.deployment_group_name.as_deref() {
192                captured.insert("deploymentGroupName", value);
193            }
194        }
195        if requested.should_capture("deploymentConfigName") {
196            if let ::std::option::Option::Some(value) = input.deployment_config_name.as_deref() {
197                captured.insert("deploymentConfigName", value);
198            }
199        }
200        if requested.should_capture("serviceRoleArn") {
201            if let ::std::option::Option::Some(value) = input.service_role_arn.as_deref() {
202                captured.insert("serviceRoleArn", value);
203            }
204        }
205
206        cfg.interceptor_state().store_put(captured);
207        ::std::result::Result::Ok(())
208    }
209}
210#[derive(Debug)]
211struct CreateDeploymentGroupResponseDeserializer;
212impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateDeploymentGroupResponseDeserializer {
213    fn deserialize_nonstreaming_with_config(
214        &self,
215        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
216        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
217    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
218        let (success, status) = (response.status().is_success(), response.status().as_u16());
219        let headers = response.headers();
220        let body = response.body().bytes().expect("body loaded");
221        #[allow(unused_mut)]
222        let mut force_error = false;
223        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
224        let parse_result = if !success && status != 200 || force_error {
225            crate::protocol_serde::shape_create_deployment_group::de_create_deployment_group_http_error(status, headers, body)
226        } else {
227            crate::protocol_serde::shape_create_deployment_group::de_create_deployment_group_http_response(status, headers, body)
228        };
229        crate::protocol_serde::type_erase_result(parse_result)
230    }
231}
232#[derive(Debug)]
233struct CreateDeploymentGroupRequestSerializer;
234impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateDeploymentGroupRequestSerializer {
235    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
236    fn serialize_input(
237        &self,
238        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
239        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
240    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
241        let input = input
242            .downcast::<crate::operation::create_deployment_group::CreateDeploymentGroupInput>()
243            .expect("correct type");
244        let _header_serialization_settings = _cfg
245            .load::<crate::serialization_settings::HeaderSerializationSettings>()
246            .cloned()
247            .unwrap_or_default();
248        let mut request_builder = {
249            #[allow(clippy::uninlined_format_args)]
250            fn uri_base(
251                _input: &crate::operation::create_deployment_group::CreateDeploymentGroupInput,
252                output: &mut ::std::string::String,
253            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
254                use ::std::fmt::Write as _;
255                ::std::write!(output, "/").expect("formatting should succeed");
256                ::std::result::Result::Ok(())
257            }
258            #[allow(clippy::unnecessary_wraps)]
259            fn update_http_builder(
260                input: &crate::operation::create_deployment_group::CreateDeploymentGroupInput,
261                builder: ::http_1x::request::Builder,
262            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
263                let mut uri = ::std::string::String::new();
264                uri_base(input, &mut uri)?;
265                ::std::result::Result::Ok(builder.method("POST").uri(uri))
266            }
267            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
268            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
269            builder = _header_serialization_settings.set_default_header(
270                builder,
271                ::http_1x::header::HeaderName::from_static("x-amz-target"),
272                "CodeDeploy_20141006.CreateDeploymentGroup",
273            );
274            builder
275        };
276        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_deployment_group::ser_create_deployment_group_input(
277            &input,
278        )?);
279        if let Some(content_length) = body.content_length() {
280            let content_length = content_length.to_string();
281            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
282        }
283        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
284    }
285}
286#[derive(Debug)]
287struct CreateDeploymentGroupEndpointParamsInterceptor;
288
289#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
290impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDeploymentGroupEndpointParamsInterceptor {
291    fn name(&self) -> &'static str {
292        "CreateDeploymentGroupEndpointParamsInterceptor"
293    }
294
295    fn read_before_execution(
296        &self,
297        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
298            '_,
299            ::aws_smithy_runtime_api::client::interceptors::context::Input,
300            ::aws_smithy_runtime_api::client::interceptors::context::Output,
301            ::aws_smithy_runtime_api::client::interceptors::context::Error,
302        >,
303        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
304    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
305        let _input = context
306            .input()
307            .downcast_ref::<CreateDeploymentGroupInput>()
308            .ok_or("failed to downcast to CreateDeploymentGroupInput")?;
309
310        let params = crate::config::endpoint::Params::builder()
311            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
312            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
313            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
314            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
315            .build()
316            .map_err(|err| {
317                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
318            })?;
319        cfg.interceptor_state()
320            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
321        ::std::result::Result::Ok(())
322    }
323}
324
325// The get_* functions below are generated from JMESPath expressions in the
326// operationContextParams trait. They target the operation's input shape.
327
328/// Error type for the `CreateDeploymentGroupError` operation.
329#[non_exhaustive]
330#[derive(::std::fmt::Debug)]
331pub enum CreateDeploymentGroupError {
332    /// <p>The maximum number of alarms for a deployment group (10) was exceeded.</p>
333    AlarmsLimitExceededException(crate::types::error::AlarmsLimitExceededException),
334    /// <p>The application does not exist with the user or Amazon Web Services account.</p>
335    ApplicationDoesNotExistException(crate::types::error::ApplicationDoesNotExistException),
336    /// <p>The minimum number of required application names was not specified.</p>
337    ApplicationNameRequiredException(crate::types::error::ApplicationNameRequiredException),
338    /// <p>The deployment configuration does not exist with the user or Amazon Web Services account.</p>
339    DeploymentConfigDoesNotExistException(crate::types::error::DeploymentConfigDoesNotExistException),
340    /// <p>A deployment group with the specified name with the user or Amazon Web Services account already exists.</p>
341    DeploymentGroupAlreadyExistsException(crate::types::error::DeploymentGroupAlreadyExistsException),
342    /// <p>The deployment groups limit was exceeded.</p>
343    DeploymentGroupLimitExceededException(crate::types::error::DeploymentGroupLimitExceededException),
344    /// <p>The deployment group name was not specified.</p>
345    DeploymentGroupNameRequiredException(crate::types::error::DeploymentGroupNameRequiredException),
346    /// <p>The Amazon ECS service is associated with more than one deployment groups. An Amazon ECS service can be associated with only one deployment group.</p>
347    EcsServiceMappingLimitExceededException(crate::types::error::EcsServiceMappingLimitExceededException),
348    /// <p>The format of the alarm configuration is invalid. Possible causes include:</p>
349    /// <ul>
350    /// <li>
351    /// <p>The alarm list is null.</p></li>
352    /// <li>
353    /// <p>The alarm object is null.</p></li>
354    /// <li>
355    /// <p>The alarm name is empty or null or exceeds the limit of 255 characters.</p></li>
356    /// <li>
357    /// <p>Two alarms with the same name have been specified.</p></li>
358    /// <li>
359    /// <p>The alarm configuration is enabled, but the alarm list is empty.</p></li>
360    /// </ul>
361    InvalidAlarmConfigException(crate::types::error::InvalidAlarmConfigException),
362    /// <p>The application name was specified in an invalid format.</p>
363    InvalidApplicationNameException(crate::types::error::InvalidApplicationNameException),
364    /// <p>The automatic rollback configuration was specified in an invalid format. For example, automatic rollback is enabled, but an invalid triggering event type or no event types were listed.</p>
365    InvalidAutoRollbackConfigException(crate::types::error::InvalidAutoRollbackConfigException),
366    /// <p>The Auto Scaling group was specified in an invalid format or does not exist.</p>
367    InvalidAutoScalingGroupException(crate::types::error::InvalidAutoScalingGroupException),
368    /// <p>The configuration for the blue/green deployment group was provided in an invalid format. For information about deployment configuration format, see <code>CreateDeploymentConfig</code>.</p>
369    InvalidBlueGreenDeploymentConfigurationException(crate::types::error::InvalidBlueGreenDeploymentConfigurationException),
370    /// <p>The deployment configuration name was specified in an invalid format.</p>
371    InvalidDeploymentConfigNameException(crate::types::error::InvalidDeploymentConfigNameException),
372    /// <p>The deployment group name was specified in an invalid format.</p>
373    InvalidDeploymentGroupNameException(crate::types::error::InvalidDeploymentGroupNameException),
374    /// <p>An invalid deployment style was specified. Valid deployment types include "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" and "WITHOUT_TRAFFIC_CONTROL."</p>
375    InvalidDeploymentStyleException(crate::types::error::InvalidDeploymentStyleException),
376    /// <p>A call was submitted that specified both Ec2TagFilters and Ec2TagSet, but only one of these data types can be used in a single call.</p>
377    InvalidEc2TagCombinationException(crate::types::error::InvalidEc2TagCombinationException),
378    /// <p>The tag was specified in an invalid format.</p>
379    InvalidEc2TagException(crate::types::error::InvalidEc2TagException),
380    /// <p>The Amazon ECS service identifier is not valid.</p>
381    InvalidEcsServiceException(crate::types::error::InvalidEcsServiceException),
382    /// <p>The input was specified in an invalid format.</p>
383    InvalidInputException(crate::types::error::InvalidInputException),
384    /// <p>An invalid load balancer name, or no load balancer name, was specified.</p>
385    InvalidLoadBalancerInfoException(crate::types::error::InvalidLoadBalancerInfoException),
386    /// <p>A call was submitted that specified both OnPremisesTagFilters and OnPremisesTagSet, but only one of these data types can be used in a single call.</p>
387    InvalidOnPremisesTagCombinationException(crate::types::error::InvalidOnPremisesTagCombinationException),
388    /// <p>The service role ARN was specified in an invalid format. Or, if an Auto Scaling group was specified, the specified service role does not grant the appropriate permissions to Amazon EC2 Auto Scaling.</p>
389    InvalidRoleException(crate::types::error::InvalidRoleException),
390    /// <p>The tag was specified in an invalid format.</p>
391    InvalidTagException(crate::types::error::InvalidTagException),
392    /// <p>The specified tags are not valid.</p>
393    InvalidTagsToAddException(crate::types::error::InvalidTagsToAddException),
394    /// <p>A target group pair associated with this deployment is not valid.</p>
395    InvalidTargetGroupPairException(crate::types::error::InvalidTargetGroupPairException),
396    /// <p>The configuration that specifies how traffic is routed during a deployment is invalid.</p>
397    InvalidTrafficRoutingConfigurationException(crate::types::error::InvalidTrafficRoutingConfigurationException),
398    /// <p>The trigger was specified in an invalid format.</p>
399    InvalidTriggerConfigException(crate::types::error::InvalidTriggerConfigException),
400    /// <p>The limit for lifecycle hooks was exceeded.</p>
401    LifecycleHookLimitExceededException(crate::types::error::LifecycleHookLimitExceededException),
402    /// <p>The role ID was not specified.</p>
403    RoleRequiredException(crate::types::error::RoleRequiredException),
404    /// <p>The number of tag groups included in the tag set list exceeded the maximum allowed limit of 3.</p>
405    TagSetListLimitExceededException(crate::types::error::TagSetListLimitExceededException),
406    /// <p>An API function was called too frequently.</p>
407    ThrottlingException(crate::types::error::ThrottlingException),
408    /// <p>The maximum allowed number of triggers was exceeded.</p>
409    TriggerTargetsLimitExceededException(crate::types::error::TriggerTargetsLimitExceededException),
410    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
411    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
412    variable wildcard pattern and check `.code()`:
413     \
414    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
415     \
416    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateDeploymentGroupError) for what information is available for the error.")]
417    Unhandled(crate::error::sealed_unhandled::Unhandled),
418}
419impl CreateDeploymentGroupError {
420    /// Creates the `CreateDeploymentGroupError::Unhandled` variant from any error type.
421    pub fn unhandled(
422        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
423    ) -> Self {
424        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
425            source: err.into(),
426            meta: ::std::default::Default::default(),
427        })
428    }
429
430    /// Creates the `CreateDeploymentGroupError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
431    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
432        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
433            source: err.clone().into(),
434            meta: err,
435        })
436    }
437    ///
438    /// Returns error metadata, which includes the error code, message,
439    /// request ID, and potentially additional information.
440    ///
441    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
442        match self {
443            Self::AlarmsLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
444            Self::ApplicationDoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
445            Self::ApplicationNameRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
446            Self::DeploymentConfigDoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
447            Self::DeploymentGroupAlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
448            Self::DeploymentGroupLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
449            Self::DeploymentGroupNameRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
450            Self::EcsServiceMappingLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
451            Self::InvalidAlarmConfigException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
452            Self::InvalidApplicationNameException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
453            Self::InvalidAutoRollbackConfigException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
454            Self::InvalidAutoScalingGroupException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
455            Self::InvalidBlueGreenDeploymentConfigurationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
456            Self::InvalidDeploymentConfigNameException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
457            Self::InvalidDeploymentGroupNameException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
458            Self::InvalidDeploymentStyleException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
459            Self::InvalidEc2TagCombinationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
460            Self::InvalidEc2TagException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
461            Self::InvalidEcsServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
462            Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
463            Self::InvalidLoadBalancerInfoException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
464            Self::InvalidOnPremisesTagCombinationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
465            Self::InvalidRoleException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
466            Self::InvalidTagException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
467            Self::InvalidTagsToAddException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
468            Self::InvalidTargetGroupPairException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
469            Self::InvalidTrafficRoutingConfigurationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
470            Self::InvalidTriggerConfigException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
471            Self::LifecycleHookLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
472            Self::RoleRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
473            Self::TagSetListLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
474            Self::ThrottlingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
475            Self::TriggerTargetsLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
476            Self::Unhandled(e) => &e.meta,
477        }
478    }
479    /// Returns `true` if the error kind is `CreateDeploymentGroupError::AlarmsLimitExceededException`.
480    pub fn is_alarms_limit_exceeded_exception(&self) -> bool {
481        matches!(self, Self::AlarmsLimitExceededException(_))
482    }
483    /// Returns `true` if the error kind is `CreateDeploymentGroupError::ApplicationDoesNotExistException`.
484    pub fn is_application_does_not_exist_exception(&self) -> bool {
485        matches!(self, Self::ApplicationDoesNotExistException(_))
486    }
487    /// Returns `true` if the error kind is `CreateDeploymentGroupError::ApplicationNameRequiredException`.
488    pub fn is_application_name_required_exception(&self) -> bool {
489        matches!(self, Self::ApplicationNameRequiredException(_))
490    }
491    /// Returns `true` if the error kind is `CreateDeploymentGroupError::DeploymentConfigDoesNotExistException`.
492    pub fn is_deployment_config_does_not_exist_exception(&self) -> bool {
493        matches!(self, Self::DeploymentConfigDoesNotExistException(_))
494    }
495    /// Returns `true` if the error kind is `CreateDeploymentGroupError::DeploymentGroupAlreadyExistsException`.
496    pub fn is_deployment_group_already_exists_exception(&self) -> bool {
497        matches!(self, Self::DeploymentGroupAlreadyExistsException(_))
498    }
499    /// Returns `true` if the error kind is `CreateDeploymentGroupError::DeploymentGroupLimitExceededException`.
500    pub fn is_deployment_group_limit_exceeded_exception(&self) -> bool {
501        matches!(self, Self::DeploymentGroupLimitExceededException(_))
502    }
503    /// Returns `true` if the error kind is `CreateDeploymentGroupError::DeploymentGroupNameRequiredException`.
504    pub fn is_deployment_group_name_required_exception(&self) -> bool {
505        matches!(self, Self::DeploymentGroupNameRequiredException(_))
506    }
507    /// Returns `true` if the error kind is `CreateDeploymentGroupError::EcsServiceMappingLimitExceededException`.
508    pub fn is_ecs_service_mapping_limit_exceeded_exception(&self) -> bool {
509        matches!(self, Self::EcsServiceMappingLimitExceededException(_))
510    }
511    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidAlarmConfigException`.
512    pub fn is_invalid_alarm_config_exception(&self) -> bool {
513        matches!(self, Self::InvalidAlarmConfigException(_))
514    }
515    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidApplicationNameException`.
516    pub fn is_invalid_application_name_exception(&self) -> bool {
517        matches!(self, Self::InvalidApplicationNameException(_))
518    }
519    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidAutoRollbackConfigException`.
520    pub fn is_invalid_auto_rollback_config_exception(&self) -> bool {
521        matches!(self, Self::InvalidAutoRollbackConfigException(_))
522    }
523    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidAutoScalingGroupException`.
524    pub fn is_invalid_auto_scaling_group_exception(&self) -> bool {
525        matches!(self, Self::InvalidAutoScalingGroupException(_))
526    }
527    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidBlueGreenDeploymentConfigurationException`.
528    pub fn is_invalid_blue_green_deployment_configuration_exception(&self) -> bool {
529        matches!(self, Self::InvalidBlueGreenDeploymentConfigurationException(_))
530    }
531    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidDeploymentConfigNameException`.
532    pub fn is_invalid_deployment_config_name_exception(&self) -> bool {
533        matches!(self, Self::InvalidDeploymentConfigNameException(_))
534    }
535    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidDeploymentGroupNameException`.
536    pub fn is_invalid_deployment_group_name_exception(&self) -> bool {
537        matches!(self, Self::InvalidDeploymentGroupNameException(_))
538    }
539    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidDeploymentStyleException`.
540    pub fn is_invalid_deployment_style_exception(&self) -> bool {
541        matches!(self, Self::InvalidDeploymentStyleException(_))
542    }
543    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidEc2TagCombinationException`.
544    pub fn is_invalid_ec2_tag_combination_exception(&self) -> bool {
545        matches!(self, Self::InvalidEc2TagCombinationException(_))
546    }
547    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidEc2TagException`.
548    pub fn is_invalid_ec2_tag_exception(&self) -> bool {
549        matches!(self, Self::InvalidEc2TagException(_))
550    }
551    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidEcsServiceException`.
552    pub fn is_invalid_ecs_service_exception(&self) -> bool {
553        matches!(self, Self::InvalidEcsServiceException(_))
554    }
555    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidInputException`.
556    pub fn is_invalid_input_exception(&self) -> bool {
557        matches!(self, Self::InvalidInputException(_))
558    }
559    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidLoadBalancerInfoException`.
560    pub fn is_invalid_load_balancer_info_exception(&self) -> bool {
561        matches!(self, Self::InvalidLoadBalancerInfoException(_))
562    }
563    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidOnPremisesTagCombinationException`.
564    pub fn is_invalid_on_premises_tag_combination_exception(&self) -> bool {
565        matches!(self, Self::InvalidOnPremisesTagCombinationException(_))
566    }
567    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidRoleException`.
568    pub fn is_invalid_role_exception(&self) -> bool {
569        matches!(self, Self::InvalidRoleException(_))
570    }
571    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidTagException`.
572    pub fn is_invalid_tag_exception(&self) -> bool {
573        matches!(self, Self::InvalidTagException(_))
574    }
575    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidTagsToAddException`.
576    pub fn is_invalid_tags_to_add_exception(&self) -> bool {
577        matches!(self, Self::InvalidTagsToAddException(_))
578    }
579    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidTargetGroupPairException`.
580    pub fn is_invalid_target_group_pair_exception(&self) -> bool {
581        matches!(self, Self::InvalidTargetGroupPairException(_))
582    }
583    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidTrafficRoutingConfigurationException`.
584    pub fn is_invalid_traffic_routing_configuration_exception(&self) -> bool {
585        matches!(self, Self::InvalidTrafficRoutingConfigurationException(_))
586    }
587    /// Returns `true` if the error kind is `CreateDeploymentGroupError::InvalidTriggerConfigException`.
588    pub fn is_invalid_trigger_config_exception(&self) -> bool {
589        matches!(self, Self::InvalidTriggerConfigException(_))
590    }
591    /// Returns `true` if the error kind is `CreateDeploymentGroupError::LifecycleHookLimitExceededException`.
592    pub fn is_lifecycle_hook_limit_exceeded_exception(&self) -> bool {
593        matches!(self, Self::LifecycleHookLimitExceededException(_))
594    }
595    /// Returns `true` if the error kind is `CreateDeploymentGroupError::RoleRequiredException`.
596    pub fn is_role_required_exception(&self) -> bool {
597        matches!(self, Self::RoleRequiredException(_))
598    }
599    /// Returns `true` if the error kind is `CreateDeploymentGroupError::TagSetListLimitExceededException`.
600    pub fn is_tag_set_list_limit_exceeded_exception(&self) -> bool {
601        matches!(self, Self::TagSetListLimitExceededException(_))
602    }
603    /// Returns `true` if the error kind is `CreateDeploymentGroupError::ThrottlingException`.
604    pub fn is_throttling_exception(&self) -> bool {
605        matches!(self, Self::ThrottlingException(_))
606    }
607    /// Returns `true` if the error kind is `CreateDeploymentGroupError::TriggerTargetsLimitExceededException`.
608    pub fn is_trigger_targets_limit_exceeded_exception(&self) -> bool {
609        matches!(self, Self::TriggerTargetsLimitExceededException(_))
610    }
611}
612impl ::std::error::Error for CreateDeploymentGroupError {
613    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
614        match self {
615            Self::AlarmsLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
616            Self::ApplicationDoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
617            Self::ApplicationNameRequiredException(_inner) => ::std::option::Option::Some(_inner),
618            Self::DeploymentConfigDoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
619            Self::DeploymentGroupAlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
620            Self::DeploymentGroupLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
621            Self::DeploymentGroupNameRequiredException(_inner) => ::std::option::Option::Some(_inner),
622            Self::EcsServiceMappingLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
623            Self::InvalidAlarmConfigException(_inner) => ::std::option::Option::Some(_inner),
624            Self::InvalidApplicationNameException(_inner) => ::std::option::Option::Some(_inner),
625            Self::InvalidAutoRollbackConfigException(_inner) => ::std::option::Option::Some(_inner),
626            Self::InvalidAutoScalingGroupException(_inner) => ::std::option::Option::Some(_inner),
627            Self::InvalidBlueGreenDeploymentConfigurationException(_inner) => ::std::option::Option::Some(_inner),
628            Self::InvalidDeploymentConfigNameException(_inner) => ::std::option::Option::Some(_inner),
629            Self::InvalidDeploymentGroupNameException(_inner) => ::std::option::Option::Some(_inner),
630            Self::InvalidDeploymentStyleException(_inner) => ::std::option::Option::Some(_inner),
631            Self::InvalidEc2TagCombinationException(_inner) => ::std::option::Option::Some(_inner),
632            Self::InvalidEc2TagException(_inner) => ::std::option::Option::Some(_inner),
633            Self::InvalidEcsServiceException(_inner) => ::std::option::Option::Some(_inner),
634            Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
635            Self::InvalidLoadBalancerInfoException(_inner) => ::std::option::Option::Some(_inner),
636            Self::InvalidOnPremisesTagCombinationException(_inner) => ::std::option::Option::Some(_inner),
637            Self::InvalidRoleException(_inner) => ::std::option::Option::Some(_inner),
638            Self::InvalidTagException(_inner) => ::std::option::Option::Some(_inner),
639            Self::InvalidTagsToAddException(_inner) => ::std::option::Option::Some(_inner),
640            Self::InvalidTargetGroupPairException(_inner) => ::std::option::Option::Some(_inner),
641            Self::InvalidTrafficRoutingConfigurationException(_inner) => ::std::option::Option::Some(_inner),
642            Self::InvalidTriggerConfigException(_inner) => ::std::option::Option::Some(_inner),
643            Self::LifecycleHookLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
644            Self::RoleRequiredException(_inner) => ::std::option::Option::Some(_inner),
645            Self::TagSetListLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
646            Self::ThrottlingException(_inner) => ::std::option::Option::Some(_inner),
647            Self::TriggerTargetsLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
648            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
649        }
650    }
651}
652impl ::std::fmt::Display for CreateDeploymentGroupError {
653    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
654        match self {
655            Self::AlarmsLimitExceededException(_inner) => _inner.fmt(f),
656            Self::ApplicationDoesNotExistException(_inner) => _inner.fmt(f),
657            Self::ApplicationNameRequiredException(_inner) => _inner.fmt(f),
658            Self::DeploymentConfigDoesNotExistException(_inner) => _inner.fmt(f),
659            Self::DeploymentGroupAlreadyExistsException(_inner) => _inner.fmt(f),
660            Self::DeploymentGroupLimitExceededException(_inner) => _inner.fmt(f),
661            Self::DeploymentGroupNameRequiredException(_inner) => _inner.fmt(f),
662            Self::EcsServiceMappingLimitExceededException(_inner) => _inner.fmt(f),
663            Self::InvalidAlarmConfigException(_inner) => _inner.fmt(f),
664            Self::InvalidApplicationNameException(_inner) => _inner.fmt(f),
665            Self::InvalidAutoRollbackConfigException(_inner) => _inner.fmt(f),
666            Self::InvalidAutoScalingGroupException(_inner) => _inner.fmt(f),
667            Self::InvalidBlueGreenDeploymentConfigurationException(_inner) => _inner.fmt(f),
668            Self::InvalidDeploymentConfigNameException(_inner) => _inner.fmt(f),
669            Self::InvalidDeploymentGroupNameException(_inner) => _inner.fmt(f),
670            Self::InvalidDeploymentStyleException(_inner) => _inner.fmt(f),
671            Self::InvalidEc2TagCombinationException(_inner) => _inner.fmt(f),
672            Self::InvalidEc2TagException(_inner) => _inner.fmt(f),
673            Self::InvalidEcsServiceException(_inner) => _inner.fmt(f),
674            Self::InvalidInputException(_inner) => _inner.fmt(f),
675            Self::InvalidLoadBalancerInfoException(_inner) => _inner.fmt(f),
676            Self::InvalidOnPremisesTagCombinationException(_inner) => _inner.fmt(f),
677            Self::InvalidRoleException(_inner) => _inner.fmt(f),
678            Self::InvalidTagException(_inner) => _inner.fmt(f),
679            Self::InvalidTagsToAddException(_inner) => _inner.fmt(f),
680            Self::InvalidTargetGroupPairException(_inner) => _inner.fmt(f),
681            Self::InvalidTrafficRoutingConfigurationException(_inner) => _inner.fmt(f),
682            Self::InvalidTriggerConfigException(_inner) => _inner.fmt(f),
683            Self::LifecycleHookLimitExceededException(_inner) => _inner.fmt(f),
684            Self::RoleRequiredException(_inner) => _inner.fmt(f),
685            Self::TagSetListLimitExceededException(_inner) => _inner.fmt(f),
686            Self::ThrottlingException(_inner) => _inner.fmt(f),
687            Self::TriggerTargetsLimitExceededException(_inner) => _inner.fmt(f),
688            Self::Unhandled(_inner) => {
689                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
690                    write!(f, "unhandled error ({code})")
691                } else {
692                    f.write_str("unhandled error")
693                }
694            }
695        }
696    }
697}
698impl ::aws_smithy_types::retry::ProvideErrorKind for CreateDeploymentGroupError {
699    fn code(&self) -> ::std::option::Option<&str> {
700        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
701    }
702    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
703        ::std::option::Option::None
704    }
705}
706impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateDeploymentGroupError {
707    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
708        match self {
709            Self::AlarmsLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
710            Self::ApplicationDoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
711            Self::ApplicationNameRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
712            Self::DeploymentConfigDoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
713            Self::DeploymentGroupAlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
714            Self::DeploymentGroupLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
715            Self::DeploymentGroupNameRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
716            Self::EcsServiceMappingLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
717            Self::InvalidAlarmConfigException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
718            Self::InvalidApplicationNameException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
719            Self::InvalidAutoRollbackConfigException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
720            Self::InvalidAutoScalingGroupException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
721            Self::InvalidBlueGreenDeploymentConfigurationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
722            Self::InvalidDeploymentConfigNameException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
723            Self::InvalidDeploymentGroupNameException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
724            Self::InvalidDeploymentStyleException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
725            Self::InvalidEc2TagCombinationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
726            Self::InvalidEc2TagException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
727            Self::InvalidEcsServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
728            Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
729            Self::InvalidLoadBalancerInfoException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
730            Self::InvalidOnPremisesTagCombinationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
731            Self::InvalidRoleException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
732            Self::InvalidTagException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
733            Self::InvalidTagsToAddException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
734            Self::InvalidTargetGroupPairException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
735            Self::InvalidTrafficRoutingConfigurationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
736            Self::InvalidTriggerConfigException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
737            Self::LifecycleHookLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
738            Self::RoleRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
739            Self::TagSetListLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
740            Self::ThrottlingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
741            Self::TriggerTargetsLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
742            Self::Unhandled(_inner) => &_inner.meta,
743        }
744    }
745}
746impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateDeploymentGroupError {
747    fn create_unhandled_error(
748        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
749        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
750    ) -> Self {
751        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
752            source,
753            meta: meta.unwrap_or_default(),
754        })
755    }
756}
757impl ::aws_types::request_id::RequestId for crate::operation::create_deployment_group::CreateDeploymentGroupError {
758    fn request_id(&self) -> Option<&str> {
759        self.meta().request_id()
760    }
761}
762
763pub use crate::operation::create_deployment_group::_create_deployment_group_input::CreateDeploymentGroupInput;
764
765pub use crate::operation::create_deployment_group::_create_deployment_group_output::CreateDeploymentGroupOutput;
766
767mod _create_deployment_group_input;
768
769mod _create_deployment_group_output;
770
771/// Builders
772pub mod builders;