oci.MeteringComputation.UsageCarbonEmission
Explore with Pulumi AI
This resource provides the Usage Carbon Emission resource in Oracle Cloud Infrastructure Metering Computation service.
Returns usage carbon emission for the given account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testUsageCarbonEmission = new oci.meteringcomputation.UsageCarbonEmission("test_usage_carbon_emission", {
    tenantId: testTenant.id,
    timeUsageEnded: usageCarbonEmissionTimeUsageEnded,
    timeUsageStarted: usageCarbonEmissionTimeUsageStarted,
    compartmentDepth: usageCarbonEmissionCompartmentDepth,
    groupBies: usageCarbonEmissionGroupBy,
    groupByTags: [{
        key: usageCarbonEmissionGroupByTagKey,
        namespace: usageCarbonEmissionGroupByTagNamespace,
        value: usageCarbonEmissionGroupByTagValue,
    }],
    isAggregateByTime: usageCarbonEmissionIsAggregateByTime,
    usageCarbonEmissionFilter: usageCarbonEmissionUsageCarbonEmissionFilter,
});
import pulumi
import pulumi_oci as oci
test_usage_carbon_emission = oci.metering_computation.UsageCarbonEmission("test_usage_carbon_emission",
    tenant_id=test_tenant["id"],
    time_usage_ended=usage_carbon_emission_time_usage_ended,
    time_usage_started=usage_carbon_emission_time_usage_started,
    compartment_depth=usage_carbon_emission_compartment_depth,
    group_bies=usage_carbon_emission_group_by,
    group_by_tags=[{
        "key": usage_carbon_emission_group_by_tag_key,
        "namespace": usage_carbon_emission_group_by_tag_namespace,
        "value": usage_carbon_emission_group_by_tag_value,
    }],
    is_aggregate_by_time=usage_carbon_emission_is_aggregate_by_time,
    usage_carbon_emission_filter=usage_carbon_emission_usage_carbon_emission_filter)
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.NewUsageCarbonEmission(ctx, "test_usage_carbon_emission", &meteringcomputation.UsageCarbonEmissionArgs{
			TenantId:         pulumi.Any(testTenant.Id),
			TimeUsageEnded:   pulumi.Any(usageCarbonEmissionTimeUsageEnded),
			TimeUsageStarted: pulumi.Any(usageCarbonEmissionTimeUsageStarted),
			CompartmentDepth: pulumi.Any(usageCarbonEmissionCompartmentDepth),
			GroupBies:        pulumi.Any(usageCarbonEmissionGroupBy),
			GroupByTags: meteringcomputation.UsageCarbonEmissionGroupByTagArray{
				&meteringcomputation.UsageCarbonEmissionGroupByTagArgs{
					Key:       pulumi.Any(usageCarbonEmissionGroupByTagKey),
					Namespace: pulumi.Any(usageCarbonEmissionGroupByTagNamespace),
					Value:     pulumi.Any(usageCarbonEmissionGroupByTagValue),
				},
			},
			IsAggregateByTime:         pulumi.Any(usageCarbonEmissionIsAggregateByTime),
			UsageCarbonEmissionFilter: pulumi.Any(usageCarbonEmissionUsageCarbonEmissionFilter),
		})
		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 testUsageCarbonEmission = new Oci.MeteringComputation.UsageCarbonEmission("test_usage_carbon_emission", new()
    {
        TenantId = testTenant.Id,
        TimeUsageEnded = usageCarbonEmissionTimeUsageEnded,
        TimeUsageStarted = usageCarbonEmissionTimeUsageStarted,
        CompartmentDepth = usageCarbonEmissionCompartmentDepth,
        GroupBies = usageCarbonEmissionGroupBy,
        GroupByTags = new[]
        {
            new Oci.MeteringComputation.Inputs.UsageCarbonEmissionGroupByTagArgs
            {
                Key = usageCarbonEmissionGroupByTagKey,
                Namespace = usageCarbonEmissionGroupByTagNamespace,
                Value = usageCarbonEmissionGroupByTagValue,
            },
        },
        IsAggregateByTime = usageCarbonEmissionIsAggregateByTime,
        UsageCarbonEmissionFilter = usageCarbonEmissionUsageCarbonEmissionFilter,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.MeteringComputation.UsageCarbonEmission;
import com.pulumi.oci.MeteringComputation.UsageCarbonEmissionArgs;
import com.pulumi.oci.MeteringComputation.inputs.UsageCarbonEmissionGroupByTagArgs;
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 testUsageCarbonEmission = new UsageCarbonEmission("testUsageCarbonEmission", UsageCarbonEmissionArgs.builder()
            .tenantId(testTenant.id())
            .timeUsageEnded(usageCarbonEmissionTimeUsageEnded)
            .timeUsageStarted(usageCarbonEmissionTimeUsageStarted)
            .compartmentDepth(usageCarbonEmissionCompartmentDepth)
            .groupBies(usageCarbonEmissionGroupBy)
            .groupByTags(UsageCarbonEmissionGroupByTagArgs.builder()
                .key(usageCarbonEmissionGroupByTagKey)
                .namespace(usageCarbonEmissionGroupByTagNamespace)
                .value(usageCarbonEmissionGroupByTagValue)
                .build())
            .isAggregateByTime(usageCarbonEmissionIsAggregateByTime)
            .usageCarbonEmissionFilter(usageCarbonEmissionUsageCarbonEmissionFilter)
            .build());
    }
}
resources:
  testUsageCarbonEmission:
    type: oci:MeteringComputation:UsageCarbonEmission
    name: test_usage_carbon_emission
    properties:
      tenantId: ${testTenant.id}
      timeUsageEnded: ${usageCarbonEmissionTimeUsageEnded}
      timeUsageStarted: ${usageCarbonEmissionTimeUsageStarted}
      compartmentDepth: ${usageCarbonEmissionCompartmentDepth}
      groupBies: ${usageCarbonEmissionGroupBy}
      groupByTags:
        - key: ${usageCarbonEmissionGroupByTagKey}
          namespace: ${usageCarbonEmissionGroupByTagNamespace}
          value: ${usageCarbonEmissionGroupByTagValue}
      isAggregateByTime: ${usageCarbonEmissionIsAggregateByTime}
      usageCarbonEmissionFilter: ${usageCarbonEmissionUsageCarbonEmissionFilter}
