getJobDocument method

Future<GetJobDocumentResponse> getJobDocument({
  1. required String jobId,
  2. bool? beforeSubstitution,
})

Gets a job document.

Requires permission to access the GetJobDocument action.

May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter jobId : The unique identifier you assigned to this job when it was created.

Parameter beforeSubstitution : Provides a view of the job document before and after the substitution parameters have been resolved with their exact values.

Implementation

Future<GetJobDocumentResponse> getJobDocument({
  required String jobId,
  bool? beforeSubstitution,
}) async {
  final $query = <String, List<String>>{
    if (beforeSubstitution != null)
      'beforeSubstitution': [beforeSubstitution.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/jobs/${Uri.encodeComponent(jobId)}/job-document',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetJobDocumentResponse.fromJson(response);
}