deleteScraper method

Future<DeleteScraperResponse> deleteScraper({
  1. required String scraperId,
  2. String? clientToken,
})

The DeleteScraper operation deletes one scraper, and stops any metrics collection that the scraper performs.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter scraperId : The ID of the scraper to delete.

Parameter clientToken : (Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.

Implementation

Future<DeleteScraperResponse> deleteScraper({
  required String scraperId,
  String? clientToken,
}) async {
  final $query = <String, List<String>>{
    if (clientToken != null) 'clientToken': [clientToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/scrapers/${Uri.encodeComponent(scraperId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DeleteScraperResponse.fromJson(response);
}