import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Usage Carbon Emission resource in Oracle Cloud Infrastructure Metering Computation service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/usage/latest/UsageCarbonEmission * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/metering_computation * * Returns carbon emission usage for the given account. * * ## Example Usage * * ```typescript * 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: Number(usageCarbonEmissionCompartmentDepth), * emissionCalculationMethod: usageCarbonEmissionEmissionCalculationMethod, * emissionType: usageCarbonEmissionEmissionType, * granularity: usageCarbonEmissionGranularity, * groupBies: usageCarbonEmissionGroupBy, * groupByTags: [{ * key: usageCarbonEmissionGroupByTagKey, * namespace: usageCarbonEmissionGroupByTagNamespace, * value: usageCarbonEmissionGroupByTagValue, * }], * isAggregateByTime: usageCarbonEmissionIsAggregateByTime === "true", * usageCarbonEmissionFilter: usageCarbonEmissionUsageCarbonEmissionFilter, * }); * ``` * * ## Import * * UsageCarbonEmissions can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:MeteringComputation/usageCarbonEmission:UsageCarbonEmission test_usage_carbon_emission "id" * ``` */ export declare class UsageCarbonEmission extends pulumi.CustomResource { /** * Get an existing UsageCarbonEmission resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: UsageCarbonEmissionState, opts?: pulumi.CustomResourceOptions): UsageCarbonEmission; /** * Returns true if the given object is an instance of UsageCarbonEmission. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is UsageCarbonEmission; /** * The compartment depth level. */ readonly compartmentDepth: pulumi.Output; /** * Specifies the method used for emission calculation, such as POWER_BASED or SPEND_BASED */ readonly emissionCalculationMethod: pulumi.Output; /** * Specifies the type of emission, such as MARKET_BASED or LOCATION_BASED. */ readonly emissionType: pulumi.Output; /** * The carbon emission granularity. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. */ readonly granularity: pulumi.Output; /** * Aggregate the result by. For example: `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]` */ readonly groupBies: pulumi.Output; /** * 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"]` */ readonly groupByTags: pulumi.Output; /** * Specifies whether aggregated by time. If isAggregateByTime is true, all carbon emissions usage over the query time period are summed. */ readonly isAggregateByTime: pulumi.Output; /** * A list of carbon emission usage items. */ readonly items: pulumi.Output; /** * Tenant ID. */ readonly tenantId: pulumi.Output; /** * The usage end time. */ readonly timeUsageEnded: pulumi.Output; /** * The usage start time. */ readonly timeUsageStarted: pulumi.Output; /** * 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 */ readonly usageCarbonEmissionFilter: pulumi.Output; /** * Create a UsageCarbonEmission resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: UsageCarbonEmissionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering UsageCarbonEmission resources. */ export interface UsageCarbonEmissionState { /** * The compartment depth level. */ compartmentDepth?: pulumi.Input; /** * Specifies the method used for emission calculation, such as POWER_BASED or SPEND_BASED */ emissionCalculationMethod?: pulumi.Input; /** * Specifies the type of emission, such as MARKET_BASED or LOCATION_BASED. */ emissionType?: pulumi.Input; /** * The carbon emission granularity. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. */ granularity?: pulumi.Input; /** * Aggregate the result by. For example: `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]` */ groupBies?: pulumi.Input[] | undefined>; /** * 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"]` */ groupByTags?: pulumi.Input[] | undefined>; /** * Specifies whether aggregated by time. If isAggregateByTime is true, all carbon emissions usage over the query time period are summed. */ isAggregateByTime?: pulumi.Input; /** * A list of carbon emission usage items. */ items?: pulumi.Input[] | undefined>; /** * Tenant ID. */ tenantId?: pulumi.Input; /** * The usage end time. */ timeUsageEnded?: pulumi.Input; /** * The usage start time. */ timeUsageStarted?: pulumi.Input; /** * 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 */ usageCarbonEmissionFilter?: pulumi.Input; } /** * The set of arguments for constructing a UsageCarbonEmission resource. */ export interface UsageCarbonEmissionArgs { /** * The compartment depth level. */ compartmentDepth?: pulumi.Input; /** * Specifies the method used for emission calculation, such as POWER_BASED or SPEND_BASED */ emissionCalculationMethod?: pulumi.Input; /** * Specifies the type of emission, such as MARKET_BASED or LOCATION_BASED. */ emissionType?: pulumi.Input; /** * The carbon emission granularity. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. */ granularity?: pulumi.Input; /** * Aggregate the result by. For example: `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "resourceName", "tenantId", "tenantName", "subscriptionId"]` */ groupBies?: pulumi.Input[] | undefined>; /** * 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"]` */ groupByTags?: pulumi.Input[] | undefined>; /** * Specifies whether aggregated by time. If isAggregateByTime is true, all carbon emissions usage over the query time period are summed. */ isAggregateByTime?: pulumi.Input; /** * Tenant ID. */ tenantId: pulumi.Input; /** * The usage end time. */ timeUsageEnded: pulumi.Input; /** * The usage start time. */ timeUsageStarted: pulumi.Input; /** * 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 */ usageCarbonEmissionFilter?: pulumi.Input; } //# sourceMappingURL=usageCarbonEmission.d.ts.map