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 InternalServiceError.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
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 Transfer Family service and perform
file transfer tasks.
Implementation
Future<DescribeUserResponse> describeUser({
required String serverId,
required String userName,
}) async {
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);
}