AWS SDK

AWS SDK

rev. 3388bf5e18f4269f2b46f39cdc814c5c39d413d0

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_association/_update_association_output.rs

@@ -0,1 +0,186 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct UpdateAssociationOutput {
           6  +
    /// <p>The description of the association that was updated.</p>
           7  +
    pub association_description: ::std::option::Option<crate::types::AssociationDescription>,
           8  +
    _request_id: Option<String>,
           9  +
}
          10  +
impl UpdateAssociationOutput {
          11  +
    /// <p>The description of the association that was updated.</p>
          12  +
    pub fn association_description(&self) -> ::std::option::Option<&crate::types::AssociationDescription> {
          13  +
        self.association_description.as_ref()
          14  +
    }
          15  +
}
          16  +
static UPDATEASSOCIATIONOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          17  +
    ::aws_smithy_schema::ShapeId::from_parts(
          18  +
        "com.amazonaws.ssm.synthetic#UpdateAssociationOutput$AssociationDescription",
          19  +
        "com.amazonaws.ssm.synthetic",
          20  +
        "UpdateAssociationOutput",
          21  +
    ),
          22  +
    ::aws_smithy_schema::ShapeType::Structure,
          23  +
    "AssociationDescription",
          24  +
    0,
          25  +
);
          26  +
static UPDATEASSOCIATIONOUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          27  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          28  +
    ::aws_smithy_schema::ShapeType::String,
          29  +
    "request_id",
          30  +
    1,
          31  +
)
          32  +
.with_http_header("x-amzn-requestid");
          33  +
static UPDATEASSOCIATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          34  +
    ::aws_smithy_schema::ShapeId::from_parts(
          35  +
        "com.amazonaws.ssm.synthetic#UpdateAssociationOutput",
          36  +
        "com.amazonaws.ssm.synthetic",
          37  +
        "UpdateAssociationOutput",
          38  +
    ),
          39  +
    ::aws_smithy_schema::ShapeType::Structure,
          40  +
    &[
          41  +
        &UPDATEASSOCIATIONOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION,
          42  +
        &UPDATEASSOCIATIONOUTPUT_MEMBER__REQUEST_ID,
          43  +
    ],
          44  +
)
          45  +
.with_original_name("UpdateAssociationResult");
          46  +
impl UpdateAssociationOutput {
          47  +
    /// The schema for this shape.
          48  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATEASSOCIATIONOUTPUT_SCHEMA;
          49  +
}
          50  +
impl ::aws_smithy_schema::serde::SerializableStruct for UpdateAssociationOutput {
          51  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          52  +
    fn serialize_members(
          53  +
        &self,
          54  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          55  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          56  +
        if let Some(ref val) = self.association_description {
          57  +
            ser.write_struct(&UPDATEASSOCIATIONOUTPUT_MEMBER_ASSOCIATION_DESCRIPTION, val)?;
          58  +
        }
          59  +
        Ok(())
          60  +
    }
          61  +
}
          62  +
impl UpdateAssociationOutput {
          63  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          64  +
    pub fn deserialize(
          65  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          66  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          67  +
        #[allow(unused_variables, unused_mut)]
          68  +
        let mut builder = Self::builder();
          69  +
        #[allow(
          70  +
            unused_variables,
          71  +
            unreachable_code,
          72  +
            clippy::single_match,
          73  +
            clippy::match_single_binding,
          74  +
            clippy::diverging_sub_expression
          75  +
        )]
          76  +
        deserializer.read_struct(&UPDATEASSOCIATIONOUTPUT_SCHEMA, &mut |member, deser| {
          77  +
            match member.member_index() {
          78  +
                Some(0) => {
          79  +
                    if deser.is_null() {
          80  +
                        deser.read_null()?;
          81  +
                    } else {
          82  +
                        builder.association_description = Some(crate::types::AssociationDescription::deserialize(deser)?);
          83  +
                    }
          84  +
                }
          85  +
                Some(1) => {
          86  +
                    builder._request_id = Some(deser.read_string(member)?);
          87  +
                }
          88  +
                _ => {}
          89  +
            }
          90  +
            Ok(())
          91  +
        })?;
          92  +
        Ok(builder.build())
          93  +
    }
          94  +
}
          95  +
impl UpdateAssociationOutput {
          96  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
          97  +
    /// Header-bound members are read directly from headers, avoiding runtime
          98  +
    /// member iteration overhead. Body members are read via the deserializer.
          99  +
    pub fn deserialize_with_response(
         100  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         101  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         102  +
        _status: u16,
         103  +
        _body: &[u8],
         104  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         105  +
        #[allow(unused_variables, unused_mut)]
         106  +
        let mut builder = Self::builder();
         107  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         108  +
            builder._request_id = Some(val.to_string());
         109  +
        }
         110  +
         111  +
        #[allow(
         112  +
            unused_variables,
         113  +
            unreachable_code,
         114  +
            clippy::single_match,
         115  +
            clippy::match_single_binding,
         116  +
            clippy::diverging_sub_expression
         117  +
        )]
         118  +
        deserializer.read_struct(&UPDATEASSOCIATIONOUTPUT_SCHEMA, &mut |member, deser| {
         119  +
            match member.member_index() {
         120  +
                Some(0) => {
         121  +
                    builder.association_description = Some(crate::types::AssociationDescription::deserialize(deser)?);
         122  +
                }
         123  +
                _ => {}
         124  +
            }
         125  +
            Ok(())
         126  +
        })?;
         127  +
        Ok(builder.build())
         128  +
    }
         129  +
}
         130  +
impl ::aws_types::request_id::RequestId for UpdateAssociationOutput {
         131  +
    fn request_id(&self) -> Option<&str> {
         132  +
        self._request_id.as_deref()
         133  +
    }
         134  +
}
         135  +
impl UpdateAssociationOutput {
         136  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         137  +
        self._request_id = request_id;
         138  +
        self
         139  +
    }
         140  +
}
         141  +
impl UpdateAssociationOutput {
         142  +
    /// Creates a new builder-style object to manufacture [`UpdateAssociationOutput`](crate::operation::update_association::UpdateAssociationOutput).
         143  +
    pub fn builder() -> crate::operation::update_association::builders::UpdateAssociationOutputBuilder {
         144  +
        crate::operation::update_association::builders::UpdateAssociationOutputBuilder::default()
         145  +
    }
         146  +
}
         147  +
         148  +
/// A builder for [`UpdateAssociationOutput`](crate::operation::update_association::UpdateAssociationOutput).
         149  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         150  +
#[non_exhaustive]
         151  +
pub struct UpdateAssociationOutputBuilder {
         152  +
    pub(crate) association_description: ::std::option::Option<crate::types::AssociationDescription>,
         153  +
    _request_id: Option<String>,
         154  +
}
         155  +
impl UpdateAssociationOutputBuilder {
         156  +
    /// <p>The description of the association that was updated.</p>
         157  +
    pub fn association_description(mut self, input: crate::types::AssociationDescription) -> Self {
         158  +
        self.association_description = ::std::option::Option::Some(input);
         159  +
        self
         160  +
    }
         161  +
    /// <p>The description of the association that was updated.</p>
         162  +
    pub fn set_association_description(mut self, input: ::std::option::Option<crate::types::AssociationDescription>) -> Self {
         163  +
        self.association_description = input;
         164  +
        self
         165  +
    }
         166  +
    /// <p>The description of the association that was updated.</p>
         167  +
    pub fn get_association_description(&self) -> &::std::option::Option<crate::types::AssociationDescription> {
         168  +
        &self.association_description
         169  +
    }
         170  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         171  +
        self._request_id = Some(request_id.into());
         172  +
        self
         173  +
    }
         174  +
         175  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         176  +
        self._request_id = request_id;
         177  +
        self
         178  +
    }
         179  +
    /// Consumes the builder and constructs a [`UpdateAssociationOutput`](crate::operation::update_association::UpdateAssociationOutput).
         180  +
    pub fn build(self) -> crate::operation::update_association::UpdateAssociationOutput {
         181  +
        crate::operation::update_association::UpdateAssociationOutput {
         182  +
            association_description: self.association_description,
         183  +
            _request_id: self._request_id,
         184  +
        }
         185  +
    }
         186  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_association/builders.rs

