deleteOTAUpdate method
Delete an OTA update.
Requires permission to access the DeleteOTAUpdate action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw VersionConflictException.
Parameter otaUpdateId :
The ID of the OTA update to delete.
Parameter deleteStream :
When true, the stream created by the OTAUpdate process is deleted when the
OTA update is deleted. Ignored if the stream specified in the OTAUpdate is
supplied by the user.
Parameter forceDeleteAWSJob :
When true, deletes the IoT job created by the OTAUpdate process even if it
is "IN_PROGRESS". Otherwise, if the job is not in a terminal state
("COMPLETED" or "CANCELED") an exception will occur. The default is false.
Implementation
Future<void> deleteOTAUpdate({
required String otaUpdateId,
bool? deleteStream,
bool? forceDeleteAWSJob,
}) async {
final $query = <String, List<String>>{
if (deleteStream != null) 'deleteStream': [deleteStream.toString()],
if (forceDeleteAWSJob != null)
'forceDeleteAWSJob': [forceDeleteAWSJob.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri: '/otaUpdates/${Uri.encodeComponent(otaUpdateId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}