update_access
async
¶
update_access(
server_id: ServerId,
external_id: ExternalId,
*,
config_overrides: Optional[AsyncTransferClientConfig] = None,
home_directory: Optional[HomeDirectory] = None,
home_directory_type: Optional[HomeDirectoryType] = None,
home_directory_mappings: Optional[HomeDirectoryMappings] = None,
policy: Optional[Policy] = None,
posix_profile: Optional[PosixProfile] = None,
role: Optional[Role] = None,
) -> UpdateAccessResponse
Allows you to update parameters for the access specified in the ServerID and ExternalID parameters.
Parameters:
-
home_directory(Optional[HomeDirectory], default:None) –The landing directory (folder) for a user when they log in to the server using the client.
A
HomeDirectoryexample is/bucket_name/home/mydirectory.You can use the
HomeDirectoryparameter forHomeDirectoryTypewhen it is set to eitherPATHorLOGICAL. -
home_directory_type(Optional[HomeDirectoryType], default:None) –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 Amazon EFS path as is in their file transfer protocol clients. If you set it toLOGICAL, you need to provide mappings in theHomeDirectoryMappingsfor how you want to make Amazon S3 or Amazon EFS paths visible to your users.If
HomeDirectoryTypeisLOGICAL, you must provide mappings, using theHomeDirectoryMappingsparameter. If, on the other hand,HomeDirectoryTypeisPATH, you provide an absolute path using theHomeDirectoryparameter. You cannot have bothHomeDirectoryandHomeDirectoryMappingsin your template. -
home_directory_mappings(Optional[HomeDirectoryMappings], default:None) –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
EntryandTargetpair, whereEntryshows how the path is made visible andTargetis 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 inTarget. This value can be set only whenHomeDirectoryTypeis set to LOGICAL.The following is an
EntryandTargetpair 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 setEntryto/and setTargetto theHomeDirectoryparameter value.The following is an
EntryandTargetpair example forchroot.[ { "Entry": "/", "Target": "/bucket_name/home/mydirectory" } ] -
policy(Optional[Policy], default:None) –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
ServerIdis 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
Policyargument.For an example of a session policy, see Example session policy.
For more information, see AssumeRole in the Amazon Web ServicesSecurity Token Service API Reference.
-
role(Optional[Role], default:None) –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.
-
server_id(ServerId) –A system-assigned unique identifier for a server instance. This is the specific server that you added your user to.
-
external_id(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,ObjectSidIn 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: =,.@:/-
Raises:
-
InternalServiceError–This exception is thrown when an error occurs in the Transfer Family service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
ResourceExistsException–The requested resource does not exist, or exists in a region other than the one specified for the command.
-
ResourceNotFoundException–This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
-
ServiceUnavailableException–The request has failed because the Amazon Web ServicesTransfer Family service is not available.
-
ThrottlingException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_transfer/_services/async_transfer.py
2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 | |