@@ -0,1 +0,550 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::update_association::_update_association_input::UpdateAssociationInputBuilder;
           3  +
           4  +
pub use crate::operation::update_association::_update_association_output::UpdateAssociationOutputBuilder;
           5  +
           6  +
impl crate::operation::update_association::builders::UpdateAssociationInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::update_association::UpdateAssociationOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::update_association::UpdateAssociationError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.update_association();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `UpdateAssociation`.
          24  +
///
          25  +
/// <p>Updates an association. You can update the association name and version, the document version, schedule, parameters, and Amazon Simple Storage Service (Amazon S3) output. When you call <code>UpdateAssociation</code>, the system removes all optional parameters from the request and overwrites the association with null values for those parameters. This is by design. You must specify all optional parameters in the call, even if you are not changing the parameters. This includes the <code>Name</code> parameter. Before calling this API action, we recommend that you call the <code>DescribeAssociation</code> API operation and make a note of all optional parameters required for your <code>UpdateAssociation</code> call.</p>
          26  +
/// <p>In order to call this API operation, a user, group, or role must be granted permission to call the <code>DescribeAssociation</code> API operation. If you don't have permission to call <code>DescribeAssociation</code>, then you receive the following error: <code>An error occurred (AccessDeniedException) when calling the UpdateAssociation operation: User: <user_arn>
          27  +
/// isn't authorized to perform: ssm:DescribeAssociation on resource:
          28  +
/// <resource_arn></resource_arn>
          29  +
/// </user_arn></code></p><important>
          30  +
/// <p>When you update an association, the association immediately runs against the specified targets. You can add the <code>ApplyOnlyAtCronInterval</code> parameter to run the association during the next schedule run.</p>
          31  +
/// </important>
          32  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          33  +
pub struct UpdateAssociationFluentBuilder {
          34  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          35  +
    inner: crate::operation::update_association::builders::UpdateAssociationInputBuilder,
          36  +
    config_override: ::std::option::Option<crate::config::Builder>,
          37  +
}
          38  +
impl
          39  +
    crate::client::customize::internal::CustomizableSend<
          40  +
        crate::operation::update_association::UpdateAssociationOutput,
          41  +
        crate::operation::update_association::UpdateAssociationError,
          42  +
    > for UpdateAssociationFluentBuilder
          43  +
{
          44  +
    fn send(
          45  +
        self,
          46  +
        config_override: crate::config::Builder,
          47  +
    ) -> crate::client::customize::internal::BoxFuture<
          48  +
        crate::client::customize::internal::SendResult<
          49  +
            crate::operation::update_association::UpdateAssociationOutput,
          50  +
            crate::operation::update_association::UpdateAssociationError,
          51  +
        >,
          52  +
    > {
          53  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          54  +
    }
          55  +
}
          56  +
