submitRegistryRecordForApproval method

Future<SubmitRegistryRecordForApprovalResponse> submitRegistryRecordForApproval({
  1. required String recordId,
  2. required String registryId,
})

Submits a DRAFT registry record for approval, moving it into the registry's approval workflow. Depending on the registry's approval configuration, the record is either auto-approved or set to PENDING_APPROVAL for a curator to approve or reject.

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

Parameter recordId : The identifier of the registry record to submit for approval (ARN or ID)

Parameter registryId : The identifier of the registry containing the record (ARN or ID)

Implementation

Future<SubmitRegistryRecordForApprovalResponse>
    submitRegistryRecordForApproval({
  required String recordId,
  required String registryId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri:
        '/registries/${Uri.encodeComponent(registryId)}/records/${Uri.encodeComponent(recordId)}/submit-for-approval',
    exceptionFnMap: _exceptionFns,
  );
  return SubmitRegistryRecordForApprovalResponse.fromJson(response);
}