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[_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:
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- Compartment
Depth int - The compartment depth level.
- Group
Bies 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<Usage
Carbon 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"]
- 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 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 string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- Compartment
Depth int - The compartment depth level.
- Group
Bies []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"]
- []Usage
Carbon 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 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 String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
- compartment
Depth Integer - The compartment depth level.
- group
Bies 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<Usage
Carbon 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"]
- is
Aggregate BooleanBy 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 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 string - Tenant ID.
- time
Usage stringEnded - The usage end time.
- time
Usage stringStarted - The usage start time.
- compartment
Depth number - The compartment depth level.
- group
Bies 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"]
- Usage
Carbon 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"]
- is
Aggregate booleanBy 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 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[meteringcomputation.
Usage Carbon 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
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
- compartment
Depth Number - The compartment depth level.
- group
Bies 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"]
- is
Aggregate BooleanBy 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 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<Usage
Carbon Emission Item> - A list of usage carbon emission items.
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Usage
Carbon Emission Item - A list of usage carbon emission items.
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<Usage
Carbon Emission Item> - A list of usage carbon emission items.
- id string
- The provider-assigned unique ID for this managed resource.
- items
Usage
Carbon Emission Item[] - A list of usage carbon emission items.
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[meteringcomputation.
Usage Carbon 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[_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.
- Compartment
Depth int - The compartment depth level.
- Group
Bies 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<Usage
Carbon 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"]
- 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
List<Usage
Carbon Emission Item> - A list of usage carbon emission items.
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- Usage
Carbon 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 []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"]
- []Usage
Carbon 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
[]Usage
Carbon Emission Item Args - A list of usage carbon emission items.
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- Usage
Carbon 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 Integer - The compartment depth level.
- group
Bies 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<Usage
Carbon 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"]
- is
Aggregate 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<Usage
Carbon Emission Item> - A list of usage carbon emission items.
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
- usage
Carbon 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 number - The compartment depth level.
- group
Bies 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"]
- Usage
Carbon 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"]
- is
Aggregate 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
Usage
Carbon Emission Item[] - A list of usage carbon emission items.
- tenant
Id string - Tenant ID.
- time
Usage stringEnded - The usage end time.
- time
Usage stringStarted - The usage start time.
- usage
Carbon 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[meteringcomputation.
Usage Carbon 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[meteringcomputation.
Usage Carbon 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
- compartment
Depth Number - The compartment depth level.
- group
Bies 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"]
- is
Aggregate 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.
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
- usage
Carbon 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.
- Compartment
Id string - The compartment OCID.
- Compartment
Name string - The compartment name.
- Compartment
Path string - The compartment path, starting from root.
- Computed
Carbon doubleEmission - The carbon emission in MTCO2 unit.
- Emission
Calculation stringMethod - The method used to calculate carbon emission.
- Platform string
- Platform for the cost.
- Region string
- The region of the usage.
- Resource
Id string - The resource OCID that is incurring the cost.
- Resource
Name string - The resource name that is incurring the cost.
- Service string
- The service name that is incurring the cost.
- Sku
Name string - The SKU friendly name.
- Sku
Part stringNumber - The SKU part number.
- Subscription
Id string - The subscription ID.
- List<Usage
Carbon Emission Item Tag> - For grouping, a tag definition. For filtering, a definition and key.
- Tenant
Id string - Tenant ID.
- Tenant
Name string - The tenancy name.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- Ad string
- The availability domain of the usage.
- Compartment
Id string - The compartment OCID.
- Compartment
Name string - The compartment name.
- Compartment
Path string - The compartment path, starting from root.
- Computed
Carbon float64Emission - The carbon emission in MTCO2 unit.
- Emission
Calculation stringMethod - The method used to calculate carbon emission.
- Platform string
- Platform for the cost.
- Region string
- The region of the usage.
- Resource
Id string - The resource OCID that is incurring the cost.
- Resource
Name string - The resource name that is incurring the cost.
- Service string
- The service name that is incurring the cost.
- Sku
Name string - The SKU friendly name.
- Sku
Part stringNumber - The SKU part number.
- Subscription
Id string - The subscription ID.
- []Usage
Carbon Emission Item Tag - For grouping, a tag definition. For filtering, a definition and key.
- Tenant
Id string - Tenant ID.
- Tenant
Name string - The tenancy name.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted - The usage start time.
- ad String
- The availability domain of the usage.
- compartment
Id String - The compartment OCID.
- compartment
Name String - The compartment name.
- compartment
Path String - The compartment path, starting from root.
- computed
Carbon DoubleEmission - The carbon emission in MTCO2 unit.
- emission
Calculation StringMethod - The method used to calculate carbon emission.
- platform String
- Platform for the cost.
- region String
- The region of the usage.
- resource
Id String - The resource OCID that is incurring the cost.
- resource
Name String - The resource name that is incurring the cost.
- service String
- The service name that is incurring the cost.
- sku
Name String - The SKU friendly name.
- sku
Part StringNumber - The SKU part number.
- subscription
Id String - The subscription ID.
- List<Usage
Carbon Emission Item Tag> - For grouping, a tag definition. For filtering, a definition and key.
- tenant
Id String - Tenant ID.
- tenant
Name String - The tenancy name.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted - The usage start time.
- ad string
- The availability domain of the usage.
- compartment
Id string - The compartment OCID.
- compartment
Name string - The compartment name.
- compartment
Path string - The compartment path, starting from root.
- computed
Carbon numberEmission - The carbon emission in MTCO2 unit.
- emission
Calculation stringMethod - The method used to calculate carbon emission.
- platform string
- Platform for the cost.
- region string
- The region of the usage.
- resource
Id string - The resource OCID that is incurring the cost.
- resource
Name string - The resource name that is incurring the cost.
- service string
- The service name that is incurring the cost.
- sku
Name string - The SKU friendly name.
- sku
Part stringNumber - The SKU part number.
- subscription
Id string - The subscription ID.
- Usage
Carbon Emission Item Tag[] - For grouping, a tag definition. For filtering, a definition and key.
- tenant
Id string - Tenant ID.
- tenant
Name string - The tenancy name.
- time
Usage stringEnded - The usage end time.
- time
Usage 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[meteringcomputation.
Usage Carbon 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.
- compartment
Id String - The compartment OCID.
- compartment
Name String - The compartment name.
- compartment
Path String - The compartment path, starting from root.
- computed
Carbon NumberEmission - The carbon emission in MTCO2 unit.
- emission
Calculation StringMethod - The method used to calculate carbon emission.
- platform String
- Platform for the cost.
- region String
- The region of the usage.
- resource
Id String - The resource OCID that is incurring the cost.
- resource
Name String - The resource name that is incurring the cost.
- service String
- The service name that is incurring the cost.
- sku
Name String - The SKU friendly name.
- sku
Part StringNumber - The SKU part number.
- subscription
Id String - The subscription ID.
- List<Property Map>
- For grouping, a tag definition. For filtering, a definition and key.
- tenant
Id String - Tenant ID.
- tenant
Name String - The tenancy name.
- time
Usage StringEnded - The usage end time.
- time
Usage 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
oci
Terraform Provider.