Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getRatecards

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

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testRatecards = Output.Create(Oci.OsubSubscription.GetRatecards.InvokeAsync(new Oci.OsubSubscription.GetRatecardsArgs
        {
            CompartmentId = @var.Compartment_id,
            SubscriptionId = oci_osub_subscription_subscription.Test_subscription.Id,
            PartNumber = @var.Ratecard_part_number,
            TimeFrom = @var.Ratecard_time_from,
            TimeTo = @var.Ratecard_time_to,
            XOneOriginRegion = @var.Ratecard_x_one_origin_region,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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:    _var.Compartment_id,
			SubscriptionId:   oci_osub_subscription_subscription.Test_subscription.Id,
			PartNumber:       pulumi.StringRef(_var.Ratecard_part_number),
			TimeFrom:         pulumi.StringRef(_var.Ratecard_time_from),
			TimeTo:           pulumi.StringRef(_var.Ratecard_time_to),
			XOneOriginRegion: pulumi.StringRef(_var.Ratecard_x_one_origin_region),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_ratecards = oci.OsubSubscription.get_ratecards(compartment_id=var["compartment_id"],
    subscription_id=oci_osub_subscription_subscription["test_subscription"]["id"],
    part_number=var["ratecard_part_number"],
    time_from=var["ratecard_time_from"],
    time_to=var["ratecard_time_to"],
    x_one_origin_region=var["ratecard_x_one_origin_region"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testRatecards = oci.OsubSubscription.getRatecards({
    compartmentId: _var.compartment_id,
    subscriptionId: oci_osub_subscription_subscription.test_subscription.id,
    partNumber: _var.ratecard_part_number,
    timeFrom: _var.ratecard_time_from,
    timeTo: _var.ratecard_time_to,
    xOneOriginRegion: _var.ratecard_x_one_origin_region,
});

Coming soon!

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 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 GetRatecardsRateCard]

The list of rate_cards.

subscription_id str
filters 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 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 GetRatecardsRateCardProduct]

Product description

rate_card_tiers 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
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.