AWS SDK

AWS SDK

rev. bbca34fa2eddb4be623fbbc6b6df1a2401de0029

Files changed:

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

@@ -0,1 +0,229 @@
           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 PutParameterOutput {
           6  +
    /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
           7  +
    pub version: i64,
           8  +
    /// <p>The tier assigned to the parameter.</p>
           9  +
    pub tier: ::std::option::Option<crate::types::ParameterTier>,
          10  +
    _request_id: Option<String>,
          11  +
}
          12  +
impl PutParameterOutput {
          13  +
    /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
          14  +
    pub fn version(&self) -> i64 {
          15  +
        self.version
          16  +
    }
          17  +
    /// <p>The tier assigned to the parameter.</p>
          18  +
    pub fn tier(&self) -> ::std::option::Option<&crate::types::ParameterTier> {
          19  +
        self.tier.as_ref()
          20  +
    }
          21  +
}
          22  +
static PUTPARAMETEROUTPUT_MEMBER_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          23  +
    ::aws_smithy_schema::ShapeId::from_parts(
          24  +
        "com.amazonaws.ssm.synthetic#PutParameterOutput$Version",
          25  +
        "com.amazonaws.ssm.synthetic",
          26  +
        "PutParameterOutput",
          27  +
    ),
          28  +
    ::aws_smithy_schema::ShapeType::Long,
          29  +
    "Version",
          30  +
    0,
          31  +
);
          32  +
static PUTPARAMETEROUTPUT_MEMBER_TIER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm.synthetic#PutParameterOutput$Tier",
          35  +
        "com.amazonaws.ssm.synthetic",
          36  +
        "PutParameterOutput",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::String,
          39  +
    "Tier",
          40  +
    1,
          41  +
);
          42  +
static PUTPARAMETEROUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          43  +
    ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
          44  +
    ::aws_smithy_schema::ShapeType::String,
          45  +
    "request_id",
          46  +
    2,
          47  +
)
          48  +
.with_http_header("x-amzn-requestid");
          49  +
static PUTPARAMETEROUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          50  +
    ::aws_smithy_schema::ShapeId::from_parts(
          51  +
        "com.amazonaws.ssm.synthetic#PutParameterOutput",
          52  +
        "com.amazonaws.ssm.synthetic",
          53  +
        "PutParameterOutput",
          54  +
    ),
          55  +
    ::aws_smithy_schema::ShapeType::Structure,
          56  +
    &[
          57  +
        &PUTPARAMETEROUTPUT_MEMBER_VERSION,
          58  +
        &PUTPARAMETEROUTPUT_MEMBER_TIER,
          59  +
        &PUTPARAMETEROUTPUT_MEMBER__REQUEST_ID,
          60  +
    ],
          61  +
)
          62  +
.with_original_name("PutParameterResult");
          63  +
impl PutParameterOutput {
          64  +
    /// The schema for this shape.
          65  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PUTPARAMETEROUTPUT_SCHEMA;
          66  +
}
          67  +
impl ::aws_smithy_schema::serde::SerializableStruct for PutParameterOutput {
          68  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
          69  +
    fn serialize_members(
          70  +
        &self,
          71  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
          72  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
          73  +
        {
          74  +
            let val = &self.version;
          75  +
            ser.write_long(&PUTPARAMETEROUTPUT_MEMBER_VERSION, *val)?;
          76  +
        }
          77  +
        if let Some(ref val) = self.tier {
          78  +
            ser.write_string(&PUTPARAMETEROUTPUT_MEMBER_TIER, val.as_str())?;
          79  +
        }
          80  +
        Ok(())
          81  +
    }
          82  +
}
          83  +
impl PutParameterOutput {
          84  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          85  +
    pub fn deserialize(
          86  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          87  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          88  +
        #[allow(unused_variables, unused_mut)]
          89  +
        let mut builder = Self::builder();
          90  +
        #[allow(
          91  +
            unused_variables,
          92  +
            unreachable_code,
          93  +
            clippy::single_match,
          94  +
            clippy::match_single_binding,
          95  +
            clippy::diverging_sub_expression
          96  +
        )]
          97  +
        deserializer.read_struct(&PUTPARAMETEROUTPUT_SCHEMA, &mut |member, deser| {
          98  +
            match member.member_index() {
          99  +
                Some(0) => {
         100  +
                    builder.version = Some(deser.read_long(member)?);
         101  +
                }
         102  +
                Some(1) => {
         103  +
                    if deser.is_null() {
         104  +
                        deser.read_null()?;
         105  +
                    } else {
         106  +
                        builder.tier = Some(crate::types::ParameterTier::from(deser.read_string(member)?.as_str()));
         107  +
                    }
         108  +
                }
         109  +
                Some(2) => {
         110  +
                    builder._request_id = Some(deser.read_string(member)?);
         111  +
                }
         112  +
                _ => {}
         113  +
            }
         114  +
            Ok(())
         115  +
        })?;
         116  +
        Ok(builder.build())
         117  +
    }
         118  +
}
         119  +
impl PutParameterOutput {
         120  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         121  +
    /// Header-bound members are read directly from headers, avoiding runtime
         122  +
    /// member iteration overhead. Body members are read via the deserializer.
         123  +
    pub fn deserialize_with_response(
         124  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         125  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         126  +
        _status: u16,
         127  +
        _body: &[u8],
         128  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         129  +
        #[allow(unused_variables, unused_mut)]
         130  +
        let mut builder = Self::builder();
         131  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         132  +
            builder._request_id = Some(val.to_string());
         133  +
        }
         134  +
         135  +
        #[allow(
         136  +
            unused_variables,
         137  +
            unreachable_code,
         138  +
            clippy::single_match,
         139  +
            clippy::match_single_binding,
         140  +
            clippy::diverging_sub_expression
         141  +
        )]
         142  +
        deserializer.read_struct(&PUTPARAMETEROUTPUT_SCHEMA, &mut |member, deser| {
         143  +
            match member.member_index() {
         144  +
                Some(0) => {
         145  +
                    builder.version = Some(deser.read_long(member)?);
         146  +
                }
         147  +
                Some(1) => {
         148  +
                    builder.tier = Some(crate::types::ParameterTier::from(deser.read_string(member)?.as_str()));
         149  +
                }
         150  +
                _ => {}
         151  +
            }
         152  +
            Ok(())
         153  +
        })?;
         154  +
        Ok(builder.build())
         155  +
    }
         156  +
}
         157  +
