Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.MeteringComputation.getQueries
Explore with Pulumi AI
This data source provides the list of Queries in Oracle Cloud Infrastructure Metering Computation service.
Returns the saved query list.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testQueries = oci.MeteringComputation.getQueries({
compartmentId: compartmentId,
});
import pulumi
import pulumi_oci as oci
test_queries = oci.MeteringComputation.get_queries(compartment_id=compartment_id)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/MeteringComputation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := MeteringComputation.GetQueries(ctx, &meteringcomputation.GetQueriesArgs{
CompartmentId: compartmentId,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testQueries = Oci.MeteringComputation.GetQueries.Invoke(new()
{
CompartmentId = compartmentId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.MeteringComputation.MeteringComputationFunctions;
import com.pulumi.oci.MeteringComputation.inputs.GetQueriesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testQueries = MeteringComputationFunctions.getQueries(GetQueriesArgs.builder()
.compartmentId(compartmentId)
.build());
}
}
variables:
testQueries:
fn::invoke:
Function: oci:MeteringComputation:getQueries
Arguments:
compartmentId: ${compartmentId}
Using getQueries
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getQueries(args: GetQueriesArgs, opts?: InvokeOptions): Promise<GetQueriesResult>
function getQueriesOutput(args: GetQueriesOutputArgs, opts?: InvokeOptions): Output<GetQueriesResult>
def get_queries(compartment_id: Optional[str] = None,
filters: Optional[Sequence[_meteringcomputation.GetQueriesFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetQueriesResult
def get_queries_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_meteringcomputation.GetQueriesFilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetQueriesResult]
func GetQueries(ctx *Context, args *GetQueriesArgs, opts ...InvokeOption) (*GetQueriesResult, error)
func GetQueriesOutput(ctx *Context, args *GetQueriesOutputArgs, opts ...InvokeOption) GetQueriesResultOutput
> Note: This function is named GetQueries
in the Go SDK.
public static class GetQueries
{
public static Task<GetQueriesResult> InvokeAsync(GetQueriesArgs args, InvokeOptions? opts = null)
public static Output<GetQueriesResult> Invoke(GetQueriesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetQueriesResult> getQueries(GetQueriesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:MeteringComputation/getQueries:getQueries
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The compartment ID in which to list resources.
- Filters
List<Get
Queries Filter> - The filter object for query usage.
- Compartment
Id string - The compartment ID in which to list resources.
- Filters
[]Get
Queries Filter - The filter object for query usage.
- compartment
Id String - The compartment ID in which to list resources.
- filters
List<Get
Queries Filter> - The filter object for query usage.
- compartment
Id string - The compartment ID in which to list resources.
- filters
Get
Queries Filter[] - The filter object for query usage.
- compartment_
id str - The compartment ID in which to list resources.
- filters
Sequence[meteringcomputation.
Get Queries Filter] - The filter object for query usage.
- compartment
Id String - The compartment ID in which to list resources.
- filters List<Property Map>
- The filter object for query usage.
getQueries Result
The following output properties are available:
- Compartment
Id string - The compartment OCID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Query
Collections List<GetQueries Query Collection> - The list of query_collection.
- Filters
List<Get
Queries Filter> - The filter object for query usage.
- Compartment
Id string - The compartment OCID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Query
Collections []GetQueries Query Collection - The list of query_collection.
- Filters
[]Get
Queries Filter - The filter object for query usage.
- compartment
Id String - The compartment OCID.
- id String
- The provider-assigned unique ID for this managed resource.
- query
Collections List<GetQueries Query Collection> - The list of query_collection.
- filters
List<Get
Queries Filter> - The filter object for query usage.
- compartment
Id string - The compartment OCID.
- id string
- The provider-assigned unique ID for this managed resource.
- query
Collections GetQueries Query Collection[] - The list of query_collection.
- filters
Get
Queries Filter[] - The filter object for query usage.
- compartment_
id str - The compartment OCID.
- id str
- The provider-assigned unique ID for this managed resource.
- query_
collections Sequence[meteringcomputation.Get Queries Query Collection] - The list of query_collection.
- filters
Sequence[meteringcomputation.
Get Queries Filter] - The filter object for query usage.
- compartment
Id String - The compartment OCID.
- id String
- The provider-assigned unique ID for this managed resource.
- query
Collections List<Property Map> - The list of query_collection.
- filters List<Property Map>
- The filter object for query usage.
Supporting Types
GetQueriesFilter
GetQueriesQueryCollection
GetQueriesQueryCollectionItem
- Compartment
Id string - The compartment ID in which to list resources.
- Id string
- The query OCID.
- Query
Definitions List<GetQueries Query Collection Item Query Definition> - The common fields for queries.
- Compartment
Id string - The compartment ID in which to list resources.
- Id string
- The query OCID.
- Query
Definitions []GetQueries Query Collection Item Query Definition - The common fields for queries.
- compartment
Id String - The compartment ID in which to list resources.
- id String
- The query OCID.
- query
Definitions List<GetQueries Query Collection Item Query Definition> - The common fields for queries.
- compartment
Id string - The compartment ID in which to list resources.
- id string
- The query OCID.
- query
Definitions GetQueries Query Collection Item Query Definition[] - The common fields for queries.
- compartment_
id str - The compartment ID in which to list resources.
- id str
- The query OCID.
- query_
definitions Sequence[meteringcomputation.Get Queries Query Collection Item Query Definition] - The common fields for queries.
- compartment
Id String - The compartment ID in which to list resources.
- id String
- The query OCID.
- query
Definitions List<Property Map> - The common fields for queries.
GetQueriesQueryCollectionItemQueryDefinition
- Cost
Analysis List<GetUis Queries Query Collection Item Query Definition Cost Analysis Ui> - The common fields for Cost Analysis UI rendering.
- Display
Name string - The query display name. Avoid entering confidential information.
- Report
Queries List<GetQueries Query Collection Item Query Definition Report Query> - The request of the generated Cost Analysis report.
- Version double
- The saved query version.
- Cost
Analysis []GetUis Queries Query Collection Item Query Definition Cost Analysis Ui - The common fields for Cost Analysis UI rendering.
- Display
Name string - The query display name. Avoid entering confidential information.
- Report
Queries []GetQueries Query Collection Item Query Definition Report Query - The request of the generated Cost Analysis report.
- Version float64
- The saved query version.
- cost
Analysis List<GetUis Queries Query Collection Item Query Definition Cost Analysis Ui> - The common fields for Cost Analysis UI rendering.
- display
Name String - The query display name. Avoid entering confidential information.
- report
Queries List<GetQueries Query Collection Item Query Definition Report Query> - The request of the generated Cost Analysis report.
- version Double
- The saved query version.
- cost
Analysis GetUis Queries Query Collection Item Query Definition Cost Analysis Ui[] - The common fields for Cost Analysis UI rendering.
- display
Name string - The query display name. Avoid entering confidential information.
- report
Queries GetQueries Query Collection Item Query Definition Report Query[] - The request of the generated Cost Analysis report.
- version number
- The saved query version.
- cost_
analysis_ Sequence[meteringcomputation.uis Get Queries Query Collection Item Query Definition Cost Analysis Ui] - The common fields for Cost Analysis UI rendering.
- display_
name str - The query display name. Avoid entering confidential information.
- report_
queries Sequence[meteringcomputation.Get Queries Query Collection Item Query Definition Report Query] - The request of the generated Cost Analysis report.
- version float
- The saved query version.
- cost
Analysis List<Property Map>Uis - The common fields for Cost Analysis UI rendering.
- display
Name String - The query display name. Avoid entering confidential information.
- report
Queries List<Property Map> - The request of the generated Cost Analysis report.
- version Number
- The saved query version.
GetQueriesQueryCollectionItemQueryDefinitionCostAnalysisUi
- Graph string
- The graph type.
- Is
Cumulative boolGraph - A cumulative graph.
- Graph string
- The graph type.
- Is
Cumulative boolGraph - A cumulative graph.
- graph String
- The graph type.
- is
Cumulative BooleanGraph - A cumulative graph.
- graph string
- The graph type.
- is
Cumulative booleanGraph - A cumulative graph.
- graph str
- The graph type.
- is_
cumulative_ boolgraph - A cumulative graph.
- graph String
- The graph type.
- is
Cumulative BooleanGraph - A cumulative graph.
GetQueriesQueryCollectionItemQueryDefinitionReportQuery
- Compartment
Depth double - The compartment depth level.
- Date
Range stringName - The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
- Filter string
- The filter object for query usage.
- Forecasts
List<Get
Queries Query Collection Item Query Definition Report Query Forecast> - Forecast configuration of usage/cost.
- Granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- Group
Bies List<string> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Get
Queries Query Collection Item Query Definition Report Query Group By Tag> - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- Is
Aggregate boolBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- Query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data AllCredit - Query the credit adjustments and expired credit
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- Compartment
Depth float64 - The compartment depth level.
- Date
Range stringName - The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
- Filter string
- The filter object for query usage.
- Forecasts
[]Get
Queries Query Collection Item Query Definition Report Query Forecast - Forecast configuration of usage/cost.
- Granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- Group
Bies []string - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- []Get
Queries Query Collection Item Query Definition Report Query Group By Tag - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- Is
Aggregate boolBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- Query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data AllCredit - Query the credit adjustments and expired credit
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- compartment
Depth Double - The compartment depth level.
- date
Range StringName - The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
- filter String
- The filter object for query usage.
- forecasts
List<Get
Queries Query Collection Item Query Definition Report Query Forecast> - Forecast configuration of usage/cost.
- granularity String
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- group
Bies List<String> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Get
Queries Query Collection Item Query Definition Report Query Group By Tag> - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate BooleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- query
Type String - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data AllCredit - Query the credit adjustments and expired credit
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
- compartment
Depth number - The compartment depth level.
- date
Range stringName - The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
- filter string
- The filter object for query usage.
- forecasts
Get
Queries Query Collection Item Query Definition Report Query Forecast[] - Forecast configuration of usage/cost.
- granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- group
Bies string[] - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- Get
Queries Query Collection Item Query Definition Report Query Group By Tag[] - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate booleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data AllCredit - Query the credit adjustments and expired credit
- tenant
Id string - Tenant ID.
- time
Usage stringEnded - The usage end time.
- time
Usage stringStarted - The usage start time.
- compartment_
depth float - The compartment depth level.
- date_
range_ strname - The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
- filter str
- The filter object for query usage.
- forecasts
Sequence[meteringcomputation.
Get Queries Query Collection Item Query Definition Report Query Forecast] - Forecast configuration of usage/cost.
- granularity str
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- group_
bies Sequence[str] - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- Sequence[meteringcomputation.
Get Queries Query Collection Item Query Definition Report Query Group By Tag] - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is_
aggregate_ boolby_ time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- query_
type str - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data AllCredit - Query the credit adjustments and expired credit
- tenant_
id str - Tenant ID.
- time_
usage_ strended - The usage end time.
- time_
usage_ strstarted - The usage start time.
- compartment
Depth Number - The compartment depth level.
- date
Range StringName - The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
- filter String
- The filter object for query usage.
- forecasts List<Property Map>
- Forecast configuration of usage/cost.
- granularity String
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- group
Bies List<String> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Property Map>
- GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate BooleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- query
Type String - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data AllCredit - Query the credit adjustments and expired credit
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
GetQueriesQueryCollectionItemQueryDefinitionReportQueryForecast
- Forecast
Type string - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- Time
Forecast stringEnded - The forecast end time.
- Time
Forecast stringStarted - The forecast start time. Defaults to UTC-1 if not specified.
- Forecast
Type string - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- Time
Forecast stringEnded - The forecast end time.
- Time
Forecast stringStarted - The forecast start time. Defaults to UTC-1 if not specified.
- forecast
Type String - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- time
Forecast StringEnded - The forecast end time.
- time
Forecast StringStarted - The forecast start time. Defaults to UTC-1 if not specified.
- forecast
Type string - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- time
Forecast stringEnded - The forecast end time.
- time
Forecast stringStarted - The forecast start time. Defaults to UTC-1 if not specified.
- forecast_
type str - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- time_
forecast_ strended - The forecast end time.
- time_
forecast_ strstarted - The forecast start time. Defaults to UTC-1 if not specified.
- forecast
Type String - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- time
Forecast StringEnded - The forecast end time.
- time
Forecast StringStarted - The forecast start time. Defaults to UTC-1 if not specified.
GetQueriesQueryCollectionItemQueryDefinitionReportQueryGroupByTag
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.