impl UpdateAssociationFluentBuilder {
          57  +
    /// Creates a new `UpdateAssociationFluentBuilder`.
          58  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          59  +
        Self {
          60  +
            handle,
          61  +
            inner: ::std::default::Default::default(),
          62  +
            config_override: ::std::option::Option::None,
          63  +
        }
          64  +
    }
          65  +
    /// Access the UpdateAssociation as a reference.
          66  +
    pub fn as_input(&self) -> &crate::operation::update_association::builders::UpdateAssociationInputBuilder {
          67  +
        &self.inner
          68  +
    }
          69  +
    /// Sends the request and returns the response.
          70  +
    ///
          71  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          72  +
    /// can be matched against.
          73  +
    ///
          74  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          75  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          76  +
    /// set when configuring the client.
          77  +
    pub async fn send(
          78  +
        self,
          79  +
    ) -> ::std::result::Result<
          80  +
        crate::operation::update_association::UpdateAssociationOutput,
          81  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          82  +
            crate::operation::update_association::UpdateAssociationError,
          83  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          84  +
        >,
          85  +
    > {
          86  +
        let input = self
          87  +
            .inner
          88  +
            .build()
          89  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          90  +
        let runtime_plugins = crate::operation::update_association::UpdateAssociation::operation_runtime_plugins(
          91  +
            self.handle.runtime_plugins.clone(),
          92  +
            &self.handle.conf,
          93  +
            self.config_override,
          94  +
        );
          95  +
        crate::operation::update_association::UpdateAssociation::orchestrate(&runtime_plugins, input).await
          96  +
    }
          97  +
          98  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          99  +
    pub fn customize(
         100  +
        self,
         101  +
    ) -> crate::client::customize::CustomizableOperation<
         102  +
        crate::operation::update_association::UpdateAssociationOutput,
         103  +
        crate::operation::update_association::UpdateAssociationError,
         104  +
        Self,
         105  +
    > {
         106  +
        crate::client::customize::CustomizableOperation::new(self)
         107  +
    }
         108  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         109  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         110  +
        self
         111  +
    }
         112  +
         113  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         114  +
        self.config_override = config_override;
         115  +
        self
         116  +
    }
         117  +
    /// <p>The ID of the association you want to update.</p>
         118  +
    pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         119  +
        self.inner = self.inner.association_id(input.into());
         120  +
        self
         121  +
    }
         122  +
    /// <p>The ID of the association you want to update.</p>
         123  +
    pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         124  +
        self.inner = self.inner.set_association_id(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>The ID of the association you want to update.</p>
         128  +
    pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
         129  +
        self.inner.get_association_id()
         130  +
    }
         131  +
    ///
         132  +
    /// Adds a key-value pair to `Parameters`.
         133  +
    ///
         134  +
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
         135  +
    ///
         136  +
    /// <p>The parameters you want to update for the association. If you create a parameter using Parameter Store, a tool in Amazon Web Services Systems Manager, you can reference the parameter using <code>{{ssm:parameter-name}}</code>.</p>
         137  +
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
         138  +
        self.inner = self.inner.parameters(k.into(), v);
         139  +
        self
         140  +
    }
         141  +
    /// <p>The parameters you want to update for the association. If you create a parameter using Parameter Store, a tool in Amazon Web Services Systems Manager, you can reference the parameter using <code>{{ssm:parameter-name}}</code>.</p>
         142  +
    pub fn set_parameters(
         143  +
        mut self,
         144  +
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
         145  +
    ) -> Self {
         146  +
        self.inner = self.inner.set_parameters(input);
         147  +
        self
         148  +
    }
         149  +
    /// <p>The parameters you want to update for the association. If you create a parameter using Parameter Store, a tool in Amazon Web Services Systems Manager, you can reference the parameter using <code>{{ssm:parameter-name}}</code>.</p>
         150  +
    pub fn get_parameters(
         151  +
        &self,
         152  +
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
         153  +
        self.inner.get_parameters()
         154  +
    }
         155  +
    /// <p>The document version you want update for the association.</p><important>
         156  +
    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
         157  +
    /// </important>
         158  +
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         159  +
        self.inner = self.inner.document_version(input.into());
         160  +
        self
         161  +
    }
         162  +
    /// <p>The document version you want update for the association.</p><important>
         163  +
    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
         164  +
    /// </important>
         165  +
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         166  +
        self.inner = self.inner.set_document_version(input);
         167  +
        self
         168  +
    }
         169  +
    /// <p>The document version you want update for the association.</p><important>
         170  +
    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
         171  +
    /// </important>
         172  +
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
         173  +
        self.inner.get_document_version()
         174  +
    }
         175  +
    /// <p>The cron expression used to schedule the association that you want to update.</p>
         176  +
    pub fn schedule_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         177  +
        self.inner = self.inner.schedule_expression(input.into());
         178  +
        self
         179  +
    }
         180  +
    /// <p>The cron expression used to schedule the association that you want to update.</p>
         181  +
    pub fn set_schedule_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         182  +
        self.inner = self.inner.set_schedule_expression(input);
         183  +
        self
         184  +
    }
         185  +
    /// <p>The cron expression used to schedule the association that you want to update.</p>
         186  +
    pub fn get_schedule_expression(&self) -> &::std::option::Option<::std::string::String> {
         187  +
        self.inner.get_schedule_expression()
         188  +
    }
         189  +
    /// <p>An S3 bucket where you want to store the results of this request.</p>
         190  +
    pub fn output_location(mut self, input: crate::types::InstanceAssociationOutputLocation) -> Self {
         191  +
        self.inner = self.inner.output_location(input);
         192  +
        self
         193  +
    }
         194  +
    /// <p>An S3 bucket where you want to store the results of this request.</p>
         195  +
    pub fn set_output_location(mut self, input: ::std::option::Option<crate::types::InstanceAssociationOutputLocation>) -> Self {
         196  +
        self.inner = self.inner.set_output_location(input);
         197  +
        self
         198  +
    }
         199  +
    /// <p>An S3 bucket where you want to store the results of this request.</p>
         200  +
    pub fn get_output_location(&self) -> &::std::option::Option<crate::types::InstanceAssociationOutputLocation> {
         201  +
        self.inner.get_output_location()
         202  +
    }
         203  +
    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
         204  +
    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
         205  +
    /// <p>For Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
         206  +
    /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
         207  +
    /// <p>For example:</p>
         208  +
    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
         209  +
    /// <p>For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, <code>AWS-ApplyPatchBaseline</code> or <code>My-Document</code>.</p>
         210  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         211  +
        self.inner = self.inner.name(input.into());
         212  +
        self
         213  +
    }
         214  +
    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
         215  +
    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
         216  +
    /// <p>For Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
         217  +
    /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
         218  +
    /// <p>For example:</p>
         219  +
    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
         220  +
    /// <p>For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, <code>AWS-ApplyPatchBaseline</code> or <code>My-Document</code>.</p>
         221  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         222  +
        self.inner = self.inner.set_name(input);
         223  +
        self
         224  +
    }
         225  +
    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
         226  +
    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
         227  +
    /// <p>For Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
         228  +
    /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
         229  +
    /// <p>For example:</p>
         230  +
    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
         231  +
    /// <p>For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, <code>AWS-ApplyPatchBaseline</code> or <code>My-Document</code>.</p>
         232  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         233  +
        self.inner.get_name()
         234  +
    }
         235  +
    ///
         236  +
    /// Appends an item to `Targets`.
         237  +
    ///
         238  +
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
         239  +
    ///
         240  +
    /// <p>The targets of the association.</p>
         241  +
    pub fn targets(mut self, input: crate::types::Target) -> Self {
         242  +
        self.inner = self.inner.targets(input);
         243  +
        self
         244  +
    }
         245  +
    /// <p>The targets of the association.</p>
         246  +
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
         247  +
        self.inner = self.inner.set_targets(input);
         248  +
        self
         249  +
    }
         250  +
    /// <p>The targets of the association.</p>
         251  +
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
         252  +
        self.inner.get_targets()
         253  +
    }
         254  +
    /// <p>The name of the association that you want to update.</p>
         255  +
    pub fn association_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         256  +
        self.inner = self.inner.association_name(input.into());
         257  +
        self
         258  +
    }
         259  +
    /// <p>The name of the association that you want to update.</p>
         260  +
    pub fn set_association_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         261  +
        self.inner = self.inner.set_association_name(input);
         262  +
        self
         263  +
    }
         264  +
    /// <p>The name of the association that you want to update.</p>
         265  +
    pub fn get_association_name(&self) -> &::std::option::Option<::std::string::String> {
         266  +
        self.inner.get_association_name()
         267  +
    }
         268  +
    /// <p>This parameter is provided for concurrency control purposes. You must specify the latest association version in the service. If you want to ensure that this request succeeds, either specify <code>$LATEST</code>, or omit this parameter.</p>
         269  +
    pub fn association_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         270  +
        self.inner = self.inner.association_version(input.into());
         271  +
        self
         272  +
    }
         273  +
    /// <p>This parameter is provided for concurrency control purposes. You must specify the latest association version in the service. If you want to ensure that this request succeeds, either specify <code>$LATEST</code>, or omit this parameter.</p>
         274  +
    pub fn set_association_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         275  +
        self.inner = self.inner.set_association_version(input);
         276  +
        self
         277  +
    }
         278  +
    /// <p>This parameter is provided for concurrency control purposes. You must specify the latest association version in the service. If you want to ensure that this request succeeds, either specify <code>$LATEST</code>, or omit this parameter.</p>
         279  +
    pub fn get_association_version(&self) -> &::std::option::Option<::std::string::String> {
         280  +
        self.inner.get_association_version()
         281  +
    }
         282  +
    /// <p>Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a tool in Amazon Web Services Systems Manager.</p>
         283  +
    pub fn automation_target_parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         284  +
        self.inner = self.inner.automation_target_parameter_name(input.into());
         285  +
        self
         286  +
    }
         287  +
    /// <p>Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a tool in Amazon Web Services Systems Manager.</p>
         288  +
    pub fn set_automation_target_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         289  +
        self.inner = self.inner.set_automation_target_parameter_name(input);
         290  +
        self
         291  +
    }
         292  +
    /// <p>Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a tool in Amazon Web Services Systems Manager.</p>
         293  +
    pub fn get_automation_target_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
         294  +
        self.inner.get_automation_target_parameter_name()
         295  +
    }
         296  +
    /// <p>The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set <code>MaxError</code> to 10%, then the system stops sending the request when the sixth error is received.</p>
         297  +
    /// <p>Executions that are already running an association when <code>MaxErrors</code> is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set <code>MaxConcurrency</code> to 1 so that executions proceed one at a time.</p>
         298  +
    pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         299  +
        self.inner = self.inner.max_errors(input.into());
         300  +
        self
         301  +
    }
         302  +
    /// <p>The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set <code>MaxError</code> to 10%, then the system stops sending the request when the sixth error is received.</p>
         303  +
    /// <p>Executions that are already running an association when <code>MaxErrors</code> is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set <code>MaxConcurrency</code> to 1 so that executions proceed one at a time.</p>
         304  +
    pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         305  +
        self.inner = self.inner.set_max_errors(input);
         306  +
        self
         307  +
    }
         308  +
    /// <p>The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set <code>MaxError</code> to 10%, then the system stops sending the request when the sixth error is received.</p>
         309  +
    /// <p>Executions that are already running an association when <code>MaxErrors</code> is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set <code>MaxConcurrency</code> to 1 so that executions proceed one at a time.</p>
         310  +
    pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
         311  +
        self.inner.get_max_errors()
         312  +
    }
         313  +
    /// <p>The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.</p>
         314  +
    /// <p>If a new managed node starts and attempts to run an association while Systems Manager is running <code>MaxConcurrency</code> associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for <code>MaxConcurrency</code>.</p>
         315  +
    pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         316  +
        self.inner = self.inner.max_concurrency(input.into());
         317  +
        self
         318  +
    }
         319  +
    /// <p>The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.</p>
         320  +
    /// <p>If a new managed node starts and attempts to run an association while Systems Manager is running <code>MaxConcurrency</code> associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for <code>MaxConcurrency</code>.</p>
         321  +
    pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         322  +
        self.inner = self.inner.set_max_concurrency(input);
         323  +
        self
         324  +
    }
         325  +
    /// <p>The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.</p>
         326  +
    /// <p>If a new managed node starts and attempts to run an association while Systems Manager is running <code>MaxConcurrency</code> associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for <code>MaxConcurrency</code>.</p>
         327  +
    pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
         328  +
        self.inner.get_max_concurrency()
         329  +
    }
         330  +
    /// <p>The severity level to assign to the association.</p>
         331  +
    pub fn compliance_severity(mut self, input: crate::types::AssociationComplianceSeverity) -> Self {
         332  +
        self.inner = self.inner.compliance_severity(input);
         333  +
        self
         334  +
    }
         335  +
    /// <p>The severity level to assign to the association.</p>
         336  +
    pub fn set_compliance_severity(mut self, input: ::std::option::Option<crate::types::AssociationComplianceSeverity>) -> Self {
         337  +
        self.inner = self.inner.set_compliance_severity(input);
         338  +
        self
         339  +
    }
         340  +
    /// <p>The severity level to assign to the association.</p>
         341  +
    pub fn get_compliance_severity(&self) -> &::std::option::Option<crate::types::AssociationComplianceSeverity> {
         342  +
        self.inner.get_compliance_severity()
         343  +
    }
         344  +
    /// <p>The mode for generating association compliance. You can specify <code>AUTO</code> or <code>MANUAL</code>. In <code>AUTO</code> mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is <code>COMPLIANT</code>. If the association execution doesn't run successfully, the association is <code>NON-COMPLIANT</code>.</p>
         345  +
    /// <p>In <code>MANUAL</code> mode, you must specify the <code>AssociationId</code> as a parameter for the <code>PutComplianceItems</code> API operation. In this case, compliance data isn't managed by State Manager, a tool in Amazon Web Services Systems Manager. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
         346  +
    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
         347  +
    pub fn sync_compliance(mut self, input: crate::types::AssociationSyncCompliance) -> Self {
         348  +
        self.inner = self.inner.sync_compliance(input);
         349  +
        self
         350  +
    }
         351  +
    /// <p>The mode for generating association compliance. You can specify <code>AUTO</code> or <code>MANUAL</code>. In <code>AUTO</code> mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is <code>COMPLIANT</code>. If the association execution doesn't run successfully, the association is <code>NON-COMPLIANT</code>.</p>
         352  +
    /// <p>In <code>MANUAL</code> mode, you must specify the <code>AssociationId</code> as a parameter for the <code>PutComplianceItems</code> API operation. In this case, compliance data isn't managed by State Manager, a tool in Amazon Web Services Systems Manager. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
         353  +
    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
         354  +
    pub fn set_sync_compliance(mut self, input: ::std::option::Option<crate::types::AssociationSyncCompliance>) -> Self {
         355  +
        self.inner = self.inner.set_sync_compliance(input);
         356  +
        self
         357  +
    }
         358  +
    /// <p>The mode for generating association compliance. You can specify <code>AUTO</code> or <code>MANUAL</code>. In <code>AUTO</code> mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is <code>COMPLIANT</code>. If the association execution doesn't run successfully, the association is <code>NON-COMPLIANT</code>.</p>
         359  +
    /// <p>In <code>MANUAL</code> mode, you must specify the <code>AssociationId</code> as a parameter for the <code>PutComplianceItems</code> API operation. In this case, compliance data isn't managed by State Manager, a tool in Amazon Web Services Systems Manager. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
         360  +
    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
         361  +
    pub fn get_sync_compliance(&self) -> &::std::option::Option<crate::types::AssociationSyncCompliance> {
         362  +
        self.inner.get_sync_compliance()
         363  +
    }
         364  +
    /// <p>By default, when you update an association, the system runs it immediately after it is updated and then according to the schedule you specified. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code> if you want the association to run only according to the schedule you specified.</p>
         365  +
    /// <p>If you chose this option when you created an association and later you edit that association or you make changes to the Automation runbook or SSM document on which that association is based, State Manager applies the association at the next specified cron interval. For example, if you chose the <code>Latest</code> version of an SSM document when you created an association and you edit the association by choosing a different document version on the Documents page, State Manager applies the association at the next specified cron interval if you previously set <code>ApplyOnlyAtCronInterval</code> to <code>true</code>. If this option wasn't selected, State Manager immediately runs the association.</p>
         366  +
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling">Understanding when associations are applied to resources</a> and <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates">About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         367  +
    /// <p>This parameter isn't supported for rate expressions.</p>
         368  +
    /// <p>You can reset this parameter. To do so, specify the <code>no-apply-only-at-cron-interval</code> parameter when you update the association from the command line. This parameter forces the association to run immediately after updating it and according to the interval specified.</p>
         369  +
    pub fn apply_only_at_cron_interval(mut self, input: bool) -> Self {
         370  +
        self.inner = self.inner.apply_only_at_cron_interval(input);
         371  +
        self
         372  +
    }
         373  +
    /// <p>By default, when you update an association, the system runs it immediately after it is updated and then according to the schedule you specified. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code> if you want the association to run only according to the schedule you specified.</p>
         374  +
    /// <p>If you chose this option when you created an association and later you edit that association or you make changes to the Automation runbook or SSM document on which that association is based, State Manager applies the association at the next specified cron interval. For example, if you chose the <code>Latest</code> version of an SSM document when you created an association and you edit the association by choosing a different document version on the Documents page, State Manager applies the association at the next specified cron interval if you previously set <code>ApplyOnlyAtCronInterval</code> to <code>true</code>. If this option wasn't selected, State Manager immediately runs the association.</p>
         375  +
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling">Understanding when associations are applied to resources</a> and <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates">About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         376  +
    /// <p>This parameter isn't supported for rate expressions.</p>
         377  +
    /// <p>You can reset this parameter. To do so, specify the <code>no-apply-only-at-cron-interval</code> parameter when you update the association from the command line. This parameter forces the association to run immediately after updating it and according to the interval specified.</p>
         378  +
    pub fn set_apply_only_at_cron_interval(mut self, input: ::std::option::Option<bool>) -> Self {
         379  +
        self.inner = self.inner.set_apply_only_at_cron_interval(input);
         380  +
        self
         381  +
    }
         382  +
    /// <p>By default, when you update an association, the system runs it immediately after it is updated and then according to the schedule you specified. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code> if you want the association to run only according to the schedule you specified.</p>
         383  +
    /// <p>If you chose this option when you created an association and later you edit that association or you make changes to the Automation runbook or SSM document on which that association is based, State Manager applies the association at the next specified cron interval. For example, if you chose the <code>Latest</code> version of an SSM document when you created an association and you edit the association by choosing a different document version on the Documents page, State Manager applies the association at the next specified cron interval if you previously set <code>ApplyOnlyAtCronInterval</code> to <code>true</code>. If this option wasn't selected, State Manager immediately runs the association.</p>
         384  +
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling">Understanding when associations are applied to resources</a> and <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates">About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         385  +
    /// <p>This parameter isn't supported for rate expressions.</p>
         386  +
    /// <p>You can reset this parameter. To do so, specify the <code>no-apply-only-at-cron-interval</code> parameter when you update the association from the command line. This parameter forces the association to run immediately after updating it and according to the interval specified.</p>
         387  +
    pub fn get_apply_only_at_cron_interval(&self) -> &::std::option::Option<bool> {
         388  +
        self.inner.get_apply_only_at_cron_interval()
         389  +
    }
         390  +
    ///
         391  +
    /// Appends an item to `CalendarNames`.
         392  +
    ///
         393  +
    /// To override the contents of this collection use [`set_calendar_names`](Self::set_calendar_names).
         394  +
    ///
         395  +
    /// <p>The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar">Amazon Web Services Systems Manager Change Calendar</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         396  +
    pub fn calendar_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         397  +
        self.inner = self.inner.calendar_names(input.into());
         398  +
        self
         399  +
    }
         400  +
    /// <p>The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar">Amazon Web Services Systems Manager Change Calendar</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         401  +
    pub fn set_calendar_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         402  +
        self.inner = self.inner.set_calendar_names(input);
         403  +
        self
         404  +
    }
         405  +
    /// <p>The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar">Amazon Web Services Systems Manager Change Calendar</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         406  +
    pub fn get_calendar_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         407  +
        self.inner.get_calendar_names()
         408  +
    }
         409  +
    ///
         410  +
    /// Appends an item to `TargetLocations`.
         411  +
    ///
         412  +
    /// To override the contents of this collection use [`set_target_locations`](Self::set_target_locations).
         413  +
    ///
         414  +
    /// <p>A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to update an association in multiple Regions and multiple accounts.</p><note>
         415  +
    /// <p>The <code>TargetLocationAlarmConfiguration</code> parameter is not supported by State Manager.</p>
         416  +
    /// </note>
         417  +
    pub fn target_locations(mut self, input: crate::types::TargetLocation) -> Self {
         418  +
        self.inner = self.inner.target_locations(input);
         419  +
        self
         420  +
    }
         421  +
    /// <p>A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to update an association in multiple Regions and multiple accounts.</p><note>
         422  +
    /// <p>The <code>TargetLocationAlarmConfiguration</code> parameter is not supported by State Manager.</p>
         423  +
    /// </note>
         424  +
    pub fn set_target_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>) -> Self {
         425  +
        self.inner = self.inner.set_target_locations(input);
         426  +
        self
         427  +
    }
         428  +
    /// <p>A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to update an association in multiple Regions and multiple accounts.</p><note>
         429  +
    /// <p>The <code>TargetLocationAlarmConfiguration</code> parameter is not supported by State Manager.</p>
         430  +
    /// </note>
         431  +
    pub fn get_target_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>> {
         432  +
        self.inner.get_target_locations()
         433  +
    }
         434  +
    /// <p>Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of <code>cron(0 0 ? * THU#2 *)</code>, you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html">Reference: Cron and rate expressions for Systems Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         435  +
    /// <p>To use offsets, you must specify the <code>ApplyOnlyAtCronInterval</code> parameter. This option tells the system not to run an association immediately after you create it.</p>
         436  +
    /// </note>
         437  +
    pub fn schedule_offset(mut self, input: i32) -> Self {
         438  +
        self.inner = self.inner.schedule_offset(input);
         439  +
        self
         440  +
    }
         441  +
    /// <p>Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of <code>cron(0 0 ? * THU#2 *)</code>, you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html">Reference: Cron and rate expressions for Systems Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         442  +
    /// <p>To use offsets, you must specify the <code>ApplyOnlyAtCronInterval</code> parameter. This option tells the system not to run an association immediately after you create it.</p>
         443  +
    /// </note>
         444  +
    pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
         445  +
        self.inner = self.inner.set_schedule_offset(input);
         446  +
        self
         447  +
    }
         448  +
    /// <p>Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of <code>cron(0 0 ? * THU#2 *)</code>, you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html">Reference: Cron and rate expressions for Systems Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         449  +
    /// <p>To use offsets, you must specify the <code>ApplyOnlyAtCronInterval</code> parameter. This option tells the system not to run an association immediately after you create it.</p>
         450  +
    /// </note>
         451  +
    pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
         452  +
        self.inner.get_schedule_offset()
         453  +
    }
         454  +
    /// <p>The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.</p>
         455  +
    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
         456  +
    /// <ul>
         457  +
    /// <li>
         458  +
    /// <p>The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.</p></li>
         459  +
    /// <li>
         460  +
    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_UpdateAssociation.html#systemsmanager-UpdateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is updated, but only according to the specified schedule.</p></li>
         461  +
    /// </ul>
         462  +
    pub fn duration(mut self, input: i32) -> Self {
         463  +
        self.inner = self.inner.duration(input);
         464  +
        self
         465  +
    }
         466  +
    /// <p>The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.</p>
         467  +
    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
         468  +
    /// <ul>
         469  +
    /// <li>
         470  +
    /// <p>The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.</p></li>
         471  +
    /// <li>
         472  +
    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_UpdateAssociation.html#systemsmanager-UpdateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is updated, but only according to the specified schedule.</p></li>
         473  +
    /// </ul>
         474  +
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
         475  +
        self.inner = self.inner.set_duration(input);
         476  +
        self
         477  +
    }
         478  +
    /// <p>The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.</p>
         479  +
    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
         480  +
    /// <ul>
         481  +
    /// <li>
         482  +
    /// <p>The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.</p></li>
         483  +
    /// <li>
         484  +
    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_UpdateAssociation.html#systemsmanager-UpdateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is updated, but only according to the specified schedule.</p></li>
         485  +
    /// </ul>
         486  +
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
         487  +
        self.inner.get_duration()
         488  +
    }
         489  +
    ///
         490  +
    /// Appends an item to `TargetMaps`.
         491  +
    ///
         492  +
    /// To override the contents of this collection use [`set_target_maps`](Self::set_target_maps).
         493  +
    ///
         494  +
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         495  +
    pub fn target_maps(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>) -> Self {
         496  +
        self.inner = self.inner.target_maps(input);
         497  +
        self
         498  +
    }
         499  +
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         500  +
    pub fn set_target_maps(
         501  +
        mut self,
         502  +
        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
         503  +
    ) -> Self {
         504  +
        self.inner = self.inner.set_target_maps(input);
         505  +
        self
         506  +
    }
         507  +
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
         508  +
    pub fn get_target_maps(
         509  +
        &self,
         510  +
    ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>> {
         511  +
        self.inner.get_target_maps()
         512  +
    }
         513  +
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
         514  +
    pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
         515  +
        self.inner = self.inner.alarm_configuration(input);
         516  +
        self
         517  +
    }
         518  +
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
         519  +
    pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
         520  +
        self.inner = self.inner.set_alarm_configuration(input);
         521  +
        self
         522  +
    }
         523  +
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
         524  +
    pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
         525  +
        self.inner.get_alarm_configuration()
         526  +
    }
         527  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         528  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         529  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         530  +
    /// </note>
         531  +
    pub fn association_dispatch_assume_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         532  +
        self.inner = self.inner.association_dispatch_assume_role(input.into());
         533  +
        self
         534  +
    }
         535  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         536  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         537  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         538  +
    /// </note>
         539  +
    pub fn set_association_dispatch_assume_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         540  +
        self.inner = self.inner.set_association_dispatch_assume_role(input);
         541  +
        self
         542  +
    }
         543  +
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
         544  +
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
         545  +
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
         546  +
    /// </note>
         547  +
    pub fn get_association_dispatch_assume_role(&self) -> &::std::option::Option<::std::string::String> {
         548  +
        self.inner.get_association_dispatch_assume_role()
         549  +
    }
         550  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_association_status.rs

