createUserProfile method
Creates a user profile in Amazon DataZone.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter domainIdentifier :
The identifier of the Amazon DataZone domain in which a user profile is
created.
Parameter userIdentifier :
The identifier of the user for which the user profile is created.
Parameter clientToken :
A unique, case-sensitive identifier that is provided to ensure the
idempotency of the request.
Parameter sessionName :
The session name for IAM role sessions.
Parameter userType :
The user type of the user for which the user profile is created.
Implementation
Future<CreateUserProfileOutput> createUserProfile({
required String domainIdentifier,
required String userIdentifier,
String? clientToken,
String? sessionName,
UserType? userType,
}) async {
final $payload = <String, dynamic>{
'userIdentifier': userIdentifier,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (sessionName != null) 'sessionName': sessionName,
if (userType != null) 'userType': userType.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/v2/domains/${Uri.encodeComponent(domainIdentifier)}/user-profiles',
exceptionFnMap: _exceptionFns,
);
return CreateUserProfileOutput.fromJson(response);
}