createInvitations method

Future<CreateInvitationsResponse> createInvitations({
  1. required List<String> accountIds,
  2. bool? disableEmailNotification,
  3. String? message,
})

Sends an Amazon Macie membership invitation to one or more accounts.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter accountIds : An array that lists Amazon Web Services account IDs, one for each account to send the invitation to.

Parameter disableEmailNotification : Specifies whether to send the invitation as an email message. If this value is false, Amazon Macie sends the invitation (as an email message) to the email address that you specified for the recipient's account when you associated the account with your account. The default value is false.

Parameter message : Custom text to include in the email message that contains the invitation. The text can contain as many as 80 alphanumeric characters.

Implementation

Future<CreateInvitationsResponse> createInvitations({
  required List<String> accountIds,
  bool? disableEmailNotification,
  String? message,
}) async {
  final $payload = <String, dynamic>{
    'accountIds': accountIds,
    if (disableEmailNotification != null)
      'disableEmailNotification': disableEmailNotification,
    if (message != null) 'message': message,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/invitations',
    exceptionFnMap: _exceptionFns,
  );
  return CreateInvitationsResponse.fromJson(response);
}