impl ::aws_types::request_id::RequestId for PutParameterOutput {
         158  +
    fn request_id(&self) -> Option<&str> {
         159  +
        self._request_id.as_deref()
         160  +
    }
         161  +
}
         162  +
impl PutParameterOutput {
         163  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         164  +
        self._request_id = request_id;
         165  +
        self
         166  +
    }
         167  +
}
         168  +
impl PutParameterOutput {
         169  +
    /// Creates a new builder-style object to manufacture [`PutParameterOutput`](crate::operation::put_parameter::PutParameterOutput).
         170  +
    pub fn builder() -> crate::operation::put_parameter::builders::PutParameterOutputBuilder {
         171  +
        crate::operation::put_parameter::builders::PutParameterOutputBuilder::default()
         172  +
    }
         173  +
}
         174  +
         175  +
/// A builder for [`PutParameterOutput`](crate::operation::put_parameter::PutParameterOutput).
         176  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         177  +
#[non_exhaustive]
         178  +
pub struct PutParameterOutputBuilder {
         179  +
    pub(crate) version: ::std::option::Option<i64>,
         180  +
    pub(crate) tier: ::std::option::Option<crate::types::ParameterTier>,
         181  +
    _request_id: Option<String>,
         182  +
}
         183  +
impl PutParameterOutputBuilder {
         184  +
    /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
         185  +
    pub fn version(mut self, input: i64) -> Self {
         186  +
        self.version = ::std::option::Option::Some(input);
         187  +
        self
         188  +
    }
         189  +
    /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
         190  +
    pub fn set_version(mut self, input: ::std::option::Option<i64>) -> Self {
         191  +
        self.version = input;
         192  +
        self
         193  +
    }
         194  +
    /// <p>The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents). By default, if you don't specify a specific version, the system returns the latest parameter value when a parameter is called.</p>
         195  +
    pub fn get_version(&self) -> &::std::option::Option<i64> {
         196  +
        &self.version
         197  +
    }
         198  +
    /// <p>The tier assigned to the parameter.</p>
         199  +
    pub fn tier(mut self, input: crate::types::ParameterTier) -> Self {
         200  +
        self.tier = ::std::option::Option::Some(input);
         201  +
        self
         202  +
    }
         203  +
    /// <p>The tier assigned to the parameter.</p>
         204  +
    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::ParameterTier>) -> Self {
         205  +
        self.tier = input;
         206  +
        self
         207  +
    }
         208  +
    /// <p>The tier assigned to the parameter.</p>
         209  +
    pub fn get_tier(&self) -> &::std::option::Option<crate::types::ParameterTier> {
         210  +
        &self.tier
         211  +
    }
         212  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         213  +
        self._request_id = Some(request_id.into());
         214  +
        self
         215  +
    }
         216  +
         217  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         218  +
        self._request_id = request_id;
         219  +
        self
         220  +
    }
         221  +
    /// Consumes the builder and constructs a [`PutParameterOutput`](crate::operation::put_parameter::PutParameterOutput).
         222  +
    pub fn build(self) -> crate::operation::put_parameter::PutParameterOutput {
         223  +
        crate::operation::put_parameter::PutParameterOutput {
         224  +
            version: self.version.unwrap_or_default(),
         225  +
            tier: self.tier,
         226  +
            _request_id: self._request_id,
         227  +
        }
         228  +
    }
         229  +
}

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

@@ -0,1 +0,537 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::put_parameter::_put_parameter_input::PutParameterInputBuilder;
           3  +
           4  +
pub use crate::operation::put_parameter::_put_parameter_output::PutParameterOutputBuilder;
           5  +
           6  +
