1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OneSubsription
  5. getInvoiceLineComputedUsages
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.OneSubsription.getInvoiceLineComputedUsages

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides the list of Invoice Line Computed Usages in Oracle Cloud Infrastructure Onesubscription service.

    This is a collection API which returns a list of Invoiced Computed Usages for given Invoiceline id.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testInvoiceLineComputedUsages = oci.OneSubsription.getInvoiceLineComputedUsages({
        compartmentId: _var.compartment_id,
        invoiceLineId: oci_onesubscription_invoice_line.test_invoice_line.id,
        fields: _var.invoice_line_computed_usage_fields,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_invoice_line_computed_usages = oci.OneSubsription.get_invoice_line_computed_usages(compartment_id=var["compartment_id"],
        invoice_line_id=oci_onesubscription_invoice_line["test_invoice_line"]["id"],
        fields=var["invoice_line_computed_usage_fields"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/OneSubsription"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := OneSubsription.GetInvoiceLineComputedUsages(ctx, &onesubsription.GetInvoiceLineComputedUsagesArgs{
    			CompartmentId: _var.Compartment_id,
    			InvoiceLineId: oci_onesubscription_invoice_line.Test_invoice_line.Id,
    			Fields:        _var.Invoice_line_computed_usage_fields,
    		}, 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 testInvoiceLineComputedUsages = Oci.OneSubsription.GetInvoiceLineComputedUsages.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            InvoiceLineId = oci_onesubscription_invoice_line.Test_invoice_line.Id,
            Fields = @var.Invoice_line_computed_usage_fields,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OneSubsription.OneSubsriptionFunctions;
    import com.pulumi.oci.OneSubsription.inputs.GetInvoiceLineComputedUsagesArgs;
    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 testInvoiceLineComputedUsages = OneSubsriptionFunctions.getInvoiceLineComputedUsages(GetInvoiceLineComputedUsagesArgs.builder()
                .compartmentId(var_.compartment_id())
                .invoiceLineId(oci_onesubscription_invoice_line.test_invoice_line().id())
                .fields(var_.invoice_line_computed_usage_fields())
                .build());
    
        }
    }
    
    variables:
      testInvoiceLineComputedUsages:
        fn::invoke:
          Function: oci:OneSubsription:getInvoiceLineComputedUsages
          Arguments:
            compartmentId: ${var.compartment_id}
            invoiceLineId: ${oci_onesubscription_invoice_line.test_invoice_line.id}
            fields: ${var.invoice_line_computed_usage_fields}
    

    Using getInvoiceLineComputedUsages

    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 getInvoiceLineComputedUsages(args: GetInvoiceLineComputedUsagesArgs, opts?: InvokeOptions): Promise<GetInvoiceLineComputedUsagesResult>
    function getInvoiceLineComputedUsagesOutput(args: GetInvoiceLineComputedUsagesOutputArgs, opts?: InvokeOptions): Output<GetInvoiceLineComputedUsagesResult>
    def get_invoice_line_computed_usages(compartment_id: Optional[str] = None,
                                         fields: Optional[Sequence[str]] = None,
                                         filters: Optional[Sequence[_onesubsription.GetInvoiceLineComputedUsagesFilter]] = None,
                                         invoice_line_id: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetInvoiceLineComputedUsagesResult
    def get_invoice_line_computed_usages_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                         fields: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                         filters: Optional[pulumi.Input[Sequence[pulumi.Input[_onesubsription.GetInvoiceLineComputedUsagesFilterArgs]]]] = None,
                                         invoice_line_id: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetInvoiceLineComputedUsagesResult]
    func GetInvoiceLineComputedUsages(ctx *Context, args *GetInvoiceLineComputedUsagesArgs, opts ...InvokeOption) (*GetInvoiceLineComputedUsagesResult, error)
    func GetInvoiceLineComputedUsagesOutput(ctx *Context, args *GetInvoiceLineComputedUsagesOutputArgs, opts ...InvokeOption) GetInvoiceLineComputedUsagesResultOutput

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

    public static class GetInvoiceLineComputedUsages 
    {
        public static Task<GetInvoiceLineComputedUsagesResult> InvokeAsync(GetInvoiceLineComputedUsagesArgs args, InvokeOptions? opts = null)
        public static Output<GetInvoiceLineComputedUsagesResult> Invoke(GetInvoiceLineComputedUsagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInvoiceLineComputedUsagesResult> getInvoiceLineComputedUsages(GetInvoiceLineComputedUsagesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:OneSubsription/getInvoiceLineComputedUsages:getInvoiceLineComputedUsages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the root compartment.
    InvoiceLineId string
    Invoice Line Identifier - Primary Key SPM
    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.
    Filters List<GetInvoiceLineComputedUsagesFilter>
    CompartmentId string
    The OCID of the root compartment.
    InvoiceLineId string
    Invoice Line Identifier - Primary Key SPM
    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.
    Filters []GetInvoiceLineComputedUsagesFilter
    compartmentId String
    The OCID of the root compartment.
    invoiceLineId String
    Invoice Line Identifier - Primary Key SPM
    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.
    filters List<GetInvoiceLineComputedUsagesFilter>
    compartmentId string
    The OCID of the root compartment.
    invoiceLineId string
    Invoice Line Identifier - Primary Key SPM
    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.
    filters GetInvoiceLineComputedUsagesFilter[]
    compartment_id str
    The OCID of the root compartment.
    invoice_line_id str
    Invoice Line Identifier - Primary Key SPM
    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.
    filters Sequence[onesubsription.GetInvoiceLineComputedUsagesFilter]
    compartmentId String
    The OCID of the root compartment.
    invoiceLineId String
    Invoice Line Identifier - Primary Key SPM
    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.
    filters List<Property Map>

    getInvoiceLineComputedUsages Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    InvoiceLineId string
    InvoicelineComputedUsages List<GetInvoiceLineComputedUsagesInvoicelineComputedUsage>
    The list of invoiceline_computed_usages.
    Fields List<string>
    Filters List<GetInvoiceLineComputedUsagesFilter>
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    InvoiceLineId string
    InvoicelineComputedUsages []GetInvoiceLineComputedUsagesInvoicelineComputedUsage
    The list of invoiceline_computed_usages.
    Fields []string
    Filters []GetInvoiceLineComputedUsagesFilter
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    invoiceLineId String
    invoicelineComputedUsages List<GetInvoiceLineComputedUsagesInvoicelineComputedUsage>
    The list of invoiceline_computed_usages.
    fields List<String>
    filters List<GetInvoiceLineComputedUsagesFilter>
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    invoiceLineId string
    invoicelineComputedUsages GetInvoiceLineComputedUsagesInvoicelineComputedUsage[]
    The list of invoiceline_computed_usages.
    fields string[]
    filters GetInvoiceLineComputedUsagesFilter[]
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    invoiceLineId String
    invoicelineComputedUsages List<Property Map>
    The list of invoiceline_computed_usages.
    fields List<String>
    filters List<Property Map>

    Supporting Types

    GetInvoiceLineComputedUsagesFilter

    Name string
    Product name
    Values List<string>
    Regex bool
    Name string
    Product name
    Values []string
    Regex bool
    name String
    Product name
    values List<String>
    regex Boolean
    name string
    Product name
    values string[]
    regex boolean
    name str
    Product name
    values Sequence[str]
    regex bool
    name String
    Product name
    values List<String>
    regex Boolean

    GetInvoiceLineComputedUsagesInvoicelineComputedUsage

    Cost double
    Sum of Usage/Service Billing Line net Amount
    CostRounded double
    Computed Line Amount rounded.
    NetUnitPrice double
    Net Unit Price for the product in consideration, price actual.
    ParentProducts List<GetInvoiceLineComputedUsagesInvoicelineComputedUsageParentProduct>
    Product description
    Products List<GetInvoiceLineComputedUsagesInvoicelineComputedUsageProduct>
    Product description
    Quantity double
    Total Quantity that was used for computation
    TimeMeteredOn string
    Metered Service date.
    Type string
    Usage compute type in SPM.
    Cost float64
    Sum of Usage/Service Billing Line net Amount
    CostRounded float64
    Computed Line Amount rounded.
    NetUnitPrice float64
    Net Unit Price for the product in consideration, price actual.
    ParentProducts []GetInvoiceLineComputedUsagesInvoicelineComputedUsageParentProduct
    Product description
    Products []GetInvoiceLineComputedUsagesInvoicelineComputedUsageProduct
    Product description
    Quantity float64
    Total Quantity that was used for computation
    TimeMeteredOn string
    Metered Service date.
    Type string
    Usage compute type in SPM.
    cost Double
    Sum of Usage/Service Billing Line net Amount
    costRounded Double
    Computed Line Amount rounded.
    netUnitPrice Double
    Net Unit Price for the product in consideration, price actual.
    parentProducts List<GetInvoiceLineComputedUsagesInvoicelineComputedUsageParentProduct>
    Product description
    products List<GetInvoiceLineComputedUsagesInvoicelineComputedUsageProduct>
    Product description
    quantity Double
    Total Quantity that was used for computation
    timeMeteredOn String
    Metered Service date.
    type String
    Usage compute type in SPM.
    cost number
    Sum of Usage/Service Billing Line net Amount
    costRounded number
    Computed Line Amount rounded.
    netUnitPrice number
    Net Unit Price for the product in consideration, price actual.
    parentProducts GetInvoiceLineComputedUsagesInvoicelineComputedUsageParentProduct[]
    Product description
    products GetInvoiceLineComputedUsagesInvoicelineComputedUsageProduct[]
    Product description
    quantity number
    Total Quantity that was used for computation
    timeMeteredOn string
    Metered Service date.
    type string
    Usage compute type in SPM.
    cost float
    Sum of Usage/Service Billing Line net Amount
    cost_rounded float
    Computed Line Amount rounded.
    net_unit_price float
    Net Unit Price for the product in consideration, price actual.
    parent_products Sequence[onesubsription.GetInvoiceLineComputedUsagesInvoicelineComputedUsageParentProduct]
    Product description
    products Sequence[onesubsription.GetInvoiceLineComputedUsagesInvoicelineComputedUsageProduct]
    Product description
    quantity float
    Total Quantity that was used for computation
    time_metered_on str
    Metered Service date.
    type str
    Usage compute type in SPM.
    cost Number
    Sum of Usage/Service Billing Line net Amount
    costRounded Number
    Computed Line Amount rounded.
    netUnitPrice Number
    Net Unit Price for the product in consideration, price actual.
    parentProducts List<Property Map>
    Product description
    products List<Property Map>
    Product description
    quantity Number
    Total Quantity that was used for computation
    timeMeteredOn String
    Metered Service date.
    type String
    Usage compute type in SPM.

    GetInvoiceLineComputedUsagesInvoicelineComputedUsageParentProduct

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

    GetInvoiceLineComputedUsagesInvoicelineComputedUsageProduct

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

    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 v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi