1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. MeteringComputation
  5. getUsageCarbonEmissionsQueries
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.MeteringComputation.getUsageCarbonEmissionsQueries

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the list of Usage Carbon Emissions Queries in Oracle Cloud Infrastructure Metering Computation service.

    Returns the usage carbon emissions saved query list.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testUsageCarbonEmissionsQueries = oci.MeteringComputation.getUsageCarbonEmissionsQueries({
        compartmentId: compartmentId,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_usage_carbon_emissions_queries = oci.MeteringComputation.get_usage_carbon_emissions_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.GetUsageCarbonEmissionsQueries(ctx, &meteringcomputation.GetUsageCarbonEmissionsQueriesArgs{
    			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 testUsageCarbonEmissionsQueries = Oci.MeteringComputation.GetUsageCarbonEmissionsQueries.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.GetUsageCarbonEmissionsQueriesArgs;
    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 testUsageCarbonEmissionsQueries = MeteringComputationFunctions.getUsageCarbonEmissionsQueries(GetUsageCarbonEmissionsQueriesArgs.builder()
                .compartmentId(compartmentId)
                .build());
    
        }
    }
    
    variables:
      testUsageCarbonEmissionsQueries:
        fn::invoke:
          Function: oci:MeteringComputation:getUsageCarbonEmissionsQueries
          Arguments:
            compartmentId: ${compartmentId}
    

    Using getUsageCarbonEmissionsQueries

    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 getUsageCarbonEmissionsQueries(args: GetUsageCarbonEmissionsQueriesArgs, opts?: InvokeOptions): Promise<GetUsageCarbonEmissionsQueriesResult>
    function getUsageCarbonEmissionsQueriesOutput(args: GetUsageCarbonEmissionsQueriesOutputArgs, opts?: InvokeOptions): Output<GetUsageCarbonEmissionsQueriesResult>
    def get_usage_carbon_emissions_queries(compartment_id: Optional[str] = None,
                                           filters: Optional[Sequence[_meteringcomputation.GetUsageCarbonEmissionsQueriesFilter]] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetUsageCarbonEmissionsQueriesResult
    def get_usage_carbon_emissions_queries_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                           filters: Optional[pulumi.Input[Sequence[pulumi.Input[_meteringcomputation.GetUsageCarbonEmissionsQueriesFilterArgs]]]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetUsageCarbonEmissionsQueriesResult]
    func GetUsageCarbonEmissionsQueries(ctx *Context, args *GetUsageCarbonEmissionsQueriesArgs, opts ...InvokeOption) (*GetUsageCarbonEmissionsQueriesResult, error)
    func GetUsageCarbonEmissionsQueriesOutput(ctx *Context, args *GetUsageCarbonEmissionsQueriesOutputArgs, opts ...InvokeOption) GetUsageCarbonEmissionsQueriesResultOutput

    > Note: This function is named GetUsageCarbonEmissionsQueries in the Go SDK.

    public static class GetUsageCarbonEmissionsQueries 
    {
        public static Task<GetUsageCarbonEmissionsQueriesResult> InvokeAsync(GetUsageCarbonEmissionsQueriesArgs args, InvokeOptions? opts = null)
        public static Output<GetUsageCarbonEmissionsQueriesResult> Invoke(GetUsageCarbonEmissionsQueriesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUsageCarbonEmissionsQueriesResult> getUsageCarbonEmissionsQueries(GetUsageCarbonEmissionsQueriesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:MeteringComputation/getUsageCarbonEmissionsQueries:getUsageCarbonEmissionsQueries
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The compartment ID in which to list resources.
    Filters List<GetUsageCarbonEmissionsQueriesFilter>
    CompartmentId string
    The compartment ID in which to list resources.
    Filters []GetUsageCarbonEmissionsQueriesFilter
    compartmentId String
    The compartment ID in which to list resources.
    filters List<GetUsageCarbonEmissionsQueriesFilter>
    compartmentId string
    The compartment ID in which to list resources.
    filters GetUsageCarbonEmissionsQueriesFilter[]
    compartmentId String
    The compartment ID in which to list resources.
    filters List<Property Map>

    getUsageCarbonEmissionsQueries Result

    The following output properties are available:

    CompartmentId string
    The compartment OCID.
    Id string
    The provider-assigned unique ID for this managed resource.
    UsageCarbonEmissionsQueryCollections List<GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollection>
    The list of usage_carbon_emissions_query_collection.
    Filters List<GetUsageCarbonEmissionsQueriesFilter>
    CompartmentId string
    The compartment OCID.
    Id string
    The provider-assigned unique ID for this managed resource.
    UsageCarbonEmissionsQueryCollections []GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollection
    The list of usage_carbon_emissions_query_collection.
    Filters []GetUsageCarbonEmissionsQueriesFilter
    compartmentId String
    The compartment OCID.
    id String
    The provider-assigned unique ID for this managed resource.
    usageCarbonEmissionsQueryCollections List<GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollection>
    The list of usage_carbon_emissions_query_collection.
    filters List<GetUsageCarbonEmissionsQueriesFilter>
    compartmentId string
    The compartment OCID.
    id string
    The provider-assigned unique ID for this managed resource.
    usageCarbonEmissionsQueryCollections GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollection[]
    The list of usage_carbon_emissions_query_collection.
    filters GetUsageCarbonEmissionsQueriesFilter[]
    compartmentId String
    The compartment OCID.
    id String
    The provider-assigned unique ID for this managed resource.
    usageCarbonEmissionsQueryCollections List<Property Map>
    The list of usage_carbon_emissions_query_collection.
    filters List<Property Map>

    Supporting Types

    GetUsageCarbonEmissionsQueriesFilter

    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

    GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollection

    GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItem

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

    GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinition

    CostAnalysisUis List<GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionCostAnalysisUi>
    The common fields for Cost Analysis UI rendering.
    DisplayName string
    The query display name. Avoid entering confidential information.
    ReportQueries List<GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQuery>
    The request of the generated usage carbon emissions report.
    Version int
    The saved query version.
    CostAnalysisUis []GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionCostAnalysisUi
    The common fields for Cost Analysis UI rendering.
    DisplayName string
    The query display name. Avoid entering confidential information.
    ReportQueries []GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQuery
    The request of the generated usage carbon emissions report.
    Version int
    The saved query version.
    costAnalysisUis List<GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionCostAnalysisUi>
    The common fields for Cost Analysis UI rendering.
    displayName String
    The query display name. Avoid entering confidential information.
    reportQueries List<GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQuery>
    The request of the generated usage carbon emissions report.
    version Integer
    The saved query version.
    costAnalysisUis GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionCostAnalysisUi[]
    The common fields for Cost Analysis UI rendering.
    displayName string
    The query display name. Avoid entering confidential information.
    reportQueries GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQuery[]
    The request of the generated usage carbon emissions report.
    version number
    The saved query version.
    cost_analysis_uis Sequence[meteringcomputation.GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionCostAnalysisUi]
    The common fields for Cost Analysis UI rendering.
    display_name str
    The query display name. Avoid entering confidential information.
    report_queries Sequence[meteringcomputation.GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQuery]
    The request of the generated usage carbon emissions report.
    version int
    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 usage carbon emissions report.
    version Number
    The saved query version.

    GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionCostAnalysisUi

    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.

    GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQuery

    CompartmentDepth int
    The compartment depth level.
    DateRangeName string
    The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    GroupBies List<string>
    Specifies what to aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    GroupByTags List<GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQueryGroupByTag>
    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
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    TenantId string
    Tenant ID.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    The usage start time.
    UsageCarbonEmissionsQueryFilter string
    The filter object for query usage.
    CompartmentDepth int
    The compartment depth level.
    DateRangeName string
    The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    GroupBies []string
    Specifies what to aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    GroupByTags []GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQueryGroupByTag
    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
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    TenantId string
    Tenant ID.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    The usage start time.
    UsageCarbonEmissionsQueryFilter string
    The filter object for query usage.
    compartmentDepth Integer
    The compartment depth level.
    dateRangeName String
    The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    groupBies List<String>
    Specifies what to aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    groupByTags List<GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQueryGroupByTag>
    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
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    tenantId String
    Tenant ID.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    The usage start time.
    usageCarbonEmissionsQueryFilter String
    The filter object for query usage.
    compartmentDepth number
    The compartment depth level.
    dateRangeName string
    The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    groupBies string[]
    Specifies what to aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    groupByTags GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQueryGroupByTag[]
    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
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    tenantId string
    Tenant ID.
    timeUsageEnded string
    The usage end time.
    timeUsageStarted string
    The usage start time.
    usageCarbonEmissionsQueryFilter string
    The filter object for query usage.
    compartment_depth int
    The compartment depth level.
    date_range_name str
    The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    group_bies Sequence[str]
    Specifies what to aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
    group_by_tags Sequence[meteringcomputation.GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQueryGroupByTag]
    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
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    tenant_id str
    Tenant ID.
    time_usage_ended str
    The usage end time.
    time_usage_started str
    The usage start time.
    usage_carbon_emissions_query_filter str
    The filter object for query usage.
    compartmentDepth Number
    The compartment depth level.
    dateRangeName String
    The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    groupBies List<String>
    Specifies what to aggregate the result by. For 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
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    tenantId String
    Tenant ID.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    The usage start time.
    usageCarbonEmissionsQueryFilter String
    The filter object for query usage.

    GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQueryGroupByTag

    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.17.0 published on Friday, Nov 15, 2024 by Pulumi