/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.transfer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateUserRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The landing directory (folder) for a user when they log in to the server using the client. *

*

* A HomeDirectory example is /bucket_name/home/mydirectory. *

*/ private String homeDirectory; /** *

* 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 PATH, the user will see the absolute Amazon S3 bucket or EFS paths as is in * their file transfer protocol clients. If you set it LOGICAL, you need to provide mappings in the * HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users. *

*/ private String homeDirectoryType; /** *

* 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 Entry and Target pair, * where Entry shows how the path is made visible and Target 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 Target. This value can be set only when * HomeDirectoryType is set to LOGICAL. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the value the user should see for their home directory when they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

*/ private java.util.List homeDirectoryMappings; /** *

* 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 ${Transfer:UserName}, ${Transfer:HomeDirectory}, and * ${Transfer:HomeBucket}. *

* *

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session * policies. *

*

* 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 Policy argument. *

*

* For an example of a session policy, see Example session policy. *

*

* For more information, see AssumeRole in the Amazon * Web Services Security Token Service API Reference. *

*
*/ private String policy; /** *

* Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any * secondary groups IDs (SecondaryGids), 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. *

*/ private PosixProfile posixProfile; /** *

* 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. *

*/ private String role; /** *

* A system-assigned unique identifier for a server instance. This is the specific server that you added your user * to. *

*/ private String serverId; /** *

* The public portion of the Secure Shell (SSH) key used to authenticate the user to the server. *

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. *

*

* Transfer Family accepts RSA, ECDSA, and ED25519 keys. *

* */ private String sshPublicKeyBody; /** *

* Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any * purpose. *

*/ private java.util.List tags; /** *

* A unique string that identifies a user and is associated with a ServerId. 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. *

*/ private String userName; /** *

* The landing directory (folder) for a user when they log in to the server using the client. *

*

* A HomeDirectory example is /bucket_name/home/mydirectory. *

* * @param homeDirectory * The landing directory (folder) for a user when they log in to the server using the client.

*

* A HomeDirectory example is /bucket_name/home/mydirectory. */ public void setHomeDirectory(String homeDirectory) { this.homeDirectory = homeDirectory; } /** *

* The landing directory (folder) for a user when they log in to the server using the client. *

*

* A HomeDirectory example is /bucket_name/home/mydirectory. *

* * @return The landing directory (folder) for a user when they log in to the server using the client.

*

* A HomeDirectory example is /bucket_name/home/mydirectory. */ public String getHomeDirectory() { return this.homeDirectory; } /** *

* The landing directory (folder) for a user when they log in to the server using the client. *

*

* A HomeDirectory example is /bucket_name/home/mydirectory. *

* * @param homeDirectory * The landing directory (folder) for a user when they log in to the server using the client.

*

* A HomeDirectory example is /bucket_name/home/mydirectory. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withHomeDirectory(String homeDirectory) { setHomeDirectory(homeDirectory); return this; } /** *

* 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 PATH, the user will see the absolute Amazon S3 bucket or EFS paths as is in * their file transfer protocol clients. If you set it LOGICAL, you need to provide mappings in the * HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users. *

* * @param homeDirectoryType * 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 PATH, the user will see the absolute Amazon S3 bucket or EFS * paths as is in their file transfer protocol clients. If you set it LOGICAL, you need to * provide mappings in the HomeDirectoryMappings for how you want to make Amazon S3 or Amazon * EFS paths visible to your users. * @see HomeDirectoryType */ public void setHomeDirectoryType(String homeDirectoryType) { this.homeDirectoryType = homeDirectoryType; } /** *

* 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 PATH, the user will see the absolute Amazon S3 bucket or EFS paths as is in * their file transfer protocol clients. If you set it LOGICAL, you need to provide mappings in the * HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users. *

* * @return 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 PATH, the user will see the absolute Amazon S3 bucket or EFS * paths as is in their file transfer protocol clients. If you set it LOGICAL, you need to * provide mappings in the HomeDirectoryMappings for how you want to make Amazon S3 or Amazon * EFS paths visible to your users. * @see HomeDirectoryType */ public String getHomeDirectoryType() { return this.homeDirectoryType; } /** *

* 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 PATH, the user will see the absolute Amazon S3 bucket or EFS paths as is in * their file transfer protocol clients. If you set it LOGICAL, you need to provide mappings in the * HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users. *

* * @param homeDirectoryType * 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 PATH, the user will see the absolute Amazon S3 bucket or EFS * paths as is in their file transfer protocol clients. If you set it LOGICAL, you need to * provide mappings in the HomeDirectoryMappings for how you want to make Amazon S3 or Amazon * EFS paths visible to your users. * @return Returns a reference to this object so that method calls can be chained together. * @see HomeDirectoryType */ public CreateUserRequest withHomeDirectoryType(String homeDirectoryType) { setHomeDirectoryType(homeDirectoryType); return this; } /** *

* 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 PATH, the user will see the absolute Amazon S3 bucket or EFS paths as is in * their file transfer protocol clients. If you set it LOGICAL, you need to provide mappings in the * HomeDirectoryMappings for how you want to make Amazon S3 or Amazon EFS paths visible to your users. *

* * @param homeDirectoryType * 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 PATH, the user will see the absolute Amazon S3 bucket or EFS * paths as is in their file transfer protocol clients. If you set it LOGICAL, you need to * provide mappings in the HomeDirectoryMappings for how you want to make Amazon S3 or Amazon * EFS paths visible to your users. * @return Returns a reference to this object so that method calls can be chained together. * @see HomeDirectoryType */ public CreateUserRequest withHomeDirectoryType(HomeDirectoryType homeDirectoryType) { this.homeDirectoryType = homeDirectoryType.toString(); return this; } /** *

* 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 Entry and Target pair, * where Entry shows how the path is made visible and Target 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 Target. This value can be set only when * HomeDirectoryType is set to LOGICAL. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the value the user should see for their home directory when they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

* * @return 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 Entry and * Target pair, where Entry shows how the path is made visible and * Target 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 Target. This value can be set only when HomeDirectoryType is set to * LOGICAL.

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the * designated home directory ("chroot"). To do this, you can set Entry to * / and set Target to the value the user should see for their home directory when * they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] */ public java.util.List getHomeDirectoryMappings() { return homeDirectoryMappings; } /** *

* 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 Entry and Target pair, * where Entry shows how the path is made visible and Target 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 Target. This value can be set only when * HomeDirectoryType is set to LOGICAL. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the value the user should see for their home directory when they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

* * @param homeDirectoryMappings * 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 Entry and * Target pair, where Entry shows how the path is made visible and * Target 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 Target. This value can be set only when HomeDirectoryType is set to * LOGICAL.

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the * designated home directory ("chroot"). To do this, you can set Entry to * / and set Target to the value the user should see for their home directory when * they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] */ public void setHomeDirectoryMappings(java.util.Collection homeDirectoryMappings) { if (homeDirectoryMappings == null) { this.homeDirectoryMappings = null; return; } this.homeDirectoryMappings = new java.util.ArrayList(homeDirectoryMappings); } /** *

* 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 Entry and Target pair, * where Entry shows how the path is made visible and Target 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 Target. This value can be set only when * HomeDirectoryType is set to LOGICAL. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the value the user should see for their home directory when they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setHomeDirectoryMappings(java.util.Collection)} or * {@link #withHomeDirectoryMappings(java.util.Collection)} if you want to override the existing values. *

* * @param homeDirectoryMappings * 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 Entry and * Target pair, where Entry shows how the path is made visible and * Target 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 Target. This value can be set only when HomeDirectoryType is set to * LOGICAL.

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the * designated home directory ("chroot"). To do this, you can set Entry to * / and set Target to the value the user should see for their home directory when * they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withHomeDirectoryMappings(HomeDirectoryMapEntry... homeDirectoryMappings) { if (this.homeDirectoryMappings == null) { setHomeDirectoryMappings(new java.util.ArrayList(homeDirectoryMappings.length)); } for (HomeDirectoryMapEntry ele : homeDirectoryMappings) { this.homeDirectoryMappings.add(ele); } return this; } /** *

* 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 Entry and Target pair, * where Entry shows how the path is made visible and Target 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 Target. This value can be set only when * HomeDirectoryType is set to LOGICAL. *

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the value the user should see for their home directory when they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] *

* * @param homeDirectoryMappings * 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 Entry and * Target pair, where Entry shows how the path is made visible and * Target 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 Target. This value can be set only when HomeDirectoryType is set to * LOGICAL.

*

* The following is an Entry and Target pair example. *

*

* [ { "Entry": "/directory1", "Target": "/bucket_name/home/mydirectory" } ] *

*

* In most cases, you can use this value instead of the session policy to lock your user down to the * designated home directory ("chroot"). To do this, you can set Entry to * / and set Target to the value the user should see for their home directory when * they log in. *

*

* The following is an Entry and Target pair example for chroot. *

*

* [ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withHomeDirectoryMappings(java.util.Collection homeDirectoryMappings) { setHomeDirectoryMappings(homeDirectoryMappings); return this; } /** *

* 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 ${Transfer:UserName}, ${Transfer:HomeDirectory}, and * ${Transfer:HomeBucket}. *

* *

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session * policies. *

*

* 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 Policy argument. *

*

* For an example of a session policy, see Example session policy. *

*

* For more information, see AssumeRole in the Amazon * Web Services Security Token Service API Reference. *

*
* * @param policy * 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 ${Transfer:UserName}, * ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

*

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use * session policies. *

*

* 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 Policy * argument. *

*

* For an example of a session policy, see Example session * policy. *

*

* For more information, see AssumeRole in the * Amazon Web Services Security Token Service API Reference. *

*/ public void setPolicy(String policy) { this.policy = policy; } /** *

* 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 ${Transfer:UserName}, ${Transfer:HomeDirectory}, and * ${Transfer:HomeBucket}. *

* *

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session * policies. *

*

* 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 Policy argument. *

*

* For an example of a session policy, see Example session policy. *

*

* For more information, see AssumeRole in the Amazon * Web Services Security Token Service API Reference. *

*
* * @return 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 ${Transfer:UserName}, * ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

*

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use * session policies. *

*

* 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 Policy * argument. *

*

* For an example of a session policy, see Example session * policy. *

*

* For more information, see AssumeRole in the * Amazon Web Services Security Token Service API Reference. *

*/ public String getPolicy() { return this.policy; } /** *

* 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 ${Transfer:UserName}, ${Transfer:HomeDirectory}, and * ${Transfer:HomeBucket}. *

* *

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use session * policies. *

*

* 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 Policy argument. *

*

* For an example of a session policy, see Example session policy. *

*

* For more information, see AssumeRole in the Amazon * Web Services Security Token Service API Reference. *

*
* * @param policy * 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 ${Transfer:UserName}, * ${Transfer:HomeDirectory}, and ${Transfer:HomeBucket}.

*

* This policy applies only when the domain of ServerId is Amazon S3. Amazon EFS does not use * session policies. *

*

* 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 Policy * argument. *

*

* For an example of a session policy, see Example session * policy. *

*

* For more information, see AssumeRole in the * Amazon Web Services Security Token Service API Reference. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withPolicy(String policy) { setPolicy(policy); return this; } /** *

* Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any * secondary groups IDs (SecondaryGids), 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. *

* * @param posixProfile * Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and * any secondary groups IDs (SecondaryGids), 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. */ public void setPosixProfile(PosixProfile posixProfile) { this.posixProfile = posixProfile; } /** *

* Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any * secondary groups IDs (SecondaryGids), 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. *

* * @return Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and * any secondary groups IDs (SecondaryGids), 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. */ public PosixProfile getPosixProfile() { return this.posixProfile; } /** *

* Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and any * secondary groups IDs (SecondaryGids), 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. *

* * @param posixProfile * Specifies the full POSIX identity, including user ID (Uid), group ID (Gid), and * any secondary groups IDs (SecondaryGids), 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withPosixProfile(PosixProfile posixProfile) { setPosixProfile(posixProfile); return this; } /** *

* 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. *

* * @param role * 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. */ public void setRole(String role) { this.role = role; } /** *

* 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. *

* * @return 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. */ public String getRole() { return this.role; } /** *

* 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. *

* * @param role * 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withRole(String role) { setRole(role); return this; } /** *

* A system-assigned unique identifier for a server instance. This is the specific server that you added your user * to. *

* * @param serverId * A system-assigned unique identifier for a server instance. This is the specific server that you added your * user to. */ public void setServerId(String serverId) { this.serverId = serverId; } /** *

* A system-assigned unique identifier for a server instance. This is the specific server that you added your user * to. *

* * @return A system-assigned unique identifier for a server instance. This is the specific server that you added * your user to. */ public String getServerId() { return this.serverId; } /** *

* A system-assigned unique identifier for a server instance. This is the specific server that you added your user * to. *

* * @param serverId * A system-assigned unique identifier for a server instance. This is the specific server that you added your * user to. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withServerId(String serverId) { setServerId(serverId); return this; } /** *

* The public portion of the Secure Shell (SSH) key used to authenticate the user to the server. *

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. *

*

* Transfer Family accepts RSA, ECDSA, and ED25519 keys. *

*
    *
  • *

    * For RSA keys, the key type is ssh-rsa. *

    *
  • *
  • *

    * For ED25519 keys, the key type is ssh-ed25519. *

    *
  • *
  • *

    * For ECDSA keys, the key type is either ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or * ecdsa-sha2-nistp521, depending on the size of the key you generated. *

    *
  • *
* * @param sshPublicKeyBody * The public portion of the Secure Shell (SSH) key used to authenticate the user to the server.

*

* The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each * element. *

*

* Transfer Family accepts RSA, ECDSA, and ED25519 keys. *

*
    *
  • *

    * For RSA keys, the key type is ssh-rsa. *

    *
  • *
  • *

    * For ED25519 keys, the key type is ssh-ed25519. *

    *
  • *
  • *

    * For ECDSA keys, the key type is either ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, * or ecdsa-sha2-nistp521, depending on the size of the key you generated. *

    *
  • */ public void setSshPublicKeyBody(String sshPublicKeyBody) { this.sshPublicKeyBody = sshPublicKeyBody; } /** *

    * The public portion of the Secure Shell (SSH) key used to authenticate the user to the server. *

    *

    * The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. *

    *

    * Transfer Family accepts RSA, ECDSA, and ED25519 keys. *

    *
      *
    • *

      * For RSA keys, the key type is ssh-rsa. *

      *
    • *
    • *

      * For ED25519 keys, the key type is ssh-ed25519. *

      *
    • *
    • *

      * For ECDSA keys, the key type is either ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or * ecdsa-sha2-nistp521, depending on the size of the key you generated. *

      *
    • *
    * * @return The public portion of the Secure Shell (SSH) key used to authenticate the user to the server.

    *

    * The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each * element. *

    *

    * Transfer Family accepts RSA, ECDSA, and ED25519 keys. *

    *
      *
    • *

      * For RSA keys, the key type is ssh-rsa. *

      *
    • *
    • *

      * For ED25519 keys, the key type is ssh-ed25519. *

      *
    • *
    • *

      * For ECDSA keys, the key type is either ecdsa-sha2-nistp256, ecdsa-sha2-nistp384 * , or ecdsa-sha2-nistp521, depending on the size of the key you generated. *

      *
    • */ public String getSshPublicKeyBody() { return this.sshPublicKeyBody; } /** *

      * The public portion of the Secure Shell (SSH) key used to authenticate the user to the server. *

      *

      * The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each element. *

      *

      * Transfer Family accepts RSA, ECDSA, and ED25519 keys. *

      *
        *
      • *

        * For RSA keys, the key type is ssh-rsa. *

        *
      • *
      • *

        * For ED25519 keys, the key type is ssh-ed25519. *

        *
      • *
      • *

        * For ECDSA keys, the key type is either ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or * ecdsa-sha2-nistp521, depending on the size of the key you generated. *

        *
      • *
      * * @param sshPublicKeyBody * The public portion of the Secure Shell (SSH) key used to authenticate the user to the server.

      *

      * The three standard SSH public key format elements are <key type>, * <body base64>, and an optional <comment>, with spaces between each * element. *

      *

      * Transfer Family accepts RSA, ECDSA, and ED25519 keys. *

      *
        *
      • *

        * For RSA keys, the key type is ssh-rsa. *

        *
      • *
      • *

        * For ED25519 keys, the key type is ssh-ed25519. *

        *
      • *
      • *

        * For ECDSA keys, the key type is either ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, * or ecdsa-sha2-nistp521, depending on the size of the key you generated. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withSshPublicKeyBody(String sshPublicKeyBody) { setSshPublicKeyBody(sshPublicKeyBody); return this; } /** *

        * Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any * purpose. *

        * * @return Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for * any purpose. */ public java.util.List getTags() { return tags; } /** *

        * Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any * purpose. *

        * * @param tags * Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for * any purpose. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

        * Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any * purpose. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

        * * @param tags * Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for * any purpose. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

        * Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for any * purpose. *

        * * @param tags * Key-value pairs that can be used to group and search for users. Tags are metadata attached to users for * any purpose. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

        * A unique string that identifies a user and is associated with a ServerId. 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. *

        * * @param userName * A unique string that identifies a user and is associated with a ServerId. 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. */ public void setUserName(String userName) { this.userName = userName; } /** *

        * A unique string that identifies a user and is associated with a ServerId. 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. *

        * * @return A unique string that identifies a user and is associated with a ServerId. 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. */ public String getUserName() { return this.userName; } /** *

        * A unique string that identifies a user and is associated with a ServerId. 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. *

        * * @param userName * A unique string that identifies a user and is associated with a ServerId. 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withUserName(String userName) { setUserName(userName); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getHomeDirectory() != null) sb.append("HomeDirectory: ").append(getHomeDirectory()).append(","); if (getHomeDirectoryType() != null) sb.append("HomeDirectoryType: ").append(getHomeDirectoryType()).append(","); if (getHomeDirectoryMappings() != null) sb.append("HomeDirectoryMappings: ").append(getHomeDirectoryMappings()).append(","); if (getPolicy() != null) sb.append("Policy: ").append(getPolicy()).append(","); if (getPosixProfile() != null) sb.append("PosixProfile: ").append(getPosixProfile()).append(","); if (getRole() != null) sb.append("Role: ").append(getRole()).append(","); if (getServerId() != null) sb.append("ServerId: ").append(getServerId()).append(","); if (getSshPublicKeyBody() != null) sb.append("SshPublicKeyBody: ").append(getSshPublicKeyBody()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getUserName() != null) sb.append("UserName: ").append(getUserName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateUserRequest == false) return false; CreateUserRequest other = (CreateUserRequest) obj; if (other.getHomeDirectory() == null ^ this.getHomeDirectory() == null) return false; if (other.getHomeDirectory() != null && other.getHomeDirectory().equals(this.getHomeDirectory()) == false) return false; if (other.getHomeDirectoryType() == null ^ this.getHomeDirectoryType() == null) return false; if (other.getHomeDirectoryType() != null && other.getHomeDirectoryType().equals(this.getHomeDirectoryType()) == false) return false; if (other.getHomeDirectoryMappings() == null ^ this.getHomeDirectoryMappings() == null) return false; if (other.getHomeDirectoryMappings() != null && other.getHomeDirectoryMappings().equals(this.getHomeDirectoryMappings()) == false) return false; if (other.getPolicy() == null ^ this.getPolicy() == null) return false; if (other.getPolicy() != null && other.getPolicy().equals(this.getPolicy()) == false) return false; if (other.getPosixProfile() == null ^ this.getPosixProfile() == null) return false; if (other.getPosixProfile() != null && other.getPosixProfile().equals(this.getPosixProfile()) == false) return false; if (other.getRole() == null ^ this.getRole() == null) return false; if (other.getRole() != null && other.getRole().equals(this.getRole()) == false) return false; if (other.getServerId() == null ^ this.getServerId() == null) return false; if (other.getServerId() != null && other.getServerId().equals(this.getServerId()) == false) return false; if (other.getSshPublicKeyBody() == null ^ this.getSshPublicKeyBody() == null) return false; if (other.getSshPublicKeyBody() != null && other.getSshPublicKeyBody().equals(this.getSshPublicKeyBody()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getUserName() == null ^ this.getUserName() == null) return false; if (other.getUserName() != null && other.getUserName().equals(this.getUserName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHomeDirectory() == null) ? 0 : getHomeDirectory().hashCode()); hashCode = prime * hashCode + ((getHomeDirectoryType() == null) ? 0 : getHomeDirectoryType().hashCode()); hashCode = prime * hashCode + ((getHomeDirectoryMappings() == null) ? 0 : getHomeDirectoryMappings().hashCode()); hashCode = prime * hashCode + ((getPolicy() == null) ? 0 : getPolicy().hashCode()); hashCode = prime * hashCode + ((getPosixProfile() == null) ? 0 : getPosixProfile().hashCode()); hashCode = prime * hashCode + ((getRole() == null) ? 0 : getRole().hashCode()); hashCode = prime * hashCode + ((getServerId() == null) ? 0 : getServerId().hashCode()); hashCode = prime * hashCode + ((getSshPublicKeyBody() == null) ? 0 : getSshPublicKeyBody().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); return hashCode; } @Override public CreateUserRequest clone() { return (CreateUserRequest) super.clone(); } }