Create UsageCarbonEmission Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UsageCarbonEmission(name: string, args: UsageCarbonEmissionArgs, opts?: CustomResourceOptions);@overload
def UsageCarbonEmission(resource_name: str,
                        args: UsageCarbonEmissionArgs,
                        opts: Optional[ResourceOptions] = None)
@overload
def UsageCarbonEmission(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        tenant_id: Optional[str] = None,
                        time_usage_ended: Optional[str] = None,
                        time_usage_started: Optional[str] = None,
                        compartment_depth: Optional[int] = None,
                        group_bies: Optional[Sequence[str]] = None,
                        group_by_tags: Optional[Sequence[UsageCarbonEmissionGroupByTagArgs]] = None,
                        is_aggregate_by_time: Optional[bool] = None,
                        usage_carbon_emission_filter: Optional[str] = None)func NewUsageCarbonEmission(ctx *Context, name string, args UsageCarbonEmissionArgs, opts ...ResourceOption) (*UsageCarbonEmission, error)public UsageCarbonEmission(string name, UsageCarbonEmissionArgs args, CustomResourceOptions? opts = null)
public UsageCarbonEmission(String name, UsageCarbonEmissionArgs args)
public UsageCarbonEmission(String name, UsageCarbonEmissionArgs args, CustomResourceOptions options)
type: oci:MeteringComputation:UsageCarbonEmission
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 UsageCarbonEmissionArgs
- 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 UsageCarbonEmissionArgs
- 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 UsageCarbonEmissionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UsageCarbonEmissionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UsageCarbonEmissionArgs
- 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 usageCarbonEmissionResource = new Oci.MeteringComputation.UsageCarbonEmission("usageCarbonEmissionResource", new()
{
    TenantId = "string",
    TimeUsageEnded = "string",
    TimeUsageStarted = "string",
    CompartmentDepth = 0,
    GroupBies = new[]
    {
        "string",
    },
    GroupByTags = new[]
    {
        new Oci.MeteringComputation.Inputs.UsageCarbonEmissionGroupByTagArgs
        {
            Key = "string",
            Namespace = "string",
            Value = "string",
        },
    },
    IsAggregateByTime = false,
    UsageCarbonEmissionFilter = "string",
});
example, err := meteringcomputation.NewUsageCarbonEmission(ctx, "usageCarbonEmissionResource", &meteringcomputation.UsageCarbonEmissionArgs{
	TenantId:         pulumi.String("string"),
	TimeUsageEnded:   pulumi.String("string"),
	TimeUsageStarted: pulumi.String("string"),
	CompartmentDepth: pulumi.Int(0),
	GroupBies: pulumi.StringArray{
		pulumi.String("string"),
	},
	GroupByTags: meteringcomputation.UsageCarbonEmissionGroupByTagArray{
		&meteringcomputation.UsageCarbonEmissionGroupByTagArgs{
			Key:       pulumi.String("string"),
			Namespace: pulumi.String("string"),
			Value:     pulumi.String("string"),
		},
	},
	IsAggregateByTime:         pulumi.Bool(false),
	UsageCarbonEmissionFilter: pulumi.String("string"),
})
var usageCarbonEmissionResource = new UsageCarbonEmission("usageCarbonEmissionResource", UsageCarbonEmissionArgs.builder()
    .tenantId("string")
    .timeUsageEnded("string")
    .timeUsageStarted("string")
    .compartmentDepth(0)
    .groupBies("string")
    .groupByTags(UsageCarbonEmissionGroupByTagArgs.builder()
        .key("string")
        .namespace("string")
        .value("string")
        .build())
    .isAggregateByTime(false)
    .usageCarbonEmissionFilter("string")
    .build());