@@ -0,1 +0,742 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `UpdateAssociationStatus`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct UpdateAssociationStatus;
           6  +
impl UpdateAssociationStatus {
           7  +
    /// Creates a new `UpdateAssociationStatus`
           8  +
    pub fn new() -> Self {
           9  +
        Self
          10  +
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          13  +
        crate::operation::update_association_status::UpdateAssociationStatusInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::update_association_status::UpdateAssociationStatusOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::update_association_status::UpdateAssociationStatusInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::update_association_status::UpdateAssociationStatusOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::update_association_status::UpdateAssociationStatusError,
          24  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          25  +
        >,
          26  +
    > {
          27  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          28  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          29  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          30  +
        >| {
          31  +
            err.map_service_error(|err| {
          32  +
                err.downcast::<crate::operation::update_association_status::UpdateAssociationStatusError>()
          33  +
                    .expect("correct error type")
          34  +
            })
          35  +
        };
          36  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          37  +
            .await
          38  +
            .map_err(map_err)?;
          39  +
        let output = context.finalize().map_err(map_err)?;
          40  +
        ::std::result::Result::Ok(
          41  +
            output
          42  +
                .downcast::<crate::operation::update_association_status::UpdateAssociationStatusOutput>()
          43  +
                .expect("correct output type"),
          44  +
        )
          45  +
    }
          46  +
          47  +
    pub(crate) async fn orchestrate_with_stop_point(
          48  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          49  +
        input: crate::operation::update_association_status::UpdateAssociationStatusInput,
          50  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          51  +
    ) -> ::std::result::Result<
          52  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          53  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          54  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          55  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          56  +
        >,
          57  +
    > {
          58  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          59  +
        use ::tracing::Instrument;
          60  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("SSM", "UpdateAssociationStatus", input, runtime_plugins, stop_point)
          61  +
            // Create a parent span for the entire operation. Includes a random, internal-only,
          62  +
            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          63  +
            .instrument(::tracing::debug_span!(
          64  +
                "SSM.UpdateAssociationStatus",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "UpdateAssociationStatus",
          67  +
                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          68  +
                "rpc.system" = "aws-api",
          69  +
            ))
          70  +
            .await
          71  +
    }
          72  +
          73  +
    pub(crate) fn operation_runtime_plugins(
          74  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          75  +
        client_config: &crate::config::Config,
          76  +
        config_override: ::std::option::Option<crate::config::Builder>,
          77  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          78  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          79  +
          80  +
        if let ::std::option::Option::Some(config_override) = config_override {
          81  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          82  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          83  +
            }
          84  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          85  +
                config_override,
          86  +
                client_config.config.clone(),
          87  +
                &client_config.runtime_components,
          88  +
            ));
          89  +
        }
          90  +
        runtime_plugins
          91  +
    }
          92  +
}
          93  +
