/** * Copyright 2022 Splunk, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"): you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. * * Splunk Search service * Use the Search service in Splunk Cloud Services to dispatch, review, and manage searches and search jobs. You can finalize or cancel jobs, retrieve search results, and request search-related configurations from the Metadata Catalog service in Splunk Cloud Services. * * OpenAPI spec version: v2beta1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { DeleteSearchJob, FieldsSummary, ListPreviewResultsResponse, ListSearchResultsResponse, SearchJob, SearchStatus, TimeBucketsSummary, UpdateJob } from '../models'; import BaseApiService from "../../../../baseapiservice"; import { SearchServiceExtensions } from "../../../../service_extensions/search"; import { RequestStatus } from '../../../../client'; export declare const SEARCH_SERVICE_PREFIX: string; export declare const SEARCH_SERVICE_CLUSTER: string; /** * @export */ export declare enum OutputModeEnum { Csv = "csv", Json = "json" } /** * Splunk Search service * Version: v2beta1.1 * Use the Search service in Splunk Cloud Services to dispatch, review, and manage searches and search jobs. You can finalize or cancel jobs, retrieve search results, and request search-related configurations from the Metadata Catalog service in Splunk Cloud Services. */ export declare class GeneratedSearchService extends BaseApiService { getServiceCluster(): string; getServicePrefix(): string; /** * Creates a search job. * @param searchJob * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return SearchJob */ createJob: (searchJob?: SearchJob | undefined, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Creates a search job that deletes events from an index. The events are deleted from the index in the specified module, based on the search criteria as specified by the predicate. * @param deleteSearchJob * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return DeleteSearchJob */ deleteJob: (deleteSearchJob?: DeleteSearchJob | undefined, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Export the search results for the job with the specified search ID (SID). Export the results as a csv file or json file. * @param sid The search ID. * @param args parameters to be sent with the request * @param args.count The maximum number of entries to return. Set to 0 to return all available entries. * @param args.filename The export results filename. Default: exportResults * @param args.outputMode Specifies the format for the returned output. * @param requestStatusCallback callback function to listen to the status of a request * @return { [key: string]: any; } */ exportResults: (sid: string, args?: { [key: string]: any; count?: number | undefined; filename?: string | undefined; outputMode?: OutputModeEnum | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise<{ [key: string]: any; }>; /** * Return the search job with the specified search ID (SID). * @param sid The search ID. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return SearchJob */ getJob: (sid: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Return events summary, for search ID (SID) search. * @param sid The search ID. * @param args parameters to be sent with the request * @param args.count The maximum number of entries to return. Set to 0 to return all available entries. * @param args.earliest The earliest time filter, in absolute time. When specifying an absolute time specify either UNIX time, or UTC in seconds using the ISO-8601 (%FT%T.%Q) format. For example 2019-01-25T13:15:30Z. GMT is the default timezone. You must specify GMT when you specify UTC. Any offset specified is ignored. * @param args.field A field to return for the result set. You can specify multiple fields of comma-separated values if multiple fields are required. * @param args.latest The latest time filter in absolute time. When specifying an absolute time specify either UNIX time, or UTC in seconds using the ISO-8601 (%FT%T.%Q) format. For example 2019-01-25T13:15:30Z. GMT is the default timezone. You must specify GMT when you specify UTC. Any offset specified is ignored. Latest time must be after Earliest time. * @param args.offset Index of first item to return. * @param requestStatusCallback callback function to listen to the status of a request * @return ListSearchResultsResponse */ listEventsSummary: (sid: string, args?: { [key: string]: any; count?: number | undefined; earliest?: string | undefined; field?: string | undefined; latest?: string | undefined; offset?: number | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Return fields stats summary of the events to-date, for search ID (SID) search. * @param sid The search ID. * @param args parameters to be sent with the request * @param args.earliest The earliest time filter, in absolute time. When specifying an absolute time specify either UNIX time, or UTC in seconds using the ISO-8601 (%FT%T.%Q) format. For example 2019-01-25T13:15:30Z. GMT is the default timezone. You must specify GMT when you specify UTC. Any offset specified is ignored. * @param args.latest The latest time filter in absolute time. When specifying an absolute time specify either UNIX time, or UTC in seconds using the ISO-8601 (%FT%T.%Q) format. For example 2019-01-25T13:15:30Z. GMT is the default timezone. You must specify GMT when you specify UTC. Any offset specified is ignored. Latest time must be after Earliest time. * @param requestStatusCallback callback function to listen to the status of a request * @return FieldsSummary */ listFieldsSummary: (sid: string, args?: { [key: string]: any; earliest?: string | undefined; latest?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Return the matching list of search jobs. * @param args parameters to be sent with the request * @param args.count The maximum number of jobs that you want to return the status entries for. * @param args.filter Filter the list of jobs by sid. Valid format is `sid IN ({comma separated list of SIDs in quotes})`. A maximum of 30 SIDs can be specified in one query. * @param args.status Filter the list of jobs by status. Valid status values are 'running', 'done', 'canceled', or 'failed'. * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listJobs: (args?: { [key: string]: any; count?: number | undefined; filter?: string | undefined; status?: SearchStatus | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Return the preview search results for the job with the specified search ID (SID). Can be used when a job is running to return interim results. * @param sid The search ID. * @param args parameters to be sent with the request * @param args.count The maximum number of entries to return. Set to 0 to return all available entries. * @param args.offset Index of first item to return. * @param requestStatusCallback callback function to listen to the status of a request * @return ListPreviewResultsResponse */ listPreviewResults: (sid: string, args?: { [key: string]: any; count?: number | undefined; offset?: number | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Return the search results for the job with the specified search ID (SID). * @param sid The search ID. * @param args parameters to be sent with the request * @param args.count The maximum number of entries to return. Set to 0 to return all available entries. * @param args.field A field to return for the result set. You can specify multiple fields of comma-separated values if multiple fields are required. * @param args.offset Index of first item to return. * @param requestStatusCallback callback function to listen to the status of a request * @return ListSearchResultsResponse */ listResults: (sid: string, args?: { [key: string]: any; count?: number | undefined; field?: string | undefined; offset?: number | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Return event distribution over time of the untransformed events read to-date, for search ID(SID) search. * @param sid The search ID. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return TimeBucketsSummary */ listTimeBuckets: (sid: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update the search job with the specified search ID (SID) with an action. * @param sid The search ID. * @param updateJob * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return SearchJob */ updateJob: (sid: string, updateJob?: UpdateJob | undefined, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; } export declare type SearchService = GeneratedSearchService & SearchServiceExtensions; export declare const SearchService: { new (...args: any[]): { waitForJob(jobIn: J, pollInterval?: number | undefined, callback?: ((job: J) => object) | undefined): Promise; getJob(sid: string): Promise<{ sid?: string | undefined; status?: string | undefined; }>; }; } & typeof GeneratedSearchService;