usage_carbon_emission_resource = oci.metering_computation.UsageCarbonEmission("usageCarbonEmissionResource",
    tenant_id="string",
    time_usage_ended="string",
    time_usage_started="string",
    compartment_depth=0,
    group_bies=["string"],
    group_by_tags=[{
        "key": "string",
        "namespace": "string",
        "value": "string",
    }],
    is_aggregate_by_time=False,
    usage_carbon_emission_filter="string")
const usageCarbonEmissionResource = new oci.meteringcomputation.UsageCarbonEmission("usageCarbonEmissionResource", {
    tenantId: "string",
    timeUsageEnded: "string",
    timeUsageStarted: "string",
    compartmentDepth: 0,
    groupBies: ["string"],
    groupByTags: [{
        key: "string",
        namespace: "string",
        value: "string",
    }],
    isAggregateByTime: false,
    usageCarbonEmissionFilter: "string",
});
type: oci:MeteringComputation:UsageCarbonEmission
properties:
    compartmentDepth: 0
    groupBies:
        - string
    groupByTags:
        - key: string
          namespace: string
          value: string
    isAggregateByTime: false
    tenantId: string
    timeUsageEnded: string
    timeUsageStarted: string
    usageCarbonEmissionFilter: string
UsageCarbonEmission Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The UsageCarbonEmission resource accepts the following input properties:
- TenantId string
- Tenant ID.
- TimeUsage stringEnded 
- The usage end time.
- TimeUsage stringStarted 
- The usage start time.
- CompartmentDepth int
- The compartment depth level.
- GroupBies List<string>
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
List<UsageCarbon Emission 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"]
- IsAggregate boolBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- UsageCarbon stringEmission Filter 
- The filter object for query usage. - ** 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 
- TenantId string
- Tenant ID.
- TimeUsage stringEnded 
- The usage end time.
- TimeUsage stringStarted 
- The usage start time.
- CompartmentDepth int
- The compartment depth level.
- GroupBies []string
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
[]UsageCarbon Emission Group By Tag Args 
- 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"]
- IsAggregate boolBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- UsageCarbon stringEmission Filter 
- The filter object for query usage. - ** 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 
- tenantId String
- Tenant ID.
- timeUsage StringEnded 
- The usage end time.
- timeUsage StringStarted 
- The usage start time.
- compartmentDepth Integer
- The compartment depth level.
- groupBies List<String>
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
List<UsageCarbon Emission 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"]
- isAggregate BooleanBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- usageCarbon StringEmission Filter 
- The filter object for query usage. - ** 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 
- tenantId string
- Tenant ID.
- timeUsage stringEnded 
- The usage end time.
- timeUsage stringStarted 
- The usage start time.
- compartmentDepth number
- The compartment depth level.
- groupBies string[]
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
UsageCarbon Emission 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"]
- isAggregate booleanBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- usageCarbon stringEmission Filter 
- The filter object for query usage. - ** 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 
- tenant_id str
- Tenant ID.
- time_usage_ strended 
- The usage end time.
- time_usage_ strstarted 
- The usage start time.
- compartment_depth int
- The compartment depth level.
- group_bies Sequence[str]
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
Sequence[UsageCarbon Emission Group By Tag Args] 
- 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 carbon emissions over the query time period will be added up.
- usage_carbon_ stremission_ filter 
- The filter object for query usage. - ** 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 
- tenantId String
- Tenant ID.
- timeUsage StringEnded 
- The usage end time.
- timeUsage StringStarted 
- The usage start time.
- compartmentDepth Number
- The compartment depth level.
- groupBies List<String>
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 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"]
- isAggregate BooleanBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- usageCarbon StringEmission Filter 
- The filter object for query usage. - ** 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 
Outputs
All input properties are implicitly available as output properties. Additionally, the UsageCarbonEmission resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<UsageCarbon Emission Item> 
- A list of usage carbon emission items.
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]UsageCarbon Emission Item 
- A list of usage carbon emission items.
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<UsageCarbon Emission Item> 
- A list of usage carbon emission items.
- id string
- The provider-assigned unique ID for this managed resource.
- items
UsageCarbon Emission Item[] 
- A list of usage carbon emission items.
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[UsageCarbon Emission Item] 
- A list of usage carbon emission items.
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- A list of usage carbon emission items.
Look up Existing UsageCarbonEmission Resource
Get an existing UsageCarbonEmission 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?: UsageCarbonEmissionState, opts?: CustomResourceOptions): UsageCarbonEmission@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_depth: Optional[int] = None,
        group_bies: Optional[Sequence[str]] = None,
        group_by_tags: Optional[Sequence[UsageCarbonEmissionGroupByTagArgs]] = None,
        is_aggregate_by_time: Optional[bool] = None,
        items: Optional[Sequence[UsageCarbonEmissionItemArgs]] = None,
        tenant_id: Optional[str] = None,
        time_usage_ended: Optional[str] = None,
        time_usage_started: Optional[str] = None,
        usage_carbon_emission_filter: Optional[str] = None) -> UsageCarbonEmissionfunc GetUsageCarbonEmission(ctx *Context, name string, id IDInput, state *UsageCarbonEmissionState, opts ...ResourceOption) (*UsageCarbonEmission, error)public static UsageCarbonEmission Get(string name, Input<string> id, UsageCarbonEmissionState? state, CustomResourceOptions? opts = null)public static UsageCarbonEmission get(String name, Output<String> id, UsageCarbonEmissionState state, CustomResourceOptions options)resources:  _:    type: oci:MeteringComputation:UsageCarbonEmission    get:      id: ${id}- 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.
