describeUser method
Retrieves the user metadata and attributes from the UserId in
an identity store.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter identityStoreId :
The globally unique identifier for the identity store, such as
d-1234567890. In this example, d- is a fixed
prefix, and 1234567890 is a randomly generated string that
contains numbers and lower case letters. This value is generated at the
time that a new identity store is created.
Parameter userId :
The identifier for a user in the identity store.
Parameter extensions :
A collection of extension names indicating what extensions the service
should retrieve alongside other user attributes.
aws:identitystore:enterprise is the only supported extension
name.
Implementation
Future<DescribeUserResponse> describeUser({
required String identityStoreId,
required String userId,
List<String>? extensions,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSIdentityStore.DescribeUser'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'IdentityStoreId': identityStoreId,
'UserId': userId,
if (extensions != null) 'Extensions': extensions,
},
);
return DescribeUserResponse.fromJson(jsonResponse.body);
}