PrometheusService / Client / update_query_logging_configuration

update_query_logging_configuration

PrometheusService.Client.update_query_logging_configuration(**kwargs)

Updates the query logging configuration for the specified workspace.

See also: AWS API Documentation

Request Syntax

response = client.update_query_logging_configuration(
    clientToken='string',
    destinations=[
        {
            'cloudWatchLogs': {
                'logGroupArn': 'string'
            },
            'filters': {
                'qspThreshold': 123
            }
        },
    ],
    workspaceId='string'
)
Parameters:
  • clientToken (string) –

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

    This field is autopopulated if not provided.

  • destinations (list) –

    [REQUIRED]

    The destinations where query logs will be sent. Only CloudWatch Logs destination is supported. The list must contain exactly one element.

    • (dict) –

      Defines a destination and its associated filtering criteria for query logging.

      • cloudWatchLogs (dict) – [REQUIRED]

        Configuration details for logging to CloudWatch Logs.

        • logGroupArn (string) – [REQUIRED]

          The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation.

      • filters (dict) – [REQUIRED]

        Filtering criteria that determine which queries are logged.

        • qspThreshold (integer) – [REQUIRED]

          The Query Samples Processed (QSP) threshold above which queries will be logged. Queries processing more samples than this threshold will be captured in logs.

  • workspaceId (string) –

    [REQUIRED]

    The ID of the workspace for which to update the query logging configuration.

Return type:

dict

Returns:

Response Syntax

{
    'status': {
        'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
        'statusReason': 'string'
    }
}

Response Structure

  • (dict) –

    • status (dict) –

      The current status of the query logging configuration.

      • statusCode (string) –

        The current status of the query logging configuration.

      • statusReason (string) –

        If there is a failure, the reason for the failure.

Exceptions

  • PrometheusService.Client.exceptions.ConflictException

  • PrometheusService.Client.exceptions.ValidationException

  • PrometheusService.Client.exceptions.ResourceNotFoundException

  • PrometheusService.Client.exceptions.AccessDeniedException

  • PrometheusService.Client.exceptions.InternalServerException