- CompartmentDepth int
- The compartment depth level.
- GroupBies List<string>
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
List<UsageCarbon Emission 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"]
- IsAggregate boolBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- Items
List<UsageCarbon Emission Item> 
- A list of usage carbon emission items.
- TenantId string
- Tenant ID.
- TimeUsage stringEnded 
- The usage end time.
- TimeUsage stringStarted 
- The usage start time.
- UsageCarbon stringEmission Filter 
- The filter object for query usage. - ** 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 
- CompartmentDepth int
- The compartment depth level.
- GroupBies []string
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
[]UsageCarbon Emission Group By Tag Args 
- 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"]
- IsAggregate boolBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- Items
[]UsageCarbon Emission Item Args 
- A list of usage carbon emission items.
- TenantId string
- Tenant ID.
- TimeUsage stringEnded 
- The usage end time.
- TimeUsage stringStarted 
- The usage start time.
- UsageCarbon stringEmission Filter 
- The filter object for query usage. - ** 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 
- compartmentDepth Integer
- The compartment depth level.
- groupBies List<String>
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
List<UsageCarbon Emission 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"]
- isAggregate BooleanBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- items
List<UsageCarbon Emission Item> 
- A list of usage carbon emission items.
- tenantId String
- Tenant ID.
- timeUsage StringEnded 
- The usage end time.
- timeUsage StringStarted 
- The usage start time.
- usageCarbon StringEmission Filter 
- The filter object for query usage. - ** 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 
- compartmentDepth number
- The compartment depth level.
- groupBies string[]
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
UsageCarbon Emission 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"]
- isAggregate booleanBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- items
UsageCarbon Emission Item[] 
- A list of usage carbon emission items.
- tenantId string
- Tenant ID.
- timeUsage stringEnded 
- The usage end time.
- timeUsage stringStarted 
- The usage start time.
- usageCarbon stringEmission Filter 
- The filter object for query usage. - ** 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 
- compartment_depth int
- The compartment depth level.
- group_bies Sequence[str]
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 
Sequence[UsageCarbon Emission Group By Tag Args] 
- 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 carbon emissions over the query time period will be added up.
- items
Sequence[UsageCarbon Emission Item Args] 
- A list of usage carbon emission items.
- tenant_id str
- Tenant ID.
- time_usage_ strended 
- The usage end time.
- time_usage_ strstarted 
- The usage start time.
- usage_carbon_ stremission_ filter 
- The filter object for query usage. - ** 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 
- compartmentDepth Number
- The compartment depth level.
- groupBies List<String>
- Aggregate the result by. For example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]
- 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"]
- isAggregate BooleanBy Time 
- Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
- items List<Property Map>
- A list of usage carbon emission items.
- tenantId String
- Tenant ID.
- timeUsage StringEnded 
- The usage end time.
- timeUsage StringStarted 
- The usage start time.
- usageCarbon StringEmission Filter 
- The filter object for query usage. - ** 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 
Supporting Types
UsageCarbonEmissionGroupByTag, UsageCarbonEmissionGroupByTagArgs            
UsageCarbonEmissionItem, UsageCarbonEmissionItemArgs        
- Ad string
- The availability domain of the usage.
- CompartmentId string
- The compartment OCID.
- CompartmentName string
- The compartment name.
- CompartmentPath string
- The compartment path, starting from root.
- ComputedCarbon doubleEmission 
- The carbon emission in MTCO2 unit.
- EmissionCalculation stringMethod 
- The method used to calculate carbon emission.
- Platform string
- Platform for the cost.
- Region string
- The region of the usage.
- ResourceId string
- The resource OCID that is incurring the cost.
- ResourceName string
- The resource name that is incurring the cost.
- Service string
- The service name that is incurring the cost.
- SkuName string
- The SKU friendly name.
- SkuPart stringNumber 
- The SKU part number.
- SubscriptionId string
- The subscription ID.
- 
List<UsageCarbon Emission Item Tag> 
- For grouping, a tag definition. For filtering, a definition and key.
- TenantId string
- Tenant ID.
- TenantName string
- The tenancy name.
- TimeUsage stringEnded 
- The usage end time.
- TimeUsage stringStarted 
- The usage start time.
- Ad string
- The availability domain of the usage.
- CompartmentId string
- The compartment OCID.
- CompartmentName string
- The compartment name.
- CompartmentPath string
- The compartment path, starting from root.
- ComputedCarbon float64Emission 
- The carbon emission in MTCO2 unit.
- EmissionCalculation stringMethod 
- The method used to calculate carbon emission.
- Platform string
- Platform for the cost.
- Region string
- The region of the usage.
- ResourceId string
- The resource OCID that is incurring the cost.
- ResourceName string
- The resource name that is incurring the cost.
- Service string
- The service name that is incurring the cost.
- SkuName string
- The SKU friendly name.
- SkuPart stringNumber 
- The SKU part number.
- SubscriptionId string
- The subscription ID.
- 
[]UsageCarbon Emission Item Tag 
- For grouping, a tag definition. For filtering, a definition and key.
- TenantId string
- Tenant ID.
- TenantName string
- The tenancy name.
- TimeUsage stringEnded 
- The usage end time.
- TimeUsage stringStarted 
- The usage start time.
- ad String
- The availability domain of the usage.
- compartmentId String
- The compartment OCID.
- compartmentName String
- The compartment name.
- compartmentPath String
- The compartment path, starting from root.
- computedCarbon DoubleEmission 
- The carbon emission in MTCO2 unit.
- emissionCalculation StringMethod 
- The method used to calculate carbon emission.
- platform String
- Platform for the cost.
- region String
- The region of the usage.
- resourceId String
- The resource OCID that is incurring the cost.
- resourceName String
- The resource name that is incurring the cost.
- service String
- The service name that is incurring the cost.
- skuName String
- The SKU friendly name.
- skuPart StringNumber 
- The SKU part number.
- subscriptionId String
- The subscription ID.
- 
List<UsageCarbon Emission Item Tag> 
- For grouping, a tag definition. For filtering, a definition and key.
- tenantId String
- Tenant ID.
- tenantName String
- The tenancy name.
- timeUsage StringEnded 
- The usage end time.
- timeUsage StringStarted 
- The usage start time.
- ad string
- The availability domain of the usage.
- compartmentId string
- The compartment OCID.
- compartmentName string
- The compartment name.
- compartmentPath string
- The compartment path, starting from root.
- computedCarbon numberEmission 
- The carbon emission in MTCO2 unit.
- emissionCalculation stringMethod 
- The method used to calculate carbon emission.
- platform string
- Platform for the cost.
- region string
- The region of the usage.
- resourceId string
- The resource OCID that is incurring the cost.
- resourceName string
- The resource name that is incurring the cost.
- service string
- The service name that is incurring the cost.
- skuName string
- The SKU friendly name.
- skuPart stringNumber 
- The SKU part number.
- subscriptionId string
- The subscription ID.
- 
UsageCarbon Emission Item Tag[] 
- For grouping, a tag definition. For filtering, a definition and key.
- tenantId string
- Tenant ID.
- tenantName string
- The tenancy name.
- timeUsage stringEnded 
- The usage end time.
- timeUsage stringStarted 
- The usage start time.
- ad str
- The availability domain of the usage.
- compartment_id str
- The compartment OCID.
- compartment_name str
- The compartment name.
- compartment_path str
- The compartment path, starting from root.
- computed_carbon_ floatemission 
- The carbon emission in MTCO2 unit.
- emission_calculation_ strmethod 
- The method used to calculate carbon emission.
- platform str
- Platform for the cost.
- region str
- The region of the usage.
- resource_id str
- The resource OCID that is incurring the cost.
- resource_name str
- The resource name that is incurring the cost.
- service str
- The service name that is incurring the cost.
- sku_name str
- The SKU friendly name.
- sku_part_ strnumber 
- The SKU part number.
- subscription_id str
- The subscription ID.
- 
Sequence[UsageCarbon Emission Item Tag] 
- For grouping, a tag definition. For filtering, a definition and key.
- tenant_id str
- Tenant ID.
- tenant_name str
- The tenancy name.
- time_usage_ strended 
- The usage end time.
- time_usage_ strstarted 
- The usage start time.
- ad String
- The availability domain of the usage.
- compartmentId String
- The compartment OCID.
- compartmentName String
- The compartment name.
- compartmentPath String
- The compartment path, starting from root.
- computedCarbon NumberEmission 
- The carbon emission in MTCO2 unit.
- emissionCalculation StringMethod 
- The method used to calculate carbon emission.
- platform String
- Platform for the cost.
- region String
- The region of the usage.
- resourceId String
- The resource OCID that is incurring the cost.
- resourceName String
- The resource name that is incurring the cost.
- service String
- The service name that is incurring the cost.
- skuName String
- The SKU friendly name.
- skuPart StringNumber 
- The SKU part number.
- subscriptionId String
- The subscription ID.
- List<Property Map>
- For grouping, a tag definition. For filtering, a definition and key.
- tenantId String
- Tenant ID.
- tenantName String
- The tenancy name.
- timeUsage StringEnded 
- The usage end time.
- timeUsage StringStarted 
- The usage start time.
UsageCarbonEmissionItemTag, UsageCarbonEmissionItemTagArgs          
Import
UsageCarbonEmissions can be imported using the id, e.g.
$ pulumi import oci:MeteringComputation/usageCarbonEmission:UsageCarbonEmission test_usage_carbon_emission "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 ociTerraform Provider.