aws_sdk_transfer/client/create_access.rs
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateAccess`](crate::operation::create_access::builders::CreateAccessFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`home_directory(impl Into<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::home_directory) / [`set_home_directory(Option<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::set_home_directory):<br>required: **false**<br><p>The landing directory (folder) for a user when they log in to the server using the client.</p> <p>A <code>HomeDirectory</code> example is <code>/bucket_name/home/mydirectory</code>.</p><note> <p>The <code>HomeDirectory</code> parameter is only used if <code>HomeDirectoryType</code> is set to <code>PATH</code>.</p> </note><br>
/// - [`home_directory_type(HomeDirectoryType)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::home_directory_type) / [`set_home_directory_type(Option<HomeDirectoryType>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::set_home_directory_type):<br>required: **false**<br><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> <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> </note><br>
/// - [`home_directory_mappings(HomeDirectoryMapEntry)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::home_directory_mappings) / [`set_home_directory_mappings(Option<Vec::<HomeDirectoryMapEntry>>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::set_home_directory_mappings):<br>required: **false**<br><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> <p>The following is an <code>Entry</code> and <code>Target</code> pair example.</p> <p><code>\[ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } \]</code></p> <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> <p>The following is an <code>Entry</code> and <code>Target</code> pair example for <code>chroot</code>.</p> <p><code>\[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } \]</code></p><br>
/// - [`policy(impl Into<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::policy) / [`set_policy(Option<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::set_policy):<br>required: **false**<br><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> <p>This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session policies.</p> <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> <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> <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> </note><br>
/// - [`posix_profile(PosixProfile)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::posix_profile) / [`set_posix_profile(Option<PosixProfile>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::set_posix_profile):<br>required: **false**<br><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><br>
/// - [`role(impl Into<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::role) / [`set_role(Option<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::set_role):<br>required: **true**<br><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><br>
/// - [`server_id(impl Into<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::server_id) / [`set_server_id(Option<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::set_server_id):<br>required: **true**<br><p>A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.</p><br>
/// - [`external_id(impl Into<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::external_id) / [`set_external_id(Option<String>)`](crate::operation::create_access::builders::CreateAccessFluentBuilder::set_external_id):<br>required: **true**<br><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> <p><code>Get-ADGroup -Filter {samAccountName -like "<i>YourGroupName</i>*"} -Properties * | Select SamAccountName,ObjectSid</code></p> <p>In that command, replace <i>YourGroupName</i> with the name of your Active Directory group.</p> <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><br>
/// - On success, responds with [`CreateAccessOutput`](crate::operation::create_access::CreateAccessOutput) with field(s):
/// - [`server_id(String)`](crate::operation::create_access::CreateAccessOutput::server_id): <p>The identifier of the server that the user is attached to.</p>
/// - [`external_id(String)`](crate::operation::create_access::CreateAccessOutput::external_id): <p>The external identifier of the group whose users have access to your Amazon S3 or Amazon EFS resources over the enabled protocols using Transfer Family.</p>
/// - On failure, responds with [`SdkError<CreateAccessError>`](crate::operation::create_access::CreateAccessError)
pub fn create_access(&self) -> crate::operation::create_access::builders::CreateAccessFluentBuilder {
crate::operation::create_access::builders::CreateAccessFluentBuilder::new(self.handle.clone())
}
}