updateScraperLoggingConfiguration method
Updates the logging configuration for a Amazon Managed Service for Prometheus scraper.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter loggingDestination :
The destination where scraper logs will be sent.
Parameter scraperId :
The ID of the scraper whose logging configuration will be updated.
Parameter scraperComponents :
The list of scraper components to configure for logging.
Implementation
Future<UpdateScraperLoggingConfigurationResponse>
updateScraperLoggingConfiguration({
required ScraperLoggingDestination loggingDestination,
required String scraperId,
List<ScraperComponent>? scraperComponents,
}) async {
final $payload = <String, dynamic>{
'loggingDestination': loggingDestination,
if (scraperComponents != null) 'scraperComponents': scraperComponents,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/scrapers/${Uri.encodeComponent(scraperId)}/logging-configuration',
exceptionFnMap: _exceptionFns,
);
return UpdateScraperLoggingConfigurationResponse.fromJson(response);
}