1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. MeteringComputation
  5. UsageCarbonEmission
Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi

oci.MeteringComputation.UsageCarbonEmission

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi

    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=[oci.metering_computation.UsageCarbonEmissionGroupByTagArgs(
            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[_meteringcomputation.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=[oci.metering_computation.UsageCarbonEmissionGroupByTagArgs(
            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

    The UsageCarbonEmission resource accepts the following input properties:

    TenantId string
    Tenant ID.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    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"]
    GroupByTags List<UsageCarbonEmissionGroupByTag>
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    IsAggregateByTime bool
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    UsageCarbonEmissionFilter string

    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.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    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"]
    GroupByTags []UsageCarbonEmissionGroupByTagArgs
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    IsAggregateByTime bool
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    UsageCarbonEmissionFilter string

    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.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    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"]
    groupByTags List<UsageCarbonEmissionGroupByTag>
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    isAggregateByTime Boolean
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    usageCarbonEmissionFilter String

    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.
    timeUsageEnded string
    The usage end time.
    timeUsageStarted string
    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"]
    groupByTags UsageCarbonEmissionGroupByTag[]
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    isAggregateByTime boolean
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    usageCarbonEmissionFilter string

    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_ended str
    The usage end time.
    time_usage_started str
    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"]
    group_by_tags Sequence[meteringcomputation.UsageCarbonEmissionGroupByTagArgs]
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    is_aggregate_by_time bool
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    usage_carbon_emission_filter str

    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.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    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"]
    groupByTags List<Property Map>
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    isAggregateByTime Boolean
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    usageCarbonEmissionFilter String

    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<UsageCarbonEmissionItem>
    A list of usage carbon emission items.
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []UsageCarbonEmissionItem
    A list of usage carbon emission items.
    id String
    The provider-assigned unique ID for this managed resource.
    items List<UsageCarbonEmissionItem>
    A list of usage carbon emission items.
    id string
    The provider-assigned unique ID for this managed resource.
    items UsageCarbonEmissionItem[]
    A list of usage carbon emission items.
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[meteringcomputation.UsageCarbonEmissionItem]
    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[_meteringcomputation.UsageCarbonEmissionGroupByTagArgs]] = None,
            is_aggregate_by_time: Optional[bool] = None,
            items: Optional[Sequence[_meteringcomputation.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) -> UsageCarbonEmission
    func 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)
    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:
    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"]
    GroupByTags List<UsageCarbonEmissionGroupByTag>
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    IsAggregateByTime bool
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    Items List<UsageCarbonEmissionItem>
    A list of usage carbon emission items.
    TenantId string
    Tenant ID.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    The usage start time.
    UsageCarbonEmissionFilter string

    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"]
    GroupByTags []UsageCarbonEmissionGroupByTagArgs
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    IsAggregateByTime bool
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    Items []UsageCarbonEmissionItemArgs
    A list of usage carbon emission items.
    TenantId string
    Tenant ID.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    The usage start time.
    UsageCarbonEmissionFilter string

    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"]
    groupByTags List<UsageCarbonEmissionGroupByTag>
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    isAggregateByTime Boolean
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    items List<UsageCarbonEmissionItem>
    A list of usage carbon emission items.
    tenantId String
    Tenant ID.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    The usage start time.
    usageCarbonEmissionFilter String

    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"]
    groupByTags UsageCarbonEmissionGroupByTag[]
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    isAggregateByTime boolean
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    items UsageCarbonEmissionItem[]
    A list of usage carbon emission items.
    tenantId string
    Tenant ID.
    timeUsageEnded string
    The usage end time.
    timeUsageStarted string
    The usage start time.
    usageCarbonEmissionFilter string

    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"]
    group_by_tags Sequence[meteringcomputation.UsageCarbonEmissionGroupByTagArgs]
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    is_aggregate_by_time bool
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage carbon emissions over the query time period will be added up.
    items Sequence[meteringcomputation.UsageCarbonEmissionItemArgs]
    A list of usage carbon emission items.
    tenant_id str
    Tenant ID.
    time_usage_ended str
    The usage end time.
    time_usage_started str
    The usage start time.
    usage_carbon_emission_filter str

    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"]
    groupByTags List<Property Map>
    GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example: [{"namespace":"oracle", "key":"createdBy"]
    isAggregateByTime Boolean
    Specifies whether aggregated by time. If isAggregateByTime is true, all usage 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.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    The usage start time.
    usageCarbonEmissionFilter String

    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

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

    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.
    ComputedCarbonEmission double
    The carbon emission in MTCO2 unit.
    EmissionCalculationMethod string
    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.
    SkuPartNumber string
    The SKU part number.
    SubscriptionId string
    The subscription ID.
    Tags List<UsageCarbonEmissionItemTag>
    For grouping, a tag definition. For filtering, a definition and key.
    TenantId string
    Tenant ID.
    TenantName string
    The tenancy name.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    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.
    ComputedCarbonEmission float64
    The carbon emission in MTCO2 unit.
    EmissionCalculationMethod string
    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.
    SkuPartNumber string
    The SKU part number.
    SubscriptionId string
    The subscription ID.
    Tags []UsageCarbonEmissionItemTag
    For grouping, a tag definition. For filtering, a definition and key.
    TenantId string
    Tenant ID.
    TenantName string
    The tenancy name.
    TimeUsageEnded string
    The usage end time.
    TimeUsageStarted string
    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.
    computedCarbonEmission Double
    The carbon emission in MTCO2 unit.
    emissionCalculationMethod String
    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.
    skuPartNumber String
    The SKU part number.
    subscriptionId String
    The subscription ID.
    tags List<UsageCarbonEmissionItemTag>
    For grouping, a tag definition. For filtering, a definition and key.
    tenantId String
    Tenant ID.
    tenantName String
    The tenancy name.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    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.
    computedCarbonEmission number
    The carbon emission in MTCO2 unit.
    emissionCalculationMethod string
    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.
    skuPartNumber string
    The SKU part number.
    subscriptionId string
    The subscription ID.
    tags UsageCarbonEmissionItemTag[]
    For grouping, a tag definition. For filtering, a definition and key.
    tenantId string
    Tenant ID.
    tenantName string
    The tenancy name.
    timeUsageEnded string
    The usage end time.
    timeUsageStarted string
    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_emission float
    The carbon emission in MTCO2 unit.
    emission_calculation_method str
    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_number str
    The SKU part number.
    subscription_id str
    The subscription ID.
    tags Sequence[meteringcomputation.UsageCarbonEmissionItemTag]
    For grouping, a tag definition. For filtering, a definition and key.
    tenant_id str
    Tenant ID.
    tenant_name str
    The tenancy name.
    time_usage_ended str
    The usage end time.
    time_usage_started str
    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.
    computedCarbonEmission Number
    The carbon emission in MTCO2 unit.
    emissionCalculationMethod String
    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.
    skuPartNumber String
    The SKU part number.
    subscriptionId String
    The subscription ID.
    tags List<Property Map>
    For grouping, a tag definition. For filtering, a definition and key.
    tenantId String
    Tenant ID.
    tenantName String
    The tenancy name.
    timeUsageEnded String
    The usage end time.
    timeUsageStarted String
    The usage start time.

    UsageCarbonEmissionItemTag, UsageCarbonEmissionItemTagArgs

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

    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.2.0 published on Friday, Jul 12, 2024 by Pulumi