associateUser method
Associates the user to an EC2 instance to utilize user-based subscriptions.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter identityProvider :
The identity provider for the user.
Parameter instanceId :
The ID of the EC2 instance that provides the user-based subscription.
Parameter username :
The user name from the identity provider.
Parameter domain :
The domain name of the Active Directory that contains information for the
user to associate.
Parameter tags :
The tags that apply for the user association.
Implementation
Future<AssociateUserResponse> associateUser({
required IdentityProvider identityProvider,
required String instanceId,
required String username,
String? domain,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'IdentityProvider': identityProvider,
'InstanceId': instanceId,
'Username': username,
if (domain != null) 'Domain': domain,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/user/AssociateUser',
exceptionFnMap: _exceptionFns,
);
return AssociateUserResponse.fromJson(response);
}