deleteOTAUpdate method

Future<void> deleteOTAUpdate({
  1. required String otaUpdateId,
  2. bool? deleteStream,
  3. bool? forceDeleteAWSJob,
})

Delete an OTA update.

May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnauthorizedException. May throw InternalFailureException. May throw ServiceUnavailableException. May throw VersionConflictException.

Parameter otaUpdateId : The ID of the OTA update to delete.

Parameter deleteStream : Specifies if the stream associated with an OTA update should be deleted when the OTA update is deleted.

Parameter forceDeleteAWSJob : Specifies if the AWS Job associated with the OTA update should be deleted when the OTA update is deleted.

Implementation

Future<void> deleteOTAUpdate({
  required String otaUpdateId,
  bool? deleteStream,
  bool? forceDeleteAWSJob,
}) async {
  ArgumentError.checkNotNull(otaUpdateId, 'otaUpdateId');
  _s.validateStringLength(
    'otaUpdateId',
    otaUpdateId,
    1,
    128,
    isRequired: true,
  );
  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,
  );
}