/* * 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 CreateAccessRequest 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 down your user to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the HomeDirectory parameter value. *

*

* 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 Security * Token Service API Reference. *

*
*/ private String policy; 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; /** *

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

*

* Get-ADGroup -Filter {samAccountName -like "YourGroupName*"} -Properties * | Select SamAccountName,ObjectSid *

*

* In that command, replace YourGroupName with the name of your Active Directory group. *

*

* 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: =,.@:/- *

*/ private String externalId; /** *

* 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 CreateAccessRequest 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 CreateAccessRequest 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 CreateAccessRequest 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 down your user to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the HomeDirectory parameter value. *

*

* 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 down your user to the * designated home directory ("chroot"). To do this, you can set Entry to * / and set Target to the HomeDirectory parameter value. *

*

* 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 down your user to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the HomeDirectory parameter value. *

*

* 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 down your user to the * designated home directory ("chroot"). To do this, you can set Entry to * / and set Target to the HomeDirectory parameter value. *

*

* 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 down your user to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the HomeDirectory parameter value. *

*

* 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 down your user to the * designated home directory ("chroot"). To do this, you can set Entry to * / and set Target to the HomeDirectory parameter value. *

*

* 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 CreateAccessRequest 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 down your user to the designated home * directory ("chroot"). To do this, you can set Entry to / and set * Target to the HomeDirectory parameter value. *

*

* 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 down your user to the * designated home directory ("chroot"). To do this, you can set Entry to * / and set Target to the HomeDirectory parameter value. *

*

* 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 CreateAccessRequest 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 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 * 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 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 * 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 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 * Security Token Service API Reference. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CreateAccessRequest withPolicy(String policy) { setPolicy(policy); return this; } /** * @param posixProfile */ public void setPosixProfile(PosixProfile posixProfile) { this.posixProfile = posixProfile; } /** * @return */ public PosixProfile getPosixProfile() { return this.posixProfile; } /** * @param posixProfile * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAccessRequest 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 CreateAccessRequest 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 CreateAccessRequest withServerId(String serverId) { setServerId(serverId); return this; } /** *

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

*

* Get-ADGroup -Filter {samAccountName -like "YourGroupName*"} -Properties * | Select SamAccountName,ObjectSid *

*

* In that command, replace YourGroupName with the name of your Active Directory group. *

*

* 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: =,.@:/- *

* * @param externalId * 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.

*

* Get-ADGroup -Filter {samAccountName -like "YourGroupName*"} -Properties * | Select SamAccountName,ObjectSid *

*

* In that command, replace YourGroupName with the name of your Active Directory group. *

*

* 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: =,.@:/- */ public void setExternalId(String externalId) { this.externalId = externalId; } /** *

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

*

* Get-ADGroup -Filter {samAccountName -like "YourGroupName*"} -Properties * | Select SamAccountName,ObjectSid *

*

* In that command, replace YourGroupName with the name of your Active Directory group. *

*

* 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: =,.@:/- *

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

*

* Get-ADGroup -Filter {samAccountName -like "YourGroupName*"} -Properties * | Select SamAccountName,ObjectSid *

*

* In that command, replace YourGroupName with the name of your Active Directory group. *

*

* 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: =,.@:/- */ public String getExternalId() { return this.externalId; } /** *

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

*

* Get-ADGroup -Filter {samAccountName -like "YourGroupName*"} -Properties * | Select SamAccountName,ObjectSid *

*

* In that command, replace YourGroupName with the name of your Active Directory group. *

*

* 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: =,.@:/- *

* * @param externalId * 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.

*

* Get-ADGroup -Filter {samAccountName -like "YourGroupName*"} -Properties * | Select SamAccountName,ObjectSid *

*

* In that command, replace YourGroupName with the name of your Active Directory group. *

*

* 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: =,.@:/- * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAccessRequest withExternalId(String externalId) { setExternalId(externalId); 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 (getExternalId() != null) sb.append("ExternalId: ").append(getExternalId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateAccessRequest == false) return false; CreateAccessRequest other = (CreateAccessRequest) 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.getExternalId() == null ^ this.getExternalId() == null) return false; if (other.getExternalId() != null && other.getExternalId().equals(this.getExternalId()) == 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 + ((getExternalId() == null) ? 0 : getExternalId().hashCode()); return hashCode; } @Override public CreateAccessRequest clone() { return (CreateAccessRequest) super.clone(); } }