updateQueryLoggingConfiguration method

Future<UpdateQueryLoggingConfigurationResponse> updateQueryLoggingConfiguration({
  1. required List<LoggingDestination> destinations,
  2. required String workspaceId,
  3. String? clientToken,
})

Updates the query logging configuration for the specified workspace.

May throw AccessDeniedException. May throw ConflictException. 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 update 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<UpdateQueryLoggingConfigurationResponse>
    updateQueryLoggingConfiguration({
  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: 'PUT',
    requestUri:
        '/workspaces/${Uri.encodeComponent(workspaceId)}/logging/query',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateQueryLoggingConfigurationResponse.fromJson(response);
}