/// Per-operation error registry. Contains an entry for every modeled
          94  +
/// error this operation can throw.
          95  +
///
          96  +
/// Used by the schema-serde error path as the operation-scoped lookup
          97  +
/// for registry-backed error reification: an error code that does not
          98  +
/// match one of the operation's modeled errors directly is resolved
          99  +
/// against this registry first, then widened to the service-wide error
         100  +
/// registry.
         101  +
pub(crate) mod error_registry {
         102  +
    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
         103  +
        ::aws_smithy_schema::registry::TypeRegistry::builder()
         104  +
                            .insert_error_shape(
         105  +
                        crate::types::error::AssociationDoesNotExist::SCHEMA,
         106  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         107  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AssociationDoesNotExist::deserialize(d)?))
         108  +
                        },
         109  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         110  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AssociationDoesNotExist::deserialize(d)?))
         111  +
                        },
         112  +
                    )
         113  +
.insert_error_shape(
         114  +
                        crate::types::error::InternalServerError::SCHEMA,
         115  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         116  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         117  +
                        },
         118  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         119  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         120  +
                        },
         121  +
                    )
         122  +
.insert_error_shape(
         123  +
                        crate::types::error::InvalidDocument::SCHEMA,
         124  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         125  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidDocument::deserialize(d)?))
         126  +
                        },
         127  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         128  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidDocument::deserialize(d)?))
         129  +
                        },
         130  +
                    )
         131  +
