import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../../types"; /** * Submit a query at host level to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of "enqueued" means that the request succeeded. */ export declare class OrganizationHostQuery extends pulumi.CustomResource { /** * Get an existing OrganizationHostQuery resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): OrganizationHostQuery; /** * Returns true if the given object is an instance of OrganizationHostQuery. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is OrganizationHostQuery; /** * Creation time of the query. */ readonly created: pulumi.Output; /** * Hostname is available only when query is executed at host level. */ readonly envgroupHostname: pulumi.Output; /** * Error is set when query fails. */ readonly error: pulumi.Output; /** * ExecutionTime is available only after the query is completed. */ readonly executionTime: pulumi.Output; /** * Asynchronous Query Name. */ readonly name: pulumi.Output; /** * Contains information like metrics, dimenstions etc of the AsyncQuery. */ readonly queryParams: pulumi.Output; /** * Asynchronous Report ID. */ readonly reportDefinitionId: pulumi.Output; /** * Result is available only after the query is completed. */ readonly result: pulumi.Output; /** * ResultFileSize is available only after the query is completed. */ readonly resultFileSize: pulumi.Output; /** * ResultRows is available only after the query is completed. */ readonly resultRows: pulumi.Output; /** * Self link of the query. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` */ readonly self: pulumi.Output; /** * Query state could be "enqueued", "running", "completed", "failed". */ readonly state: pulumi.Output; /** * Last updated timestamp for the query. */ readonly updated: pulumi.Output; /** * Create a OrganizationHostQuery resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: OrganizationHostQueryArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a OrganizationHostQuery resource. */ export interface OrganizationHostQueryArgs { /** * Delimiter used in the CSV file, if `outputFormat` is set to `csv`. Defaults to the `,` (comma) character. Supported delimiter characters include comma (`,`), pipe (`|`), and tab (`\t`). */ readonly csvDelimiter?: pulumi.Input; /** * A list of dimensions. https://docs.apigee.com/api-platform/analytics/analytics-reference#dimensions */ readonly dimensions?: pulumi.Input[]>; /** * Hostname needs to be specified if query intends to run at host level. This field is only allowed when query is submitted by CreateHostAsyncQuery where analytics data will be grouped by organization and hostname. */ readonly envgroupHostname?: pulumi.Input; /** * Boolean expression that can be used to filter data. Filter expressions can be combined using AND/OR terms and should be fully parenthesized to avoid ambiguity. See Analytics metrics, dimensions, and filters reference https://docs.apigee.com/api-platform/analytics/analytics-reference for more information on the fields available to filter on. For more information on the tokens that you use to build filter expressions, see Filter expression syntax. https://docs.apigee.com/api-platform/analytics/asynch-reports-api#filter-expression-syntax */ readonly filter?: pulumi.Input; /** * Time unit used to group the result set. Valid values include: second, minute, hour, day, week, or month. If a query includes groupByTimeUnit, then the result is an aggregation based on the specified time unit and the resultant timestamp does not include milliseconds precision. If a query omits groupByTimeUnit, then the resultant timestamp includes milliseconds precision. */ readonly groupByTimeUnit?: pulumi.Input; readonly hostQueriesId: pulumi.Input; /** * Maximum number of rows that can be returned in the result. */ readonly limit?: pulumi.Input; /** * A list of Metrics. */ readonly metrics?: pulumi.Input[]>; /** * Asynchronous Query Name. */ readonly name?: pulumi.Input; readonly organizationsId: pulumi.Input; /** * Valid values include: `csv` or `json`. Defaults to `json`. Note: Configure the delimiter for CSV output using the csvDelimiter property. */ readonly outputFormat?: pulumi.Input; /** * Asynchronous Report ID. */ readonly reportDefinitionId?: pulumi.Input; /** * Required. Time range for the query. Can use the following predefined strings to specify the time range: `last60minutes` `last24hours` `last7days` Or, specify the timeRange as a structure describing start and end timestamps in the ISO format: yyyy-mm-ddThh:mm:ssZ. Example: "timeRange": { "start": "2018-07-29T00:13:00Z", "end": "2018-08-01T00:18:00Z" } */ readonly timeRange?: any; }