getUploadStatus method
Gets the status of the specified upload.
May throw InvalidRequestException. May throw ResourceNotFoundException. May throw InternalFailureException. May throw ThrottlingException.
Parameter uploadId
:
The ID of the upload. This value is returned by the
UploadEntityDefinitions
action.
Implementation
Future<GetUploadStatusResponse> getUploadStatus({
required String uploadId,
}) async {
ArgumentError.checkNotNull(uploadId, 'uploadId');
_s.validateStringLength(
'uploadId',
uploadId,
1,
40,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'IotThingsGraphFrontEndService.GetUploadStatus'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'uploadId': uploadId,
},
);
return GetUploadStatusResponse.fromJson(jsonResponse.body);
}