.insert_error_shape(
         132  +
                        crate::types::error::InvalidInstanceId::SCHEMA,
         133  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         134  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInstanceId::deserialize(d)?))
         135  +
                        },
         136  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         137  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInstanceId::deserialize(d)?))
         138  +
                        },
         139  +
                    )
         140  +
.insert_error_shape(
         141  +
                        crate::types::error::StatusUnchanged::SCHEMA,
         142  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         143  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::StatusUnchanged::deserialize(d)?))
         144  +
                        },
         145  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         146  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::StatusUnchanged::deserialize(d)?))
         147  +
                        },
         148  +
                    )
         149  +
.insert_error_shape(
         150  +
                        crate::types::error::TooManyUpdates::SCHEMA,
         151  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         152  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::TooManyUpdates::deserialize(d)?))
         153  +
                        },
         154  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         155  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::TooManyUpdates::deserialize(d)?))
         156  +
                        },
         157  +
                    )
         158  +
                            .build()
         159  +
    });
         160  +
}
         161  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateAssociationStatus {
         162  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         163  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateAssociationStatus");
         164  +
         165  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         166  +
            UpdateAssociationStatusRequestSerializer,
         167  +
        ));
         168  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         169  +
            UpdateAssociationStatusResponseDeserializer,
         170  +
        ));
         171  +
         172  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         173  +
            crate::config::auth::Params::builder()
         174  +
                .operation_name("UpdateAssociationStatus")
         175  +
                .build()
         176  +
                .expect("required fields set"),
         177  +
        ));
         178  +
         179  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
         180  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         181  +
            "UpdateAssociationStatus",
         182  +
            "SSM",
         183  +
        ));
         184  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         185  +
        signing_options.double_uri_encode = true;
         186  +
        signing_options.content_sha256_header = false;
         187  +
        signing_options.normalize_uri_path = true;
         188  +
        signing_options.payload_override = None;
         189  +
         190  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         191  +
            signing_options,
         192  +
            ..::std::default::Default::default()
         193  +
        });
         194  +
         195  +
        ::std::option::Option::Some(cfg.freeze())
         196  +
    }
         197  +
         198  +
    fn runtime_components(
         199  +
        &self,
         200  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         201  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         202  +
        #[allow(unused_mut)]
         203  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateAssociationStatus")
         204  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         205  +
                UpdateAssociationStatusTelemetryInputCaptureInterceptor,
         206  +
            ))
         207  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         208  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         209  +
            ))
         210  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         211  +
                UpdateAssociationStatusEndpointParamsInterceptor,
         212  +
            ))
         213  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         214  +
                crate::operation::update_association_status::UpdateAssociationStatusError,
         215  +
            >::new())
         216  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         217  +
                crate::operation::update_association_status::UpdateAssociationStatusError,
         218  +
            >::new())
         219  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         220  +
                crate::operation::update_association_status::UpdateAssociationStatusError,
         221  +
            >::new())
         222  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         223  +
                crate::operation::update_association_status::UpdateAssociationStatusError,
         224  +
            >::new());
         225  +
         226  +
        ::std::borrow::Cow::Owned(rcb)
         227  +
    }
         228  +
}
         229  +
         230  +
#[derive(Debug)]
         231  +
struct UpdateAssociationStatusTelemetryInputCaptureInterceptor;
         232  +
         233  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         234  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateAssociationStatusTelemetryInputCaptureInterceptor {
         235  +
    fn name(&self) -> &'static str {
         236  +
        "UpdateAssociationStatusTelemetryInputCaptureInterceptor"
         237  +
    }
         238  +
         239  +
    fn read_before_execution(
         240  +
        &self,
         241  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         242  +
            '_,
         243  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         244  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         245  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         246  +
        >,
         247  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         248  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         249  +
        // Nothing to do unless the customer opted in by naming members to record.
         250  +
        let ::std::option::Option::Some(requested) = cfg
         251  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         252  +
            .filter(|r| !r.is_empty())
         253  +
        else {
         254  +
            return ::std::result::Result::Ok(());
         255  +
        };
         256  +
         257  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateAssociationStatusInput>() else {
         258  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         259  +
            return ::std::result::Result::Ok(());
         260  +
        };
         261  +
         262  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         263  +
        if requested.should_capture("Name") {
         264  +
            if let ::std::option::Option::Some(value) = input.name.as_deref() {
         265  +
                captured.insert("Name", value);
         266  +
            }
         267  +
        }
         268  +
        if requested.should_capture("InstanceId") {
         269  +
            if let ::std::option::Option::Some(value) = input.instance_id.as_deref() {
         270  +
                captured.insert("InstanceId", value);
         271  +
            }
         272  +
        }
         273  +
         274  +
        cfg.interceptor_state().store_put(captured);
         275  +
        ::std::result::Result::Ok(())
         276  +
    }
         277  +
}
         278  +
#[derive(Debug)]
         279  +
