oci.MeteringComputation.UsageCarbonEmissionsQuery
Explore with Pulumi AI
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:
- Compartment
Id string - The compartment OCID.
- Query
Definition UsageCarbon Emissions Query Query Definition - (Updatable) The common fields for queries.
- Compartment
Id string - The compartment OCID.
- Query
Definition UsageCarbon Emissions Query Query Definition Args - (Updatable) The common fields for queries.
- compartment
Id String - The compartment OCID.
- query
Definition UsageCarbon Emissions Query Query Definition - (Updatable) The common fields for queries.
- compartment
Id string - The compartment OCID.
- query
Definition UsageCarbon Emissions Query Query Definition - (Updatable) The common fields for queries.
- compartment_
id str - The compartment OCID.
- query_
definition meteringcomputation.Usage Carbon Emissions Query Query Definition Args - (Updatable) The common fields for queries.
- compartment
Id String - The compartment OCID.
- query
Definition 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.
- Compartment
Id string - The compartment OCID.
- Query
Definition UsageCarbon Emissions Query Query Definition - (Updatable) The common fields for queries.
- Compartment
Id string - The compartment OCID.
- Query
Definition UsageCarbon Emissions Query Query Definition Args - (Updatable) The common fields for queries.
- compartment
Id String - The compartment OCID.
- query
Definition UsageCarbon Emissions Query Query Definition - (Updatable) The common fields for queries.
- compartment
Id string - The compartment OCID.
- query
Definition UsageCarbon Emissions Query Query Definition - (Updatable) The common fields for queries.
- compartment_
id str - The compartment OCID.
- query_
definition meteringcomputation.Usage Carbon Emissions Query Query Definition Args - (Updatable) The common fields for queries.
- compartment
Id String - The compartment OCID.
- query
Definition Property Map - (Updatable) The common fields for queries.
Supporting Types
UsageCarbonEmissionsQueryQueryDefinition, UsageCarbonEmissionsQueryQueryDefinitionArgs
- Cost
Analysis UsageUi Carbon Emissions Query Query Definition Cost Analysis Ui - (Updatable) The common fields for Cost Analysis UI rendering.
- Display
Name string - (Updatable) The query display name. Avoid entering confidential information.
- Report
Query UsageCarbon Emissions Query Query Definition Report Query - (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
- Cost
Analysis UsageUi Carbon Emissions Query Query Definition Cost Analysis Ui - (Updatable) The common fields for Cost Analysis UI rendering.
- Display
Name string - (Updatable) The query display name. Avoid entering confidential information.
- Report
Query UsageCarbon Emissions Query Query Definition Report Query - (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
- cost
Analysis UsageUi Carbon Emissions Query Query Definition Cost Analysis Ui - (Updatable) The common fields for Cost Analysis UI rendering.
- display
Name String - (Updatable) The query display name. Avoid entering confidential information.
- report
Query UsageCarbon Emissions Query Query Definition Report Query - (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
- cost
Analysis UsageUi Carbon Emissions Query Query Definition Cost Analysis Ui - (Updatable) The common fields for Cost Analysis UI rendering.
- display
Name string - (Updatable) The query display name. Avoid entering confidential information.
- report
Query UsageCarbon Emissions Query Query Definition Report Query - (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_ meteringcomputation.ui Usage Carbon Emissions Query Query Definition Cost Analysis Ui - (Updatable) The common fields for Cost Analysis UI rendering.
- display_
name str - (Updatable) The query display name. Avoid entering confidential information.
- report_
query meteringcomputation.Usage Carbon Emissions Query Query Definition Report Query - (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
- cost
Analysis Property MapUi - (Updatable) The common fields for Cost Analysis UI rendering.
- display
Name String - (Updatable) The query display name. Avoid entering confidential information.
- report
Query 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.
- Is
Cumulative boolGraph - (Updatable) A cumulative graph.
- Graph string
- (Updatable) The graph type.
- Is
Cumulative boolGraph - (Updatable) A cumulative graph.
- graph String
- (Updatable) The graph type.
- is
Cumulative BooleanGraph - (Updatable) A cumulative graph.
- graph string
- (Updatable) The graph type.
- is
Cumulative booleanGraph - (Updatable) A cumulative graph.
- graph str
- (Updatable) The graph type.
- is_
cumulative_ boolgraph - (Updatable) A cumulative graph.
- graph String
- (Updatable) The graph type.
- is
Cumulative BooleanGraph - (Updatable) A cumulative graph.
UsageCarbonEmissionsQueryQueryDefinitionReportQuery, UsageCarbonEmissionsQueryQueryDefinitionReportQueryArgs
- Tenant
Id string - (Updatable) Tenant ID.
- Compartment
Depth int - (Updatable) The compartment depth level.
- Date
Range stringName - (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- Group
Bies 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"]
- List<Usage
Carbon Emissions Query Query Definition Report Query Group By Tag> - (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 boolBy Time - (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 stringEnded - (Updatable) The usage end time.
- Time
Usage stringStarted - (Updatable) The usage start time.
- Usage
Carbon stringEmissions Query Filter - (Updatable) The filter object for query usage.
- Tenant
Id string - (Updatable) Tenant ID.
- Compartment
Depth int - (Updatable) The compartment depth level.
- Date
Range stringName - (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- Group
Bies []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"]
- []Usage
Carbon Emissions Query Query Definition Report Query Group By Tag - (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 boolBy Time - (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 stringEnded - (Updatable) The usage end time.
- Time
Usage stringStarted - (Updatable) The usage start time.
- Usage
Carbon stringEmissions Query Filter - (Updatable) The filter object for query usage.
- tenant
Id String - (Updatable) Tenant ID.
- compartment
Depth Integer - (Updatable) The compartment depth level.
- date
Range StringName - (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- group
Bies 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"]
- List<Usage
Carbon Emissions Query Query Definition Report Query Group By Tag> - (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 BooleanBy Time - (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 StringEnded - (Updatable) The usage end time.
- time
Usage StringStarted - (Updatable) The usage start time.
- usage
Carbon StringEmissions Query Filter - (Updatable) The filter object for query usage.
- tenant
Id string - (Updatable) Tenant ID.
- compartment
Depth number - (Updatable) The compartment depth level.
- date
Range stringName - (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- group
Bies 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"]
- Usage
Carbon Emissions Query Query Definition Report Query Group By Tag[] - (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 booleanBy Time - (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 stringEnded - (Updatable) The usage end time.
- time
Usage stringStarted - (Updatable) The usage start time.
- usage
Carbon stringEmissions Query Filter - (Updatable) The filter object for query usage.
- tenant_
id str - (Updatable) Tenant ID.
- compartment_
depth int - (Updatable) The compartment depth level.
- date_
range_ strname - (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"]
- Sequence[meteringcomputation.
Usage Carbon Emissions Query Query Definition Report Query Group By Tag] - (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_ boolby_ time - (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_ strended - (Updatable) The usage end time.
- time_
usage_ strstarted - (Updatable) The usage start time.
- usage_
carbon_ stremissions_ query_ filter - (Updatable) The filter object for query usage.
- tenant
Id String - (Updatable) Tenant ID.
- compartment
Depth Number - (Updatable) The compartment depth level.
- date
Range StringName - (Updatable) The UI date range, for example, LAST_THREE_MONTHS. It will override timeUsageStarted and timeUsageEnded properties.
- group
Bies 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"]
- 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"]
- is
Aggregate BooleanBy Time - (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 StringEnded - (Updatable) The usage end time.
- time
Usage StringStarted - (Updatable) The usage start time.
- usage
Carbon StringEmissions Query Filter - (Updatable) The filter object for query usage.
UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTag, UsageCarbonEmissionsQueryQueryDefinitionReportQueryGroupByTagArgs
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.