aws_sdk_opsworks/operation/update_user_profile/_update_user_profile_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 UpdateUserProfileInput {
6 /// <p>The user IAM ARN. This can also be a federated user's ARN.</p>
7 pub iam_user_arn: ::std::option::Option<::std::string::String>,
8 /// <p>The user's SSH user name. The allowable characters are \[a-z\], \[A-Z\], \[0-9\], '-', and '_'. If the specified name includes other punctuation marks, OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, OpsWorks Stacks generates one from the IAM user name.</p>
9 pub ssh_username: ::std::option::Option<::std::string::String>,
10 /// <p>The user's new SSH public key.</p>
11 pub ssh_public_key: ::std::option::Option<::std::string::String>,
12 /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
13 pub allow_self_management: ::std::option::Option<bool>,
14}
15impl UpdateUserProfileInput {
16 /// <p>The user IAM ARN. This can also be a federated user's ARN.</p>
17 pub fn iam_user_arn(&self) -> ::std::option::Option<&str> {
18 self.iam_user_arn.as_deref()
19 }
20 /// <p>The user's SSH user name. The allowable characters are \[a-z\], \[A-Z\], \[0-9\], '-', and '_'. If the specified name includes other punctuation marks, OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, OpsWorks Stacks generates one from the IAM user name.</p>
21 pub fn ssh_username(&self) -> ::std::option::Option<&str> {
22 self.ssh_username.as_deref()
23 }
24 /// <p>The user's new SSH public key.</p>
25 pub fn ssh_public_key(&self) -> ::std::option::Option<&str> {
26 self.ssh_public_key.as_deref()
27 }
28 /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
29 pub fn allow_self_management(&self) -> ::std::option::Option<bool> {
30 self.allow_self_management
31 }
32}
33impl UpdateUserProfileInput {
34 /// Creates a new builder-style object to manufacture [`UpdateUserProfileInput`](crate::operation::update_user_profile::UpdateUserProfileInput).
35 pub fn builder() -> crate::operation::update_user_profile::builders::UpdateUserProfileInputBuilder {
36 crate::operation::update_user_profile::builders::UpdateUserProfileInputBuilder::default()
37 }
38}
39
40/// A builder for [`UpdateUserProfileInput`](crate::operation::update_user_profile::UpdateUserProfileInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateUserProfileInputBuilder {
44 pub(crate) iam_user_arn: ::std::option::Option<::std::string::String>,
45 pub(crate) ssh_username: ::std::option::Option<::std::string::String>,
46 pub(crate) ssh_public_key: ::std::option::Option<::std::string::String>,
47 pub(crate) allow_self_management: ::std::option::Option<bool>,
48}
49impl UpdateUserProfileInputBuilder {
50 /// <p>The user IAM ARN. This can also be a federated user's ARN.</p>
51 /// This field is required.
52 pub fn iam_user_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.iam_user_arn = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>The user IAM ARN. This can also be a federated user's ARN.</p>
57 pub fn set_iam_user_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.iam_user_arn = input;
59 self
60 }
61 /// <p>The user IAM ARN. This can also be a federated user's ARN.</p>
62 pub fn get_iam_user_arn(&self) -> &::std::option::Option<::std::string::String> {
63 &self.iam_user_arn
64 }
65 /// <p>The user's SSH user name. The allowable characters are \[a-z\], \[A-Z\], \[0-9\], '-', and '_'. If the specified name includes other punctuation marks, OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, OpsWorks Stacks generates one from the IAM user name.</p>
66 pub fn ssh_username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.ssh_username = ::std::option::Option::Some(input.into());
68 self
69 }
70 /// <p>The user's SSH user name. The allowable characters are \[a-z\], \[A-Z\], \[0-9\], '-', and '_'. If the specified name includes other punctuation marks, OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, OpsWorks Stacks generates one from the IAM user name.</p>
71 pub fn set_ssh_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.ssh_username = input;
73 self
74 }
75 /// <p>The user's SSH user name. The allowable characters are \[a-z\], \[A-Z\], \[0-9\], '-', and '_'. If the specified name includes other punctuation marks, OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, OpsWorks Stacks generates one from the IAM user name.</p>
76 pub fn get_ssh_username(&self) -> &::std::option::Option<::std::string::String> {
77 &self.ssh_username
78 }
79 /// <p>The user's new SSH public key.</p>
80 pub fn ssh_public_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.ssh_public_key = ::std::option::Option::Some(input.into());
82 self
83 }
84 /// <p>The user's new SSH public key.</p>
85 pub fn set_ssh_public_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.ssh_public_key = input;
87 self
88 }
89 /// <p>The user's new SSH public key.</p>
90 pub fn get_ssh_public_key(&self) -> &::std::option::Option<::std::string::String> {
91 &self.ssh_public_key
92 }
93 /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
94 pub fn allow_self_management(mut self, input: bool) -> Self {
95 self.allow_self_management = ::std::option::Option::Some(input);
96 self
97 }
98 /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
99 pub fn set_allow_self_management(mut self, input: ::std::option::Option<bool>) -> Self {
100 self.allow_self_management = input;
101 self
102 }
103 /// <p>Whether users can specify their own SSH public key through the My Settings page. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/security-settingsshkey.html">Managing User Permissions</a>.</p>
104 pub fn get_allow_self_management(&self) -> &::std::option::Option<bool> {
105 &self.allow_self_management
106 }
107 /// Consumes the builder and constructs a [`UpdateUserProfileInput`](crate::operation::update_user_profile::UpdateUserProfileInput).
108 pub fn build(
109 self,
110 ) -> ::std::result::Result<crate::operation::update_user_profile::UpdateUserProfileInput, ::aws_smithy_types::error::operation::BuildError> {
111 ::std::result::Result::Ok(crate::operation::update_user_profile::UpdateUserProfileInput {
112 iam_user_arn: self.iam_user_arn,
113 ssh_username: self.ssh_username,
114 ssh_public_key: self.ssh_public_key,
115 allow_self_management: self.allow_self_management,
116 })
117 }
118}