getExportImageTask method

Future<GetExportImageTaskResult> getExportImageTask({
  1. String? taskId,
})

Retrieves information about an export image task, including its current state, progress, and any error details.

May throw OperationNotPermittedException. May throw ResourceNotFoundException.

Parameter taskId : The unique identifier of the export image task to retrieve information about.

Implementation

Future<GetExportImageTaskResult> getExportImageTask({
  String? taskId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'PhotonAdminProxyService.GetExportImageTask'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (taskId != null) 'TaskId': taskId,
    },
  );

  return GetExportImageTaskResult.fromJson(jsonResponse.body);
}