Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.MeteringComputation.getAverageCarbonEmission
Explore with Pulumi AI
This data source provides details about a specific Average Carbon Emission resource in Oracle Cloud Infrastructure Metering Computation service.
Returns the average carbon emissions summary by SKU.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAverageCarbonEmission = oci.MeteringComputation.getAverageCarbonEmission({
skuPartNumber: averageCarbonEmissionSkuPartNumber,
});
import pulumi
import pulumi_oci as oci
test_average_carbon_emission = oci.MeteringComputation.get_average_carbon_emission(sku_part_number=average_carbon_emission_sku_part_number)
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.GetAverageCarbonEmission(ctx, &meteringcomputation.GetAverageCarbonEmissionArgs{
SkuPartNumber: averageCarbonEmissionSkuPartNumber,
}, nil)
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 testAverageCarbonEmission = Oci.MeteringComputation.GetAverageCarbonEmission.Invoke(new()
{
SkuPartNumber = averageCarbonEmissionSkuPartNumber,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.MeteringComputation.MeteringComputationFunctions;
import com.pulumi.oci.MeteringComputation.inputs.GetAverageCarbonEmissionArgs;
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) {
final var testAverageCarbonEmission = MeteringComputationFunctions.getAverageCarbonEmission(GetAverageCarbonEmissionArgs.builder()
.skuPartNumber(averageCarbonEmissionSkuPartNumber)
.build());
}
}
variables:
testAverageCarbonEmission:
fn::invoke:
Function: oci:MeteringComputation:getAverageCarbonEmission
Arguments:
skuPartNumber: ${averageCarbonEmissionSkuPartNumber}
Using getAverageCarbonEmission
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAverageCarbonEmission(args: GetAverageCarbonEmissionArgs, opts?: InvokeOptions): Promise<GetAverageCarbonEmissionResult>
function getAverageCarbonEmissionOutput(args: GetAverageCarbonEmissionOutputArgs, opts?: InvokeOptions): Output<GetAverageCarbonEmissionResult>
def get_average_carbon_emission(sku_part_number: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAverageCarbonEmissionResult
def get_average_carbon_emission_output(sku_part_number: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAverageCarbonEmissionResult]
func GetAverageCarbonEmission(ctx *Context, args *GetAverageCarbonEmissionArgs, opts ...InvokeOption) (*GetAverageCarbonEmissionResult, error)
func GetAverageCarbonEmissionOutput(ctx *Context, args *GetAverageCarbonEmissionOutputArgs, opts ...InvokeOption) GetAverageCarbonEmissionResultOutput
> Note: This function is named GetAverageCarbonEmission
in the Go SDK.
public static class GetAverageCarbonEmission
{
public static Task<GetAverageCarbonEmissionResult> InvokeAsync(GetAverageCarbonEmissionArgs args, InvokeOptions? opts = null)
public static Output<GetAverageCarbonEmissionResult> Invoke(GetAverageCarbonEmissionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAverageCarbonEmissionResult> getAverageCarbonEmission(GetAverageCarbonEmissionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:MeteringComputation/getAverageCarbonEmission:getAverageCarbonEmission
arguments:
# arguments dictionary
The following arguments are supported:
- Sku
Part stringNumber - The SKU part number.
- Sku
Part stringNumber - The SKU part number.
- sku
Part StringNumber - The SKU part number.
- sku
Part stringNumber - The SKU part number.
- sku_
part_ strnumber - The SKU part number.
- sku
Part StringNumber - The SKU part number.
getAverageCarbonEmission Result
The following output properties are available:
- Average
Carbon doubleEmission - The average carbon emissions by SKU.
- Id string
- The provider-assigned unique ID for this managed resource.
- Sku
Part stringNumber - The sku part number.
- Average
Carbon float64Emission - The average carbon emissions by SKU.
- Id string
- The provider-assigned unique ID for this managed resource.
- Sku
Part stringNumber - The sku part number.
- average
Carbon DoubleEmission - The average carbon emissions by SKU.
- id String
- The provider-assigned unique ID for this managed resource.
- sku
Part StringNumber - The sku part number.
- average
Carbon numberEmission - The average carbon emissions by SKU.
- id string
- The provider-assigned unique ID for this managed resource.
- sku
Part stringNumber - The sku part number.
- average_
carbon_ floatemission - The average carbon emissions by SKU.
- id str
- The provider-assigned unique ID for this managed resource.
- sku_
part_ strnumber - The sku part number.
- average
Carbon NumberEmission - The average carbon emissions by SKU.
- id String
- The provider-assigned unique ID for this managed resource.
- sku
Part StringNumber - The sku part number.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.