createQueryLoggingConfiguration method
Creates a query logging configuration for the specified workspace. This operation enables logging of queries that exceed the specified QSP threshold.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter destinations :
The destinations where query logs will be sent. Only CloudWatch Logs
destination is supported. The list must contain exactly one element.
Parameter workspaceId :
The ID of the workspace for which to create the query logging
configuration.
Parameter clientToken :
(Optional) A unique, case-sensitive identifier that you can provide to
ensure the idempotency of the request.
Implementation
Future<CreateQueryLoggingConfigurationResponse>
createQueryLoggingConfiguration({
required List<LoggingDestination> destinations,
required String workspaceId,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'destinations': destinations,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceId)}/logging/query',
exceptionFnMap: _exceptionFns,
);
return CreateQueryLoggingConfigurationResponse.fromJson(response);
}