rejectResourceShareInvitation method

Future<RejectResourceShareInvitationResponse> rejectResourceShareInvitation({
  1. required String resourceShareInvitationArn,
  2. String? clientToken,
})

Rejects an invitation to a resource share from another AWS account.

May throw MalformedArnException. May throw OperationNotPermittedException. May throw ResourceShareInvitationArnNotFoundException. May throw ResourceShareInvitationAlreadyAcceptedException. May throw ResourceShareInvitationAlreadyRejectedException. May throw ResourceShareInvitationExpiredException. May throw ServerInternalException. May throw ServiceUnavailableException. May throw InvalidClientTokenException. May throw IdempotentParameterMismatchException.

Parameter resourceShareInvitationArn : The Amazon Resource Name (ARN) of the invitation.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Implementation

Future<RejectResourceShareInvitationResponse> rejectResourceShareInvitation({
  required String resourceShareInvitationArn,
  String? clientToken,
}) async {
  ArgumentError.checkNotNull(
      resourceShareInvitationArn, 'resourceShareInvitationArn');
  final $payload = <String, dynamic>{
    'resourceShareInvitationArn': resourceShareInvitationArn,
    if (clientToken != null) 'clientToken': clientToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/rejectresourceshareinvitation',
    exceptionFnMap: _exceptionFns,
  );
  return RejectResourceShareInvitationResponse.fromJson(response);
}