AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578

Files changed:

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

@@ -0,1 +0,530 @@
           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 CreateActivationInput {
           6  +
    /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
           7  +
    /// <p>Don't enter personally identifiable information in this field.</p>
           8  +
    /// </important>
           9  +
    pub description: ::std::option::Option<::std::string::String>,
          10  +
    /// <p>The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.</p><important>
          11  +
    /// <p>Don't enter personally identifiable information in this field.</p>
          12  +
    /// </important>
          13  +
    pub default_instance_name: ::std::option::Option<::std::string::String>,
          14  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in a hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
          15  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
          16  +
    /// </note>
          17  +
    pub iam_role: ::std::option::Option<::std::string::String>,
          18  +
    /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
          19  +
    pub registration_limit: ::std::option::Option<i32>,
          20  +
    /// <p>The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.</p>
          21  +
    pub expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          22  +
    /// <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 an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:</p>
          23  +
    /// <ul>
          24  +
    /// <li>
          25  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
          26  +
    /// <li>
          27  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
          28  +
    /// </ul><important>
          29  +
    /// <p>When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.</p>
          30  +
    /// </important>
          31  +
    /// <p>You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see <code>AddTagsToResource</code>. For information about how to remove tags from your managed nodes, see <code>RemoveTagsFromResource</code>.</p>
          32  +
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
          33  +
    /// <p>Reserved for internal use.</p>
          34  +
    pub registration_metadata: ::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>>,
          35  +
}
          36  +
