describeUser method

Future<DescribeUserResponse> describeUser({
  1. required String organizationId,
  2. required String userId,
})

Provides information regarding the user.

May throw EntityNotFoundException. May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException.

Parameter organizationId : The identifier for the organization under which the user exists.

Parameter userId : The identifier for the user to be described.

Implementation

Future<DescribeUserResponse> describeUser({
  required String organizationId,
  required String userId,
}) async {
  ArgumentError.checkNotNull(organizationId, 'organizationId');
  _s.validateStringLength(
    'organizationId',
    organizationId,
    34,
    34,
    isRequired: true,
  );
  ArgumentError.checkNotNull(userId, 'userId');
  _s.validateStringLength(
    'userId',
    userId,
    12,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkMailService.DescribeUser'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'OrganizationId': organizationId,
      'UserId': userId,
    },
  );

  return DescribeUserResponse.fromJson(jsonResponse.body);
}