aws_sdk_ssm/operation/create_activation/_create_activation_input.rs
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)]
5pub 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}
36impl 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}
85impl CreateActivationInput {
86 /// Creates a new builder-style object to manufacture [`CreateActivationInput`](crate::operation::create_activation::CreateActivationInput).
87 pub fn builder() -> crate::operation::create_activation::builders::CreateActivationInputBuilder {
88 crate::operation::create_activation::builders::CreateActivationInputBuilder::default()
89 }
90}
91
92/// A builder for [`CreateActivationInput`](crate::operation::create_activation::CreateActivationInput).
93#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
94#[non_exhaustive]
95pub struct CreateActivationInputBuilder {
96 pub(crate) description: ::std::option::Option<::std::string::String>,
97 pub(crate) default_instance_name: ::std::option::Option<::std::string::String>,
98 pub(crate) iam_role: ::std::option::Option<::std::string::String>,
99 pub(crate) registration_limit: ::std::option::Option<i32>,
100 pub(crate) expiration_date: ::std::option::Option<::aws_smithy_types::DateTime>,
101 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
102 pub(crate) registration_metadata: ::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>>,
103}
104impl CreateActivationInputBuilder {
105 /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
106 /// <p>Don't enter personally identifiable information in this field.</p>
107 /// </important>
108 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.description = ::std::option::Option::Some(input.into());
110 self
111 }
112 /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
113 /// <p>Don't enter personally identifiable information in this field.</p>
114 /// </important>
115 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116 self.description = input;
117 self
118 }
119 /// <p>A user-defined description of the resource that you want to register with Systems Manager.</p><important>
120 /// <p>Don't enter personally identifiable information in this field.</p>
121 /// </important>
122 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
123 &self.description
124 }
125 /// <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>
126 /// <p>Don't enter personally identifiable information in this field.</p>
127 /// </important>
128 pub fn default_instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.default_instance_name = ::std::option::Option::Some(input.into());
130 self
131 }
132 /// <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>
133 /// <p>Don't enter personally identifiable information in this field.</p>
134 /// </important>
135 pub fn set_default_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.default_instance_name = input;
137 self
138 }
139 /// <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>
140 /// <p>Don't enter personally identifiable information in this field.</p>
141 /// </important>
142 pub fn get_default_instance_name(&self) -> &::std::option::Option<::std::string::String> {
143 &self.default_instance_name
144 }
145 /// <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>
146 /// <p>You can't specify an IAM service-linked role for this parameter. You must create a unique role.</p>
147 /// </note>
148 /// This field is required.
149 pub fn iam_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.iam_role = ::std::option::Option::Some(input.into());
151 self
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 set_iam_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157 self.iam_role = input;
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 get_iam_role(&self) -> &::std::option::Option<::std::string::String> {
164 &self.iam_role
165 }
166 /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
167 pub fn registration_limit(mut self, input: i32) -> Self {
168 self.registration_limit = ::std::option::Option::Some(input);
169 self
170 }
171 /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
172 pub fn set_registration_limit(mut self, input: ::std::option::Option<i32>) -> Self {
173 self.registration_limit = input;
174 self
175 }
176 /// <p>Specify the maximum number of managed nodes you want to register. The default value is <code>1</code>.</p>
177 pub fn get_registration_limit(&self) -> &::std::option::Option<i32> {
178 &self.registration_limit
179 }
180 /// <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>
181 pub fn expiration_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
182 self.expiration_date = ::std::option::Option::Some(input);
183 self
184 }
185 /// <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>
186 pub fn set_expiration_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
187 self.expiration_date = input;
188 self
189 }
190 /// <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>
191 pub fn get_expiration_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
192 &self.expiration_date
193 }
194 /// Appends an item to `tags`.
195 ///
196 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
197 ///
198 /// <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>
199 /// <ul>
200 /// <li>
201 /// <p><code>Key=OS,Value=Windows</code></p></li>
202 /// <li>
203 /// <p><code>Key=Environment,Value=Production</code></p></li>
204 /// </ul><important>
205 /// <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>
206 /// </important>
207 /// <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>
208 pub fn tags(mut self, input: crate::types::Tag) -> Self {
209 let mut v = self.tags.unwrap_or_default();
210 v.push(input);
211 self.tags = ::std::option::Option::Some(v);
212 self
213 }
214 /// <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>
215 /// <ul>
216 /// <li>
217 /// <p><code>Key=OS,Value=Windows</code></p></li>
218 /// <li>
219 /// <p><code>Key=Environment,Value=Production</code></p></li>
220 /// </ul><important>
221 /// <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>
222 /// </important>
223 /// <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>
224 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
225 self.tags = input;
226 self
227 }
228 /// <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>
229 /// <ul>
230 /// <li>
231 /// <p><code>Key=OS,Value=Windows</code></p></li>
232 /// <li>
233 /// <p><code>Key=Environment,Value=Production</code></p></li>
234 /// </ul><important>
235 /// <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>
236 /// </important>
237 /// <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>
238 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
239 &self.tags
240 }
241 /// Appends an item to `registration_metadata`.
242 ///
243 /// To override the contents of this collection use [`set_registration_metadata`](Self::set_registration_metadata).
244 ///
245 /// <p>Reserved for internal use.</p>
246 pub fn registration_metadata(mut self, input: crate::types::RegistrationMetadataItem) -> Self {
247 let mut v = self.registration_metadata.unwrap_or_default();
248 v.push(input);
249 self.registration_metadata = ::std::option::Option::Some(v);
250 self
251 }
252 /// <p>Reserved for internal use.</p>
253 pub fn set_registration_metadata(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>>) -> Self {
254 self.registration_metadata = input;
255 self
256 }
257 /// <p>Reserved for internal use.</p>
258 pub fn get_registration_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RegistrationMetadataItem>> {
259 &self.registration_metadata
260 }
261 /// Consumes the builder and constructs a [`CreateActivationInput`](crate::operation::create_activation::CreateActivationInput).
262 pub fn build(
263 self,
264 ) -> ::std::result::Result<crate::operation::create_activation::CreateActivationInput, ::aws_smithy_types::error::operation::BuildError> {
265 ::std::result::Result::Ok(crate::operation::create_activation::CreateActivationInput {
266 description: self.description,
267 default_instance_name: self.default_instance_name,
268 iam_role: self.iam_role,
269 registration_limit: self.registration_limit,
270 expiration_date: self.expiration_date,
271 tags: self.tags,
272 registration_metadata: self.registration_metadata,
273 })
274 }
275}