rejectDelegationRequest method

Future<void> rejectDelegationRequest({
  1. required String delegationRequestId,
  2. String? notes,
})

Rejects a delegation request, denying the requested temporary access.

Once a request is rejected, it cannot be accepted or updated later. Rejected requests expire after 7 days.

When rejecting a request, an optional explanation can be added using the Notes request parameter.

For more details, see Managing Permissions for Delegation Requests.

May throw ConcurrentModificationException. May throw InvalidInputException. May throw NoSuchEntityException. May throw ServiceFailureException.

Parameter delegationRequestId : The unique identifier of the delegation request to reject.

Parameter notes : Optional notes explaining the reason for rejecting the delegation request.

Implementation

Future<void> rejectDelegationRequest({
  required String delegationRequestId,
  String? notes,
}) async {
  final $request = <String, String>{
    'DelegationRequestId': delegationRequestId,
    if (notes != null) 'Notes': notes,
  };
  await _protocol.send(
    $request,
    action: 'RejectDelegationRequest',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
  );
}