import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Query resource in Oracle Cloud Infrastructure Metering Computation service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/usage/latest/Query * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/metering_computation * * Returns the created query. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testQuery = new oci.meteringcomputation.Query("test_query", { * compartmentId: compartmentId, * queryDefinition: { * costAnalysisUi: { * graph: queryQueryDefinitionCostAnalysisUiGraph, * isCumulativeGraph: queryQueryDefinitionCostAnalysisUiIsCumulativeGraph === "true", * }, * displayName: queryQueryDefinitionDisplayName, * reportQuery: { * granularity: queryQueryDefinitionReportQueryGranularity, * tenantId: testTenant.id, * compartmentDepth: queryQueryDefinitionReportQueryCompartmentDepth, * dateRangeName: queryQueryDefinitionReportQueryDateRangeName, * filter: queryQueryDefinitionReportQueryFilter, * forecast: { * timeForecastEnded: queryQueryDefinitionReportQueryForecastTimeForecastEnded, * forecastType: queryQueryDefinitionReportQueryForecastForecastType, * timeForecastStarted: queryQueryDefinitionReportQueryForecastTimeForecastStarted, * }, * groupBies: queryQueryDefinitionReportQueryGroupBy, * groupByTags: [{ * key: queryQueryDefinitionReportQueryGroupByTagKey, * namespace: queryQueryDefinitionReportQueryGroupByTagNamespace, * value: queryQueryDefinitionReportQueryGroupByTagValue, * }], * isAggregateByTime: queryQueryDefinitionReportQueryIsAggregateByTime === "true", * queryType: queryQueryDefinitionReportQueryQueryType, * timeUsageEnded: queryQueryDefinitionReportQueryTimeUsageEnded, * timeUsageStarted: queryQueryDefinitionReportQueryTimeUsageStarted, * }, * version: queryQueryDefinitionVersion, * }, * }); * ``` * * ## Import * * Queries can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:MeteringComputation/query:Query test_query "id" * ``` */ export declare class Query extends pulumi.CustomResource { /** * Get an existing Query 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: QueryState, opts?: pulumi.CustomResourceOptions): Query; /** * Returns true if the given object is an instance of Query. 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 Query; /** * The compartment OCID. */ readonly compartmentId: pulumi.Output; /** * (Updatable) The common fields for queries. */ readonly queryDefinition: pulumi.Output; /** * Create a Query 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: QueryArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Query resources. */ export interface QueryState { /** * The compartment OCID. */ compartmentId?: pulumi.Input; /** * (Updatable) The common fields for queries. */ queryDefinition?: pulumi.Input; } /** * The set of arguments for constructing a Query resource. */ export interface QueryArgs { /** * The compartment OCID. */ compartmentId: pulumi.Input; /** * (Updatable) The common fields for queries. */ queryDefinition: pulumi.Input; } //# sourceMappingURL=query.d.ts.map