1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SetPermissionInput {
/// <p>The stack ID.</p>
#[doc(hidden)]
pub stack_id: std::option::Option<std::string::String>,
/// <p>The user's IAM ARN. This can also be a federated user's ARN.</p>
#[doc(hidden)]
pub iam_user_arn: std::option::Option<std::string::String>,
/// <p>The user is allowed to use SSH to communicate with the instance.</p>
#[doc(hidden)]
pub allow_ssh: std::option::Option<bool>,
/// <p>The user is allowed to use <b>sudo</b> to elevate privileges.</p>
#[doc(hidden)]
pub allow_sudo: std::option::Option<bool>,
/// <p>The user's permission level, which must be set to one of the following strings. You cannot set your own permissions level.</p>
/// <ul>
/// <li> <p> <code>deny</code> </p> </li>
/// <li> <p> <code>show</code> </p> </li>
/// <li> <p> <code>deploy</code> </p> </li>
/// <li> <p> <code>manage</code> </p> </li>
/// <li> <p> <code>iam_only</code> </p> </li>
/// </ul>
/// <p>For more information about the permissions associated with these levels, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html">Managing User Permissions</a>.</p>
#[doc(hidden)]
pub level: std::option::Option<std::string::String>,
}
impl SetPermissionInput {
/// <p>The stack ID.</p>
pub fn stack_id(&self) -> std::option::Option<&str> {
self.stack_id.as_deref()
}
/// <p>The user's IAM ARN. This can also be a federated user's ARN.</p>
pub fn iam_user_arn(&self) -> std::option::Option<&str> {
self.iam_user_arn.as_deref()
}
/// <p>The user is allowed to use SSH to communicate with the instance.</p>
pub fn allow_ssh(&self) -> std::option::Option<bool> {
self.allow_ssh
}
/// <p>The user is allowed to use <b>sudo</b> to elevate privileges.</p>
pub fn allow_sudo(&self) -> std::option::Option<bool> {
self.allow_sudo
}
/// <p>The user's permission level, which must be set to one of the following strings. You cannot set your own permissions level.</p>
/// <ul>
/// <li> <p> <code>deny</code> </p> </li>
/// <li> <p> <code>show</code> </p> </li>
/// <li> <p> <code>deploy</code> </p> </li>
/// <li> <p> <code>manage</code> </p> </li>
/// <li> <p> <code>iam_only</code> </p> </li>
/// </ul>
/// <p>For more information about the permissions associated with these levels, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html">Managing User Permissions</a>.</p>
pub fn level(&self) -> std::option::Option<&str> {
self.level.as_deref()
}
}
impl SetPermissionInput {
/// Creates a new builder-style object to manufacture [`SetPermissionInput`](crate::operation::set_permission::SetPermissionInput).
pub fn builder() -> crate::operation::set_permission::builders::SetPermissionInputBuilder {
crate::operation::set_permission::builders::SetPermissionInputBuilder::default()
}
}
/// A builder for [`SetPermissionInput`](crate::operation::set_permission::SetPermissionInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct SetPermissionInputBuilder {
pub(crate) stack_id: std::option::Option<std::string::String>,
pub(crate) iam_user_arn: std::option::Option<std::string::String>,
pub(crate) allow_ssh: std::option::Option<bool>,
pub(crate) allow_sudo: std::option::Option<bool>,
pub(crate) level: std::option::Option<std::string::String>,
}
impl SetPermissionInputBuilder {
/// <p>The stack ID.</p>
pub fn stack_id(mut self, input: impl Into<std::string::String>) -> Self {
self.stack_id = Some(input.into());
self
}
/// <p>The stack ID.</p>
pub fn set_stack_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.stack_id = input;
self
}
/// <p>The user's IAM ARN. This can also be a federated user's ARN.</p>
pub fn iam_user_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.iam_user_arn = Some(input.into());
self
}
/// <p>The user's IAM ARN. This can also be a federated user's ARN.</p>
pub fn set_iam_user_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.iam_user_arn = input;
self
}
/// <p>The user is allowed to use SSH to communicate with the instance.</p>
pub fn allow_ssh(mut self, input: bool) -> Self {
self.allow_ssh = Some(input);
self
}
/// <p>The user is allowed to use SSH to communicate with the instance.</p>
pub fn set_allow_ssh(mut self, input: std::option::Option<bool>) -> Self {
self.allow_ssh = input;
self
}
/// <p>The user is allowed to use <b>sudo</b> to elevate privileges.</p>
pub fn allow_sudo(mut self, input: bool) -> Self {
self.allow_sudo = Some(input);
self
}
/// <p>The user is allowed to use <b>sudo</b> to elevate privileges.</p>
pub fn set_allow_sudo(mut self, input: std::option::Option<bool>) -> Self {
self.allow_sudo = input;
self
}
/// <p>The user's permission level, which must be set to one of the following strings. You cannot set your own permissions level.</p>
/// <ul>
/// <li> <p> <code>deny</code> </p> </li>
/// <li> <p> <code>show</code> </p> </li>
/// <li> <p> <code>deploy</code> </p> </li>
/// <li> <p> <code>manage</code> </p> </li>
/// <li> <p> <code>iam_only</code> </p> </li>
/// </ul>
/// <p>For more information about the permissions associated with these levels, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html">Managing User Permissions</a>.</p>
pub fn level(mut self, input: impl Into<std::string::String>) -> Self {
self.level = Some(input.into());
self
}
/// <p>The user's permission level, which must be set to one of the following strings. You cannot set your own permissions level.</p>
/// <ul>
/// <li> <p> <code>deny</code> </p> </li>
/// <li> <p> <code>show</code> </p> </li>
/// <li> <p> <code>deploy</code> </p> </li>
/// <li> <p> <code>manage</code> </p> </li>
/// <li> <p> <code>iam_only</code> </p> </li>
/// </ul>
/// <p>For more information about the permissions associated with these levels, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html">Managing User Permissions</a>.</p>
pub fn set_level(mut self, input: std::option::Option<std::string::String>) -> Self {
self.level = input;
self
}
/// Consumes the builder and constructs a [`SetPermissionInput`](crate::operation::set_permission::SetPermissionInput).
pub fn build(
self,
) -> Result<
crate::operation::set_permission::SetPermissionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::set_permission::SetPermissionInput {
stack_id: self.stack_id,
iam_user_arn: self.iam_user_arn,
allow_ssh: self.allow_ssh,
allow_sudo: self.allow_sudo,
level: self.level,
})
}
}