1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OneSubsription
  5. getRatecards
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.OneSubsription.getRatecards

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides the list of Ratecards in Oracle Cloud Infrastructure Onesubscription service.

    List API that returns all ratecards for given Subscription Id and Account ID (if provided) and for a particular date range

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRatecards = oci.OneSubsription.getRatecards({
        compartmentId: compartmentId,
        subscriptionId: testSubscription.id,
        partNumber: ratecardPartNumber,
        timeFrom: ratecardTimeFrom,
        timeTo: ratecardTimeTo,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_ratecards = oci.OneSubsription.get_ratecards(compartment_id=compartment_id,
        subscription_id=test_subscription["id"],
        part_number=ratecard_part_number,
        time_from=ratecard_time_from,
        time_to=ratecard_time_to)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/OneSubsription"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := OneSubsription.GetRatecards(ctx, &onesubsription.GetRatecardsArgs{
    			CompartmentId:  compartmentId,
    			SubscriptionId: testSubscription.Id,
    			PartNumber:     pulumi.StringRef(ratecardPartNumber),
    			TimeFrom:       pulumi.StringRef(ratecardTimeFrom),
    			TimeTo:         pulumi.StringRef(ratecardTimeTo),
    		}, 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 testRatecards = Oci.OneSubsription.GetRatecards.Invoke(new()
        {
            CompartmentId = compartmentId,
            SubscriptionId = testSubscription.Id,
            PartNumber = ratecardPartNumber,
            TimeFrom = ratecardTimeFrom,
            TimeTo = ratecardTimeTo,
        });
    
    });
    
    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.GetRatecardsArgs;
    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 testRatecards = OneSubsriptionFunctions.getRatecards(GetRatecardsArgs.builder()
                .compartmentId(compartmentId)
                .subscriptionId(testSubscription.id())
                .partNumber(ratecardPartNumber)
                .timeFrom(ratecardTimeFrom)
                .timeTo(ratecardTimeTo)
                .build());
    
        }
    }
    
    variables:
      testRatecards:
        fn::invoke:
          Function: oci:OneSubsription:getRatecards
          Arguments:
            compartmentId: ${compartmentId}
            subscriptionId: ${testSubscription.id}
            partNumber: ${ratecardPartNumber}
            timeFrom: ${ratecardTimeFrom}
            timeTo: ${ratecardTimeTo}
    

    Using getRatecards

    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 getRatecards(args: GetRatecardsArgs, opts?: InvokeOptions): Promise<GetRatecardsResult>
    function getRatecardsOutput(args: GetRatecardsOutputArgs, opts?: InvokeOptions): Output<GetRatecardsResult>
    def get_ratecards(compartment_id: Optional[str] = None,
                      filters: Optional[Sequence[_onesubsription.GetRatecardsFilter]] = None,
                      part_number: Optional[str] = None,
                      subscription_id: Optional[str] = None,
                      time_from: Optional[str] = None,
                      time_to: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetRatecardsResult
    def get_ratecards_output(compartment_id: Optional[pulumi.Input[str]] = None,
                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[_onesubsription.GetRatecardsFilterArgs]]]] = None,
                      part_number: Optional[pulumi.Input[str]] = None,
                      subscription_id: Optional[pulumi.Input[str]] = None,
                      time_from: Optional[pulumi.Input[str]] = None,
                      time_to: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetRatecardsResult]
    func GetRatecards(ctx *Context, args *GetRatecardsArgs, opts ...InvokeOption) (*GetRatecardsResult, error)
    func GetRatecardsOutput(ctx *Context, args *GetRatecardsOutputArgs, opts ...InvokeOption) GetRatecardsResultOutput

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

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

    The following arguments are supported:

    CompartmentId string
    The OCID of the root compartment.
    SubscriptionId string
    Line level Subscription Id
    Filters List<GetRatecardsFilter>
    PartNumber string
    This param is used to get the rate card(s) filterd by the partNumber
    TimeFrom string
    This param is used to get the rate card(s) whose effective start date starts on or after a particular date
    TimeTo string
    This param is used to get the rate card(s) whose effective end date ends on or before a particular date
    CompartmentId string
    The OCID of the root compartment.
    SubscriptionId string
    Line level Subscription Id
    Filters []GetRatecardsFilter
    PartNumber string
    This param is used to get the rate card(s) filterd by the partNumber
    TimeFrom string
    This param is used to get the rate card(s) whose effective start date starts on or after a particular date
    TimeTo string
    This param is used to get the rate card(s) whose effective end date ends on or before a particular date
    compartmentId String
    The OCID of the root compartment.
    subscriptionId String
    Line level Subscription Id
    filters List<GetRatecardsFilter>
    partNumber String
    This param is used to get the rate card(s) filterd by the partNumber
    timeFrom String
    This param is used to get the rate card(s) whose effective start date starts on or after a particular date
    timeTo String
    This param is used to get the rate card(s) whose effective end date ends on or before a particular date
    compartmentId string
    The OCID of the root compartment.
    subscriptionId string
    Line level Subscription Id
    filters GetRatecardsFilter[]
    partNumber string
    This param is used to get the rate card(s) filterd by the partNumber
    timeFrom string
    This param is used to get the rate card(s) whose effective start date starts on or after a particular date
    timeTo string
    This param is used to get the rate card(s) whose effective end date ends on or before a particular date
    compartment_id str
    The OCID of the root compartment.
    subscription_id str
    Line level Subscription Id
    filters Sequence[onesubsription.GetRatecardsFilter]
    part_number str
    This param is used to get the rate card(s) filterd by the partNumber
    time_from str
    This param is used to get the rate card(s) whose effective start date starts on or after a particular date
    time_to str
    This param is used to get the rate card(s) whose effective end date ends on or before a particular date
    compartmentId String
    The OCID of the root compartment.
    subscriptionId String
    Line level Subscription Id
    filters List<Property Map>
    partNumber String
    This param is used to get the rate card(s) filterd by the partNumber
    timeFrom String
    This param is used to get the rate card(s) whose effective start date starts on or after a particular date
    timeTo String
    This param is used to get the rate card(s) whose effective end date ends on or before a particular date

    getRatecards Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    RateCards List<GetRatecardsRateCard>
    The list of rate_cards.
    SubscriptionId string
    Filters List<GetRatecardsFilter>
    PartNumber string
    Product part numner
    TimeFrom string
    TimeTo string
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    RateCards []GetRatecardsRateCard
    The list of rate_cards.
    SubscriptionId string
    Filters []GetRatecardsFilter
    PartNumber string
    Product part numner
    TimeFrom string
    TimeTo string
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    rateCards List<GetRatecardsRateCard>
    The list of rate_cards.
    subscriptionId String
    filters List<GetRatecardsFilter>
    partNumber String
    Product part numner
    timeFrom String
    timeTo String
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    rateCards GetRatecardsRateCard[]
    The list of rate_cards.
    subscriptionId string
    filters GetRatecardsFilter[]
    partNumber string
    Product part numner
    timeFrom string
    timeTo string
    compartment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    rate_cards Sequence[onesubsription.GetRatecardsRateCard]
    The list of rate_cards.
    subscription_id str
    filters Sequence[onesubsription.GetRatecardsFilter]
    part_number str
    Product part numner
    time_from str
    time_to str
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    rateCards List<Property Map>
    The list of rate_cards.
    subscriptionId String
    filters List<Property Map>
    partNumber String
    Product part numner
    timeFrom String
    timeTo String

    Supporting Types

    GetRatecardsFilter

    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

    GetRatecardsRateCard

    Currencies List<GetRatecardsRateCardCurrency>
    Currency details
    DiscretionaryDiscountPercentage string
    Rate card discretionary discount percentage
    IsTier bool
    Rate card price tier flag
    NetUnitPrice string
    Rate card tier net unit price
    OveragePrice string
    Rate card tier overage price
    Products List<GetRatecardsRateCardProduct>
    Product description
    RateCardTiers List<GetRatecardsRateCardRateCardTier>
    List of tiered rate card prices
    SubscribedServiceId string
    SPM internal Subscribed Service ID
    TimeEnd string
    Rate card end date
    TimeStart string
    Rate card start date
    Currencies []GetRatecardsRateCardCurrency
    Currency details
    DiscretionaryDiscountPercentage string
    Rate card discretionary discount percentage
    IsTier bool
    Rate card price tier flag
    NetUnitPrice string
    Rate card tier net unit price
    OveragePrice string
    Rate card tier overage price
    Products []GetRatecardsRateCardProduct
    Product description
    RateCardTiers []GetRatecardsRateCardRateCardTier
    List of tiered rate card prices
    SubscribedServiceId string
    SPM internal Subscribed Service ID
    TimeEnd string
    Rate card end date
    TimeStart string
    Rate card start date
    currencies List<GetRatecardsRateCardCurrency>
    Currency details
    discretionaryDiscountPercentage String
    Rate card discretionary discount percentage
    isTier Boolean
    Rate card price tier flag
    netUnitPrice String
    Rate card tier net unit price
    overagePrice String
    Rate card tier overage price
    products List<GetRatecardsRateCardProduct>
    Product description
    rateCardTiers List<GetRatecardsRateCardRateCardTier>
    List of tiered rate card prices
    subscribedServiceId String
    SPM internal Subscribed Service ID
    timeEnd String
    Rate card end date
    timeStart String
    Rate card start date
    currencies GetRatecardsRateCardCurrency[]
    Currency details
    discretionaryDiscountPercentage string
    Rate card discretionary discount percentage
    isTier boolean
    Rate card price tier flag
    netUnitPrice string
    Rate card tier net unit price
    overagePrice string
    Rate card tier overage price
    products GetRatecardsRateCardProduct[]
    Product description
    rateCardTiers GetRatecardsRateCardRateCardTier[]
    List of tiered rate card prices
    subscribedServiceId string
    SPM internal Subscribed Service ID
    timeEnd string
    Rate card end date
    timeStart string
    Rate card start date
    currencies Sequence[onesubsription.GetRatecardsRateCardCurrency]
    Currency details
    discretionary_discount_percentage str
    Rate card discretionary discount percentage
    is_tier bool
    Rate card price tier flag
    net_unit_price str
    Rate card tier net unit price
    overage_price str
    Rate card tier overage price
    products Sequence[onesubsription.GetRatecardsRateCardProduct]
    Product description
    rate_card_tiers Sequence[onesubsription.GetRatecardsRateCardRateCardTier]
    List of tiered rate card prices
    subscribed_service_id str
    SPM internal Subscribed Service ID
    time_end str
    Rate card end date
    time_start str
    Rate card start date
    currencies List<Property Map>
    Currency details
    discretionaryDiscountPercentage String
    Rate card discretionary discount percentage
    isTier Boolean
    Rate card price tier flag
    netUnitPrice String
    Rate card tier net unit price
    overagePrice String
    Rate card tier overage price
    products List<Property Map>
    Product description
    rateCardTiers List<Property Map>
    List of tiered rate card prices
    subscribedServiceId String
    SPM internal Subscribed Service ID
    timeEnd String
    Rate card end date
    timeStart String
    Rate card start date

    GetRatecardsRateCardCurrency

    IsoCode string
    Currency Code
    Name string
    Product name
    StdPrecision string
    Standard Precision of the Currency
    IsoCode string
    Currency Code
    Name string
    Product name
    StdPrecision string
    Standard Precision of the Currency
    isoCode String
    Currency Code
    name String
    Product name
    stdPrecision String
    Standard Precision of the Currency
    isoCode string
    Currency Code
    name string
    Product name
    stdPrecision string
    Standard Precision of the Currency
    iso_code str
    Currency Code
    name str
    Product name
    std_precision str
    Standard Precision of the Currency
    isoCode String
    Currency Code
    name String
    Product name
    stdPrecision String
    Standard Precision of the Currency

    GetRatecardsRateCardProduct

    BillingCategory string
    Metered service billing category
    Name string
    Product name
    PartNumber string
    This param is used to get the rate card(s) filterd by the partNumber
    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
    This param is used to get the rate card(s) filterd by the partNumber
    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
    This param is used to get the rate card(s) filterd by the partNumber
    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
    This param is used to get the rate card(s) filterd by the partNumber
    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
    This param is used to get the rate card(s) filterd by the partNumber
    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
    This param is used to get the rate card(s) filterd by the partNumber
    productCategory String
    Product category
    ucmRateCardPartType String
    Rate card part type of Product
    unitOfMeasure String
    Unit of measure

    GetRatecardsRateCardRateCardTier

    NetUnitPrice string
    Rate card tier net unit price
    OveragePrice string
    Rate card tier overage price
    UpToQuantity string
    Rate card tier quantity range
    NetUnitPrice string
    Rate card tier net unit price
    OveragePrice string
    Rate card tier overage price
    UpToQuantity string
    Rate card tier quantity range
    netUnitPrice String
    Rate card tier net unit price
    overagePrice String
    Rate card tier overage price
    upToQuantity String
    Rate card tier quantity range
    netUnitPrice string
    Rate card tier net unit price
    overagePrice string
    Rate card tier overage price
    upToQuantity string
    Rate card tier quantity range
    net_unit_price str
    Rate card tier net unit price
    overage_price str
    Rate card tier overage price
    up_to_quantity str
    Rate card tier quantity range
    netUnitPrice String
    Rate card tier net unit price
    overagePrice String
    Rate card tier overage price
    upToQuantity String
    Rate card tier quantity range

    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.11.0 published on Thursday, Sep 19, 2024 by Pulumi