1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. MeteringComputation
  5. getAverageCarbonEmission
Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi

oci.MeteringComputation.getAverageCarbonEmission

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi

    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:

    SkuPartNumber string
    The SKU part number.
    SkuPartNumber string
    The SKU part number.
    skuPartNumber String
    The SKU part number.
    skuPartNumber string
    The SKU part number.
    sku_part_number str
    The SKU part number.
    skuPartNumber String
    The SKU part number.

    getAverageCarbonEmission Result

    The following output properties are available:

    AverageCarbonEmission double
    The average carbon emissions by SKU.
    Id string
    The provider-assigned unique ID for this managed resource.
    SkuPartNumber string
    The sku part number.
    AverageCarbonEmission float64
    The average carbon emissions by SKU.
    Id string
    The provider-assigned unique ID for this managed resource.
    SkuPartNumber string
    The sku part number.
    averageCarbonEmission Double
    The average carbon emissions by SKU.
    id String
    The provider-assigned unique ID for this managed resource.
    skuPartNumber String
    The sku part number.
    averageCarbonEmission number
    The average carbon emissions by SKU.
    id string
    The provider-assigned unique ID for this managed resource.
    skuPartNumber string
    The sku part number.
    average_carbon_emission float
    The average carbon emissions by SKU.
    id str
    The provider-assigned unique ID for this managed resource.
    sku_part_number str
    The sku part number.
    averageCarbonEmission Number
    The average carbon emissions by SKU.
    id String
    The provider-assigned unique ID for this managed resource.
    skuPartNumber String
    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.
    oci logo
    Oracle Cloud Infrastructure v2.18.0 published on Friday, Nov 22, 2024 by Pulumi