aws_sdk_transfer/operation/create_user/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_user::_create_user_output::CreateUserOutputBuilder;
3
4pub use crate::operation::create_user::_create_user_input::CreateUserInputBuilder;
5
6impl crate::operation::create_user::builders::CreateUserInputBuilder {
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_user::CreateUserOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_user::CreateUserError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_user();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateUser`.
24///
25/// <p>Creates a user and associates them with an existing file transfer protocol-enabled server. You can only create and associate users with servers that have the <code>IdentityProviderType</code> set to <code>SERVICE_MANAGED</code>. Using parameters for <code>CreateUser</code>, you can specify the user name, set the home directory, store the user's public key, and assign the user's Identity and Access Management (IAM) role. You can also optionally add a session policy, and assign metadata with tags that can be used to group and search for users.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateUserFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_user::builders::CreateUserInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_user::CreateUserOutput,
35 crate::operation::create_user::CreateUserError,
36 > for CreateUserFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::create_user::CreateUserOutput,
44 crate::operation::create_user::CreateUserError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateUserFluentBuilder {
51 /// Creates a new `CreateUserFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the CreateUser as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_user::builders::CreateUserInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::create_user::CreateUserOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_user::CreateUserError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::create_user::CreateUser::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_user::CreateUser::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::create_user::CreateUserOutput,
97 crate::operation::create_user::CreateUserError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>The landing directory (folder) for a user when they log in to the server using the client.</p>
112 /// <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note>
113 /// <p>You can use the <code>HomeDirectory</code> parameter for <code>HomeDirectoryType</code> when it is set to either <code>PATH</code> or <code>LOGICAL</code>.</p>
114 /// </note>
115 pub fn home_directory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.inner = self.inner.home_directory(input.into());
117 self
118 }
119 /// <p>The landing directory (folder) for a user when they log in to the server using the client.</p>
120 /// <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note>
121 /// <p>You can use the <code>HomeDirectory</code> parameter for <code>HomeDirectoryType</code> when it is set to either <code>PATH</code> or <code>LOGICAL</code>.</p>
122 /// </note>
123 pub fn set_home_directory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.inner = self.inner.set_home_directory(input);
125 self
126 }
127 /// <p>The landing directory (folder) for a user when they log in to the server using the client.</p>
128 /// <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note>
129 /// <p>You can use the <code>HomeDirectory</code> parameter for <code>HomeDirectoryType</code> when it is set to either <code>PATH</code> or <code>LOGICAL</code>.</p>
130 /// </note>
131 pub fn get_home_directory(&self) -> &::std::option::Option<::std::string::String> {
132 self.inner.get_home_directory()
133 }
134 /// <p>The type of landing directory (folder) that you want your users' home directory to be when they log in to the server. If you set it to <code>PATH</code>, the user will see the absolute Amazon S3 bucket or Amazon EFS path as is in their file transfer protocol clients. If you set it to <code>LOGICAL</code>, you need to provide mappings in the <code>HomeDirectoryMappings</code> for how you want to make Amazon S3 or Amazon EFS paths visible to your users.</p><note>
135 /// <p>If <code>HomeDirectoryType</code> is <code>LOGICAL</code>, you must provide mappings, using the <code>HomeDirectoryMappings</code> parameter. If, on the other hand, <code>HomeDirectoryType</code> is <code>PATH</code>, you provide an absolute path using the <code>HomeDirectory</code> parameter. You cannot have both <code>HomeDirectory</code> and <code>HomeDirectoryMappings</code> in your template.</p>
136 /// </note>
137 pub fn home_directory_type(mut self, input: crate::types::HomeDirectoryType) -> Self {
138 self.inner = self.inner.home_directory_type(input);
139 self
140 }
141 /// <p>The type of landing directory (folder) that you want your users' home directory to be when they log in to the server. If you set it to <code>PATH</code>, the user will see the absolute Amazon S3 bucket or Amazon EFS path as is in their file transfer protocol clients. If you set it to <code>LOGICAL</code>, you need to provide mappings in the <code>HomeDirectoryMappings</code> for how you want to make Amazon S3 or Amazon EFS paths visible to your users.</p><note>
142 /// <p>If <code>HomeDirectoryType</code> is <code>LOGICAL</code>, you must provide mappings, using the <code>HomeDirectoryMappings</code> parameter. If, on the other hand, <code>HomeDirectoryType</code> is <code>PATH</code>, you provide an absolute path using the <code>HomeDirectory</code> parameter. You cannot have both <code>HomeDirectory</code> and <code>HomeDirectoryMappings</code> in your template.</p>
143 /// </note>
144 pub fn set_home_directory_type(mut self, input: ::std::option::Option<crate::types::HomeDirectoryType>) -> Self {
145 self.inner = self.inner.set_home_directory_type(input);
146 self
147 }
148 /// <p>The type of landing directory (folder) that you want your users' home directory to be when they log in to the server. If you set it to <code>PATH</code>, the user will see the absolute Amazon S3 bucket or Amazon EFS path as is in their file transfer protocol clients. If you set it to <code>LOGICAL</code>, you need to provide mappings in the <code>HomeDirectoryMappings</code> for how you want to make Amazon S3 or Amazon EFS paths visible to your users.</p><note>
149 /// <p>If <code>HomeDirectoryType</code> is <code>LOGICAL</code>, you must provide mappings, using the <code>HomeDirectoryMappings</code> parameter. If, on the other hand, <code>HomeDirectoryType</code> is <code>PATH</code>, you provide an absolute path using the <code>HomeDirectory</code> parameter. You cannot have both <code>HomeDirectory</code> and <code>HomeDirectoryMappings</code> in your template.</p>
150 /// </note>
151 pub fn get_home_directory_type(&self) -> &::std::option::Option<crate::types::HomeDirectoryType> {
152 self.inner.get_home_directory_type()
153 }
154 ///
155 /// Appends an item to `HomeDirectoryMappings`.
156 ///
157 /// To override the contents of this collection use [`set_home_directory_mappings`](Self::set_home_directory_mappings).
158 ///
159 /// <p>Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible. You must specify the <code>Entry</code> and <code>Target</code> pair, where <code>Entry</code> shows how the path is made visible and <code>Target</code> is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access to paths in <code>Target</code>. This value can be set only when <code>HomeDirectoryType</code> is set to <i>LOGICAL</i>.</p>
160 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p>
161 /// <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
162 /// <p>In most cases, you can use this value instead of the session policy to lock your user down to the designated home directory ("<code>chroot</code>"). To do this, you can set <code>Entry</code> to <code>/</code> and set <code>Target</code> to the value the user should see for their home directory when they log in.</p>
163 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p>
164 /// <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
165 pub fn home_directory_mappings(mut self, input: crate::types::HomeDirectoryMapEntry) -> Self {
166 self.inner = self.inner.home_directory_mappings(input);
167 self
168 }
169 /// <p>Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible. You must specify the <code>Entry</code> and <code>Target</code> pair, where <code>Entry</code> shows how the path is made visible and <code>Target</code> is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access to paths in <code>Target</code>. This value can be set only when <code>HomeDirectoryType</code> is set to <i>LOGICAL</i>.</p>
170 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p>
171 /// <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
172 /// <p>In most cases, you can use this value instead of the session policy to lock your user down to the designated home directory ("<code>chroot</code>"). To do this, you can set <code>Entry</code> to <code>/</code> and set <code>Target</code> to the value the user should see for their home directory when they log in.</p>
173 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p>
174 /// <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
175 pub fn set_home_directory_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HomeDirectoryMapEntry>>) -> Self {
176 self.inner = self.inner.set_home_directory_mappings(input);
177 self
178 }
179 /// <p>Logical directory mappings that specify what Amazon S3 or Amazon EFS paths and keys should be visible to your user and how you want to make them visible. You must specify the <code>Entry</code> and <code>Target</code> pair, where <code>Entry</code> shows how the path is made visible and <code>Target</code> is the actual Amazon S3 or Amazon EFS path. If you only specify a target, it is displayed as is. You also must ensure that your Identity and Access Management (IAM) role provides access to paths in <code>Target</code>. This value can be set only when <code>HomeDirectoryType</code> is set to <i>LOGICAL</i>.</p>
180 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p>
181 /// <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
182 /// <p>In most cases, you can use this value instead of the session policy to lock your user down to the designated home directory ("<code>chroot</code>"). To do this, you can set <code>Entry</code> to <code>/</code> and set <code>Target</code> to the value the user should see for their home directory when they log in.</p>
183 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p>
184 /// <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
185 pub fn get_home_directory_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HomeDirectoryMapEntry>> {
186 self.inner.get_home_directory_mappings()
187 }
188 /// <p>A session policy for your user so that you can use the same Identity and Access Management (IAM) role across multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket. Variables that you can use inside this policy include <code>${Transfer:UserName}</code>, <code>${Transfer:HomeDirectory}</code>, and <code>${Transfer:HomeBucket}</code>.</p><note>
189 /// <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p>
190 /// <p>For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the <code>Policy</code> argument.</p>
191 /// <p>For an example of a session policy, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/session-policy.html">Example session policy</a>.</p>
192 /// <p>For more information, see <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Amazon Web Services Security Token Service API Reference</i>.</p>
193 /// </note>
194 pub fn policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195 self.inner = self.inner.policy(input.into());
196 self
197 }
198 /// <p>A session policy for your user so that you can use the same Identity and Access Management (IAM) role across multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket. Variables that you can use inside this policy include <code>${Transfer:UserName}</code>, <code>${Transfer:HomeDirectory}</code>, and <code>${Transfer:HomeBucket}</code>.</p><note>
199 /// <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p>
200 /// <p>For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the <code>Policy</code> argument.</p>
201 /// <p>For an example of a session policy, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/session-policy.html">Example session policy</a>.</p>
202 /// <p>For more information, see <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Amazon Web Services Security Token Service API Reference</i>.</p>
203 /// </note>
204 pub fn set_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205 self.inner = self.inner.set_policy(input);
206 self
207 }
208 /// <p>A session policy for your user so that you can use the same Identity and Access Management (IAM) role across multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket. Variables that you can use inside this policy include <code>${Transfer:UserName}</code>, <code>${Transfer:HomeDirectory}</code>, and <code>${Transfer:HomeBucket}</code>.</p><note>
209 /// <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p>
210 /// <p>For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the <code>Policy</code> argument.</p>
211 /// <p>For an example of a session policy, see <a href="https://docs.aws.amazon.com/transfer/latest/userguide/session-policy.html">Example session policy</a>.</p>
212 /// <p>For more information, see <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Amazon Web Services Security Token Service API Reference</i>.</p>
213 /// </note>
214 pub fn get_policy(&self) -> &::std::option::Option<::std::string::String> {
215 self.inner.get_policy()
216 }
217 /// <p>Specifies the full POSIX identity, including user ID (<code>Uid</code>), group ID (<code>Gid</code>), and any secondary groups IDs (<code>SecondaryGids</code>), that controls your users' access to your Amazon EFS file systems. The POSIX permissions that are set on files and directories in Amazon EFS determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.</p>
218 pub fn posix_profile(mut self, input: crate::types::PosixProfile) -> Self {
219 self.inner = self.inner.posix_profile(input);
220 self
221 }
222 /// <p>Specifies the full POSIX identity, including user ID (<code>Uid</code>), group ID (<code>Gid</code>), and any secondary groups IDs (<code>SecondaryGids</code>), that controls your users' access to your Amazon EFS file systems. The POSIX permissions that are set on files and directories in Amazon EFS determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.</p>
223 pub fn set_posix_profile(mut self, input: ::std::option::Option<crate::types::PosixProfile>) -> Self {
224 self.inner = self.inner.set_posix_profile(input);
225 self
226 }
227 /// <p>Specifies the full POSIX identity, including user ID (<code>Uid</code>), group ID (<code>Gid</code>), and any secondary groups IDs (<code>SecondaryGids</code>), that controls your users' access to your Amazon EFS file systems. The POSIX permissions that are set on files and directories in Amazon EFS determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.</p>
228 pub fn get_posix_profile(&self) -> &::std::option::Option<crate::types::PosixProfile> {
229 self.inner.get_posix_profile()
230 }
231 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users' access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users' transfer requests.</p>
232 pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
233 self.inner = self.inner.role(input.into());
234 self
235 }
236 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users' access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users' transfer requests.</p>
237 pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
238 self.inner = self.inner.set_role(input);
239 self
240 }
241 /// <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that controls your users' access to your Amazon S3 bucket or Amazon EFS file system. The policies attached to this role determine the level of access that you want to provide your users when transferring files into and out of your Amazon S3 bucket or Amazon EFS file system. The IAM role should also contain a trust relationship that allows the server to access your resources when servicing your users' transfer requests.</p>
242 pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
243 self.inner.get_role()
244 }
245 /// <p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p>
246 pub fn server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
247 self.inner = self.inner.server_id(input.into());
248 self
249 }
250 /// <p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p>
251 pub fn set_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252 self.inner = self.inner.set_server_id(input);
253 self
254 }
255 /// <p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p>
256 pub fn get_server_id(&self) -> &::std::option::Option<::std::string::String> {
257 self.inner.get_server_id()
258 }
259 /// <p>The public portion of the Secure Shell (SSH) key used to authenticate the user to the server.</p>
260 /// <p>The three standard SSH public key format elements are <code><key type></code>, <code><body base64></code>, and an optional <code><comment></code>, with spaces between each element.</p>
261 /// <p>Transfer Family accepts RSA, ECDSA, and ED25519 keys.</p>
262 /// <ul>
263 /// <li>
264 /// <p>For RSA keys, the key type is <code>ssh-rsa</code>.</p></li>
265 /// <li>
266 /// <p>For ED25519 keys, the key type is <code>ssh-ed25519</code>.</p></li>
267 /// <li>
268 /// <p>For ECDSA keys, the key type is either <code>ecdsa-sha2-nistp256</code>, <code>ecdsa-sha2-nistp384</code>, or <code>ecdsa-sha2-nistp521</code>, depending on the size of the key you generated.</p></li>
269 /// </ul>
270 pub fn ssh_public_key_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271 self.inner = self.inner.ssh_public_key_body(input.into());
272 self
273 }
274 /// <p>The public portion of the Secure Shell (SSH) key used to authenticate the user to the server.</p>
275 /// <p>The three standard SSH public key format elements are <code><key type></code>, <code><body base64></code>, and an optional <code><comment></code>, with spaces between each element.</p>
276 /// <p>Transfer Family accepts RSA, ECDSA, and ED25519 keys.</p>
277 /// <ul>
278 /// <li>
279 /// <p>For RSA keys, the key type is <code>ssh-rsa</code>.</p></li>
280 /// <li>
281 /// <p>For ED25519 keys, the key type is <code>ssh-ed25519</code>.</p></li>
282 /// <li>
283 /// <p>For ECDSA keys, the key type is either <code>ecdsa-sha2-nistp256</code>, <code>ecdsa-sha2-nistp384</code>, or <code>ecdsa-sha2-nistp521</code>, depending on the size of the key you generated.</p></li>
284 /// </ul>
285 pub fn set_ssh_public_key_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286 self.inner = self.inner.set_ssh_public_key_body(input);
287 self
288 }
289 /// <p>The public portion of the Secure Shell (SSH) key used to authenticate the user to the server.</p>
290 /// <p>The three standard SSH public key format elements are <code><key type></code>, <code><body base64></code>, and an optional <code><comment></code>, with spaces between each element.</p>
291 /// <p>Transfer Family accepts RSA, ECDSA, and ED25519 keys.</p>
292 /// <ul>
293 /// <li>
294 /// <p>For RSA keys, the key type is <code>ssh-rsa</code>.</p></li>
295 /// <li>
296 /// <p>For ED25519 keys, the key type is <code>ssh-ed25519</code>.</p></li>
297 /// <li>
298 /// <p>For ECDSA keys, the key type is either <code>ecdsa-sha2-nistp256</code>, <code>ecdsa-sha2-nistp384</code>, or <code>ecdsa-sha2-nistp521</code>, depending on the size of the key you generated.</p></li>
299 /// </ul>
300 pub fn get_ssh_public_key_body(&self) -> &::std::option::Option<::std::string::String> {
301 self.inner.get_ssh_public_key_body()
302 }
303 ///
304 /// Appends an item to `Tags`.
305 ///
306 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
307 ///
308 /// <p>Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any purpose.</p>
309 pub fn tags(mut self, input: crate::types::Tag) -> Self {
310 self.inner = self.inner.tags(input);
311 self
312 }
313 /// <p>Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any purpose.</p>
314 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
315 self.inner = self.inner.set_tags(input);
316 self
317 }
318 /// <p>Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any purpose.</p>
319 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
320 self.inner.get_tags()
321 }
322 /// <p>A unique string that identifies a user and is associated with a <code>ServerId</code>. This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. The user name can't start with a hyphen, period, or at sign.</p>
323 pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
324 self.inner = self.inner.user_name(input.into());
325 self
326 }
327 /// <p>A unique string that identifies a user and is associated with a <code>ServerId</code>. This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. The user name can't start with a hyphen, period, or at sign.</p>
328 pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
329 self.inner = self.inner.set_user_name(input);
330 self
331 }
332 /// <p>A unique string that identifies a user and is associated with a <code>ServerId</code>. This user name must be a minimum of 3 and a maximum of 100 characters long. The following are valid characters: a-z, A-Z, 0-9, underscore '_', hyphen '-', period '.', and at sign '@'. The user name can't start with a hyphen, period, or at sign.</p>
333 pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
334 self.inner.get_user_name()
335 }
336}