acceptInvitation method

Future<void> acceptInvitation({
  1. required String detectorId,
  2. required String invitationId,
  3. required String masterId,
})

Accepts the invitation to be monitored by a GuardDuty administrator account.

May throw BadRequestException. May throw InternalServerErrorException.

Parameter detectorId : The unique ID of the detector of the GuardDuty member account.

Parameter invitationId : The value that is used to validate the administrator account to the member account.

Parameter masterId : The account ID of the GuardDuty administrator account whose invitation you're accepting.

Implementation

Future<void> acceptInvitation({
  required String detectorId,
  required String invitationId,
  required String masterId,
}) async {
  ArgumentError.checkNotNull(detectorId, 'detectorId');
  _s.validateStringLength(
    'detectorId',
    detectorId,
    1,
    300,
    isRequired: true,
  );
  ArgumentError.checkNotNull(invitationId, 'invitationId');
  ArgumentError.checkNotNull(masterId, 'masterId');
  final $payload = <String, dynamic>{
    'invitationId': invitationId,
    'masterId': masterId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/detector/${Uri.encodeComponent(detectorId)}/master',
    exceptionFnMap: _exceptionFns,
  );
}