1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsubUsage
  5. getComputedUsage
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.OsubUsage.getComputedUsage

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides details about a specific Computed Usage resource in Oracle Cloud Infrastructure Osub Usage service.

    This is an API which returns Computed Usage corresponding to the id passed

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testComputedUsage = oci.OsubUsage.getComputedUsage({
        compartmentId: compartmentId,
        computedUsageId: testComputedUsageOciOsubUsageComputedUsage.id,
        fields: computedUsageFields,
        xOneOriginRegion: computedUsageXOneOriginRegion,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_computed_usage = oci.OsubUsage.get_computed_usage(compartment_id=compartment_id,
        computed_usage_id=test_computed_usage_oci_osub_usage_computed_usage["id"],
        fields=computed_usage_fields,
        x_one_origin_region=computed_usage_x_one_origin_region)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/OsubUsage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := OsubUsage.GetComputedUsage(ctx, &osubusage.GetComputedUsageArgs{
    			CompartmentId:    compartmentId,
    			ComputedUsageId:  testComputedUsageOciOsubUsageComputedUsage.Id,
    			Fields:           computedUsageFields,
    			XOneOriginRegion: pulumi.StringRef(computedUsageXOneOriginRegion),
    		}, 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 testComputedUsage = Oci.OsubUsage.GetComputedUsage.Invoke(new()
        {
            CompartmentId = compartmentId,
            ComputedUsageId = testComputedUsageOciOsubUsageComputedUsage.Id,
            Fields = computedUsageFields,
            XOneOriginRegion = computedUsageXOneOriginRegion,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OsubUsage.OsubUsageFunctions;
    import com.pulumi.oci.OsubUsage.inputs.GetComputedUsageArgs;
    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 testComputedUsage = OsubUsageFunctions.getComputedUsage(GetComputedUsageArgs.builder()
                .compartmentId(compartmentId)
                .computedUsageId(testComputedUsageOciOsubUsageComputedUsage.id())
                .fields(computedUsageFields)
                .xOneOriginRegion(computedUsageXOneOriginRegion)
                .build());
    
        }
    }
    
    variables:
      testComputedUsage:
        fn::invoke:
          Function: oci:OsubUsage:getComputedUsage
          Arguments:
            compartmentId: ${compartmentId}
            computedUsageId: ${testComputedUsageOciOsubUsageComputedUsage.id}
            fields: ${computedUsageFields}
            xOneOriginRegion: ${computedUsageXOneOriginRegion}
    

    Using getComputedUsage

    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 getComputedUsage(args: GetComputedUsageArgs, opts?: InvokeOptions): Promise<GetComputedUsageResult>
    function getComputedUsageOutput(args: GetComputedUsageOutputArgs, opts?: InvokeOptions): Output<GetComputedUsageResult>
    def get_computed_usage(compartment_id: Optional[str] = None,
                           computed_usage_id: Optional[str] = None,
                           fields: Optional[Sequence[str]] = None,
                           x_one_origin_region: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetComputedUsageResult
    def get_computed_usage_output(compartment_id: Optional[pulumi.Input[str]] = None,
                           computed_usage_id: Optional[pulumi.Input[str]] = None,
                           fields: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                           x_one_origin_region: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetComputedUsageResult]
    func GetComputedUsage(ctx *Context, args *GetComputedUsageArgs, opts ...InvokeOption) (*GetComputedUsageResult, error)
    func GetComputedUsageOutput(ctx *Context, args *GetComputedUsageOutputArgs, opts ...InvokeOption) GetComputedUsageResultOutput

    > Note: This function is named GetComputedUsage in the Go SDK.

    public static class GetComputedUsage 
    {
        public static Task<GetComputedUsageResult> InvokeAsync(GetComputedUsageArgs args, InvokeOptions? opts = null)
        public static Output<GetComputedUsageResult> Invoke(GetComputedUsageInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetComputedUsageResult> getComputedUsage(GetComputedUsageArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:OsubUsage/getComputedUsage:getComputedUsage
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the root compartment.
    ComputedUsageId string
    The Computed Usage Id
    Fields List<string>
    Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
    XOneOriginRegion string
    The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
    CompartmentId string
    The OCID of the root compartment.
    ComputedUsageId string
    The Computed Usage Id
    Fields []string
    Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
    XOneOriginRegion string
    The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
    compartmentId String
    The OCID of the root compartment.
    computedUsageId String
    The Computed Usage Id
    fields List<String>
    Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
    xOneOriginRegion String
    The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
    compartmentId string
    The OCID of the root compartment.
    computedUsageId string
    The Computed Usage Id
    fields string[]
    Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
    xOneOriginRegion string
    The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
    compartment_id str
    The OCID of the root compartment.
    computed_usage_id str
    The Computed Usage Id
    fields Sequence[str]
    Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
    x_one_origin_region str
    The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
    compartmentId String
    The OCID of the root compartment.
    computedUsageId String
    The Computed Usage Id
    fields List<String>
    Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
    xOneOriginRegion String
    The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.

    getComputedUsage Result

    The following output properties are available:

    CommitmentServiceId string
    Subscribed service commitmentId.
    CompartmentId string
    ComputeSource string
    SPM Internal compute records source .
    ComputedUsageId string
    Cost string
    Computed Line Amount not rounded
    CostRounded string
    Computed Line Amount rounded.
    CurrencyCode string
    Currency code
    DataCenter string
    Data Center Attribute as sent by MQS to SPM.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsInvoiced bool
    Invoicing status for the aggregated compute usage
    MqsMessageId string
    MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
    NetUnitPrice string
    Net Unit Price for the product in consideration, price actual.
    OriginalUsageNumber string
    SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
    ParentProducts List<GetComputedUsageParentProduct>
    Product description
    ParentSubscribedServiceId string
    Subscribed service line parent id
    PlanNumber string
    Subscription plan number
    Products List<GetComputedUsageProduct>
    Product description
    Quantity string
    Total Quantity that was used for computation
    RateCardId string
    Ratecard Id at subscribed service level
    RateCardTierdId string
    References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
    TimeCreated string
    Computed Usage created time, expressed in RFC 3339 timestamp format.
    TimeMeteredOn string
    Metered Service date, expressed in RFC 3339 timestamp format.
    TimeOfArrival string
    Usae computation date, expressed in RFC 3339 timestamp format.
    TimeUpdated string
    Computed Usage updated time, expressed in RFC 3339 timestamp format.
    Type string
    Usage compute type in SPM.
    UnitOfMeasure string
    Unit of Messure
    UsageNumber string
    SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
    Fields List<string>
    XOneOriginRegion string
    CommitmentServiceId string
    Subscribed service commitmentId.
    CompartmentId string
    ComputeSource string
    SPM Internal compute records source .
    ComputedUsageId string
    Cost string
    Computed Line Amount not rounded
    CostRounded string
    Computed Line Amount rounded.
    CurrencyCode string
    Currency code
    DataCenter string
    Data Center Attribute as sent by MQS to SPM.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsInvoiced bool
    Invoicing status for the aggregated compute usage
    MqsMessageId string
    MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
    NetUnitPrice string
    Net Unit Price for the product in consideration, price actual.
    OriginalUsageNumber string
    SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
    ParentProducts []GetComputedUsageParentProduct
    Product description
    ParentSubscribedServiceId string
    Subscribed service line parent id
    PlanNumber string
    Subscription plan number
    Products []GetComputedUsageProduct
    Product description
    Quantity string
    Total Quantity that was used for computation
    RateCardId string
    Ratecard Id at subscribed service level
    RateCardTierdId string
    References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
    TimeCreated string
    Computed Usage created time, expressed in RFC 3339 timestamp format.
    TimeMeteredOn string
    Metered Service date, expressed in RFC 3339 timestamp format.
    TimeOfArrival string
    Usae computation date, expressed in RFC 3339 timestamp format.
    TimeUpdated string
    Computed Usage updated time, expressed in RFC 3339 timestamp format.
    Type string
    Usage compute type in SPM.
    UnitOfMeasure string
    Unit of Messure
    UsageNumber string
    SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
    Fields []string
    XOneOriginRegion string
    commitmentServiceId String
    Subscribed service commitmentId.
    compartmentId String
    computeSource String
    SPM Internal compute records source .
    computedUsageId String
    cost String
    Computed Line Amount not rounded
    costRounded String
    Computed Line Amount rounded.
    currencyCode String
    Currency code
    dataCenter String
    Data Center Attribute as sent by MQS to SPM.
    id String
    The provider-assigned unique ID for this managed resource.
    isInvoiced Boolean
    Invoicing status for the aggregated compute usage
    mqsMessageId String
    MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
    netUnitPrice String
    Net Unit Price for the product in consideration, price actual.
    originalUsageNumber String
    SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
    parentProducts List<GetComputedUsageParentProduct>
    Product description
    parentSubscribedServiceId String
    Subscribed service line parent id
    planNumber String
    Subscription plan number
    products List<GetComputedUsageProduct>
    Product description
    quantity String
    Total Quantity that was used for computation
    rateCardId String
    Ratecard Id at subscribed service level
    rateCardTierdId String
    References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
    timeCreated String
    Computed Usage created time, expressed in RFC 3339 timestamp format.
    timeMeteredOn String
    Metered Service date, expressed in RFC 3339 timestamp format.
    timeOfArrival String
    Usae computation date, expressed in RFC 3339 timestamp format.
    timeUpdated String
    Computed Usage updated time, expressed in RFC 3339 timestamp format.
    type String
    Usage compute type in SPM.
    unitOfMeasure String
    Unit of Messure
    usageNumber String
    SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
    fields List<String>
    xOneOriginRegion String
    commitmentServiceId string
    Subscribed service commitmentId.
    compartmentId string
    computeSource string
    SPM Internal compute records source .
    computedUsageId string
    cost string
    Computed Line Amount not rounded
    costRounded string
    Computed Line Amount rounded.
    currencyCode string
    Currency code
    dataCenter string
    Data Center Attribute as sent by MQS to SPM.
    id string
    The provider-assigned unique ID for this managed resource.
    isInvoiced boolean
    Invoicing status for the aggregated compute usage
    mqsMessageId string
    MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
    netUnitPrice string
    Net Unit Price for the product in consideration, price actual.
    originalUsageNumber string
    SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
    parentProducts GetComputedUsageParentProduct[]
    Product description
    parentSubscribedServiceId string
    Subscribed service line parent id
    planNumber string
    Subscription plan number
    products GetComputedUsageProduct[]
    Product description
    quantity string
    Total Quantity that was used for computation
    rateCardId string
    Ratecard Id at subscribed service level
    rateCardTierdId string
    References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
    timeCreated string
    Computed Usage created time, expressed in RFC 3339 timestamp format.
    timeMeteredOn string
    Metered Service date, expressed in RFC 3339 timestamp format.
    timeOfArrival string
    Usae computation date, expressed in RFC 3339 timestamp format.
    timeUpdated string
    Computed Usage updated time, expressed in RFC 3339 timestamp format.
    type string
    Usage compute type in SPM.
    unitOfMeasure string
    Unit of Messure
    usageNumber string
    SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
    fields string[]
    xOneOriginRegion string
    commitment_service_id str
    Subscribed service commitmentId.
    compartment_id str
    compute_source str
    SPM Internal compute records source .
    computed_usage_id str
    cost str
    Computed Line Amount not rounded
    cost_rounded str
    Computed Line Amount rounded.
    currency_code str
    Currency code
    data_center str
    Data Center Attribute as sent by MQS to SPM.
    id str
    The provider-assigned unique ID for this managed resource.
    is_invoiced bool
    Invoicing status for the aggregated compute usage
    mqs_message_id str
    MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
    net_unit_price str
    Net Unit Price for the product in consideration, price actual.
    original_usage_number str
    SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
    parent_products Sequence[osubusage.GetComputedUsageParentProduct]
    Product description
    parent_subscribed_service_id str
    Subscribed service line parent id
    plan_number str
    Subscription plan number
    products Sequence[osubusage.GetComputedUsageProduct]
    Product description
    quantity str
    Total Quantity that was used for computation
    rate_card_id str
    Ratecard Id at subscribed service level
    rate_card_tierd_id str
    References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
    time_created str
    Computed Usage created time, expressed in RFC 3339 timestamp format.
    time_metered_on str
    Metered Service date, expressed in RFC 3339 timestamp format.
    time_of_arrival str
    Usae computation date, expressed in RFC 3339 timestamp format.
    time_updated str
    Computed Usage updated time, expressed in RFC 3339 timestamp format.
    type str
    Usage compute type in SPM.
    unit_of_measure str
    Unit of Messure
    usage_number str
    SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
    fields Sequence[str]
    x_one_origin_region str
    commitmentServiceId String
    Subscribed service commitmentId.
    compartmentId String
    computeSource String
    SPM Internal compute records source .
    computedUsageId String
    cost String
    Computed Line Amount not rounded
    costRounded String
    Computed Line Amount rounded.
    currencyCode String
    Currency code
    dataCenter String
    Data Center Attribute as sent by MQS to SPM.
    id String
    The provider-assigned unique ID for this managed resource.
    isInvoiced Boolean
    Invoicing status for the aggregated compute usage
    mqsMessageId String
    MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
    netUnitPrice String
    Net Unit Price for the product in consideration, price actual.
    originalUsageNumber String
    SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
    parentProducts List<Property Map>
    Product description
    parentSubscribedServiceId String
    Subscribed service line parent id
    planNumber String
    Subscription plan number
    products List<Property Map>
    Product description
    quantity String
    Total Quantity that was used for computation
    rateCardId String
    Ratecard Id at subscribed service level
    rateCardTierdId String
    References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
    timeCreated String
    Computed Usage created time, expressed in RFC 3339 timestamp format.
    timeMeteredOn String
    Metered Service date, expressed in RFC 3339 timestamp format.
    timeOfArrival String
    Usae computation date, expressed in RFC 3339 timestamp format.
    timeUpdated String
    Computed Usage updated time, expressed in RFC 3339 timestamp format.
    type String
    Usage compute type in SPM.
    unitOfMeasure String
    Unit of Messure
    usageNumber String
    SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
    fields List<String>
    xOneOriginRegion String

    Supporting Types

    GetComputedUsageParentProduct

    BillingCategory string
    Metered service billing category
    Name string
    Product name
    PartNumber string
    Product part number
    ProductCategory string
    Product category
    ProvisioningGroup string
    Product provisioning group
    UcmRateCardPartType string
    Rate card part type of Product
    UnitOfMeasure string
    Unit of Messure
    BillingCategory string
    Metered service billing category
    Name string
    Product name
    PartNumber string
    Product part number
    ProductCategory string
    Product category
    ProvisioningGroup string
    Product provisioning group
    UcmRateCardPartType string
    Rate card part type of Product
    UnitOfMeasure string
    Unit of Messure
    billingCategory String
    Metered service billing category
    name String
    Product name
    partNumber String
    Product part number
    productCategory String
    Product category
    provisioningGroup String
    Product provisioning group
    ucmRateCardPartType String
    Rate card part type of Product
    unitOfMeasure String
    Unit of Messure
    billingCategory string
    Metered service billing category
    name string
    Product name
    partNumber string
    Product part number
    productCategory string
    Product category
    provisioningGroup string
    Product provisioning group
    ucmRateCardPartType string
    Rate card part type of Product
    unitOfMeasure string
    Unit of Messure
    billing_category str
    Metered service billing category
    name str
    Product name
    part_number str
    Product part number
    product_category str
    Product category
    provisioning_group str
    Product provisioning group
    ucm_rate_card_part_type str
    Rate card part type of Product
    unit_of_measure str
    Unit of Messure
    billingCategory String
    Metered service billing category
    name String
    Product name
    partNumber String
    Product part number
    productCategory String
    Product category
    provisioningGroup String
    Product provisioning group
    ucmRateCardPartType String
    Rate card part type of Product
    unitOfMeasure String
    Unit of Messure

    GetComputedUsageProduct

    BillingCategory string
    Metered service billing category
    Name string
    Product name
    PartNumber string
    Product part number
    ProductCategory string
    Product category
    ProvisioningGroup string
    Product provisioning group
    UcmRateCardPartType string
    Rate card part type of Product
    UnitOfMeasure string
    Unit of Messure
    BillingCategory string
    Metered service billing category
    Name string
    Product name
    PartNumber string
    Product part number
    ProductCategory string
    Product category
    ProvisioningGroup string
    Product provisioning group
    UcmRateCardPartType string
    Rate card part type of Product
    UnitOfMeasure string
    Unit of Messure
    billingCategory String
    Metered service billing category
    name String
    Product name
    partNumber String
    Product part number
    productCategory String
    Product category
    provisioningGroup String
    Product provisioning group
    ucmRateCardPartType String
    Rate card part type of Product
    unitOfMeasure String
    Unit of Messure
    billingCategory string
    Metered service billing category
    name string
    Product name
    partNumber string
    Product part number
    productCategory string
    Product category
    provisioningGroup string
    Product provisioning group
    ucmRateCardPartType string
    Rate card part type of Product
    unitOfMeasure string
    Unit of Messure
    billing_category str
    Metered service billing category
    name str
    Product name
    part_number str
    Product part number
    product_category str
    Product category
    provisioning_group str
    Product provisioning group
    ucm_rate_card_part_type str
    Rate card part type of Product
    unit_of_measure str
    Unit of Messure
    billingCategory String
    Metered service billing category
    name String
    Product name
    partNumber String
    Product part number
    productCategory String
    Product category
    provisioningGroup String
    Product provisioning group
    ucmRateCardPartType String
    Rate card part type of Product
    unitOfMeasure String
    Unit of Messure

    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.17.0 published on Friday, Nov 15, 2024 by Pulumi