struct UpdateAssociationStatusResponseDeserializer;
         280  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateAssociationStatusResponseDeserializer {
         281  +
    fn deserialize_nonstreaming_with_config(
         282  +
        &self,
         283  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         284  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         285  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         286  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         287  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         288  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         289  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         290  +
        // loads `body` before firing this hook.
         291  +
        let body = response.body().bytes().expect("body loaded");
         292  +
        let headers = response.headers();
         293  +
        #[allow(unused_mut)]
         294  +
        let mut force_error = false;
         295  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         296  +
        if !success && status != 200 || force_error {
         297  +
            let protocol = _cfg
         298  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         299  +
                .expect("a SharedClientProtocol is required");
         300  +
            #[allow(unused_mut)]
         301  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         302  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         303  +
            })?;
         304  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         305  +
            let generic = generic_builder.build();
         306  +
            let error_code = match generic.code() {
         307  +
                ::std::option::Option::Some(code) => code,
         308  +
                ::std::option::Option::None => {
         309  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         310  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         311  +
                            crate::operation::update_association_status::UpdateAssociationStatusError::unhandled(generic),
         312  +
                        ),
         313  +
                    ))
         314  +
                }
         315  +
            };
         316  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         317  +
            let err = match error_code {
         318  +
                "AssociationDoesNotExist" => crate::operation::update_association_status::UpdateAssociationStatusError::AssociationDoesNotExist({
         319  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         320  +
                        crate::types::error::AssociationDoesNotExist::deserialize_with_response(
         321  +
                            &mut *deser,
         322  +
                            response.headers(),
         323  +
                            response.status().into(),
         324  +
                            body,
         325  +
                        )
         326  +
                    }) {
         327  +
                        ::std::result::Result::Ok(val) => val,
         328  +
                        ::std::result::Result::Err(e) => {
         329  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         330  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         331  +
                            ))
         332  +
                        }
         333  +
                    };
         334  +
                    tmp.meta = generic;
         335  +
                    if tmp.message.is_none() {
         336  +
                        tmp.message = _error_message;
         337  +
                    }
         338  +
                    tmp
         339  +
                }),
         340  +
                "InternalServerError" => crate::operation::update_association_status::UpdateAssociationStatusError::InternalServerError({
         341  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         342  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         343  +
                            &mut *deser,
         344  +
                            response.headers(),
         345  +
                            response.status().into(),
         346  +
                            body,
         347  +
                        )
         348  +
                    }) {
         349  +
                        ::std::result::Result::Ok(val) => val,
         350  +
                        ::std::result::Result::Err(e) => {
         351  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         352  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         353  +
                            ))
         354  +
                        }
         355  +
                    };
         356  +
                    tmp.meta = generic;
         357  +
                    if tmp.message.is_none() {
         358  +
                        tmp.message = _error_message;
         359  +
                    }
         360  +
                    tmp
         361  +
                }),
         362  +
                "InvalidDocument" => crate::operation::update_association_status::UpdateAssociationStatusError::InvalidDocument({
         363  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         364  +
                        crate::types::error::InvalidDocument::deserialize_with_response(
         365  +
                            &mut *deser,
         366  +
                            response.headers(),
         367  +
                            response.status().into(),
         368  +
                            body,
         369  +
                        )
         370  +
                    }) {
         371  +
                        ::std::result::Result::Ok(val) => val,
         372  +
                        ::std::result::Result::Err(e) => {
         373  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         374  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         375  +
                            ))
         376  +
                        }
         377  +
                    };
         378  +
                    tmp.meta = generic;
         379  +
                    if tmp.message.is_none() {
         380  +
                        tmp.message = _error_message;
         381  +
                    }
         382  +
                    tmp
         383  +
                }),
         384  +
                "InvalidInstanceId" => crate::operation::update_association_status::UpdateAssociationStatusError::InvalidInstanceId({
         385  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         386  +
                        crate::types::error::InvalidInstanceId::deserialize_with_response(
         387  +
                            &mut *deser,
         388  +
                            response.headers(),
         389  +
                            response.status().into(),
         390  +
                            body,
         391  +
                        )
         392  +
                    }) {
         393  +
                        ::std::result::Result::Ok(val) => val,
         394  +
                        ::std::result::Result::Err(e) => {
         395  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         396  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         397  +
                            ))
         398  +
                        }
         399  +
                    };
         400  +
                    tmp.meta = generic;
         401  +
                    if tmp.message.is_none() {
         402  +
                        tmp.message = _error_message;
         403  +
                    }
         404  +
                    tmp
         405  +
                }),
         406  +
                "StatusUnchanged" => crate::operation::update_association_status::UpdateAssociationStatusError::StatusUnchanged({
         407  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         408  +
                        crate::types::error::StatusUnchanged::deserialize_with_response(
         409  +
                            &mut *deser,
         410  +
                            response.headers(),
         411  +
                            response.status().into(),
         412  +
                            body,
         413  +
                        )
         414  +
                    }) {
         415  +
                        ::std::result::Result::Ok(val) => val,
         416  +
                        ::std::result::Result::Err(e) => {
         417  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         418  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         419  +
                            ))
         420  +
                        }
         421  +
                    };
         422  +
                    tmp.meta = generic;
         423  +
                    if tmp.message.is_none() {
         424  +
                        tmp.message = _error_message;
         425  +
                    }
         426  +
                    tmp
         427  +
                }),
         428  +
                "TooManyUpdates" => crate::operation::update_association_status::UpdateAssociationStatusError::TooManyUpdates({
         429  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         430  +
                        crate::types::error::TooManyUpdates::deserialize_with_response(
         431  +
                            &mut *deser,
         432  +
                            response.headers(),
         433  +
                            response.status().into(),
         434  +
                            body,
         435  +
                        )
         436  +
                    }) {
         437  +
                        ::std::result::Result::Ok(val) => val,
         438  +
                        ::std::result::Result::Err(e) => {
         439  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         440  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         441  +
                            ))
         442  +
                        }
         443  +
                    };
         444  +
                    tmp.meta = generic;
         445  +
                    if tmp.message.is_none() {
         446  +
                        tmp.message = _error_message;
         447  +
                    }
         448  +
                    tmp
         449  +
                }),
         450  +
                _ => {
         451  +
                    // Registry-backed, operation-scoped reification of an error whose
         452  +
                    // code this operation does not model directly: the operation's own
         453  +
                    // error registry is consulted first, then the lookup widens to the
         454  +
                    // service-wide error registry. On a hit, the reified error is attached
         455  +
                    // as the source of the returned unhandled error while its metadata
         456  +
                    // (code, message, request id) is preserved; on a miss the generic
         457  +
                    // error is returned unchanged.
         458  +
                    match protocol
         459  +
                        .deserialize_error_response(response, _cfg)
         460  +
                        .ok()
         461  +
                        .and_then(|mut deser| {
         462  +
                            ::aws_smithy_schema::registry::reify_error(
         463  +
                                crate::operation::update_association_status::error_registry::REGISTRY
         464  +
                                    .or(&crate::error_type_registry::REGISTRY),
         465  +
                                error_code,
         466  +
                                &mut *deser,
         467  +
                            )
         468  +
                        }) {
         469  +
                        ::std::option::Option::Some(source) => <crate::operation::update_association_status::UpdateAssociationStatusError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         470  +
                        ::std::option::Option::None => crate::operation::update_association_status::UpdateAssociationStatusError::generic(generic),
         471  +
                    }
         472  +
                }
         473  +
            };
         474  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         475  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         476  +
            ))
         477  +
        } else {
         478  +
            let protocol = _cfg
         479  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         480  +
                .expect("a SharedClientProtocol is required");
         481  +
            let mut deser = protocol
         482  +
                .deserialize_response(response, UpdateAssociationStatus::OUTPUT_SCHEMA, _cfg)
         483  +
                .map_err(|e| {
         484  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         485  +
                })?;
         486  +
            // body and headers are already in scope from the top of the function;
         487  +
            // alias `headers` as `_response_headers` so MutateOutput
         488  +
            // customizations have a stable name to read from.
         489  +
            let _response_headers = headers;
         490  +
            #[allow(unused_mut)]
         491  +
            let mut output = crate::operation::update_association_status::UpdateAssociationStatusOutput::deserialize_with_response(
         492  +
                &mut *deser,
         493  +
                _response_headers,
         494  +
                response.status().into(),
         495  +
                body,
         496  +
            )
         497  +
            .map_err(|e| {
         498  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         499  +
            })?;
         500  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         501  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         502  +
        }
         503  +
    }
         504  +
}
         505  +
#[derive(Debug)]
         506  +
struct UpdateAssociationStatusRequestSerializer;
         507  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateAssociationStatusRequestSerializer {
         508  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         509  +
    fn serialize_input(
         510  +
        &self,
         511  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         512  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         513  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         514  +
        let input = input
         515  +
            .downcast::<crate::operation::update_association_status::UpdateAssociationStatusInput>()
         516  +
            .expect("correct type");
         517  +
         518  +
        let protocol = _cfg
         519  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         520  +
            .expect("a SharedClientProtocol is required");
         521  +
        let mut request = protocol
         522  +
            .serialize_request(&input, UpdateAssociationStatus::INPUT_SCHEMA, "/", _cfg)
         523  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         524  +
         525  +
        return ::std::result::Result::Ok(request);
         526  +
    }
         527  +
}
         528  +
#[derive(Debug)]
         529  +
struct UpdateAssociationStatusEndpointParamsInterceptor;
         530  +
         531  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         532  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateAssociationStatusEndpointParamsInterceptor {
         533  +
    fn name(&self) -> &'static str {
         534  +
        "UpdateAssociationStatusEndpointParamsInterceptor"
         535  +
    }
         536  +
         537  +
    fn read_before_execution(
         538  +
        &self,
         539  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         540  +
            '_,
         541  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         542  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         543  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         544  +
        >,
         545  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         546  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         547  +
        let _input = context
         548  +
            .input()
         549  +
            .downcast_ref::<UpdateAssociationStatusInput>()
         550  +
            .ok_or("failed to downcast to UpdateAssociationStatusInput")?;
         551  +
         552  +
        let params = crate::config::endpoint::Params::builder()
         553  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         554  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         555  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         556  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         557  +
            .build()
         558  +
            .map_err(|err| {
         559  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         560  +
            })?;
         561  +
        cfg.interceptor_state()
         562  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         563  +
        ::std::result::Result::Ok(())
         564  +
    }
         565  +
}
         566  +
         567  +
// The get_* functions below are generated from JMESPath expressions in the
         568  +
