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

oci.OsubSubscription.getRatecards

Explore with Pulumi AI

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

    This data source provides the list of Ratecards in Oracle Cloud Infrastructure Osub Subscription 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.OsubSubscription.getRatecards({
        compartmentId: compartmentId,
        subscriptionId: testSubscription.id,
        partNumber: ratecardPartNumber,
        timeFrom: ratecardTimeFrom,
        timeTo: ratecardTimeTo,
        xOneOriginRegion: ratecardXOneOriginRegion,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_ratecards = oci.OsubSubscription.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,
        x_one_origin_region=ratecard_x_one_origin_region)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/OsubSubscription"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := OsubSubscription.GetRatecards(ctx, &osubsubscription.GetRatecardsArgs{
    			CompartmentId:    compartmentId,
    			SubscriptionId:   testSubscription.Id,
    			PartNumber:       pulumi.StringRef(ratecardPartNumber),
    			TimeFrom:         pulumi.StringRef(ratecardTimeFrom),
    			TimeTo:           pulumi.StringRef(ratecardTimeTo),
    			XOneOriginRegion: pulumi.StringRef(ratecardXOneOriginRegion),
    		}, 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.OsubSubscription.GetRatecards.Invoke(new()
        {
            CompartmentId = compartmentId,
            SubscriptionId = testSubscription.Id,
            PartNumber = ratecardPartNumber,
            TimeFrom = ratecardTimeFrom,
            TimeTo = ratecardTimeTo,
            XOneOriginRegion = ratecardXOneOriginRegion,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.OsubSubscription.OsubSubscriptionFunctions;
    import com.pulumi.oci.OsubSubscription.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 = OsubSubscriptionFunctions.getRatecards(GetRatecardsArgs.builder()
                .compartmentId(compartmentId)
                .subscriptionId(testSubscription.id())
                .partNumber(ratecardPartNumber)
                .timeFrom(ratecardTimeFrom)
                .timeTo(ratecardTimeTo)
                .xOneOriginRegion(ratecardXOneOriginRegion)
                .build());
    
        }
    }
    
    variables:
      testRatecards:
        fn::invoke:
          Function: oci:OsubSubscription:getRatecards
          Arguments:
            compartmentId: ${compartmentId}
            subscriptionId: ${testSubscription.id}
            partNumber: ${ratecardPartNumber}
            timeFrom: ${ratecardTimeFrom}
            timeTo: ${ratecardTimeTo}
            xOneOriginRegion: ${ratecardXOneOriginRegion}
    

    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[_osubsubscription.GetRatecardsFilter]] = None,
                      part_number: Optional[str] = None,
                      subscription_id: Optional[str] = None,
                      time_from: Optional[str] = None,
                      time_to: Optional[str] = None,
                      x_one_origin_region: 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[_osubsubscription.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,
                      x_one_origin_region: 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:OsubSubscription/getRatecards:getRatecards
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the 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
    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 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
    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 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
    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 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
    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 compartment.
    subscription_id str
    Line level Subscription Id
    filters Sequence[osubsubscription.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
    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 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
    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.

    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
    XOneOriginRegion 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
    XOneOriginRegion 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
    xOneOriginRegion 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
    xOneOriginRegion string
    compartment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    rate_cards Sequence[osubsubscription.GetRatecardsRateCard]
    The list of rate_cards.
    subscription_id str
    filters Sequence[osubsubscription.GetRatecardsFilter]
    part_number str
    Product part numner
    time_from str
    time_to str
    x_one_origin_region 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
    xOneOriginRegion 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
    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
    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
    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
    timeEnd string
    Rate card end date
    timeStart string
    Rate card start date
    currencies Sequence[osubsubscription.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[osubsubscription.GetRatecardsRateCardProduct]
    Product description
    rate_card_tiers Sequence[osubsubscription.GetRatecardsRateCardRateCardTier]
    List of tiered rate card prices
    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
    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.17.0 published on Friday, Nov 15, 2024 by Pulumi