impl crate::operation::put_parameter::builders::PutParameterInputBuilder {
           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::put_parameter::PutParameterOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::put_parameter::PutParameterError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.put_parameter();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `PutParameter`.
          24  +
///
          25  +
/// <p>Create or update a parameter in Parameter Store.</p><note>
          26  +
/// <p>Parameter Store throughput defines the number of API transactions per second (TPS) that Systems Manager can process. This applies to <code>GetParameter</code>, <code>GetParameters</code>, and <code>PutParameter</code> API calls for your Amazon Web Services account and Amazon Web Services Region. By default, Parameter Store is configured with a standard throughput quota suitable for low- to moderate-volume workloads. Applications that retrieve configuration data infrequently or operate at smaller scale can use this default setting without additional cost.</p>
          27  +
/// <p>For higher-volume workloads, you can enable higher throughput. This increases the maximum number of supported transactions per second for your account and Region. Increased throughput supports applications and workloads that need concurrent access to multiple parameters. If you experience <code>ThrottlingException: Rate exceeded</code> errors, enable higher throughput. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-throughput.html">Changing Parameter Store throughput</a>.</p>
          28  +
/// </note>
          29  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
pub struct PutParameterFluentBuilder {
          31  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          32  +
    inner: crate::operation::put_parameter::builders::PutParameterInputBuilder,
          33  +
    config_override: ::std::option::Option<crate::config::Builder>,
          34  +
}
          35  +
impl
          36  +
    crate::client::customize::internal::CustomizableSend<
          37  +
        crate::operation::put_parameter::PutParameterOutput,
          38  +
        crate::operation::put_parameter::PutParameterError,
          39  +
    > for PutParameterFluentBuilder
          40  +
{
          41  +
    fn send(
          42  +
        self,
          43  +
        config_override: crate::config::Builder,
          44  +
    ) -> crate::client::customize::internal::BoxFuture<
          45  +
        crate::client::customize::internal::SendResult<
          46  +
            crate::operation::put_parameter::PutParameterOutput,
          47  +
            crate::operation::put_parameter::PutParameterError,
          48  +
        >,
          49  +
    > {
          50  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          51  +
    }
          52  +
}
          53  +
impl PutParameterFluentBuilder {
          54  +
    /// Creates a new `PutParameterFluentBuilder`.
          55  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          56  +
        Self {
          57  +
            handle,
          58  +
            inner: ::std::default::Default::default(),
          59  +
            config_override: ::std::option::Option::None,
          60  +
        }
          61  +
    }
          62  +
    /// Access the PutParameter as a reference.
          63  +
    pub fn as_input(&self) -> &crate::operation::put_parameter::builders::PutParameterInputBuilder {
          64  +
        &self.inner
          65  +
    }
          66  +
    /// Sends the request and returns the response.
          67  +
    ///
          68  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          69  +
    /// can be matched against.
          70  +
    ///
          71  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          72  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          73  +
    /// set when configuring the client.
          74  +
    pub async fn send(
          75  +
        self,
          76  +
    ) -> ::std::result::Result<
          77  +
        crate::operation::put_parameter::PutParameterOutput,
          78  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          79  +
            crate::operation::put_parameter::PutParameterError,
          80  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          81  +
        >,
          82  +
    > {
          83  +
        let input = self
          84  +
            .inner
          85  +
            .build()
          86  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          87  +
        let runtime_plugins = crate::operation::put_parameter::PutParameter::operation_runtime_plugins(
          88  +
            self.handle.runtime_plugins.clone(),
          89  +
            &self.handle.conf,
          90  +
            self.config_override,
          91  +
        );
          92  +
        crate::operation::put_parameter::PutParameter::orchestrate(&runtime_plugins, input).await
          93  +
    }
          94  +
          95  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          96  +
    pub fn customize(
          97  +
        self,
          98  +
    ) -> crate::client::customize::CustomizableOperation<
          99  +
        crate::operation::put_parameter::PutParameterOutput,
         100  +
        crate::operation::put_parameter::PutParameterError,
         101  +
        Self,
         102  +
    > {
         103  +
        crate::client::customize::CustomizableOperation::new(self)
         104  +
    }
         105  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         106  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         107  +
        self
         108  +
    }
         109  +
         110  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         111  +
        self.config_override = config_override;
         112  +
        self
         113  +
    }
         114  +
    /// <p>The fully qualified name of the parameter that you want to create or update.</p><note>
         115  +
    /// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
         116  +
    /// </note>
         117  +
    /// <p>The fully qualified name includes the complete hierarchy of the parameter path and name. For parameters in a hierarchy, you must include a leading forward slash character (/) when you create or reference a parameter. For example: <code>/Dev/DBServer/MySQL/db-string13</code></p>
         118  +
    /// <p>Naming Constraints:</p>
         119  +
    /// <ul>
         120  +
    /// <li>
         121  +
    /// <p>Parameter names are case sensitive.</p></li>
         122  +
    /// <li>
         123  +
    /// <p>A parameter name must be unique within an Amazon Web Services Region</p></li>
         124  +
    /// <li>
         125  +
    /// <p>A parameter name can't be prefixed with "<code>aws</code>" or "<code>ssm</code>" (case-insensitive).</p></li>
         126  +
    /// <li>
         127  +
    /// <p>Parameter names can include only the following symbols and letters: <code>a-zA-Z0-9_.-</code></p>
         128  +
    /// <p>In addition, the slash character ( / ) is used to delineate hierarchies in parameter names. For example: <code>/Dev/Production/East/Project-ABC/MyParameter</code></p></li>
         129  +
    /// <li>
         130  +
    /// <p>Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a <code>ValidationException</code> error.</p></li>
         131  +
    /// <li>
         132  +
    /// <p>Parameter hierarchies are limited to a maximum depth of fifteen levels.</p></li>
         133  +
    /// </ul>
         134  +
    /// <p>For additional information about valid values for parameter names, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html">Creating Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         135  +
    /// <p>The reported maximum length of 2048 characters for a parameter name includes 1037 characters that are reserved for internal use by Systems Manager. The maximum length for a parameter name that you specify is 1011 characters.</p>
         136  +
    /// <p>This count of 1011 characters includes the characters in the ARN that precede the name you specify. This ARN length will vary depending on your partition and Region. For example, the following 45 characters count toward the 1011 character maximum for a parameter created in the US East (Ohio) Region: <code>arn:aws:ssm:us-east-2:111122223333:parameter/</code>.</p>
         137  +
    /// </note>
         138  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         139  +
        self.inner = self.inner.name(input.into());
         140  +
        self
         141  +
    }
         142  +
    /// <p>The fully qualified name of the parameter that you want to create or update.</p><note>
         143  +
    /// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
         144  +
    /// </note>
         145  +
    /// <p>The fully qualified name includes the complete hierarchy of the parameter path and name. For parameters in a hierarchy, you must include a leading forward slash character (/) when you create or reference a parameter. For example: <code>/Dev/DBServer/MySQL/db-string13</code></p>
         146  +
    /// <p>Naming Constraints:</p>
         147  +
    /// <ul>
         148  +
    /// <li>
         149  +
    /// <p>Parameter names are case sensitive.</p></li>
         150  +
    /// <li>
         151  +
    /// <p>A parameter name must be unique within an Amazon Web Services Region</p></li>
         152  +
    /// <li>
         153  +
    /// <p>A parameter name can't be prefixed with "<code>aws</code>" or "<code>ssm</code>" (case-insensitive).</p></li>
         154  +
    /// <li>
         155  +
    /// <p>Parameter names can include only the following symbols and letters: <code>a-zA-Z0-9_.-</code></p>
         156  +
    /// <p>In addition, the slash character ( / ) is used to delineate hierarchies in parameter names. For example: <code>/Dev/Production/East/Project-ABC/MyParameter</code></p></li>
         157  +
    /// <li>
         158  +
    /// <p>Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a <code>ValidationException</code> error.</p></li>
         159  +
    /// <li>
         160  +
    /// <p>Parameter hierarchies are limited to a maximum depth of fifteen levels.</p></li>
         161  +
    /// </ul>
         162  +
    /// <p>For additional information about valid values for parameter names, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html">Creating Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         163  +
    /// <p>The reported maximum length of 2048 characters for a parameter name includes 1037 characters that are reserved for internal use by Systems Manager. The maximum length for a parameter name that you specify is 1011 characters.</p>
         164  +
    /// <p>This count of 1011 characters includes the characters in the ARN that precede the name you specify. This ARN length will vary depending on your partition and Region. For example, the following 45 characters count toward the 1011 character maximum for a parameter created in the US East (Ohio) Region: <code>arn:aws:ssm:us-east-2:111122223333:parameter/</code>.</p>
         165  +
    /// </note>
         166  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         167  +
        self.inner = self.inner.set_name(input);
         168  +
        self
         169  +
    }
         170  +
    /// <p>The fully qualified name of the parameter that you want to create or update.</p><note>
         171  +
    /// <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name itself.</p>
         172  +
    /// </note>
         173  +
    /// <p>The fully qualified name includes the complete hierarchy of the parameter path and name. For parameters in a hierarchy, you must include a leading forward slash character (/) when you create or reference a parameter. For example: <code>/Dev/DBServer/MySQL/db-string13</code></p>
         174  +
    /// <p>Naming Constraints:</p>
         175  +
    /// <ul>
         176  +
    /// <li>
         177  +
    /// <p>Parameter names are case sensitive.</p></li>
         178  +
    /// <li>
         179  +
    /// <p>A parameter name must be unique within an Amazon Web Services Region</p></li>
         180  +
    /// <li>
         181  +
    /// <p>A parameter name can't be prefixed with "<code>aws</code>" or "<code>ssm</code>" (case-insensitive).</p></li>
         182  +
    /// <li>
         183  +
    /// <p>Parameter names can include only the following symbols and letters: <code>a-zA-Z0-9_.-</code></p>
         184  +
    /// <p>In addition, the slash character ( / ) is used to delineate hierarchies in parameter names. For example: <code>/Dev/Production/East/Project-ABC/MyParameter</code></p></li>
         185  +
    /// <li>
         186  +
    /// <p>Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a <code>ValidationException</code> error.</p></li>
         187  +
    /// <li>
         188  +
    /// <p>Parameter hierarchies are limited to a maximum depth of fifteen levels.</p></li>
         189  +
    /// </ul>
         190  +
    /// <p>For additional information about valid values for parameter names, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html">Creating Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         191  +
    /// <p>The reported maximum length of 2048 characters for a parameter name includes 1037 characters that are reserved for internal use by Systems Manager. The maximum length for a parameter name that you specify is 1011 characters.</p>
         192  +
    /// <p>This count of 1011 characters includes the characters in the ARN that precede the name you specify. This ARN length will vary depending on your partition and Region. For example, the following 45 characters count toward the 1011 character maximum for a parameter created in the US East (Ohio) Region: <code>arn:aws:ssm:us-east-2:111122223333:parameter/</code>.</p>
         193  +
    /// </note>
         194  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         195  +
        self.inner.get_name()
         196  +
    }
         197  +
    /// <p>Information about the parameter that you want to add to the system. Optional but recommended.</p><important>
         198  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         199  +
    /// </important>
         200  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         201  +
        self.inner = self.inner.description(input.into());
         202  +
        self
         203  +
    }
         204  +
    /// <p>Information about the parameter that you want to add to the system. Optional but recommended.</p><important>
         205  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         206  +
    /// </important>
         207  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         208  +
        self.inner = self.inner.set_description(input);
         209  +
        self
         210  +
    }
         211  +
    /// <p>Information about the parameter that you want to add to the system. Optional but recommended.</p><important>
         212  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         213  +
    /// </important>
         214  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         215  +
        self.inner.get_description()
         216  +
    }
         217  +
    /// <p>The parameter value that you want to add to the system. Standard parameters have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.</p><note>
         218  +
    /// <p>Parameters can't be referenced or nested in the values of other parameters. You can't include values wrapped in double brackets <code>{{}}</code> or <code>{{ssm:<i>parameter-name</i>}}</code> in a parameter value.</p>
         219  +
    /// </note>
         220  +
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         221  +
        self.inner = self.inner.value(input.into());
         222  +
        self
         223  +
    }
         224  +
    /// <p>The parameter value that you want to add to the system. Standard parameters have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.</p><note>
         225  +
    /// <p>Parameters can't be referenced or nested in the values of other parameters. You can't include values wrapped in double brackets <code>{{}}</code> or <code>{{ssm:<i>parameter-name</i>}}</code> in a parameter value.</p>
         226  +
    /// </note>
         227  +
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         228  +
        self.inner = self.inner.set_value(input);
         229  +
        self
         230  +
    }
         231  +
    /// <p>The parameter value that you want to add to the system. Standard parameters have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.</p><note>
         232  +
    /// <p>Parameters can't be referenced or nested in the values of other parameters. You can't include values wrapped in double brackets <code>{{}}</code> or <code>{{ssm:<i>parameter-name</i>}}</code> in a parameter value.</p>
         233  +
    /// </note>
         234  +
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
         235  +
        self.inner.get_value()
         236  +
    }
         237  +
    /// <p>The type of parameter that you want to create.</p><note>
         238  +
    /// <p><code>SecureString</code> isn't currently supported for CloudFormation templates.</p>
         239  +
    /// </note>
         240  +
    /// <p>Items in a <code>StringList</code> must be separated by a comma (,). You can't use other punctuation or special character to escape items in the list. If you have a parameter value that requires a comma, then use the <code>String</code> data type.</p><important>
         241  +
    /// <p>Specifying a parameter type isn't required when updating a parameter. You must specify a parameter type when creating a parameter.</p>
         242  +
    /// </important>
         243  +
    pub fn r#type(mut self, input: crate::types::ParameterType) -> Self {
         244  +
        self.inner = self.inner.r#type(input);
         245  +
        self
         246  +
    }
         247  +
    /// <p>The type of parameter that you want to create.</p><note>
         248  +
    /// <p><code>SecureString</code> isn't currently supported for CloudFormation templates.</p>
         249  +
    /// </note>
         250  +
    /// <p>Items in a <code>StringList</code> must be separated by a comma (,). You can't use other punctuation or special character to escape items in the list. If you have a parameter value that requires a comma, then use the <code>String</code> data type.</p><important>
         251  +
    /// <p>Specifying a parameter type isn't required when updating a parameter. You must specify a parameter type when creating a parameter.</p>
         252  +
    /// </important>
         253  +
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ParameterType>) -> Self {
         254  +
        self.inner = self.inner.set_type(input);
         255  +
        self
         256  +
    }
         257  +
    /// <p>The type of parameter that you want to create.</p><note>
         258  +
    /// <p><code>SecureString</code> isn't currently supported for CloudFormation templates.</p>
         259  +
    /// </note>
         260  +
    /// <p>Items in a <code>StringList</code> must be separated by a comma (,). You can't use other punctuation or special character to escape items in the list. If you have a parameter value that requires a comma, then use the <code>String</code> data type.</p><important>
         261  +
    /// <p>Specifying a parameter type isn't required when updating a parameter. You must specify a parameter type when creating a parameter.</p>
         262  +
    /// </important>
         263  +
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ParameterType> {
         264  +
        self.inner.get_type()
         265  +
    }
         266  +
    /// <p>The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the <code>SecureString</code> data type.</p>
         267  +
    /// <p>If you don't specify a key ID, the system uses the default key associated with your Amazon Web Services account, which is not as secure as using a custom key.</p>
         268  +
    /// <ul>
         269  +
    /// <li>
         270  +
    /// <p>To use a custom KMS key, choose the <code>SecureString</code> data type with the <code>Key ID</code> parameter.</p></li>
         271  +
    /// </ul>
         272  +
    pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         273  +
        self.inner = self.inner.key_id(input.into());
         274  +
        self
         275  +
    }
         276  +
    /// <p>The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the <code>SecureString</code> data type.</p>
         277  +
    /// <p>If you don't specify a key ID, the system uses the default key associated with your Amazon Web Services account, which is not as secure as using a custom key.</p>
         278  +
    /// <ul>
         279  +
    /// <li>
         280  +
    /// <p>To use a custom KMS key, choose the <code>SecureString</code> data type with the <code>Key ID</code> parameter.</p></li>
         281  +
    /// </ul>
         282  +
    pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         283  +
        self.inner = self.inner.set_key_id(input);
         284  +
        self
         285  +
    }
         286  +
    /// <p>The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the <code>SecureString</code> data type.</p>
         287  +
    /// <p>If you don't specify a key ID, the system uses the default key associated with your Amazon Web Services account, which is not as secure as using a custom key.</p>
         288  +
    /// <ul>
         289  +
    /// <li>
         290  +
    /// <p>To use a custom KMS key, choose the <code>SecureString</code> data type with the <code>Key ID</code> parameter.</p></li>
         291  +
    /// </ul>
         292  +
    pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
         293  +
        self.inner.get_key_id()
         294  +
    }
         295  +
    /// <p>Overwrite an existing parameter. The default value is <code>false</code>.</p>
         296  +
    pub fn overwrite(mut self, input: bool) -> Self {
         297  +
        self.inner = self.inner.overwrite(input);
         298  +
        self
         299  +
    }
         300  +
    /// <p>Overwrite an existing parameter. The default value is <code>false</code>.</p>
         301  +
    pub fn set_overwrite(mut self, input: ::std::option::Option<bool>) -> Self {
         302  +
        self.inner = self.inner.set_overwrite(input);
         303  +
        self
         304  +
    }
         305  +
    /// <p>Overwrite an existing parameter. The default value is <code>false</code>.</p>
         306  +
    pub fn get_overwrite(&self) -> &::std::option::Option<bool> {
         307  +
        self.inner.get_overwrite()
         308  +
    }
         309  +
    /// <p>A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$</p>
         310  +
    pub fn allowed_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         311  +
        self.inner = self.inner.allowed_pattern(input.into());
         312  +
        self
         313  +
    }
         314  +
    /// <p>A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$</p>
         315  +
    pub fn set_allowed_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         316  +
        self.inner = self.inner.set_allowed_pattern(input);
         317  +
        self
         318  +
    }
         319  +
    /// <p>A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$</p>
         320  +
    pub fn get_allowed_pattern(&self) -> &::std::option::Option<::std::string::String> {
         321  +
        self.inner.get_allowed_pattern()
         322  +
    }
         323  +
    ///
         324  +
    /// Appends an item to `Tags`.
         325  +
    ///
         326  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         327  +
    ///
         328  +
    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:</p>
         329  +
    /// <ul>
         330  +
    /// <li>
         331  +
    /// <p><code>Key=Resource,Value=S3bucket</code></p></li>
         332  +
    /// <li>
         333  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         334  +
    /// <li>
         335  +
    /// <p><code>Key=ParameterType,Value=LicenseKey</code></p></li>
         336  +
    /// </ul><note>
         337  +
    /// <p>To add tags to an existing Systems Manager parameter, use the <code>AddTagsToResource</code> operation.</p>
         338  +
    /// </note>
         339  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         340  +
        self.inner = self.inner.tags(input);
         341  +
        self
         342  +
    }
         343  +
    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:</p>
         344  +
    /// <ul>
         345  +
    /// <li>
         346  +
    /// <p><code>Key=Resource,Value=S3bucket</code></p></li>
         347  +
    /// <li>
         348  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         349  +
    /// <li>
         350  +
    /// <p><code>Key=ParameterType,Value=LicenseKey</code></p></li>
         351  +
    /// </ul><note>
         352  +
    /// <p>To add tags to an existing Systems Manager parameter, use the <code>AddTagsToResource</code> operation.</p>
         353  +
    /// </note>
         354  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         355  +
        self.inner = self.inner.set_tags(input);
         356  +
        self
         357  +
    }
         358  +
    /// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:</p>
         359  +
    /// <ul>
         360  +
    /// <li>
         361  +
    /// <p><code>Key=Resource,Value=S3bucket</code></p></li>
         362  +
    /// <li>
         363  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         364  +
    /// <li>
         365  +
    /// <p><code>Key=ParameterType,Value=LicenseKey</code></p></li>
         366  +
    /// </ul><note>
         367  +
    /// <p>To add tags to an existing Systems Manager parameter, use the <code>AddTagsToResource</code> operation.</p>
         368  +
    /// </note>
         369  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         370  +
        self.inner.get_tags()
         371  +
    }
         372  +
    /// <p>The parameter tier to assign to a parameter.</p>
         373  +
    /// <p>Parameter Store offers a standard tier and an advanced tier for parameters. Standard parameters have a content size limit of 4 KB and can't be configured to use parameter policies. You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account. Standard parameters are offered at no additional cost.</p>
         374  +
    /// <p>Advanced parameters have a content size limit of 8 KB and can be configured to use parameter policies. You can create a maximum of 100,000 advanced parameters for each Region in an Amazon Web Services account. Advanced parameters incur a charge. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html">Managing parameter tiers</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         375  +
    /// <p>You can change a standard parameter to an advanced parameter any time. But you can't revert an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard parameter would result in data loss because the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly, advanced parameters use a different form of encryption than standard parameters.</p>
         376  +
    /// <p>If you no longer need an advanced parameter, or if you no longer want to incur charges for an advanced parameter, you must delete it and recreate it as a new standard parameter.</p>
         377  +
    /// <p><b>Using the Default Tier Configuration</b></p>
         378  +
    /// <p>In <code>PutParameter</code> requests, you can specify the tier to create the parameter in. Whenever you specify a tier in the request, Parameter Store creates or updates the parameter according to that request. However, if you don't specify a tier in a request, Parameter Store assigns the tier based on the current Parameter Store default tier configuration.</p>
         379  +
    /// <p>The default tier when you begin using Parameter Store is the standard-parameter tier. If you use the advanced-parameter tier, you can specify one of the following as the default:</p>
         380  +
    /// <ul>
         381  +
    /// <li>
         382  +
    /// <p><b>Advanced</b>: With this option, Parameter Store evaluates all requests as advanced parameters.</p></li>
         383  +
    /// <li>
         384  +
    /// <p><b>Intelligent-Tiering</b>: With this option, Parameter Store evaluates each request to determine if the parameter is standard or advanced.</p>
         385  +
    /// <p>If the request doesn't include any options that require an advanced parameter, the parameter is created in the standard-parameter tier. If one or more options requiring an advanced parameter are included in the request, Parameter Store create a parameter in the advanced-parameter tier.</p>
         386  +
    /// <p>This approach helps control your parameter-related costs by always creating standard parameters unless an advanced parameter is necessary.</p></li>
         387  +
    /// </ul>
         388  +
    /// <p>Options that require an advanced parameter include the following:</p>
         389  +
    /// <ul>
         390  +
    /// <li>
         391  +
    /// <p>The content size of the parameter is more than 4 KB.</p></li>
         392  +
    /// <li>
         393  +
    /// <p>The parameter uses a parameter policy.</p></li>
         394  +
    /// <li>
         395  +
    /// <p>More than 10,000 parameters already exist in your Amazon Web Services account in the current Amazon Web Services Region.</p></li>
         396  +
    /// </ul>
         397  +
    /// <p>For more information about configuring the default tier option, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html#ps-default-tier">Specifying a default parameter tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         398  +
    pub fn tier(mut self, input: crate::types::ParameterTier) -> Self {
         399  +
        self.inner = self.inner.tier(input);
         400  +
        self
         401  +
    }
         402  +
    /// <p>The parameter tier to assign to a parameter.</p>
         403  +
    /// <p>Parameter Store offers a standard tier and an advanced tier for parameters. Standard parameters have a content size limit of 4 KB and can't be configured to use parameter policies. You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account. Standard parameters are offered at no additional cost.</p>
         404  +
    /// <p>Advanced parameters have a content size limit of 8 KB and can be configured to use parameter policies. You can create a maximum of 100,000 advanced parameters for each Region in an Amazon Web Services account. Advanced parameters incur a charge. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html">Managing parameter tiers</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         405  +
    /// <p>You can change a standard parameter to an advanced parameter any time. But you can't revert an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard parameter would result in data loss because the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly, advanced parameters use a different form of encryption than standard parameters.</p>
         406  +
    /// <p>If you no longer need an advanced parameter, or if you no longer want to incur charges for an advanced parameter, you must delete it and recreate it as a new standard parameter.</p>
         407  +
    /// <p><b>Using the Default Tier Configuration</b></p>
         408  +
    /// <p>In <code>PutParameter</code> requests, you can specify the tier to create the parameter in. Whenever you specify a tier in the request, Parameter Store creates or updates the parameter according to that request. However, if you don't specify a tier in a request, Parameter Store assigns the tier based on the current Parameter Store default tier configuration.</p>
         409  +
    /// <p>The default tier when you begin using Parameter Store is the standard-parameter tier. If you use the advanced-parameter tier, you can specify one of the following as the default:</p>
         410  +
    /// <ul>
         411  +
    /// <li>
         412  +
    /// <p><b>Advanced</b>: With this option, Parameter Store evaluates all requests as advanced parameters.</p></li>
         413  +
    /// <li>
         414  +
    /// <p><b>Intelligent-Tiering</b>: With this option, Parameter Store evaluates each request to determine if the parameter is standard or advanced.</p>
         415  +
    /// <p>If the request doesn't include any options that require an advanced parameter, the parameter is created in the standard-parameter tier. If one or more options requiring an advanced parameter are included in the request, Parameter Store create a parameter in the advanced-parameter tier.</p>
         416  +
    /// <p>This approach helps control your parameter-related costs by always creating standard parameters unless an advanced parameter is necessary.</p></li>
         417  +
    /// </ul>
         418  +
    /// <p>Options that require an advanced parameter include the following:</p>
         419  +
    /// <ul>
         420  +
    /// <li>
         421  +
    /// <p>The content size of the parameter is more than 4 KB.</p></li>
         422  +
    /// <li>
         423  +
    /// <p>The parameter uses a parameter policy.</p></li>
         424  +
    /// <li>
         425  +
    /// <p>More than 10,000 parameters already exist in your Amazon Web Services account in the current Amazon Web Services Region.</p></li>
         426  +
    /// </ul>
         427  +
    /// <p>For more information about configuring the default tier option, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html#ps-default-tier">Specifying a default parameter tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         428  +
    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::ParameterTier>) -> Self {
         429  +
        self.inner = self.inner.set_tier(input);
         430  +
        self
         431  +
    }
         432  +
    /// <p>The parameter tier to assign to a parameter.</p>
         433  +
    /// <p>Parameter Store offers a standard tier and an advanced tier for parameters. Standard parameters have a content size limit of 4 KB and can't be configured to use parameter policies. You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account. Standard parameters are offered at no additional cost.</p>
         434  +
    /// <p>Advanced parameters have a content size limit of 8 KB and can be configured to use parameter policies. You can create a maximum of 100,000 advanced parameters for each Region in an Amazon Web Services account. Advanced parameters incur a charge. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html">Managing parameter tiers</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         435  +
    /// <p>You can change a standard parameter to an advanced parameter any time. But you can't revert an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard parameter would result in data loss because the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly, advanced parameters use a different form of encryption than standard parameters.</p>
         436  +
    /// <p>If you no longer need an advanced parameter, or if you no longer want to incur charges for an advanced parameter, you must delete it and recreate it as a new standard parameter.</p>
         437  +
    /// <p><b>Using the Default Tier Configuration</b></p>
         438  +
    /// <p>In <code>PutParameter</code> requests, you can specify the tier to create the parameter in. Whenever you specify a tier in the request, Parameter Store creates or updates the parameter according to that request. However, if you don't specify a tier in a request, Parameter Store assigns the tier based on the current Parameter Store default tier configuration.</p>
         439  +
    /// <p>The default tier when you begin using Parameter Store is the standard-parameter tier. If you use the advanced-parameter tier, you can specify one of the following as the default:</p>
         440  +
    /// <ul>
         441  +
    /// <li>
         442  +
    /// <p><b>Advanced</b>: With this option, Parameter Store evaluates all requests as advanced parameters.</p></li>
         443  +
    /// <li>
         444  +
    /// <p><b>Intelligent-Tiering</b>: With this option, Parameter Store evaluates each request to determine if the parameter is standard or advanced.</p>
         445  +
    /// <p>If the request doesn't include any options that require an advanced parameter, the parameter is created in the standard-parameter tier. If one or more options requiring an advanced parameter are included in the request, Parameter Store create a parameter in the advanced-parameter tier.</p>
         446  +
    /// <p>This approach helps control your parameter-related costs by always creating standard parameters unless an advanced parameter is necessary.</p></li>
         447  +
    /// </ul>
         448  +
    /// <p>Options that require an advanced parameter include the following:</p>
         449  +
    /// <ul>
         450  +
    /// <li>
         451  +
    /// <p>The content size of the parameter is more than 4 KB.</p></li>
         452  +
    /// <li>
         453  +
    /// <p>The parameter uses a parameter policy.</p></li>
         454  +
    /// <li>
         455  +
    /// <p>More than 10,000 parameters already exist in your Amazon Web Services account in the current Amazon Web Services Region.</p></li>
         456  +
    /// </ul>
         457  +
    /// <p>For more information about configuring the default tier option, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html#ps-default-tier">Specifying a default parameter tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         458  +
    pub fn get_tier(&self) -> &::std::option::Option<crate::types::ParameterTier> {
         459  +
        self.inner.get_tier()
         460  +
    }
         461  +
    /// <p>One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a tool in Amazon Web Services Systems Manager supports the following policy types:</p>
         462  +
    /// <p>Expiration: This policy deletes the parameter after it expires. When you create the policy, you specify the expiration date. You can update the expiration date and time by updating the policy. Updating the <i>parameter</i> doesn't affect the expiration date and time. When the expiration time is reached, Parameter Store deletes the parameter.</p>
         463  +
    /// <p>ExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that notifies you about the expiration. By using this policy, you can receive notification before or after the expiration time is reached, in units of days or hours.</p>
         464  +
    /// <p>NoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't been modified for a specified period of time. This policy type is useful when, for example, a secret needs to be changed within a period of time, but it hasn't been changed.</p>
         465  +
    /// <p>All existing policies are preserved until you send new policies or an empty policy. For more information about parameter policies, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a>.</p>
         466  +
    pub fn policies(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         467  +
        self.inner = self.inner.policies(input.into());
         468  +
        self
         469  +
    }
         470  +
    /// <p>One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a tool in Amazon Web Services Systems Manager supports the following policy types:</p>
         471  +
    /// <p>Expiration: This policy deletes the parameter after it expires. When you create the policy, you specify the expiration date. You can update the expiration date and time by updating the policy. Updating the <i>parameter</i> doesn't affect the expiration date and time. When the expiration time is reached, Parameter Store deletes the parameter.</p>
         472  +
    /// <p>ExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that notifies you about the expiration. By using this policy, you can receive notification before or after the expiration time is reached, in units of days or hours.</p>
         473  +
    /// <p>NoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't been modified for a specified period of time. This policy type is useful when, for example, a secret needs to be changed within a period of time, but it hasn't been changed.</p>
         474  +
    /// <p>All existing policies are preserved until you send new policies or an empty policy. For more information about parameter policies, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a>.</p>
         475  +
    pub fn set_policies(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         476  +
        self.inner = self.inner.set_policies(input);
         477  +
        self
         478  +
    }
         479  +
    /// <p>One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a tool in Amazon Web Services Systems Manager supports the following policy types:</p>
         480  +
    /// <p>Expiration: This policy deletes the parameter after it expires. When you create the policy, you specify the expiration date. You can update the expiration date and time by updating the policy. Updating the <i>parameter</i> doesn't affect the expiration date and time. When the expiration time is reached, Parameter Store deletes the parameter.</p>
         481  +
    /// <p>ExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that notifies you about the expiration. By using this policy, you can receive notification before or after the expiration time is reached, in units of days or hours.</p>
         482  +
    /// <p>NoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't been modified for a specified period of time. This policy type is useful when, for example, a secret needs to be changed within a period of time, but it hasn't been changed.</p>
         483  +
    /// <p>All existing policies are preserved until you send new policies or an empty policy. For more information about parameter policies, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a>.</p>
         484  +
    pub fn get_policies(&self) -> &::std::option::Option<::std::string::String> {
         485  +
        self.inner.get_policies()
         486  +
    }
         487  +
    /// <p>The data type for a <code>String</code> parameter. Supported data types include plain text and Amazon Machine Image (AMI) IDs.</p>
         488  +
    /// <p><b>The following data type values are supported.</b></p>
         489  +
    /// <ul>
         490  +
    /// <li>
         491  +
    /// <p><code>text</code></p></li>
         492  +
    /// <li>
         493  +
    /// <p><code>aws:ec2:image</code></p></li>
         494  +
    /// <li>
         495  +
    /// <p><code>aws:ssm:integration</code></p></li>
         496  +
    /// </ul>
         497  +
    /// <p>When you create a <code>String</code> parameter and specify <code>aws:ec2:image</code>, Amazon Web Services Systems Manager validates the parameter value is in the required format, such as <code>ami-12345abcdeEXAMPLE</code>, and that the specified AMI is available in your Amazon Web Services account.</p><note>
         498  +
    /// <p>If the action is successful, the service sends back an HTTP 200 response which indicates a successful <code>PutParameter</code> call for all cases except for data type <code>aws:ec2:image</code>. If you call <code>PutParameter</code> with <code>aws:ec2:image</code> data type, a successful HTTP 200 response does not guarantee that your parameter was successfully created or updated. The <code>aws:ec2:image</code> value is validated asynchronously, and the <code>PutParameter</code> call returns before the validation is complete. If you submit an invalid AMI value, the PutParameter operation will return success, but the asynchronous validation will fail and the parameter will not be created or updated. To monitor whether your <code>aws:ec2:image</code> parameters are created successfully, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html">Setting up notifications or trigger actions based on Parameter Store events</a>. For more information about AMI format validation , see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html">Native parameter support for Amazon Machine Image IDs</a>.</p>
         499  +
    /// </note>
         500  +
    pub fn data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         501  +
        self.inner = self.inner.data_type(input.into());
         502  +
        self
         503  +
    }
         504  +
    /// <p>The data type for a <code>String</code> parameter. Supported data types include plain text and Amazon Machine Image (AMI) IDs.</p>
         505  +
    /// <p><b>The following data type values are supported.</b></p>
         506  +
    /// <ul>
         507  +
    /// <li>
         508  +
    /// <p><code>text</code></p></li>
         509  +
    /// <li>
         510  +
    /// <p><code>aws:ec2:image</code></p></li>
         511  +
    /// <li>
         512  +
    /// <p><code>aws:ssm:integration</code></p></li>
         513  +
    /// </ul>
         514  +
    /// <p>When you create a <code>String</code> parameter and specify <code>aws:ec2:image</code>, Amazon Web Services Systems Manager validates the parameter value is in the required format, such as <code>ami-12345abcdeEXAMPLE</code>, and that the specified AMI is available in your Amazon Web Services account.</p><note>
         515  +
    /// <p>If the action is successful, the service sends back an HTTP 200 response which indicates a successful <code>PutParameter</code> call for all cases except for data type <code>aws:ec2:image</code>. If you call <code>PutParameter</code> with <code>aws:ec2:image</code> data type, a successful HTTP 200 response does not guarantee that your parameter was successfully created or updated. The <code>aws:ec2:image</code> value is validated asynchronously, and the <code>PutParameter</code> call returns before the validation is complete. If you submit an invalid AMI value, the PutParameter operation will return success, but the asynchronous validation will fail and the parameter will not be created or updated. To monitor whether your <code>aws:ec2:image</code> parameters are created successfully, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html">Setting up notifications or trigger actions based on Parameter Store events</a>. For more information about AMI format validation , see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html">Native parameter support for Amazon Machine Image IDs</a>.</p>
         516  +
    /// </note>
         517  +
    pub fn set_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         518  +
        self.inner = self.inner.set_data_type(input);
         519  +
        self
         520  +
    }
         521  +
    /// <p>The data type for a <code>String</code> parameter. Supported data types include plain text and Amazon Machine Image (AMI) IDs.</p>
         522  +
    /// <p><b>The following data type values are supported.</b></p>
         523  +
    /// <ul>
         524  +
    /// <li>
         525  +
    /// <p><code>text</code></p></li>
         526  +
    /// <li>
         527  +
    /// <p><code>aws:ec2:image</code></p></li>
         528  +
    /// <li>
         529  +
    /// <p><code>aws:ssm:integration</code></p></li>
         530  +
    /// </ul>
         531  +
    /// <p>When you create a <code>String</code> parameter and specify <code>aws:ec2:image</code>, Amazon Web Services Systems Manager validates the parameter value is in the required format, such as <code>ami-12345abcdeEXAMPLE</code>, and that the specified AMI is available in your Amazon Web Services account.</p><note>
         532  +
    /// <p>If the action is successful, the service sends back an HTTP 200 response which indicates a successful <code>PutParameter</code> call for all cases except for data type <code>aws:ec2:image</code>. If you call <code>PutParameter</code> with <code>aws:ec2:image</code> data type, a successful HTTP 200 response does not guarantee that your parameter was successfully created or updated. The <code>aws:ec2:image</code> value is validated asynchronously, and the <code>PutParameter</code> call returns before the validation is complete. If you submit an invalid AMI value, the PutParameter operation will return success, but the asynchronous validation will fail and the parameter will not be created or updated. To monitor whether your <code>aws:ec2:image</code> parameters are created successfully, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html">Setting up notifications or trigger actions based on Parameter Store events</a>. For more information about AMI format validation , see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html">Native parameter support for Amazon Machine Image IDs</a>.</p>
         533  +
    /// </note>
         534  +
    pub fn get_data_type(&self) -> &::std::option::Option<::std::string::String> {
         535  +
        self.inner.get_data_type()
         536  +
    }
         537  +
}

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

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