acceptAdministratorInvitation method

Future<void> acceptAdministratorInvitation({
  1. required String administratorId,
  2. required String invitationId,
})
Accepts the invitation to be a member account and be monitored by the Security Hub CSPM administrator account that the invitation was sent from.

This operation is only used by member accounts that are not added through Organizations.

When the member account accepts the invitation, permission is granted to the administrator account to view findings generated in the member account.

May throw InternalException. May throw InvalidAccessException. May throw InvalidInputException. May throw LimitExceededException. May throw ResourceNotFoundException.

Parameter administratorId : The account ID of the Security Hub CSPM administrator account that sent the invitation.

Parameter invitationId : The identifier of the invitation sent from the Security Hub CSPM administrator account.

Implementation

Future<void> acceptAdministratorInvitation({
  required String administratorId,
  required String invitationId,
}) async {
  final $payload = <String, dynamic>{
    'AdministratorId': administratorId,
    'InvitationId': invitationId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/administrator',
    exceptionFnMap: _exceptionFns,
  );
}