inviteMembers method
This operation is only used to invite accounts that don't belong to an Amazon Web Services organization. Organization accounts don't receive invitations.
Before you can use this action to invite a member, you must first use the
CreateMembers action to create the member account in Security
Hub CSPM.
When the account owner enables Security Hub CSPM and accepts the invitation to become a member account, the administrator account can view the findings generated in the member account.
May throw InternalException.
May throw InvalidAccessException.
May throw InvalidInputException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
Parameter accountIds :
The list of account IDs of the Amazon Web Services accounts to invite to
Security Hub CSPM as members.
Implementation
Future<InviteMembersResponse> inviteMembers({
required List<String> accountIds,
}) async {
final $payload = <String, dynamic>{
'AccountIds': accountIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/members/invite',
exceptionFnMap: _exceptionFns,
);
return InviteMembersResponse.fromJson(response);
}