updateCollaborationChangeRequest method

Future<UpdateCollaborationChangeRequestOutput> updateCollaborationChangeRequest({
  1. required ChangeRequestAction action,
  2. required String changeRequestIdentifier,
  3. required String collaborationIdentifier,
})

Updates an existing collaboration change request. This operation allows approval actions for pending change requests in collaborations (APPROVE, DENY, CANCEL, COMMIT).

For change requests without automatic approval, a member in the collaboration can manually APPROVE or DENY a change request. The collaboration owner can manually CANCEL or COMMIT a change request.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter action : The action to perform on the change request. Valid values include APPROVE (approve the change), DENY (reject the change), CANCEL (cancel the request), and COMMIT (commit after the request is approved).

For change requests without automatic approval, a member in the collaboration can manually APPROVE or DENY a change request. The collaboration owner can manually CANCEL or COMMIT a change request.

Parameter changeRequestIdentifier : The unique identifier of the specific change request to be updated within the collaboration.

Parameter collaborationIdentifier : The unique identifier of the collaboration that contains the change request to be updated.

Implementation

Future<UpdateCollaborationChangeRequestOutput>
    updateCollaborationChangeRequest({
  required ChangeRequestAction action,
  required String changeRequestIdentifier,
  required String collaborationIdentifier,
}) async {
  final $payload = <String, dynamic>{
    'action': action.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/collaborations/${Uri.encodeComponent(collaborationIdentifier)}/changeRequests/${Uri.encodeComponent(changeRequestIdentifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateCollaborationChangeRequestOutput.fromJson(response);
}