Skip to content

describe_query_logging_configuration

describe_query_logging_configuration(
    workspace_id: WorkspaceId, *, config_overrides: Optional[ampClientConfig] = None
) -> DescribeQueryLoggingConfigurationResponse

Retrieves the details of the query logging configuration for the specified workspace.

Parameters:

  • workspace_id (WorkspaceId) –

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

Raises:

Source code in docs_src/capo_amp/_services/amp.py
def describe_query_logging_configuration(
    self,
    workspace_id: "capo_amp.types.workspace_id.WorkspaceId",
    *,
    config_overrides: Optional[ampClientConfig] = None,
) -> "capo_amp.types.describe_query_logging_configuration_response.DescribeQueryLoggingConfigurationResponse":
    """<p>Retrieves the details of the query logging configuration for the specified workspace.</p>

    Args:
        workspace_id: <p>The ID of the workspace for which to retrieve the query logging configuration.</p>

    Raises:
        capo_amp.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_amp.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
        capo_amp.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resources that doesn't exist.</p>
        capo_amp.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_amp.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_amp.types.describe_query_logging_configuration_request.DescribeQueryLoggingConfigurationRequest]",
    ) -> OperationResponse[
        "capo_amp.types.describe_query_logging_configuration_response.DescribeQueryLoggingConfigurationResponse"
    ]:
        import capo_amp._operations.amazon_prometheus_service.describe_query_logging_configuration

        output, http_response = (
            capo_amp._operations.amazon_prometheus_service.describe_query_logging_configuration.describe_query_logging_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeQueryLoggingConfiguration")
    )
    input_: capo_amp.types.describe_query_logging_configuration_request.DescribeQueryLoggingConfigurationRequest = {
        "workspace_id": workspace_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output