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

oci.MeteringComputation.UsageCarbonEmissionsQuery

Explore with Pulumi AI

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

    This resource provides the Usage Carbon Emissions Query resource in Oracle Cloud Infrastructure Metering Computation service.

    Returns the created usage carbon emissions query.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testUsageCarbonEmissionsQuery = new oci.meteringcomputation.UsageCarbonEmissionsQuery("test_usage_carbon_emissions_query", {
        compartmentId: compartmentId,
        queryDefinition: {
            costAnalysisUi: {
                graph: usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiGraph,
                isCumulativeGraph: usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiIsCumulativeGraph,
            },
            displayName: usageCarbonEmissionsQueryQueryDefinitionDisplayName,
            reportQuery: {
                tenantId: testTenant.id,
                compartmentDepth: usageCarbonEmissionsQueryQueryDefinitionReportQueryCompartmentDepth,
                dateRangeName: usageCarbonEmissionsQueryQueryDefinitionReportQueryDateRangeName,
                groupBies: usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupBy,
                groupByTags: [{
                    key: usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagKey,
                    namespace: usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagNamespace,
                    value: usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagValue,
                }],
                isAggregateByTime: usageCarbonEmissionsQueryQueryDefinitionReportQueryIsAggregateByTime,
                timeUsageEnded: usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageEnded,
                timeUsageStarted: usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageStarted,
                usageCarbonEmissionsQueryFilter: usageCarbonEmissionsQueryQueryDefinitionReportQueryUsageCarbonEmissionsQueryFilter,
            },
            version: usageCarbonEmissionsQueryQueryDefinitionVersion,
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_usage_carbon_emissions_query = oci.metering_computation.UsageCarbonEmissionsQuery("test_usage_carbon_emissions_query",
        compartment_id=compartment_id,
        query_definition={
            "cost_analysis_ui": {
                "graph": usage_carbon_emissions_query_query_definition_cost_analysis_ui_graph,
                "is_cumulative_graph": usage_carbon_emissions_query_query_definition_cost_analysis_ui_is_cumulative_graph,
            },
            "display_name": usage_carbon_emissions_query_query_definition_display_name,
            "report_query": {
                "tenant_id": test_tenant["id"],
                "compartment_depth": usage_carbon_emissions_query_query_definition_report_query_compartment_depth,
                "date_range_name": usage_carbon_emissions_query_query_definition_report_query_date_range_name,
                "group_bies": usage_carbon_emissions_query_query_definition_report_query_group_by,
                "group_by_tags": [{
                    "key": usage_carbon_emissions_query_query_definition_report_query_group_by_tag_key,
                    "namespace": usage_carbon_emissions_query_query_definition_report_query_group_by_tag_namespace,
                    "value": usage_carbon_emissions_query_query_definition_report_query_group_by_tag_value,
                }],
                "is_aggregate_by_time": usage_carbon_emissions_query_query_definition_report_query_is_aggregate_by_time,
                "time_usage_ended": usage_carbon_emissions_query_query_definition_report_query_time_usage_ended,
                "time_usage_started": usage_carbon_emissions_query_query_definition_report_query_time_usage_started,
                "usage_carbon_emissions_query_filter": usage_carbon_emissions_query_query_definition_report_query_usage_carbon_emissions_query_filter,
            },
            "version": usage_carbon_emissions_query_query_definition_version,
        })
    
    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.NewUsageCarbonEmissionsQuery(ctx, "test_usage_carbon_emissions_query", &MeteringComputation.UsageCarbonEmissionsQueryArgs{
    			CompartmentId: pulumi.Any(compartmentId),
    			QueryDefinition: &meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionArgs{
    				CostAnalysisUi: &meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs{
    					Graph:             pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiGraph),
    					IsCumulativeGraph: pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiIsCumulativeGraph),
    				},
    				DisplayName: pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionDisplayName),
    				ReportQuery: &meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs{
    					TenantId:         pulumi.Any(testTenant.Id),
    					CompartmentDepth: pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryCompartmentDepth),
    					DateRangeName:    pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryDateRangeName),
    					GroupBies:        pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupBy),
    					GroupByTags: meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArray{
    						&meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs{
    							Key:       pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagKey),
    							Namespace: pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagNamespace),
    							Value:     pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagValue),
    						},
    					},
    					IsAggregateByTime:               pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryIsAggregateByTime),
    					TimeUsageEnded:                  pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageEnded),
    					TimeUsageStarted:                pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageStarted),
    					UsageCarbonEmissionsQueryFilter: pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionReportQueryUsageCarbonEmissionsQueryFilter),
    				},
    				Version: pulumi.Any(usageCarbonEmissionsQueryQueryDefinitionVersion),
    			},
    		})
    		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 testUsageCarbonEmissionsQuery = new Oci.MeteringComputation.UsageCarbonEmissionsQuery("test_usage_carbon_emissions_query", new()
        {
            CompartmentId = compartmentId,
            QueryDefinition = new Oci.MeteringComputation.Inputs.UsageCarbonEmissionsQueryQueryDefinitionArgs
            {
                CostAnalysisUi = new Oci.MeteringComputation.Inputs.UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs
                {
                    Graph = usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiGraph,
                    IsCumulativeGraph = usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiIsCumulativeGraph,
                },
                DisplayName = usageCarbonEmissionsQueryQueryDefinitionDisplayName,
                ReportQuery = new Oci.MeteringComputation.Inputs.UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs
                {
                    TenantId = testTenant.Id,
                    CompartmentDepth = usageCarbonEmissionsQueryQueryDefinitionReportQueryCompartmentDepth,
                    DateRangeName = usageCarbonEmissionsQueryQueryDefinitionReportQueryDateRangeName,
                    GroupBies = usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupBy,
                    GroupByTags = new[]
                    {
                        new Oci.MeteringComputation.Inputs.UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs
                        {
                            Key = usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagKey,
                            Namespace = usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagNamespace,
                            Value = usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagValue,
                        },
                    },
                    IsAggregateByTime = usageCarbonEmissionsQueryQueryDefinitionReportQueryIsAggregateByTime,
                    TimeUsageEnded = usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageEnded,
                    TimeUsageStarted = usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageStarted,
                    UsageCarbonEmissionsQueryFilter = usageCarbonEmissionsQueryQueryDefinitionReportQueryUsageCarbonEmissionsQueryFilter,
                },
                Version = usageCarbonEmissionsQueryQueryDefinitionVersion,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.MeteringComputation.UsageCarbonEmissionsQuery;
    import com.pulumi.oci.MeteringComputation.UsageCarbonEmissionsQueryArgs;
    import com.pulumi.oci.MeteringComputation.inputs.UsageCarbonEmissionsQueryQueryDefinitionArgs;
    import com.pulumi.oci.MeteringComputation.inputs.UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs;
    import com.pulumi.oci.MeteringComputation.inputs.UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs;
    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) {
            var testUsageCarbonEmissionsQuery = new UsageCarbonEmissionsQuery("testUsageCarbonEmissionsQuery", UsageCarbonEmissionsQueryArgs.builder()
                .compartmentId(compartmentId)
                .queryDefinition(UsageCarbonEmissionsQueryQueryDefinitionArgs.builder()
                    .costAnalysisUi(UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs.builder()
                        .graph(usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiGraph)
                        .isCumulativeGraph(usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiIsCumulativeGraph)
                        .build())
                    .displayName(usageCarbonEmissionsQueryQueryDefinitionDisplayName)
                    .reportQuery(UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs.builder()
                        .tenantId(testTenant.id())
                        .compartmentDepth(usageCarbonEmissionsQueryQueryDefinitionReportQueryCompartmentDepth)
                        .dateRangeName(usageCarbonEmissionsQueryQueryDefinitionReportQueryDateRangeName)
                        .groupBies(usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupBy)
                        .groupByTags(UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs.builder()
                            .key(usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagKey)
                            .namespace(usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagNamespace)
                            .value(usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagValue)
                            .build())
                        .isAggregateByTime(usageCarbonEmissionsQueryQueryDefinitionReportQueryIsAggregateByTime)
                        .timeUsageEnded(usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageEnded)
                        .timeUsageStarted(usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageStarted)
                        .usageCarbonEmissionsQueryFilter(usageCarbonEmissionsQueryQueryDefinitionReportQueryUsageCarbonEmissionsQueryFilter)
                        .build())
                    .version(usageCarbonEmissionsQueryQueryDefinitionVersion)
                    .build())
                .build());
    
        }
    }
    
    resources:
      testUsageCarbonEmissionsQuery:
        type: oci:MeteringComputation:UsageCarbonEmissionsQuery
        name: test_usage_carbon_emissions_query
        properties:
          compartmentId: ${compartmentId}
          queryDefinition:
            costAnalysisUi:
              graph: ${usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiGraph}
              isCumulativeGraph: ${usageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiIsCumulativeGraph}
            displayName: ${usageCarbonEmissionsQueryQueryDefinitionDisplayName}
            reportQuery:
              tenantId: ${testTenant.id}
              compartmentDepth: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryCompartmentDepth}
              dateRangeName: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryDateRangeName}
              groupBies: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupBy}
              groupByTags:
                - key: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagKey}
                  namespace: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagNamespace}
                  value: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagValue}
              isAggregateByTime: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryIsAggregateByTime}
              timeUsageEnded: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageEnded}
              timeUsageStarted: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryTimeUsageStarted}
              usageCarbonEmissionsQueryFilter: ${usageCarbonEmissionsQueryQueryDefinitionReportQueryUsageCarbonEmissionsQueryFilter}
            version: ${usageCarbonEmissionsQueryQueryDefinitionVersion}
    

    Create UsageCarbonEmissionsQuery Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new UsageCarbonEmissionsQuery(name: string, args: UsageCarbonEmissionsQueryArgs, opts?: CustomResourceOptions);
    @overload
    def UsageCarbonEmissionsQuery(resource_name: str,
                                  args: UsageCarbonEmissionsQueryArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def UsageCarbonEmissionsQuery(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  compartment_id: Optional[str] = None,
                                  query_definition: Optional[_meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionArgs] = None)
    func NewUsageCarbonEmissionsQuery(ctx *Context, name string, args UsageCarbonEmissionsQueryArgs, opts ...ResourceOption) (*UsageCarbonEmissionsQuery, error)
    public UsageCarbonEmissionsQuery(string name, UsageCarbonEmissionsQueryArgs args, CustomResourceOptions? opts = null)
    public UsageCarbonEmissionsQuery(String name, UsageCarbonEmissionsQueryArgs args)
    public UsageCarbonEmissionsQuery(String name, UsageCarbonEmissionsQueryArgs args, CustomResourceOptions options)
    
    type: oci:MeteringComputation:UsageCarbonEmissionsQuery
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args UsageCarbonEmissionsQueryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UsageCarbonEmissionsQueryArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UsageCarbonEmissionsQueryArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UsageCarbonEmissionsQueryArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UsageCarbonEmissionsQueryArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var usageCarbonEmissionsQueryResource = new Oci.MeteringComputation.UsageCarbonEmissionsQuery("usageCarbonEmissionsQueryResource", new()
    {
        CompartmentId = "string",
        QueryDefinition = new Oci.MeteringComputation.Inputs.UsageCarbonEmissionsQueryQueryDefinitionArgs
        {
            CostAnalysisUi = new Oci.MeteringComputation.Inputs.UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs
            {
                Graph = "string",
                IsCumulativeGraph = false,
            },
            DisplayName = "string",
            ReportQuery = new Oci.MeteringComputation.Inputs.UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs
            {
                TenantId = "string",
                CompartmentDepth = 0,
                DateRangeName = "string",
                GroupBies = new[]
                {
                    "string",
                },
                GroupByTags = new[]
                {
                    new Oci.MeteringComputation.Inputs.UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs
                    {
                        Key = "string",
                        Namespace = "string",
                        Value = "string",
                    },
                },
                IsAggregateByTime = false,
                TimeUsageEnded = "string",
                TimeUsageStarted = "string",
                UsageCarbonEmissionsQueryFilter = "string",
            },
            Version = 0,
        },
    });
    
    example, err := MeteringComputation.NewUsageCarbonEmissionsQuery(ctx, "usageCarbonEmissionsQueryResource", &MeteringComputation.UsageCarbonEmissionsQueryArgs{
    	CompartmentId: pulumi.String("string"),
    	QueryDefinition: &meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionArgs{
    		CostAnalysisUi: &meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs{
    			Graph:             pulumi.String("string"),
    			IsCumulativeGraph: pulumi.Bool(false),
    		},
    		DisplayName: pulumi.String("string"),
    		ReportQuery: &meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs{
    			TenantId:         pulumi.String("string"),
    			CompartmentDepth: pulumi.Int(0),
    			DateRangeName:    pulumi.String("string"),
    			GroupBies: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			GroupByTags: meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArray{
    				&meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs{
    					Key:       pulumi.String("string"),
    					Namespace: pulumi.String("string"),
    					Value:     pulumi.String("string"),
    				},
    			},
    			IsAggregateByTime:               pulumi.Bool(false),
    			TimeUsageEnded:                  pulumi.String("string"),
    			TimeUsageStarted:                pulumi.String("string"),
    			UsageCarbonEmissionsQueryFilter: pulumi.String("string"),
    		},
    		Version: pulumi.Int(0),
    	},
    })
    
    var usageCarbonEmissionsQueryResource = new UsageCarbonEmissionsQuery("usageCarbonEmissionsQueryResource", UsageCarbonEmissionsQueryArgs.builder()
        .compartmentId("string")
        .queryDefinition(UsageCarbonEmissionsQueryQueryDefinitionArgs.builder()
            .costAnalysisUi(UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs.builder()
                .graph("string")
                .isCumulativeGraph(false)
                .build())
            .displayName("string")
            .reportQuery(UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs.builder()
                .tenantId("string")
                .compartmentDepth(0)
                .dateRangeName("string")
                .groupBies("string")
                .groupByTags(UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs.builder()
                    .key("string")
                    .namespace("string")
                    .value("string")
                    .build())
                .isAggregateByTime(false)
                .timeUsageEnded("string")
                .timeUsageStarted("string")
                .usageCarbonEmissionsQueryFilter("string")
                .build())
            .version(0)
            .build())
        .build());
    
    usage_carbon_emissions_query_resource = oci.metering_computation.UsageCarbonEmissionsQuery("usageCarbonEmissionsQueryResource",
        compartment_id="string",
        query_definition=oci.metering_computation.UsageCarbonEmissionsQueryQueryDefinitionArgs(
            cost_analysis_ui=oci.metering_computation.UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs(
                graph="string",
                is_cumulative_graph=False,
            ),
            display_name="string",
            report_query=oci.metering_computation.UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs(
                tenant_id="string",
                compartment_depth=0,
                date_range_name="string",
                group_bies=["string"],
                group_by_tags=[oci.metering_computation.UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs(
                    key="string",
                    namespace="string",
                    value="string",
                )],
                is_aggregate_by_time=False,
                time_usage_ended="string",
                time_usage_started="string",
                usage_carbon_emissions_query_filter="string",
            ),
            version=0,
        ))
    
    const usageCarbonEmissionsQueryResource = new oci.meteringcomputation.UsageCarbonEmissionsQuery("usageCarbonEmissionsQueryResource", {
        compartmentId: "string",
        queryDefinition: {
            costAnalysisUi: {
                graph: "string",
                isCumulativeGraph: false,
            },
            displayName: "string",
            reportQuery: {
                tenantId: "string",
                compartmentDepth: 0,
                dateRangeName: "string",
                groupBies: ["string"],
                groupByTags: [{
                    key: "string",
                    namespace: "string",
                    value: "string",
                }],
                isAggregateByTime: false,
                timeUsageEnded: "string",
                timeUsageStarted: "string",
                usageCarbonEmissionsQueryFilter: "string",
            },
            version: 0,
        },
    });
    
    type: oci:MeteringComputation:UsageCarbonEmissionsQuery
    properties:
        compartmentId: string
        queryDefinition:
            costAnalysisUi:
                graph: string
                isCumulativeGraph: false
            displayName: string
            reportQuery:
                compartmentDepth: 0
                dateRangeName: string
                groupBies:
                    - string
                groupByTags:
                    - key: string
                      namespace: string
                      value: string
                isAggregateByTime: false
                tenantId: string
                timeUsageEnded: string
                timeUsageStarted: string
                usageCarbonEmissionsQueryFilter: string
            version: 0
    

    UsageCarbonEmissionsQuery Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The UsageCarbonEmissionsQuery resource accepts the following input properties:

    CompartmentId string
    The compartment OCID.
    QueryDefinition UsageCarbonEmissionsQueryQueryDefinition
    (Updatable) The common fields for queries.
    CompartmentId string
    The compartment OCID.
    QueryDefinition UsageCarbonEmissionsQueryQueryDefinitionArgs
    (Updatable) The common fields for queries.
    compartmentId String
    The compartment OCID.
    queryDefinition UsageCarbonEmissionsQueryQueryDefinition
    (Updatable) The common fields for queries.
    compartmentId string
    The compartment OCID.
    queryDefinition UsageCarbonEmissionsQueryQueryDefinition
    (Updatable) The common fields for queries.
    compartment_id str
    The compartment OCID.
    query_definition meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionArgs
    (Updatable) The common fields for queries.
    compartmentId String
    The compartment OCID.
    queryDefinition Property Map
    (Updatable) The common fields for queries.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UsageCarbonEmissionsQuery resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing UsageCarbonEmissionsQuery Resource

    Get an existing UsageCarbonEmissionsQuery resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: UsageCarbonEmissionsQueryState, opts?: CustomResourceOptions): UsageCarbonEmissionsQuery
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            query_definition: Optional[_meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionArgs] = None) -> UsageCarbonEmissionsQuery
    func GetUsageCarbonEmissionsQuery(ctx *Context, name string, id IDInput, state *UsageCarbonEmissionsQueryState, opts ...ResourceOption) (*UsageCarbonEmissionsQuery, error)
    public static UsageCarbonEmissionsQuery Get(string name, Input<string> id, UsageCarbonEmissionsQueryState? state, CustomResourceOptions? opts = null)
    public static UsageCarbonEmissionsQuery get(String name, Output<String> id, UsageCarbonEmissionsQueryState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CompartmentId string
    The compartment OCID.
    QueryDefinition UsageCarbonEmissionsQueryQueryDefinition
    (Updatable) The common fields for queries.
    CompartmentId string
    The compartment OCID.
    QueryDefinition UsageCarbonEmissionsQueryQueryDefinitionArgs
    (Updatable) The common fields for queries.
    compartmentId String
    The compartment OCID.
    queryDefinition UsageCarbonEmissionsQueryQueryDefinition
    (Updatable) The common fields for queries.
    compartmentId string
    The compartment OCID.
    queryDefinition UsageCarbonEmissionsQueryQueryDefinition
    (Updatable) The common fields for queries.
    compartment_id str
    The compartment OCID.
    query_definition meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionArgs
    (Updatable) The common fields for queries.
    compartmentId String
    The compartment OCID.
    queryDefinition Property Map
    (Updatable) The common fields for queries.

    Supporting Types

    UsageCarbonEmissionsQueryQueryDefinition, UsageCarbonEmissionsQueryQueryDefinitionArgs

    CostAnalysisUi UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUi
    (Updatable) The common fields for Cost Analysis UI rendering.
    DisplayName string
    (Updatable) The query display name. Avoid entering confidential information.
    ReportQuery UsageCarbonEmissionsQueryQueryDefinitionReportQuery
    (Updatable) The request of the generated usage carbon emissions report.
    Version int

    (Updatable) The saved query version.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    CostAnalysisUi UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUi
    (Updatable) The common fields for Cost Analysis UI rendering.
    DisplayName string
    (Updatable) The query display name. Avoid entering confidential information.
    ReportQuery UsageCarbonEmissionsQueryQueryDefinitionReportQuery
    (Updatable) The request of the generated usage carbon emissions report.
    Version int

    (Updatable) The saved query version.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    costAnalysisUi UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUi
    (Updatable) The common fields for Cost Analysis UI rendering.
    displayName String
    (Updatable) The query display name. Avoid entering confidential information.
    reportQuery UsageCarbonEmissionsQueryQueryDefinitionReportQuery
    (Updatable) The request of the generated usage carbon emissions report.
    version Integer

    (Updatable) The saved query version.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    costAnalysisUi UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUi
    (Updatable) The common fields for Cost Analysis UI rendering.
    displayName string
    (Updatable) The query display name. Avoid entering confidential information.
    reportQuery UsageCarbonEmissionsQueryQueryDefinitionReportQuery
    (Updatable) The request of the generated usage carbon emissions report.
    version number

    (Updatable) The saved query version.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    cost_analysis_ui meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUi
    (Updatable) The common fields for Cost Analysis UI rendering.
    display_name str
    (Updatable) The query display name. Avoid entering confidential information.
    report_query meteringcomputation.UsageCarbonEmissionsQueryQueryDefinitionReportQuery
    (Updatable) The request of the generated usage carbon emissions report.
    version int

    (Updatable) The saved query version.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    costAnalysisUi Property Map
    (Updatable) The common fields for Cost Analysis UI rendering.
    displayName String
    (Updatable) The query display name. Avoid entering confidential information.
    reportQuery Property Map
    (Updatable) The request of the generated usage carbon emissions report.
    version Number

    (Updatable) The saved query version.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUi, UsageCarbonEmissionsQueryQueryDefinitionCostAnalysisUiArgs

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

    UsageCarbonEmissionsQueryQueryDefinitionReportQuery, UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs

    TenantId string
    (Updatable) Tenant ID.
    CompartmentDepth int
    (Updatable) The compartment depth level.
    DateRangeName string
    (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    GroupBies List<string>
    (Updatable) 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<UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTag>
    (Updatable) 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
    (Updatable) Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    TimeUsageEnded string
    (Updatable) The usage end time.
    TimeUsageStarted string
    (Updatable) The usage start time.
    UsageCarbonEmissionsQueryFilter string
    (Updatable) The filter object for query usage.
    TenantId string
    (Updatable) Tenant ID.
    CompartmentDepth int
    (Updatable) The compartment depth level.
    DateRangeName string
    (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    GroupBies []string
    (Updatable) 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 []UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTag
    (Updatable) 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
    (Updatable) Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    TimeUsageEnded string
    (Updatable) The usage end time.
    TimeUsageStarted string
    (Updatable) The usage start time.
    UsageCarbonEmissionsQueryFilter string
    (Updatable) The filter object for query usage.
    tenantId String
    (Updatable) Tenant ID.
    compartmentDepth Integer
    (Updatable) The compartment depth level.
    dateRangeName String
    (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    groupBies List<String>
    (Updatable) 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<UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTag>
    (Updatable) 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
    (Updatable) Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    timeUsageEnded String
    (Updatable) The usage end time.
    timeUsageStarted String
    (Updatable) The usage start time.
    usageCarbonEmissionsQueryFilter String
    (Updatable) The filter object for query usage.
    tenantId string
    (Updatable) Tenant ID.
    compartmentDepth number
    (Updatable) The compartment depth level.
    dateRangeName string
    (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    groupBies string[]
    (Updatable) 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 UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTag[]
    (Updatable) 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
    (Updatable) Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    timeUsageEnded string
    (Updatable) The usage end time.
    timeUsageStarted string
    (Updatable) The usage start time.
    usageCarbonEmissionsQueryFilter string
    (Updatable) The filter object for query usage.
    tenant_id str
    (Updatable) Tenant ID.
    compartment_depth int
    (Updatable) The compartment depth level.
    date_range_name str
    (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    group_bies Sequence[str]
    (Updatable) 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.UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTag]
    (Updatable) 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
    (Updatable) Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    time_usage_ended str
    (Updatable) The usage end time.
    time_usage_started str
    (Updatable) The usage start time.
    usage_carbon_emissions_query_filter str
    (Updatable) The filter object for query usage.
    tenantId String
    (Updatable) Tenant ID.
    compartmentDepth Number
    (Updatable) The compartment depth level.
    dateRangeName String
    (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
    groupBies List<String>
    (Updatable) 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>
    (Updatable) 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
    (Updatable) Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up.
    timeUsageEnded String
    (Updatable) The usage end time.
    timeUsageStarted String
    (Updatable) The usage start time.
    usageCarbonEmissionsQueryFilter String
    (Updatable) The filter object for query usage.

    UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTag, UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs

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

    Import

    UsageCarbonEmissionsQueries can be imported using the id, e.g.

    $ pulumi import oci:MeteringComputation/usageCarbonEmissionsQuery:UsageCarbonEmissionsQuery test_usage_carbon_emissions_query "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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