describeUser method
Describes the user assigned to the specific file transfer protocol-enabled
server, as identified by its ServerId
property.
The response from this call returns the properties of the user associated
with the ServerId
value that was specified.
May throw ServiceUnavailableException. May throw InternalServiceError. May throw InvalidRequestException. May throw ResourceNotFoundException.
Parameter serverId
:
A system-assigned unique identifier for a server that has this user
assigned.
Parameter userName
:
The name of the user assigned to one or more servers. User names are part
of the sign-in credentials to use the AWS Transfer Family service and
perform file transfer tasks.
Implementation
Future<DescribeUserResponse> describeUser({
required String serverId,
required String userName,
}) async {
ArgumentError.checkNotNull(serverId, 'serverId');
_s.validateStringLength(
'serverId',
serverId,
19,
19,
isRequired: true,
);
ArgumentError.checkNotNull(userName, 'userName');
_s.validateStringLength(
'userName',
userName,
3,
100,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'TransferService.DescribeUser'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ServerId': serverId,
'UserName': userName,
},
);
return DescribeUserResponse.fromJson(jsonResponse.body);
}