impl CreateActivationInput {
          37  +
    /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
          38  +
    /// <p>Don't enter personally identifiable information in this field.</p>
          39  +
    /// </important>
          40  +
    pub fn description(&self) -> ::std::option::Option<&str> {
          41  +
        self.description.as_deref()
          42  +
    }
          43  +
    /// <p>The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.</p><important>
          44  +
    /// <p>Don't enter personally identifiable information in this field.</p>
          45  +
    /// </important>
          46  +
    pub fn default_instance_name(&self) -> ::std::option::Option<&str> {
          47  +
        self.default_instance_name.as_deref()
          48  +
    }
          49  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in a hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
          50  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
          51  +
    /// </note>
          52  +
    pub fn iam_role(&self) -> ::std::option::Option<&str> {
          53  +
        self.iam_role.as_deref()
          54  +
    }
          55  +
    /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
          56  +
    pub fn registration_limit(&self) -> ::std::option::Option<i32> {
          57  +
        self.registration_limit
          58  +
    }
          59  +
    /// <p>The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.</p>
          60  +
    pub fn expiration_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          61  +
        self.expiration_date.as_ref()
          62  +
    }
          63  +
    /// <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 an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:</p>
          64  +
    /// <ul>
          65  +
    /// <li>
          66  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
          67  +
    /// <li>
          68  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
          69  +
    /// </ul><important>
          70  +
    /// <p>When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.</p>
          71  +
    /// </important>
          72  +
    /// <p>You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see <code>AddTagsToResource</code>. For information about how to remove tags from your managed nodes, see <code>RemoveTagsFromResource</code>.</p>
          73  +
    ///
          74  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
          75  +
    pub fn tags(&self) -> &[crate::types::Tag] {
          76  +
        self.tags.as_deref().unwrap_or_default()
          77  +
    }
          78  +
    /// <p>Reserved for internal use.</p>
          79  +
    ///
          80  +
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.registration_metadata.is_none()`.
          81  +
    pub fn registration_metadata(&self) -> &[crate::types::RegistrationMetadataItem] {
          82  +
        self.registration_metadata.as_deref().unwrap_or_default()
          83  +
    }
          84  +
}
          85  +
static CREATEACTIVATIONINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          86  +
    ::aws_smithy_schema::ShapeId::from_parts(
          87  +
        "com.amazonaws.ssm.synthetic#CreateActivationInput$Description",
          88  +
        "com.amazonaws.ssm.synthetic",
          89  +
        "CreateActivationInput",
          90  +
    ),
          91  +
    ::aws_smithy_schema::ShapeType::String,
          92  +
    "Description",
          93  +
    0,
          94  +
);
          95  +
static CREATEACTIVATIONINPUT_MEMBER_DEFAULT_INSTANCE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          96  +
    ::aws_smithy_schema::ShapeId::from_parts(
          97  +
        "com.amazonaws.ssm.synthetic#CreateActivationInput$DefaultInstanceName",
          98  +
        "com.amazonaws.ssm.synthetic",
          99  +
        "CreateActivationInput",
         100  +
    ),
         101  +
    ::aws_smithy_schema::ShapeType::String,
         102  +
    "DefaultInstanceName",
         103  +
    1,
         104  +
);
         105  +
static CREATEACTIVATIONINPUT_MEMBER_IAM_ROLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         106  +
    ::aws_smithy_schema::ShapeId::from_parts(
         107  +
        "com.amazonaws.ssm.synthetic#CreateActivationInput$IamRole",
         108  +
        "com.amazonaws.ssm.synthetic",
         109  +
        "CreateActivationInput",
         110  +
    ),
         111  +
    ::aws_smithy_schema::ShapeType::String,
         112  +
    "IamRole",
         113  +
    2,
         114  +
);
         115  +
static CREATEACTIVATIONINPUT_MEMBER_REGISTRATION_LIMIT: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         116  +
    ::aws_smithy_schema::ShapeId::from_parts(
         117  +
        "com.amazonaws.ssm.synthetic#CreateActivationInput$RegistrationLimit",
         118  +
        "com.amazonaws.ssm.synthetic",
         119  +
        "CreateActivationInput",
         120  +
    ),
         121  +
    ::aws_smithy_schema::ShapeType::Integer,
         122  +
    "RegistrationLimit",
         123  +
    3,
         124  +
);
         125  +
static CREATEACTIVATIONINPUT_MEMBER_EXPIRATION_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         126  +
    ::aws_smithy_schema::ShapeId::from_parts(
         127  +
        "com.amazonaws.ssm.synthetic#CreateActivationInput$ExpirationDate",
         128  +
        "com.amazonaws.ssm.synthetic",
         129  +
        "CreateActivationInput",
         130  +
    ),
         131  +
    ::aws_smithy_schema::ShapeType::Timestamp,
         132  +
    "ExpirationDate",
         133  +
    4,
         134  +
);
         135  +
static CREATEACTIVATIONINPUT_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         136  +
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
         137  +
    ::aws_smithy_schema::ShapeType::Structure,
         138  +
    "member",
         139  +
    0,
         140  +
);
         141  +
static CREATEACTIVATIONINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         142  +
    ::aws_smithy_schema::ShapeId::from_parts(
         143  +
        "com.amazonaws.ssm.synthetic#CreateActivationInput$Tags",
         144  +
        "com.amazonaws.ssm.synthetic",
         145  +
        "CreateActivationInput",
         146  +
    ),
         147  +
    ::aws_smithy_schema::ShapeType::List,
         148  +
    "Tags",
         149  +
    5,
         150  +
)
         151  +
.with_list_member(&CREATEACTIVATIONINPUT_MEMBER_TAGS_MEMBER);
         152  +
static CREATEACTIVATIONINPUT_MEMBER_REGISTRATION_METADATA_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         153  +
    ::aws_smithy_schema::ShapeId::from_parts(
         154  +
        "com.amazonaws.ssm#RegistrationMetadataList$member",
         155  +
        "com.amazonaws.ssm",
         156  +
        "RegistrationMetadataList",
         157  +
    ),
         158  +
    ::aws_smithy_schema::ShapeType::Structure,
         159  +
    "member",
         160  +
    0,
         161  +
);
         162  +
static CREATEACTIVATIONINPUT_MEMBER_REGISTRATION_METADATA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
         163  +
    ::aws_smithy_schema::ShapeId::from_parts(
         164  +
        "com.amazonaws.ssm.synthetic#CreateActivationInput$RegistrationMetadata",
         165  +
        "com.amazonaws.ssm.synthetic",
         166  +
        "CreateActivationInput",
         167  +
    ),
         168  +
    ::aws_smithy_schema::ShapeType::List,
         169  +
    "RegistrationMetadata",
         170  +
    6,
         171  +
)
         172  +
.with_list_member(&CREATEACTIVATIONINPUT_MEMBER_REGISTRATION_METADATA_MEMBER);
         173  +
static CREATEACTIVATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
         174  +
    ::aws_smithy_schema::ShapeId::from_parts(
         175  +
        "com.amazonaws.ssm.synthetic#CreateActivationInput",
         176  +
        "com.amazonaws.ssm.synthetic",
         177  +
        "CreateActivationInput",
         178  +
    ),
         179  +
    ::aws_smithy_schema::ShapeType::Structure,
         180  +
    &[
         181  +
        &CREATEACTIVATIONINPUT_MEMBER_DESCRIPTION,
         182  +
        &CREATEACTIVATIONINPUT_MEMBER_DEFAULT_INSTANCE_NAME,
         183  +
        &CREATEACTIVATIONINPUT_MEMBER_IAM_ROLE,
         184  +
        &CREATEACTIVATIONINPUT_MEMBER_REGISTRATION_LIMIT,
         185  +
        &CREATEACTIVATIONINPUT_MEMBER_EXPIRATION_DATE,
         186  +
        &CREATEACTIVATIONINPUT_MEMBER_TAGS,
         187  +
        &CREATEACTIVATIONINPUT_MEMBER_REGISTRATION_METADATA,
         188  +
    ],
         189  +
)
         190  +
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
         191  +
.with_original_name("CreateActivationRequest");
         192  +
impl CreateActivationInput {
         193  +
    /// The schema for this shape.
         194  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEACTIVATIONINPUT_SCHEMA;
         195  +
}
         196  +
impl ::aws_smithy_schema::serde::SerializableStruct for CreateActivationInput {
         197  +
    #[allow(unused_variables, clippy::diverging_sub_expression)]
         198  +
    fn serialize_members(
         199  +
        &self,
         200  +
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
         201  +
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
         202  +
        if let Some(ref val) = self.description {
         203  +
            ser.write_string(&CREATEACTIVATIONINPUT_MEMBER_DESCRIPTION, val)?;
         204  +
        }
         205  +
        if let Some(ref val) = self.default_instance_name {
         206  +
            ser.write_string(&CREATEACTIVATIONINPUT_MEMBER_DEFAULT_INSTANCE_NAME, val)?;
         207  +
        }
         208  +
        if let Some(ref val) = self.iam_role {
         209  +
            ser.write_string(&CREATEACTIVATIONINPUT_MEMBER_IAM_ROLE, val)?;
         210  +
        }
         211  +
        if let Some(ref val) = self.registration_limit {
         212  +
            ser.write_integer(&CREATEACTIVATIONINPUT_MEMBER_REGISTRATION_LIMIT, *val)?;
         213  +
        }
         214  +
        if let Some(ref val) = self.expiration_date {
         215  +
            ser.write_timestamp(&CREATEACTIVATIONINPUT_MEMBER_EXPIRATION_DATE, val)?;
         216  +
        }
         217  +
        if let Some(ref val) = self.tags {
         218  +
            ser.write_list(
         219  +
                &CREATEACTIVATIONINPUT_MEMBER_TAGS,
         220  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         221  +
                    for item in val {
         222  +
                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
         223  +
                    }
         224  +
                    Ok(())
         225  +
                },
         226  +
            )?;
         227  +
        }
         228  +
        if let Some(ref val) = self.registration_metadata {
         229  +
            ser.write_list(
         230  +
                &CREATEACTIVATIONINPUT_MEMBER_REGISTRATION_METADATA,
         231  +
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         232  +
                    for item in val {
         233  +
                        ser.write_struct(crate::types::RegistrationMetadataItem::SCHEMA, item)?;
         234  +
                    }
         235  +
                    Ok(())
         236  +
                },
         237  +
            )?;
         238  +
        }
         239  +
        Ok(())
         240  +
    }
         241  +
}
         242  +
impl CreateActivationInput {
         243  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
         244  +
    pub fn deserialize(
         245  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         246  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         247  +
        #[allow(unused_variables, unused_mut)]
         248  +
        let mut builder = Self::builder();
         249  +
        #[allow(
         250  +
            unused_variables,
         251  +
            unreachable_code,
         252  +
            clippy::single_match,
         253  +
            clippy::match_single_binding,
         254  +
            clippy::diverging_sub_expression
         255  +
        )]
         256  +
        deserializer.read_struct(&CREATEACTIVATIONINPUT_SCHEMA, &mut |member, deser| {
         257  +
            match member.member_index() {
         258  +
                Some(0) => {
         259  +
                    if deser.is_null() {
         260  +
                        deser.read_null()?;
         261  +
                    } else {
         262  +
                        builder.description = Some(deser.read_string(member)?);
         263  +
                    }
         264  +
                }
         265  +
                Some(1) => {
         266  +
                    if deser.is_null() {
         267  +
                        deser.read_null()?;
         268  +
                    } else {
         269  +
                        builder.default_instance_name = Some(deser.read_string(member)?);
         270  +
                    }
         271  +
                }
         272  +
                Some(2) => {
         273  +
                    if deser.is_null() {
         274  +
                        deser.read_null()?;
         275  +
                    } else {
         276  +
                        builder.iam_role = Some(deser.read_string(member)?);
         277  +
                    }
         278  +
                }
         279  +
                Some(3) => {
         280  +
                    if deser.is_null() {
         281  +
                        deser.read_null()?;
         282  +
                    } else {
         283  +
                        builder.registration_limit = Some(deser.read_integer(member)?);
         284  +
                    }
         285  +
                }
         286  +
                Some(4) => {
         287  +
                    if deser.is_null() {
         288  +
                        deser.read_null()?;
         289  +
                    } else {
         290  +
                        builder.expiration_date = Some(deser.read_timestamp(member)?);
         291  +
                    }
         292  +
                }
         293  +
                Some(5) => {
         294  +
                    if deser.is_null() {
         295  +
                        deser.read_null()?;
         296  +
                    } else {
         297  +
                        builder.tags = Some({
         298  +
                            let mut container = Vec::new();
         299  +
                            deser.read_list(member, &mut |deser| {
         300  +
                                container.push(crate::types::Tag::deserialize(deser)?);
         301  +
                                Ok(())
         302  +
                            })?;
         303  +
                            container
         304  +
                        });
         305  +
                    }
         306  +
                }
         307  +
                Some(6) => {
         308  +
                    if deser.is_null() {
         309  +
                        deser.read_null()?;
         310  +
                    } else {
         311  +
                        builder.registration_metadata = Some({
         312  +
                            let mut container = Vec::new();
         313  +
                            deser.read_list(member, &mut |deser| {
         314  +
                                container.push(crate::types::RegistrationMetadataItem::deserialize(deser)?);
         315  +
                                Ok(())
         316  +
                            })?;
         317  +
                            container
         318  +
                        });
         319  +
                    }
         320  +
                }
         321  +
                _ => {}
         322  +
            }
         323  +
            Ok(())
         324  +
        })?;
         325  +
        builder.iam_role = builder.iam_role.or(Some(String::new()));
         326  +
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
         327  +
    }
         328  +
}
         329  +
impl CreateActivationInput {
         330  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         331  +
    pub fn deserialize_with_response(
         332  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         333  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         334  +
        _status: u16,
         335  +
        _body: &[u8],
         336  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         337  +
        Self::deserialize(deserializer)
         338  +
    }
         339  +
}
         340  +
impl CreateActivationInput {
         341  +
    /// Creates a new builder-style object to manufacture [`CreateActivationInput`](crate::operation::create_activation::CreateActivationInput).
         342  +
    pub fn builder() -> crate::operation::create_activation::builders::CreateActivationInputBuilder {
         343  +
        crate::operation::create_activation::builders::CreateActivationInputBuilder::default()
         344  +
    }
         345  +
}
         346  +
         347  +
/// A builder for [`CreateActivationInput`](crate::operation::create_activation::CreateActivationInput).
         348  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         349  +
#[non_exhaustive]
         350  +
pub struct CreateActivationInputBuilder {
         351  +
    pub(crate) description: ::std::option::Option<::std::string::String>,
         352  +
    pub(crate) default_instance_name: ::std::option::Option<::std::string::String>,
         353  +
    pub(crate) iam_role: ::std::option::Option<::std::string::String>,
         354  +
    pub(crate) registration_limit: ::std::option::Option<i32>,
         355  +
    pub(crate) expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         356  +
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
         357  +
    pub(crate) registration_metadata: ::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>>,
         358  +
}
         359  +
impl CreateActivationInputBuilder {
         360  +
    /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
         361  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         362  +
    /// </important>
         363  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         364  +
        self.description = ::std::option::Option::Some(input.into());
         365  +
        self
         366  +
    }
         367  +
    /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
         368  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         369  +
    /// </important>
         370  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         371  +
        self.description = input;
         372  +
        self
         373  +
    }
         374  +
    /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
         375  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         376  +
    /// </important>
         377  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         378  +
        &self.description
         379  +
    }
         380  +
    /// <p>The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.</p><important>
         381  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         382  +
    /// </important>
         383  +
    pub fn default_instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         384  +
        self.default_instance_name = ::std::option::Option::Some(input.into());
         385  +
        self
         386  +
    }
         387  +
    /// <p>The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.</p><important>
         388  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         389  +
    /// </important>
         390  +
    pub fn set_default_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         391  +
        self.default_instance_name = input;
         392  +
        self
         393  +
    }
         394  +
    /// <p>The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.</p><important>
         395  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         396  +
    /// </important>
         397  +
    pub fn get_default_instance_name(&self) -> &::std::option::Option<::std::string::String> {
         398  +
        &self.default_instance_name
         399  +
    }
         400  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in a hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         401  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         402  +
    /// </note>
         403  +
    /// This field is required.
         404  +
    pub fn iam_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         405  +
        self.iam_role = ::std::option::Option::Some(input.into());
         406  +
        self
         407  +
    }
         408  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in a hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         409  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         410  +
    /// </note>
         411  +
    pub fn set_iam_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         412  +
        self.iam_role = input;
         413  +
        self
         414  +
    }
         415  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in a hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         416  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         417  +
    /// </note>
         418  +
    pub fn get_iam_role(&self) -> &::std::option::Option<::std::string::String> {
         419  +
        &self.iam_role
         420  +
    }
         421  +
    /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
         422  +
    pub fn registration_limit(mut self, input: i32) -> Self {
         423  +
        self.registration_limit = ::std::option::Option::Some(input);
         424  +
        self
         425  +
    }
         426  +
    /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
         427  +
    pub fn set_registration_limit(mut self, input: ::std::option::Option<i32>) -> Self {
         428  +
        self.registration_limit = input;
         429  +
        self
         430  +
    }
         431  +
    /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
         432  +
    pub fn get_registration_limit(&self) -> &::std::option::Option<i32> {
         433  +
        &self.registration_limit
         434  +
    }
         435  +
    /// <p>The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.</p>
         436  +
    pub fn expiration_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         437  +
        self.expiration_date = ::std::option::Option::Some(input);
         438  +
        self
         439  +
    }
         440  +
    /// <p>The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.</p>
         441  +
    pub fn set_expiration_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         442  +
        self.expiration_date = input;
         443  +
        self
         444  +
    }
         445  +
    /// <p>The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.</p>
         446  +
    pub fn get_expiration_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         447  +
        &self.expiration_date
         448  +
    }
         449  +
    /// Appends an item to `tags`.
         450  +
    ///
         451  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         452  +
    ///
         453  +
    /// <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 an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:</p>
         454  +
    /// <ul>
         455  +
    /// <li>
         456  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         457  +
    /// <li>
         458  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         459  +
    /// </ul><important>
         460  +
    /// <p>When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.</p>
         461  +
    /// </important>
         462  +
    /// <p>You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see <code>AddTagsToResource</code>. For information about how to remove tags from your managed nodes, see <code>RemoveTagsFromResource</code>.</p>
         463  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         464  +
        let mut v = self.tags.unwrap_or_default();
         465  +
        v.push(input);
         466  +
        self.tags = ::std::option::Option::Some(v);
         467  +
        self
         468  +
    }
         469  +
    /// <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 an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:</p>
         470  +
    /// <ul>
         471  +
    /// <li>
         472  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         473  +
    /// <li>
         474  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         475  +
    /// </ul><important>
         476  +
    /// <p>When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.</p>
         477  +
    /// </important>
         478  +
    /// <p>You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see <code>AddTagsToResource</code>. For information about how to remove tags from your managed nodes, see <code>RemoveTagsFromResource</code>.</p>
         479  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         480  +
        self.tags = input;
         481  +
        self
         482  +
    }
         483  +
    /// <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 an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:</p>
         484  +
    /// <ul>
         485  +
    /// <li>
         486  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         487  +
    /// <li>
         488  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         489  +
    /// </ul><important>
         490  +
    /// <p>When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.</p>
         491  +
    /// </important>
         492  +
    /// <p>You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see <code>AddTagsToResource</code>. For information about how to remove tags from your managed nodes, see <code>RemoveTagsFromResource</code>.</p>
         493  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         494  +
        &self.tags
         495  +
    }
         496  +
    /// Appends an item to `registration_metadata`.
         497  +
    ///
         498  +
    /// To override the contents of this collection use [`set_registration_metadata`](Self::set_registration_metadata).
         499  +
    ///
         500  +
    /// <p>Reserved for internal use.</p>
         501  +
    pub fn registration_metadata(mut self, input: crate::types::RegistrationMetadataItem) -> Self {
         502  +
        let mut v = self.registration_metadata.unwrap_or_default();
         503  +
        v.push(input);
         504  +
        self.registration_metadata = ::std::option::Option::Some(v);
         505  +
        self
         506  +
    }
         507  +
    /// <p>Reserved for internal use.</p>
         508  +
    pub fn set_registration_metadata(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>>) -> Self {
         509  +
        self.registration_metadata = input;
         510  +
        self
         511  +
    }
         512  +
    /// <p>Reserved for internal use.</p>
         513  +
    pub fn get_registration_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>> {
         514  +
        &self.registration_metadata
         515  +
    }
         516  +
    /// Consumes the builder and constructs a [`CreateActivationInput`](crate::operation::create_activation::CreateActivationInput).
         517  +
    pub fn build(
         518  +
        self,
         519  +
    ) -> ::std::result::Result<crate::operation::create_activation::CreateActivationInput, ::aws_smithy_types::error::operation::BuildError> {
         520  +
        ::std::result::Result::Ok(crate::operation::create_activation::CreateActivationInput {
         521  +
            description: self.description,
         522  +
            default_instance_name: self.default_instance_name,
         523  +
            iam_role: self.iam_role,
         524  +
            registration_limit: self.registration_limit,
         525  +
            expiration_date: self.expiration_date,
         526  +
            tags: self.tags,
         527  +
            registration_metadata: self.registration_metadata,
         528  +
        })
         529  +
    }
         530  +
}

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

@@ -0,1 +0,232 @@
           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 CreateActivationOutput {
           6  +
    /// <p>The ID number generated by the system when it processed the activation. The activation ID functions like a user name.</p>
           7  +
    pub activation_id: ::std::option::Option<::std::string::String>,
           8  +
    /// <p>The code the system generates when it processes the activation. The activation code functions like a password to validate the activation ID.</p>
           9  +
    pub activation_code: ::std::option::Option<::std::string::String>,
          10  +
    _request_id: Option<String>,
          11  +
}
          12  +
impl CreateActivationOutput {
          13  +
    /// <p>The ID number generated by the system when it processed the activation. The activation ID functions like a user name.</p>
          14  +
    pub fn activation_id(&self) -> ::std::option::Option<&str> {
          15  +
        self.activation_id.as_deref()
          16  +
    }
          17  +
    /// <p>The code the system generates when it processes the activation. The activation code functions like a password to validate the activation ID.</p>
          18  +
    pub fn activation_code(&self) -> ::std::option::Option<&str> {
          19  +
        self.activation_code.as_deref()
          20  +
    }
          21  +
}
          22  +
static CREATEACTIVATIONOUTPUT_MEMBER_ACTIVATION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          23  +
    ::aws_smithy_schema::ShapeId::from_parts(
          24  +
        "com.amazonaws.ssm.synthetic#CreateActivationOutput$ActivationId",
          25  +
        "com.amazonaws.ssm.synthetic",
          26  +
        "CreateActivationOutput",
          27  +
    ),
          28  +
    ::aws_smithy_schema::ShapeType::String,
          29  +
    "ActivationId",
          30  +
    0,
          31  +
);
          32  +
static CREATEACTIVATIONOUTPUT_MEMBER_ACTIVATION_CODE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
          33  +
    ::aws_smithy_schema::ShapeId::from_parts(
          34  +
        "com.amazonaws.ssm.synthetic#CreateActivationOutput$ActivationCode",
          35  +
        "com.amazonaws.ssm.synthetic",
          36  +
        "CreateActivationOutput",
          37  +
    ),
          38  +
    ::aws_smithy_schema::ShapeType::String,
          39  +
    "ActivationCode",
          40  +
    1,
          41  +
);
          42  +
static CREATEACTIVATIONOUTPUT_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 CREATEACTIVATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
          50  +
    ::aws_smithy_schema::ShapeId::from_parts(
          51  +
        "com.amazonaws.ssm.synthetic#CreateActivationOutput",
          52  +
        "com.amazonaws.ssm.synthetic",
          53  +
        "CreateActivationOutput",
          54  +
    ),
          55  +
    ::aws_smithy_schema::ShapeType::Structure,
          56  +
    &[
          57  +
        &CREATEACTIVATIONOUTPUT_MEMBER_ACTIVATION_ID,
          58  +
        &CREATEACTIVATIONOUTPUT_MEMBER_ACTIVATION_CODE,
          59  +
        &CREATEACTIVATIONOUTPUT_MEMBER__REQUEST_ID,
          60  +
    ],
          61  +
)
          62  +
.with_original_name("CreateActivationResult");
          63  +
impl CreateActivationOutput {
          64  +
    /// The schema for this shape.
          65  +
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEACTIVATIONOUTPUT_SCHEMA;
          66  +
}
          67  +
impl ::aws_smithy_schema::serde::SerializableStruct for CreateActivationOutput {
          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  +
        if let Some(ref val) = self.activation_id {
          74  +
            ser.write_string(&CREATEACTIVATIONOUTPUT_MEMBER_ACTIVATION_ID, val)?;
          75  +
        }
          76  +
        if let Some(ref val) = self.activation_code {
          77  +
            ser.write_string(&CREATEACTIVATIONOUTPUT_MEMBER_ACTIVATION_CODE, val)?;
          78  +
        }
          79  +
        Ok(())
          80  +
    }
          81  +
}
          82  +
impl CreateActivationOutput {
          83  +
    /// Deserializes this structure from a [`ShapeDeserializer`].
          84  +
    pub fn deserialize(
          85  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        #[allow(unused_variables, unused_mut)]
          88  +
        let mut builder = Self::builder();
          89  +
        #[allow(
          90  +
            unused_variables,
          91  +
            unreachable_code,
          92  +
            clippy::single_match,
          93  +
            clippy::match_single_binding,
          94  +
            clippy::diverging_sub_expression
          95  +
        )]
          96  +
        deserializer.read_struct(&CREATEACTIVATIONOUTPUT_SCHEMA, &mut |member, deser| {
          97  +
            match member.member_index() {
          98  +
                Some(0) => {
          99  +
                    if deser.is_null() {
         100  +
                        deser.read_null()?;
         101  +
                    } else {
         102  +
                        builder.activation_id = Some(deser.read_string(member)?);
         103  +
                    }
         104  +
                }
         105  +
                Some(1) => {
         106  +
                    if deser.is_null() {
         107  +
                        deser.read_null()?;
         108  +
                    } else {
         109  +
                        builder.activation_code = Some(deser.read_string(member)?);
         110  +
                    }
         111  +
                }
         112  +
                Some(2) => {
         113  +
                    builder._request_id = Some(deser.read_string(member)?);
         114  +
                }
         115  +
                _ => {}
         116  +
            }
         117  +
            Ok(())
         118  +
        })?;
         119  +
        Ok(builder.build())
         120  +
    }
         121  +
}
         122  +
impl CreateActivationOutput {
         123  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         124  +
    /// Header-bound members are read directly from headers, avoiding runtime
         125  +
    /// member iteration overhead. Body members are read via the deserializer.
         126  +
    pub fn deserialize_with_response(
         127  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         128  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         129  +
        _status: u16,
         130  +
        _body: &[u8],
         131  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         132  +
        #[allow(unused_variables, unused_mut)]
         133  +
        let mut builder = Self::builder();
         134  +
        if let Some(val) = headers.get("x-amzn-requestid") {
         135  +
            builder._request_id = Some(val.to_string());
         136  +
        }
         137  +
         138  +
        #[allow(
         139  +
            unused_variables,
         140  +
            unreachable_code,
         141  +
            clippy::single_match,
         142  +
            clippy::match_single_binding,
         143  +
            clippy::diverging_sub_expression
         144  +
        )]
         145  +
        deserializer.read_struct(&CREATEACTIVATIONOUTPUT_SCHEMA, &mut |member, deser| {
         146  +
            match member.member_index() {
         147  +
                Some(0) => {
         148  +
                    builder.activation_id = Some(deser.read_string(member)?);
         149  +
                }
         150  +
                Some(1) => {
         151  +
                    builder.activation_code = Some(deser.read_string(member)?);
         152  +
                }
         153  +
                _ => {}
         154  +
            }
         155  +
            Ok(())
         156  +
        })?;
         157  +
        Ok(builder.build())
         158  +
    }
         159  +
}
         160  +
impl ::aws_types::request_id::RequestId for CreateActivationOutput {
         161  +
    fn request_id(&self) -> Option<&str> {
         162  +
        self._request_id.as_deref()
         163  +
    }
         164  +
}
         165  +
impl CreateActivationOutput {
         166  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         167  +
        self._request_id = request_id;
         168  +
        self
         169  +
    }
         170  +
}
         171  +
impl CreateActivationOutput {
         172  +
    /// Creates a new builder-style object to manufacture [`CreateActivationOutput`](crate::operation::create_activation::CreateActivationOutput).
         173  +
    pub fn builder() -> crate::operation::create_activation::builders::CreateActivationOutputBuilder {
         174  +
        crate::operation::create_activation::builders::CreateActivationOutputBuilder::default()
         175  +
    }
         176  +
}
         177  +
         178  +
/// A builder for [`CreateActivationOutput`](crate::operation::create_activation::CreateActivationOutput).
         179  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         180  +
#[non_exhaustive]
         181  +
pub struct CreateActivationOutputBuilder {
         182  +
    pub(crate) activation_id: ::std::option::Option<::std::string::String>,
         183  +
    pub(crate) activation_code: ::std::option::Option<::std::string::String>,
         184  +
    _request_id: Option<String>,
         185  +
}
         186  +
impl CreateActivationOutputBuilder {
         187  +
    /// <p>The ID number generated by the system when it processed the activation. The activation ID functions like a user name.</p>
         188  +
    pub fn activation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         189  +
        self.activation_id = ::std::option::Option::Some(input.into());
         190  +
        self
         191  +
    }
         192  +
    /// <p>The ID number generated by the system when it processed the activation. The activation ID functions like a user name.</p>
         193  +
    pub fn set_activation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         194  +
        self.activation_id = input;
         195  +
        self
         196  +
    }
         197  +
    /// <p>The ID number generated by the system when it processed the activation. The activation ID functions like a user name.</p>
         198  +
    pub fn get_activation_id(&self) -> &::std::option::Option<::std::string::String> {
         199  +
        &self.activation_id
         200  +
    }
         201  +
    /// <p>The code the system generates when it processes the activation. The activation code functions like a password to validate the activation ID.</p>
         202  +
    pub fn activation_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         203  +
        self.activation_code = ::std::option::Option::Some(input.into());
         204  +
        self
         205  +
    }
         206  +
    /// <p>The code the system generates when it processes the activation. The activation code functions like a password to validate the activation ID.</p>
         207  +
    pub fn set_activation_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         208  +
        self.activation_code = input;
         209  +
        self
         210  +
    }
         211  +
    /// <p>The code the system generates when it processes the activation. The activation code functions like a password to validate the activation ID.</p>
         212  +
    pub fn get_activation_code(&self) -> &::std::option::Option<::std::string::String> {
         213  +
        &self.activation_code
         214  +
    }
         215  +
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
         216  +
        self._request_id = Some(request_id.into());
         217  +
        self
         218  +
    }
         219  +
         220  +
    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
         221  +
        self._request_id = request_id;
         222  +
        self
         223  +
    }
         224  +
    /// Consumes the builder and constructs a [`CreateActivationOutput`](crate::operation::create_activation::CreateActivationOutput).
         225  +
    pub fn build(self) -> crate::operation::create_activation::CreateActivationOutput {
         226  +
        crate::operation::create_activation::CreateActivationOutput {
         227  +
            activation_id: self.activation_id,
         228  +
            activation_code: self.activation_code,
         229  +
            _request_id: self._request_id,
         230  +
        }
         231  +
    }
         232  +
}

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

@@ -0,1 +0,266 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::create_activation::_create_activation_input::CreateActivationInputBuilder;
           3  +
           4  +
pub use crate::operation::create_activation::_create_activation_output::CreateActivationOutputBuilder;
           5  +
           6  +
impl crate::operation::create_activation::builders::CreateActivationInputBuilder {
           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::create_activation::CreateActivationOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::create_activation::CreateActivationError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.create_activation();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `CreateActivation`.
          24  +
///
          25  +
/// <p>Generates an activation code and activation ID you can use to register your on-premises servers, edge devices, or virtual machine (VM) with Amazon Web Services Systems Manager. Registering these machines with Systems Manager makes it possible to manage them using Systems Manager tools. You use the activation code and ID when installing SSM Agent on machines in your hybrid environment. For more information about requirements for managing on-premises machines using Systems Manager, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-hybrid-multicloud.html">Using Amazon Web Services Systems Manager in hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
          26  +
/// <p>Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and on-premises servers and VMs that are configured for Systems Manager are all called <i>managed nodes</i>.</p>
          27  +
/// </note>
          28  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          29  +
pub struct CreateActivationFluentBuilder {
          30  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          31  +
    inner: crate::operation::create_activation::builders::CreateActivationInputBuilder,
          32  +
    config_override: ::std::option::Option<crate::config::Builder>,
          33  +
}
          34  +
impl
          35  +
    crate::client::customize::internal::CustomizableSend<
          36  +
        crate::operation::create_activation::CreateActivationOutput,
          37  +
        crate::operation::create_activation::CreateActivationError,
          38  +
    > for CreateActivationFluentBuilder
          39  +
{
          40  +
    fn send(
          41  +
        self,
          42  +
        config_override: crate::config::Builder,
          43  +
    ) -> crate::client::customize::internal::BoxFuture<
          44  +
        crate::client::customize::internal::SendResult<
          45  +
            crate::operation::create_activation::CreateActivationOutput,
          46  +
            crate::operation::create_activation::CreateActivationError,
          47  +
        >,
          48  +
    > {
          49  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          50  +
    }
          51  +
}
          52  +
impl CreateActivationFluentBuilder {
          53  +
    /// Creates a new `CreateActivationFluentBuilder`.
          54  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          55  +
        Self {
          56  +
            handle,
          57  +
            inner: ::std::default::Default::default(),
          58  +
            config_override: ::std::option::Option::None,
          59  +
        }
          60  +
    }
          61  +
    /// Access the CreateActivation as a reference.
          62  +
    pub fn as_input(&self) -> &crate::operation::create_activation::builders::CreateActivationInputBuilder {
          63  +
        &self.inner
          64  +
    }
          65  +
    /// Sends the request and returns the response.
          66  +
    ///
          67  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          68  +
    /// can be matched against.
          69  +
    ///
          70  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          71  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          72  +
    /// set when configuring the client.
          73  +
    pub async fn send(
          74  +
        self,
          75  +
    ) -> ::std::result::Result<
          76  +
        crate::operation::create_activation::CreateActivationOutput,
          77  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          78  +
            crate::operation::create_activation::CreateActivationError,
          79  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          80  +
        >,
          81  +
    > {
          82  +
        let input = self
          83  +
            .inner
          84  +
            .build()
          85  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          86  +
        let runtime_plugins = crate::operation::create_activation::CreateActivation::operation_runtime_plugins(
          87  +
            self.handle.runtime_plugins.clone(),
          88  +
            &self.handle.conf,
          89  +
            self.config_override,
          90  +
        );
          91  +
        crate::operation::create_activation::CreateActivation::orchestrate(&runtime_plugins, input).await
          92  +
    }
          93  +
          94  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          95  +
    pub fn customize(
          96  +
        self,
          97  +
    ) -> crate::client::customize::CustomizableOperation<
          98  +
        crate::operation::create_activation::CreateActivationOutput,
          99  +
        crate::operation::create_activation::CreateActivationError,
         100  +
        Self,
         101  +
    > {
         102  +
        crate::client::customize::CustomizableOperation::new(self)
         103  +
    }
         104  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         105  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         106  +
        self
         107  +
    }
         108  +
         109  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         110  +
        self.config_override = config_override;
         111  +
        self
         112  +
    }
         113  +
    /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
         114  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         115  +
    /// </important>
         116  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         117  +
        self.inner = self.inner.description(input.into());
         118  +
        self
         119  +
    }
         120  +
    /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
         121  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         122  +
    /// </important>
         123  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         124  +
        self.inner = self.inner.set_description(input);
         125  +
        self
         126  +
    }
         127  +
    /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
         128  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         129  +
    /// </important>
         130  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         131  +
        self.inner.get_description()
         132  +
    }
         133  +
    /// <p>The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.</p><important>
         134  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         135  +
    /// </important>
         136  +
    pub fn default_instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         137  +
        self.inner = self.inner.default_instance_name(input.into());
         138  +
        self
         139  +
    }
         140  +
    /// <p>The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.</p><important>
         141  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         142  +
    /// </important>
         143  +
    pub fn set_default_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         144  +
        self.inner = self.inner.set_default_instance_name(input);
         145  +
        self
         146  +
    }
         147  +
    /// <p>The name of the registered, managed node as it will appear in the Amazon Web Services Systems Manager console or when you use the Amazon Web Services command line tools to list Systems Manager resources.</p><important>
         148  +
    /// <p>Don't enter personally identifiable information in this field.</p>
         149  +
    /// </important>
         150  +
    pub fn get_default_instance_name(&self) -> &::std::option::Option<::std::string::String> {
         151  +
        self.inner.get_default_instance_name()
         152  +
    }
         153  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in a hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         154  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         155  +
    /// </note>
         156  +
    pub fn iam_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         157  +
        self.inner = self.inner.iam_role(input.into());
         158  +
        self
         159  +
    }
         160  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in a hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         161  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         162  +
    /// </note>
         163  +
    pub fn set_iam_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         164  +
        self.inner = self.inner.set_iam_role(input);
         165  +
        self
         166  +
    }
         167  +
    /// <p>The name of the Identity and Access Management (IAM) role that you want to assign to the managed node. This IAM role must provide AssumeRole permissions for the Amazon Web Services Systems Manager service principal <code>ssm.amazonaws.com</code>. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html">Create the IAM service role required for Systems Manager in a hybrid and multicloud environments</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
         168  +
    /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
         169  +
    /// </note>
         170  +
    pub fn get_iam_role(&self) -> &::std::option::Option<::std::string::String> {
         171  +
        self.inner.get_iam_role()
         172  +
    }
         173  +
    /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
         174  +
    pub fn registration_limit(mut self, input: i32) -> Self {
         175  +
        self.inner = self.inner.registration_limit(input);
         176  +
        self
         177  +
    }
         178  +
    /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
         179  +
    pub fn set_registration_limit(mut self, input: ::std::option::Option<i32>) -> Self {
         180  +
        self.inner = self.inner.set_registration_limit(input);
         181  +
        self
         182  +
    }
         183  +
    /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
         184  +
    pub fn get_registration_limit(&self) -> &::std::option::Option<i32> {
         185  +
        self.inner.get_registration_limit()
         186  +
    }
         187  +
    /// <p>The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.</p>
         188  +
    pub fn expiration_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         189  +
        self.inner = self.inner.expiration_date(input);
         190  +
        self
         191  +
    }
         192  +
    /// <p>The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.</p>
         193  +
    pub fn set_expiration_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         194  +
        self.inner = self.inner.set_expiration_date(input);
         195  +
        self
         196  +
    }
         197  +
    /// <p>The date by which this activation request should expire, in timestamp format, such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. If you don't provide an expiration date, the activation code expires in 24 hours.</p>
         198  +
    pub fn get_expiration_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         199  +
        self.inner.get_expiration_date()
         200  +
    }
         201  +
    ///
         202  +
    /// Appends an item to `Tags`.
         203  +
    ///
         204  +
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
         205  +
    ///
         206  +
    /// <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 an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:</p>
         207  +
    /// <ul>
         208  +
    /// <li>
         209  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         210  +
    /// <li>
         211  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         212  +
    /// </ul><important>
         213  +
    /// <p>When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.</p>
         214  +
    /// </important>
         215  +
    /// <p>You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see <code>AddTagsToResource</code>. For information about how to remove tags from your managed nodes, see <code>RemoveTagsFromResource</code>.</p>
         216  +
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
         217  +
        self.inner = self.inner.tags(input);
         218  +
        self
         219  +
    }
         220  +
    /// <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 an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:</p>
         221  +
    /// <ul>
         222  +
    /// <li>
         223  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         224  +
    /// <li>
         225  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         226  +
    /// </ul><important>
         227  +
    /// <p>When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.</p>
         228  +
    /// </important>
         229  +
    /// <p>You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see <code>AddTagsToResource</code>. For information about how to remove tags from your managed nodes, see <code>RemoveTagsFromResource</code>.</p>
         230  +
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
         231  +
        self.inner = self.inner.set_tags(input);
         232  +
        self
         233  +
    }
         234  +
    /// <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 an activation to identify which servers or virtual machines (VMs) in your on-premises environment you intend to activate. In this case, you could specify the following key-value pairs:</p>
         235  +
    /// <ul>
         236  +
    /// <li>
         237  +
    /// <p><code>Key=OS,Value=Windows</code></p></li>
         238  +
    /// <li>
         239  +
    /// <p><code>Key=Environment,Value=Production</code></p></li>
         240  +
    /// </ul><important>
         241  +
    /// <p>When you install SSM Agent on your on-premises servers and VMs, you specify an activation ID and code. When you specify the activation ID and code, tags assigned to the activation are automatically applied to the on-premises servers or VMs.</p>
         242  +
    /// </important>
         243  +
    /// <p>You can't add tags to or delete tags from an existing activation. You can tag your on-premises servers, edge devices, and VMs after they connect to Systems Manager for the first time and are assigned a managed node ID. This means they are listed in the Amazon Web Services Systems Manager console with an ID that is prefixed with "mi-". For information about how to add tags to your managed nodes, see <code>AddTagsToResource</code>. For information about how to remove tags from your managed nodes, see <code>RemoveTagsFromResource</code>.</p>
         244  +
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
         245  +
        self.inner.get_tags()
         246  +
    }
         247  +
    ///
         248  +
    /// Appends an item to `RegistrationMetadata`.
         249  +
    ///
         250  +
    /// To override the contents of this collection use [`set_registration_metadata`](Self::set_registration_metadata).
         251  +
    ///
         252  +
    /// <p>Reserved for internal use.</p>
         253  +
    pub fn registration_metadata(mut self, input: crate::types::RegistrationMetadataItem) -> Self {
         254  +
        self.inner = self.inner.registration_metadata(input);
         255  +
        self
         256  +
    }
         257  +
    /// <p>Reserved for internal use.</p>
         258  +
    pub fn set_registration_metadata(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>>) -> Self {
         259  +
        self.inner = self.inner.set_registration_metadata(input);
         260  +
        self
         261  +
    }
         262  +
    /// <p>Reserved for internal use.</p>
         263  +
    pub fn get_registration_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>> {
         264  +
        self.inner.get_registration_metadata()
         265  +
    }
         266  +
}