Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.MeteringComputation.getUsageCarbonEmissionsQueries
Explore with Pulumi AI
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:
- Compartment
Id string - The compartment ID in which to list resources.
- Filters
List<Get
Usage Carbon Emissions Queries Filter>
- Compartment
Id string - The compartment ID in which to list resources.
- Filters
[]Get
Usage Carbon Emissions Queries Filter
- compartment
Id String - The compartment ID in which to list resources.
- filters
List<Get
Usage Carbon Emissions Queries Filter>
- compartment
Id string - The compartment ID in which to list resources.
- filters
Get
Usage Carbon Emissions Queries Filter[]
- compartment_
id str - The compartment ID in which to list resources.
- filters
Sequence[meteringcomputation.
Get Usage Carbon Emissions Queries Filter]
- compartment
Id String - The compartment ID in which to list resources.
- filters List<Property Map>
getUsageCarbonEmissionsQueries Result
The following output properties are available:
- Compartment
Id string - The compartment OCID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Usage
Carbon List<GetEmissions Query Collections Usage Carbon Emissions Queries Usage Carbon Emissions Query Collection> - The list of usage_carbon_emissions_query_collection.
- Filters
List<Get
Usage Carbon Emissions Queries Filter>
- Compartment
Id string - The compartment OCID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Usage
Carbon []GetEmissions Query Collections Usage Carbon Emissions Queries Usage Carbon Emissions Query Collection - The list of usage_carbon_emissions_query_collection.
- Filters
[]Get
Usage Carbon Emissions Queries Filter
- compartment
Id String - The compartment OCID.
- id String
- The provider-assigned unique ID for this managed resource.
- usage
Carbon List<GetEmissions Query Collections Usage Carbon Emissions Queries Usage Carbon Emissions Query Collection> - The list of usage_carbon_emissions_query_collection.
- filters
List<Get
Usage Carbon Emissions Queries Filter>
- compartment
Id string - The compartment OCID.
- id string
- The provider-assigned unique ID for this managed resource.
- usage
Carbon GetEmissions Query Collections Usage Carbon Emissions Queries Usage Carbon Emissions Query Collection[] - The list of usage_carbon_emissions_query_collection.
- filters
Get
Usage Carbon Emissions Queries Filter[]
- compartment_
id str - The compartment OCID.
- id str
- The provider-assigned unique ID for this managed resource.
- usage_
carbon_ Sequence[meteringcomputation.emissions_ query_ collections Get Usage Carbon Emissions Queries Usage Carbon Emissions Query Collection] - The list of usage_carbon_emissions_query_collection.
- filters
Sequence[meteringcomputation.
Get Usage Carbon Emissions Queries Filter]
- compartment
Id String - The compartment OCID.
- id String
- The provider-assigned unique ID for this managed resource.
- usage
Carbon List<Property Map>Emissions Query Collections - The list of usage_carbon_emissions_query_collection.
- filters List<Property Map>
Supporting Types
GetUsageCarbonEmissionsQueriesFilter
GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollection
GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItem
- Compartment
Id string - The compartment ID in which to list resources.
- Id string
- The query OCID.
- Query
Definitions List<GetUsage Carbon Emissions Queries Usage Carbon Emissions 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 []GetUsage Carbon Emissions Queries Usage Carbon Emissions 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<GetUsage Carbon Emissions Queries Usage Carbon Emissions 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 GetUsage Carbon Emissions Queries Usage Carbon Emissions 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 Usage Carbon Emissions Queries Usage Carbon Emissions 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.
GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinition
- Cost
Analysis List<GetUis Usage Carbon Emissions Queries Usage Carbon Emissions 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<GetUsage Carbon Emissions Queries Usage Carbon Emissions Query Collection Item Query Definition Report Query> - The request of the generated usage carbon emissions report.
- Version int
- The saved query version.
- Cost
Analysis []GetUis Usage Carbon Emissions Queries Usage Carbon Emissions 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 []GetUsage Carbon Emissions Queries Usage Carbon Emissions Query Collection Item Query Definition Report Query - The request of the generated usage carbon emissions report.
- Version int
- The saved query version.
- cost
Analysis List<GetUis Usage Carbon Emissions Queries Usage Carbon Emissions 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<GetUsage Carbon Emissions Queries Usage Carbon Emissions Query Collection Item Query Definition Report Query> - The request of the generated usage carbon emissions report.
- version Integer
- The saved query version.
- cost
Analysis GetUis Usage Carbon Emissions Queries Usage Carbon Emissions 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 GetUsage Carbon Emissions Queries Usage Carbon Emissions Query Collection Item Query Definition Report Query[] - The request of the generated usage carbon emissions report.
- version number
- The saved query version.
- cost_
analysis_ Sequence[meteringcomputation.uis Get Usage Carbon Emissions Queries Usage Carbon Emissions 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 Usage Carbon Emissions Queries Usage Carbon Emissions Query Collection Item Query Definition Report Query] - The request of the generated usage carbon emissions report.
- version int
- 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 usage carbon emissions report.
- version Number
- The saved query version.
GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionCostAnalysisUi
- 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.
GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQuery
- Compartment
Depth int - The compartment depth level.
- Date
Range stringName - The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- Group
Bies 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"]
- List<Get
Usage Carbon Emissions Queries Usage Carbon Emissions 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 - Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- Usage
Carbon stringEmissions Query Filter - The filter object for query usage.
- Compartment
Depth int - The compartment depth level.
- Date
Range stringName - The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- Group
Bies []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"]
- []Get
Usage Carbon Emissions Queries Usage Carbon Emissions 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 - Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- Usage
Carbon stringEmissions Query Filter - The filter object for query usage.
- compartment
Depth Integer - The compartment depth level.
- date
Range StringName - The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- group
Bies 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"]
- List<Get
Usage Carbon Emissions Queries Usage Carbon Emissions 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 - Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
- usage
Carbon StringEmissions Query Filter - The filter object for query usage.
- compartment
Depth number - The compartment depth level.
- date
Range stringName - The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- group
Bies 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"]
- Get
Usage Carbon Emissions Queries Usage Carbon Emissions 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 - Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
- tenant
Id string - Tenant ID.
- time
Usage stringEnded - The usage end time.
- time
Usage stringStarted - The usage start time.
- usage
Carbon stringEmissions Query Filter - The filter object for query usage.
- compartment_
depth int - The compartment depth level.
- date_
range_ strname - 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"]
- Sequence[meteringcomputation.
Get Usage Carbon Emissions Queries Usage Carbon Emissions 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 - 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_ strended - The usage end time.
- time_
usage_ strstarted - The usage start time.
- usage_
carbon_ stremissions_ query_ filter - The filter object for query usage.
- compartment
Depth Number - The compartment depth level.
- date
Range StringName - The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- group
Bies 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"]
- 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 - Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
- usage
Carbon StringEmissions Query Filter - The filter object for query usage.
GetUsageCarbonEmissionsQueriesUsageCarbonEmissionsQueryCollectionItemQueryDefinitionReportQueryGroupByTag
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.