// operationContextParams trait. They target the operation's input shape.
         569  +
         570  +
/// Error type for the `UpdateAssociationStatusError` operation.
         571  +
#[non_exhaustive]
         572  +
#[derive(::std::fmt::Debug)]
         573  +
pub enum UpdateAssociationStatusError {
         574  +
    /// <p>The specified association doesn't exist.</p>
         575  +
    AssociationDoesNotExist(crate::types::error::AssociationDoesNotExist),
         576  +
    /// <p>An error occurred on the server side.</p>
         577  +
    InternalServerError(crate::types::error::InternalServerError),
         578  +
    /// <p>The specified SSM document doesn't exist.</p>
         579  +
    InvalidDocument(crate::types::error::InvalidDocument),
         580  +
    /// <p>The following problems can cause this exception:</p>
         581  +
    /// <ul>
         582  +
    /// <li>
         583  +
    /// <p>You don't have permission to access the managed node.</p></li>
         584  +
    /// <li>
         585  +
    /// <p>Amazon Web Services Systems Manager Agent (SSM Agent) isn't running. Verify that SSM Agent is running.</p></li>
         586  +
    /// <li>
         587  +
    /// <p>SSM Agent isn't registered with the SSM endpoint. Try reinstalling SSM Agent.</p></li>
         588  +
    /// <li>
         589  +
    /// <p>The managed node isn't in a valid state. Valid states are: <code>Running</code>, <code>Pending</code>, <code>Stopped</code>, and <code>Stopping</code>. Invalid states are: <code>Shutting-down</code> and <code>Terminated</code>.</p></li>
         590  +
    /// </ul>
         591  +
    InvalidInstanceId(crate::types::error::InvalidInstanceId),
         592  +
    /// <p>The updated status is the same as the current status.</p>
         593  +
    StatusUnchanged(crate::types::error::StatusUnchanged),
         594  +
    /// <p>There are concurrent updates for a resource that supports one update at a time.</p>
         595  +
    TooManyUpdates(crate::types::error::TooManyUpdates),
         596  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         597  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         598  +
    variable wildcard pattern and check `.code()`:
         599  +
     \
         600  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         601  +
     \
         602  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateAssociationStatusError) for what information is available for the error.")]
         603  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         604  +
}
         605  +
impl UpdateAssociationStatusError {
         606  +
    /// Creates the `UpdateAssociationStatusError::Unhandled` variant from any error type.
         607  +
    pub fn unhandled(
         608  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         609  +
    ) -> Self {
         610  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         611  +
            source: err.into(),
         612  +
            meta: ::std::default::Default::default(),
         613  +
        })
         614  +
    }
         615  +
         616  +
    /// Creates the `UpdateAssociationStatusError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         617  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         618  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         619  +
            source: err.clone().into(),
         620  +
            meta: err,
         621  +
        })
         622  +
    }
         623  +
    ///
         624  +
    /// Returns error metadata, which includes the error code, message,
         625  +
    /// request ID, and potentially additional information.
         626  +
    ///
         627  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         628  +
        match self {
         629  +
            Self::AssociationDoesNotExist(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         630  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         631  +
            Self::InvalidDocument(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         632  +
            Self::InvalidInstanceId(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         633  +
            Self::StatusUnchanged(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         634  +
            Self::TooManyUpdates(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         635  +
            Self::Unhandled(e) => &e.meta,
         636  +
        }
         637  +
    }
         638  +
    /// Returns `true` if the error kind is `UpdateAssociationStatusError::AssociationDoesNotExist`.
         639  +
    pub fn is_association_does_not_exist(&self) -> bool {
         640  +
        matches!(self, Self::AssociationDoesNotExist(_))
         641  +
    }
         642  +
    /// Returns `true` if the error kind is `UpdateAssociationStatusError::InternalServerError`.
         643  +
    pub fn is_internal_server_error(&self) -> bool {
         644  +
        matches!(self, Self::InternalServerError(_))
         645  +
    }
         646  +
    /// Returns `true` if the error kind is `UpdateAssociationStatusError::InvalidDocument`.
         647  +
    pub fn is_invalid_document(&self) -> bool {
         648  +
        matches!(self, Self::InvalidDocument(_))
         649  +
    }
         650  +
    /// Returns `true` if the error kind is `UpdateAssociationStatusError::InvalidInstanceId`.
         651  +
    pub fn is_invalid_instance_id(&self) -> bool {
         652  +
        matches!(self, Self::InvalidInstanceId(_))
         653  +
    }
         654  +
    /// Returns `true` if the error kind is `UpdateAssociationStatusError::StatusUnchanged`.
         655  +
    pub fn is_status_unchanged(&self) -> bool {
         656  +
        matches!(self, Self::StatusUnchanged(_))
         657  +
    }
         658  +
    /// Returns `true` if the error kind is `UpdateAssociationStatusError::TooManyUpdates`.
         659  +
    pub fn is_too_many_updates(&self) -> bool {
         660  +
        matches!(self, Self::TooManyUpdates(_))
         661  +
    }
         662  +
}
         663  +
impl ::std::error::Error for UpdateAssociationStatusError {
         664  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         665  +
        match self {
         666  +
            Self::AssociationDoesNotExist(_inner) => ::std::option::Option::Some(_inner),
         667  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         668  +
            Self::InvalidDocument(_inner) => ::std::option::Option::Some(_inner),
         669  +
            Self::InvalidInstanceId(_inner) => ::std::option::Option::Some(_inner),
         670  +
            Self::StatusUnchanged(_inner) => ::std::option::Option::Some(_inner),
         671  +
            Self::TooManyUpdates(_inner) => ::std::option::Option::Some(_inner),
         672  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         673  +
        }
         674  +
    }
         675  +
}
         676  +
impl ::std::fmt::Display for UpdateAssociationStatusError {
         677  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         678  +
        match self {
         679  +
            Self::AssociationDoesNotExist(_inner) => _inner.fmt(f),
         680  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         681  +
            Self::InvalidDocument(_inner) => _inner.fmt(f),
         682  +
            Self::InvalidInstanceId(_inner) => _inner.fmt(f),
         683  +
            Self::StatusUnchanged(_inner) => _inner.fmt(f),
         684  +
            Self::TooManyUpdates(_inner) => _inner.fmt(f),
         685  +
            Self::Unhandled(_inner) => {
         686  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         687  +
                    write!(f, "unhandled error ({code})")
         688  +
                } else {
         689  +
                    f.write_str("unhandled error")
         690  +
                }
         691  +
            }
         692  +
        }
         693  +
    }
         694  +
}
         695  +
impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateAssociationStatusError {
         696  +
    fn code(&self) -> ::std::option::Option<&str> {
         697  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         698  +
    }
         699  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         700  +
        ::std::option::Option::None
         701  +
    }
         702  +
}
         703  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateAssociationStatusError {
         704  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         705  +
        match self {
         706  +
            Self::AssociationDoesNotExist(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         707  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         708  +
            Self::InvalidDocument(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         709  +
            Self::InvalidInstanceId(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         710  +
            Self::StatusUnchanged(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         711  +
            Self::TooManyUpdates(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         712  +
            Self::Unhandled(_inner) => &_inner.meta,
         713  +
        }
         714  +
    }
         715  +
}
         716  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateAssociationStatusError {
         717  +
    fn create_unhandled_error(
         718  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         719  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         720  +
    ) -> Self {
         721  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         722  +
            source,
         723  +
            meta: meta.unwrap_or_default(),
         724  +
        })
         725  +
    }
         726  +
}
         727  +
impl ::aws_types::request_id::RequestId for crate::operation::update_association_status::UpdateAssociationStatusError {
         728  +
    fn request_id(&self) -> Option<&str> {
         729  +
        self.meta().request_id()
         730  +
    }
         731  +
}
         732  +
         733  +
pub use crate::operation::update_association_status::_update_association_status_input::UpdateAssociationStatusInput;
         734  +
         735  +
pub use crate::operation::update_association_status::_update_association_status_output::UpdateAssociationStatusOutput;
         736  +
         737  +
mod _update_association_status_input;
         738  +
         739  +
mod _update_association_status_output;
         740  +
         741  +
/// Builders
         742  +
pub mod builders;