getUserProfile method

Future<GetUserProfileOutput> getUserProfile({
  1. required String domainIdentifier,
  2. required String userIdentifier,
  3. String? sessionName,
  4. UserProfileType? type,
})

Gets a user profile in Amazon DataZone.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter domainIdentifier : the ID of the Amazon DataZone domain the data portal of which you want to get.

Parameter userIdentifier : The identifier of the user for which you want to get the user profile.

Parameter sessionName : The session name for IAM role sessions.

Parameter type : The type of the user profile.

Implementation

Future<GetUserProfileOutput> getUserProfile({
  required String domainIdentifier,
  required String userIdentifier,
  String? sessionName,
  UserProfileType? type,
}) async {
  final $query = <String, List<String>>{
    if (sessionName != null) 'sessionName': [sessionName],
    if (type != null) 'type': [type.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/user-profiles/${Uri.encodeComponent(userIdentifier)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetUserProfileOutput.fromJson(response);
}