aws_sdk_transfer/operation/create_access/_create_access_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 CreateAccessInput {
6 /// <p>The landing directory (folder) for a user when they log in to the server using the client.</p>
7 /// <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note>
8 /// <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>
9 /// </note>
10 pub home_directory: ::std::option::Option<::std::string::String>,
11 /// <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>
12 /// <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>
13 /// </note>
14 pub home_directory_type: ::std::option::Option<crate::types::HomeDirectoryType>,
15 /// <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>
16 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p>
17 /// <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
18 /// <p>In most cases, you can use this value instead of the session policy to lock down your user 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 <code>HomeDirectory</code> parameter value.</p>
19 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p>
20 /// <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
21 pub home_directory_mappings: ::std::option::Option<::std::vec::Vec<crate::types::HomeDirectoryMapEntry>>,
22 /// <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>
23 /// <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p>
24 /// <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>
25 /// <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>
26 /// <p>For more information, see <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Security Token Service API Reference</i>.</p>
27 /// </note>
28 pub policy: ::std::option::Option<::std::string::String>,
29 /// <p>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 your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.</p>
30 pub posix_profile: ::std::option::Option<crate::types::PosixProfile>,
31 /// <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>
32 pub role: ::std::option::Option<::std::string::String>,
33 /// <p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p>
34 pub server_id: ::std::option::Option<::std::string::String>,
35 /// <p>A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.</p>
36 /// <p><code>Get-ADGroup -Filter {samAccountName -like "<i>YourGroupName</i>*"} -Properties * | Select SamAccountName,ObjectSid</code></p>
37 /// <p>In that command, replace <i>YourGroupName</i> with the name of your Active Directory group.</p>
38 /// <p>The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-</p>
39 pub external_id: ::std::option::Option<::std::string::String>,
40}
41impl CreateAccessInput {
42 /// <p>The landing directory (folder) for a user when they log in to the server using the client.</p>
43 /// <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note>
44 /// <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>
45 /// </note>
46 pub fn home_directory(&self) -> ::std::option::Option<&str> {
47 self.home_directory.as_deref()
48 }
49 /// <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>
50 /// <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>
51 /// </note>
52 pub fn home_directory_type(&self) -> ::std::option::Option<&crate::types::HomeDirectoryType> {
53 self.home_directory_type.as_ref()
54 }
55 /// <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>
56 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p>
57 /// <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
58 /// <p>In most cases, you can use this value instead of the session policy to lock down your user 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 <code>HomeDirectory</code> parameter value.</p>
59 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p>
60 /// <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
61 ///
62 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.home_directory_mappings.is_none()`.
63 pub fn home_directory_mappings(&self) -> &[crate::types::HomeDirectoryMapEntry] {
64 self.home_directory_mappings.as_deref().unwrap_or_default()
65 }
66 /// <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>
67 /// <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p>
68 /// <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>
69 /// <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>
70 /// <p>For more information, see <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Security Token Service API Reference</i>.</p>
71 /// </note>
72 pub fn policy(&self) -> ::std::option::Option<&str> {
73 self.policy.as_deref()
74 }
75 /// <p>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 your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.</p>
76 pub fn posix_profile(&self) -> ::std::option::Option<&crate::types::PosixProfile> {
77 self.posix_profile.as_ref()
78 }
79 /// <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>
80 pub fn role(&self) -> ::std::option::Option<&str> {
81 self.role.as_deref()
82 }
83 /// <p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p>
84 pub fn server_id(&self) -> ::std::option::Option<&str> {
85 self.server_id.as_deref()
86 }
87 /// <p>A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.</p>
88 /// <p><code>Get-ADGroup -Filter {samAccountName -like "<i>YourGroupName</i>*"} -Properties * | Select SamAccountName,ObjectSid</code></p>
89 /// <p>In that command, replace <i>YourGroupName</i> with the name of your Active Directory group.</p>
90 /// <p>The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-</p>
91 pub fn external_id(&self) -> ::std::option::Option<&str> {
92 self.external_id.as_deref()
93 }
94}
95impl CreateAccessInput {
96 /// Creates a new builder-style object to manufacture [`CreateAccessInput`](crate::operation::create_access::CreateAccessInput).
97 pub fn builder() -> crate::operation::create_access::builders::CreateAccessInputBuilder {
98 crate::operation::create_access::builders::CreateAccessInputBuilder::default()
99 }
100}
101
102/// A builder for [`CreateAccessInput`](crate::operation::create_access::CreateAccessInput).
103#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
104#[non_exhaustive]
105pub struct CreateAccessInputBuilder {
106 pub(crate) home_directory: ::std::option::Option<::std::string::String>,
107 pub(crate) home_directory_type: ::std::option::Option<crate::types::HomeDirectoryType>,
108 pub(crate) home_directory_mappings: ::std::option::Option<::std::vec::Vec<crate::types::HomeDirectoryMapEntry>>,
109 pub(crate) policy: ::std::option::Option<::std::string::String>,
110 pub(crate) posix_profile: ::std::option::Option<crate::types::PosixProfile>,
111 pub(crate) role: ::std::option::Option<::std::string::String>,
112 pub(crate) server_id: ::std::option::Option<::std::string::String>,
113 pub(crate) external_id: ::std::option::Option<::std::string::String>,
114}
115impl CreateAccessInputBuilder {
116 /// <p>The landing directory (folder) for a user when they log in to the server using the client.</p>
117 /// <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note>
118 /// <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>
119 /// </note>
120 pub fn home_directory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121 self.home_directory = ::std::option::Option::Some(input.into());
122 self
123 }
124 /// <p>The landing directory (folder) for a user when they log in to the server using the client.</p>
125 /// <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note>
126 /// <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>
127 /// </note>
128 pub fn set_home_directory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.home_directory = input;
130 self
131 }
132 /// <p>The landing directory (folder) for a user when they log in to the server using the client.</p>
133 /// <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note>
134 /// <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>
135 /// </note>
136 pub fn get_home_directory(&self) -> &::std::option::Option<::std::string::String> {
137 &self.home_directory
138 }
139 /// <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>
140 /// <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>
141 /// </note>
142 pub fn home_directory_type(mut self, input: crate::types::HomeDirectoryType) -> Self {
143 self.home_directory_type = ::std::option::Option::Some(input);
144 self
145 }
146 /// <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>
147 /// <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>
148 /// </note>
149 pub fn set_home_directory_type(mut self, input: ::std::option::Option<crate::types::HomeDirectoryType>) -> Self {
150 self.home_directory_type = input;
151 self
152 }
153 /// <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>
154 /// <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>
155 /// </note>
156 pub fn get_home_directory_type(&self) -> &::std::option::Option<crate::types::HomeDirectoryType> {
157 &self.home_directory_type
158 }
159 /// Appends an item to `home_directory_mappings`.
160 ///
161 /// To override the contents of this collection use [`set_home_directory_mappings`](Self::set_home_directory_mappings).
162 ///
163 /// <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>
164 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p>
165 /// <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
166 /// <p>In most cases, you can use this value instead of the session policy to lock down your user 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 <code>HomeDirectory</code> parameter value.</p>
167 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p>
168 /// <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
169 pub fn home_directory_mappings(mut self, input: crate::types::HomeDirectoryMapEntry) -> Self {
170 let mut v = self.home_directory_mappings.unwrap_or_default();
171 v.push(input);
172 self.home_directory_mappings = ::std::option::Option::Some(v);
173 self
174 }
175 /// <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>
176 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p>
177 /// <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
178 /// <p>In most cases, you can use this value instead of the session policy to lock down your user 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 <code>HomeDirectory</code> parameter value.</p>
179 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p>
180 /// <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
181 pub fn set_home_directory_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::HomeDirectoryMapEntry>>) -> Self {
182 self.home_directory_mappings = input;
183 self
184 }
185 /// <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>
186 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p>
187 /// <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
188 /// <p>In most cases, you can use this value instead of the session policy to lock down your user 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 <code>HomeDirectory</code> parameter value.</p>
189 /// <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p>
190 /// <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p>
191 pub fn get_home_directory_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::HomeDirectoryMapEntry>> {
192 &self.home_directory_mappings
193 }
194 /// <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>
195 /// <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p>
196 /// <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>
197 /// <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>
198 /// <p>For more information, see <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Security Token Service API Reference</i>.</p>
199 /// </note>
200 pub fn policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201 self.policy = ::std::option::Option::Some(input.into());
202 self
203 }
204 /// <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>
205 /// <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p>
206 /// <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>
207 /// <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>
208 /// <p>For more information, see <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Security Token Service API Reference</i>.</p>
209 /// </note>
210 pub fn set_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211 self.policy = input;
212 self
213 }
214 /// <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>
215 /// <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p>
216 /// <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>
217 /// <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>
218 /// <p>For more information, see <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Security Token Service API Reference</i>.</p>
219 /// </note>
220 pub fn get_policy(&self) -> &::std::option::Option<::std::string::String> {
221 &self.policy
222 }
223 /// <p>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 your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.</p>
224 pub fn posix_profile(mut self, input: crate::types::PosixProfile) -> Self {
225 self.posix_profile = ::std::option::Option::Some(input);
226 self
227 }
228 /// <p>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 your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.</p>
229 pub fn set_posix_profile(mut self, input: ::std::option::Option<crate::types::PosixProfile>) -> Self {
230 self.posix_profile = input;
231 self
232 }
233 /// <p>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 your file system determine the level of access your users get when transferring files into and out of your Amazon EFS file systems.</p>
234 pub fn get_posix_profile(&self) -> &::std::option::Option<crate::types::PosixProfile> {
235 &self.posix_profile
236 }
237 /// <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>
238 /// This field is required.
239 pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240 self.role = ::std::option::Option::Some(input.into());
241 self
242 }
243 /// <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>
244 pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245 self.role = input;
246 self
247 }
248 /// <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>
249 pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
250 &self.role
251 }
252 /// <p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p>
253 /// This field is required.
254 pub fn server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255 self.server_id = ::std::option::Option::Some(input.into());
256 self
257 }
258 /// <p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p>
259 pub fn set_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260 self.server_id = input;
261 self
262 }
263 /// <p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p>
264 pub fn get_server_id(&self) -> &::std::option::Option<::std::string::String> {
265 &self.server_id
266 }
267 /// <p>A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.</p>
268 /// <p><code>Get-ADGroup -Filter {samAccountName -like "<i>YourGroupName</i>*"} -Properties * | Select SamAccountName,ObjectSid</code></p>
269 /// <p>In that command, replace <i>YourGroupName</i> with the name of your Active Directory group.</p>
270 /// <p>The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-</p>
271 /// This field is required.
272 pub fn external_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
273 self.external_id = ::std::option::Option::Some(input.into());
274 self
275 }
276 /// <p>A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.</p>
277 /// <p><code>Get-ADGroup -Filter {samAccountName -like "<i>YourGroupName</i>*"} -Properties * | Select SamAccountName,ObjectSid</code></p>
278 /// <p>In that command, replace <i>YourGroupName</i> with the name of your Active Directory group.</p>
279 /// <p>The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-</p>
280 pub fn set_external_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
281 self.external_id = input;
282 self
283 }
284 /// <p>A unique identifier that is required to identify specific groups within your directory. The users of the group that you associate have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family. If you know the group name, you can view the SID values by running the following command using Windows PowerShell.</p>
285 /// <p><code>Get-ADGroup -Filter {samAccountName -like "<i>YourGroupName</i>*"} -Properties * | Select SamAccountName,ObjectSid</code></p>
286 /// <p>In that command, replace <i>YourGroupName</i> with the name of your Active Directory group.</p>
287 /// <p>The regular expression used to validate this parameter is a string of characters consisting of uppercase and lowercase alphanumeric characters with no spaces. You can also include underscores or any of the following characters: =,.@:/-</p>
288 pub fn get_external_id(&self) -> &::std::option::Option<::std::string::String> {
289 &self.external_id
290 }
291 /// Consumes the builder and constructs a [`CreateAccessInput`](crate::operation::create_access::CreateAccessInput).
292 pub fn build(
293 self,
294 ) -> ::std::result::Result<crate::operation::create_access::CreateAccessInput, ::aws_smithy_types::error::operation::BuildError> {
295 ::std::result::Result::Ok(crate::operation::create_access::CreateAccessInput {
296 home_directory: self.home_directory,
297 home_directory_type: self.home_directory_type,
298 home_directory_mappings: self.home_directory_mappings,
299 policy: self.policy,
300 posix_profile: self.posix_profile,
301 role: self.role,
302 server_id: self.server_id,
303 external_id: self.external_id,
304 })
305 }
306}