batchCreateDelegationByAssessment method

Future<BatchCreateDelegationByAssessmentResponse> batchCreateDelegationByAssessment({
  1. required String assessmentId,
  2. required List<CreateDelegationRequest> createDelegationRequests,
})

Creates a batch of delegations for an assessment in Audit Manager.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter assessmentId : The identifier for the assessment.

Parameter createDelegationRequests : The API request to batch create delegations in Audit Manager.

Implementation

Future<BatchCreateDelegationByAssessmentResponse>
    batchCreateDelegationByAssessment({
  required String assessmentId,
  required List<CreateDelegationRequest> createDelegationRequests,
}) async {
  final $payload = <String, dynamic>{
    'createDelegationRequests': createDelegationRequests,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/assessments/${Uri.encodeComponent(assessmentId)}/delegations',
    exceptionFnMap: _exceptionFns,
  );
  return BatchCreateDelegationByAssessmentResponse.fromJson(response);
}