1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. MeteringComputation
  5. getQueries
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.MeteringComputation.getQueries

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    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:

    CompartmentId string
    The compartment ID in which to list resources.
    Filters List<GetQueriesFilter>
    The filter object for query usage.
    CompartmentId string
    The compartment ID in which to list resources.
    Filters []GetQueriesFilter
    The filter object for query usage.
    compartmentId String
    The compartment ID in which to list resources.
    filters List<GetQueriesFilter>
    The filter object for query usage.
    compartmentId string
    The compartment ID in which to list resources.
    filters GetQueriesFilter[]
    The filter object for query usage.
    compartment_id str
    The compartment ID in which to list resources.
    filters Sequence[meteringcomputation.GetQueriesFilter]
    The filter object for query usage.
    compartmentId 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:

    CompartmentId string
    The compartment OCID.
    Id string
    The provider-assigned unique ID for this managed resource.
    QueryCollections List<GetQueriesQueryCollection>
    The list of query_collection.
    Filters List<GetQueriesFilter>
    The filter object for query usage.
    CompartmentId string
    The compartment OCID.
    Id string
    The provider-assigned unique ID for this managed resource.
    QueryCollections []GetQueriesQueryCollection
    The list of query_collection.
    Filters []GetQueriesFilter
    The filter object for query usage.
    compartmentId String
    The compartment OCID.
    id String
    The provider-assigned unique ID for this managed resource.
    queryCollections List<GetQueriesQueryCollection>
    The list of query_collection.
    filters List<GetQueriesFilter>
    The filter object for query usage.
    compartmentId string
    The compartment OCID.
    id string
    The provider-assigned unique ID for this managed resource.
    queryCollections GetQueriesQueryCollection[]
    The list of query_collection.
    filters GetQueriesFilter[]
    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.GetQueriesQueryCollection]
    The list of query_collection.
    filters Sequence[meteringcomputation.GetQueriesFilter]
    The filter object for query usage.
    compartmentId String
    The compartment OCID.
    id String
    The provider-assigned unique ID for this managed resource.
    queryCollections List<Property Map>
    The list of query_collection.
    filters List<Property Map>
    The filter object for query usage.

    Supporting Types

    GetQueriesFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetQueriesQueryCollection

    GetQueriesQueryCollectionItem

    CompartmentId string
    The compartment ID in which to list resources.
    Id string
    The query OCID.
    QueryDefinitions List<GetQueriesQueryCollectionItemQueryDefinition>
    The common fields for queries.
    CompartmentId string
    The compartment ID in which to list resources.
    Id string
    The query OCID.
    QueryDefinitions []GetQueriesQueryCollectionItemQueryDefinition
    The common fields for queries.
    compartmentId String
    The compartment ID in which to list resources.
    id String
    The query OCID.
    queryDefinitions List<GetQueriesQueryCollectionItemQueryDefinition>
    The common fields for queries.
    compartmentId string
    The compartment ID in which to list resources.
    id string
    The query OCID.
    queryDefinitions GetQueriesQueryCollectionItemQueryDefinition[]
    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.GetQueriesQueryCollectionItemQueryDefinition]
    The common fields for queries.
    compartmentId String
    The compartment ID in which to list resources.
    id String
    The query OCID.
    queryDefinitions List<Property Map>
    The common fields for queries.

    GetQueriesQueryCollectionItemQueryDefinition

    CostAnalysisUis List<GetQueriesQueryCollectionItemQueryDefinitionCostAnalysisUi>
    The common fields for Cost Analysis UI rendering.
    DisplayName string
    The query display name. Avoid entering confidential information.
    ReportQueries List<GetQueriesQueryCollectionItemQueryDefinitionReportQuery>
    The request of the generated Cost Analysis report.
    Version double
    The saved query version.
    CostAnalysisUis []GetQueriesQueryCollectionItemQueryDefinitionCostAnalysisUi
    The common fields for Cost Analysis UI rendering.
    DisplayName string
    The query display name. Avoid entering confidential information.
    ReportQueries []GetQueriesQueryCollectionItemQueryDefinitionReportQuery
    The request of the generated Cost Analysis report.
    Version float64
    The saved query version.
    costAnalysisUis List<GetQueriesQueryCollectionItemQueryDefinitionCostAnalysisUi>
    The common fields for Cost Analysis UI rendering.
    displayName String
    The query display name. Avoid entering confidential information.
    reportQueries List<GetQueriesQueryCollectionItemQueryDefinitionReportQuery>
    The request of the generated Cost Analysis report.
    version Double
    The saved query version.
    costAnalysisUis GetQueriesQueryCollectionItemQueryDefinitionCostAnalysisUi[]
    The common fields for Cost Analysis UI rendering.
    displayName string
    The query display name. Avoid entering confidential information.
    reportQueries GetQueriesQueryCollectionItemQueryDefinitionReportQuery[]
    The request of the generated Cost Analysis report.
    version number
    The saved query version.
    cost_analysis_uis Sequence[meteringcomputation.GetQueriesQueryCollectionItemQueryDefinitionCostAnalysisUi]
    The common fields for Cost Analysis UI rendering.
    display_name str
    The query display name. Avoid entering confidential information.
    report_queries Sequence[meteringcomputation.GetQueriesQueryCollectionItemQueryDefinitionReportQuery]
    The request of the generated Cost Analysis report.
    version float
    The saved query version.
    costAnalysisUis List<Property Map>
    The common fields for Cost Analysis UI rendering.
    displayName String
    The query display name. Avoid entering confidential information.
    reportQueries List<Property Map>
    The request of the generated Cost Analysis report.
    version Number
    The saved query version.

    GetQueriesQueryCollectionItemQueryDefinitionCostAnalysisUi

    Graph string
    The graph type.
    IsCumulativeGraph bool
    A cumulative graph.
    Graph string
    The graph type.
    IsCumulativeGraph bool
    A cumulative graph.
    graph String
    The graph type.
    isCumulativeGraph Boolean
    A cumulative graph.
    graph string
    The graph type.
    isCumulativeGraph boolean
    A cumulative graph.
    graph str
    The graph type.
    is_cumulative_graph bool
    A cumulative graph.
    graph String
    The graph type.
    isCumulativeGraph Boolean
    A cumulative graph.

    GetQueriesQueryCollectionItemQueryDefinitionReportQuery

    CompartmentDepth double
    The compartment depth level.
    DateRangeName string
    The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
    Filter string
    The filter object for query usage.
    Forecasts List<GetQueriesQueryCollectionItemQueryDefinitionReportQueryForecast>
    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.
    GroupBies List<string>
    Aggregate the result by. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    GroupByTags List<GetQueriesQueryCollectionItemQueryDefinitionReportQueryGroupByTag>
    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"]
    IsAggregateByTime bool
    Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
    QueryType 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
    TenantId string
    Tenant ID.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    The usage start time.
    CompartmentDepth float64
    The compartment depth level.
    DateRangeName string
    The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
    Filter string
    The filter object for query usage.
    Forecasts []GetQueriesQueryCollectionItemQueryDefinitionReportQueryForecast
    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.
    GroupBies []string
    Aggregate the result by. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    GroupByTags []GetQueriesQueryCollectionItemQueryDefinitionReportQueryGroupByTag
    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"]
    IsAggregateByTime bool
    Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
    QueryType 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
    TenantId string
    Tenant ID.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    The usage start time.
    compartmentDepth Double
    The compartment depth level.
    dateRangeName String
    The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
    filter String
    The filter object for query usage.
    forecasts List<GetQueriesQueryCollectionItemQueryDefinitionReportQueryForecast>
    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.
    groupBies List<String>
    Aggregate the result by. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    groupByTags List<GetQueriesQueryCollectionItemQueryDefinitionReportQueryGroupByTag>
    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"]
    isAggregateByTime Boolean
    Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
    queryType 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
    tenantId String
    Tenant ID.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    The usage start time.
    compartmentDepth number
    The compartment depth level.
    dateRangeName string
    The UI date range, for example, LAST_THREE_MONTHS. Conflicts with timeUsageStarted and timeUsageEnded.
    filter string
    The filter object for query usage.
    forecasts GetQueriesQueryCollectionItemQueryDefinitionReportQueryForecast[]
    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.
    groupBies string[]
    Aggregate the result by. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    groupByTags GetQueriesQueryCollectionItemQueryDefinitionReportQueryGroupByTag[]
    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"]
    isAggregateByTime boolean
    Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
    queryType 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
    tenantId string
    Tenant ID.
    timeUsageEnded string
    The usage end time.
    timeUsageStarted string
    The usage start time.
    compartment_depth float
    The compartment depth level.
    date_range_name str
    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.GetQueriesQueryCollectionItemQueryDefinitionReportQueryForecast]
    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"]
    group_by_tags Sequence[meteringcomputation.GetQueriesQueryCollectionItemQueryDefinitionReportQueryGroupByTag]
    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_by_time bool
    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_ended str
    The usage end time.
    time_usage_started str
    The usage start time.
    compartmentDepth Number
    The compartment depth level.
    dateRangeName String
    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.
    groupBies List<String>
    Aggregate the result by. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    groupByTags 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"]
    isAggregateByTime Boolean
    Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
    queryType 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
    tenantId String
    Tenant ID.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    The usage start time.

    GetQueriesQueryCollectionItemQueryDefinitionReportQueryForecast

    ForecastType 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.
    TimeForecastEnded string
    The forecast end time.
    TimeForecastStarted string
    The forecast start time. Defaults to UTC-1 if not specified.
    ForecastType 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.
    TimeForecastEnded string
    The forecast end time.
    TimeForecastStarted string
    The forecast start time. Defaults to UTC-1 if not specified.
    forecastType 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.
    timeForecastEnded String
    The forecast end time.
    timeForecastStarted String
    The forecast start time. Defaults to UTC-1 if not specified.
    forecastType 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.
    timeForecastEnded string
    The forecast end time.
    timeForecastStarted string
    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_ended str
    The forecast end time.
    time_forecast_started str
    The forecast start time. Defaults to UTC-1 if not specified.
    forecastType 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.
    timeForecastEnded String
    The forecast end time.
    timeForecastStarted String
    The forecast start time. Defaults to UTC-1 if not specified.

    GetQueriesQueryCollectionItemQueryDefinitionReportQueryGroupByTag

    Key string
    The tag key.
    Namespace string
    The tag namespace.
    Value string
    The tag value.
    Key string
    The tag key.
    Namespace string
    The tag namespace.
    Value string
    The tag value.
    key String
    The tag key.
    namespace String
    The tag namespace.
    value String
    The tag value.
    key string
    The tag key.
    namespace string
    The tag namespace.
    value string
    The tag value.
    key str
    The tag key.
    namespace str
    The tag namespace.
    value str
    The tag value.
    key String
    The tag key.
    namespace String
    The tag namespace.
    value String
    The tag value.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi