Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.OsubSubscription.getRatecards
Explore with Pulumi AI
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:
- Compartment
Id string - The OCID of the compartment.
- Subscription
Id string - Line level Subscription Id
- Filters
List<Get
Ratecards Filter> - Part
Number string - This param is used to get the rate card(s) filterd by the partNumber
- Time
From string - This param is used to get the rate card(s) whose effective start date starts on or after a particular date
- Time
To string - This param is used to get the rate card(s) whose effective end date ends on or before a particular date
- XOne
Origin stringRegion - 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 string - The OCID of the compartment.
- Subscription
Id string - Line level Subscription Id
- Filters
[]Get
Ratecards Filter - Part
Number string - This param is used to get the rate card(s) filterd by the partNumber
- Time
From string - This param is used to get the rate card(s) whose effective start date starts on or after a particular date
- Time
To string - This param is used to get the rate card(s) whose effective end date ends on or before a particular date
- XOne
Origin stringRegion - 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 String - The OCID of the compartment.
- subscription
Id String - Line level Subscription Id
- filters
List<Get
Ratecards Filter> - part
Number String - This param is used to get the rate card(s) filterd by the partNumber
- time
From String - This param is used to get the rate card(s) whose effective start date starts on or after a particular date
- time
To String - This param is used to get the rate card(s) whose effective end date ends on or before a particular date
- x
One StringOrigin Region - 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 string - The OCID of the compartment.
- subscription
Id string - Line level Subscription Id
- filters
Get
Ratecards Filter[] - part
Number string - This param is used to get the rate card(s) filterd by the partNumber
- time
From string - This param is used to get the rate card(s) whose effective start date starts on or after a particular date
- time
To string - This param is used to get the rate card(s) whose effective end date ends on or before a particular date
- x
One stringOrigin Region - 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.
Get Ratecards Filter] - 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_ strorigin_ region - 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 String - The OCID of the compartment.
- subscription
Id String - Line level Subscription Id
- filters List<Property Map>
- part
Number String - This param is used to get the rate card(s) filterd by the partNumber
- time
From String - This param is used to get the rate card(s) whose effective start date starts on or after a particular date
- time
To String - This param is used to get the rate card(s) whose effective end date ends on or before a particular date
- x
One StringOrigin Region - 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:
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Rate
Cards List<GetRatecards Rate Card> - The list of rate_cards.
- Subscription
Id string - Filters
List<Get
Ratecards Filter> - Part
Number string - Product part numner
- Time
From string - Time
To string - XOne
Origin stringRegion
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Rate
Cards []GetRatecards Rate Card - The list of rate_cards.
- Subscription
Id string - Filters
[]Get
Ratecards Filter - Part
Number string - Product part numner
- Time
From string - Time
To string - XOne
Origin stringRegion
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- rate
Cards List<GetRatecards Rate Card> - The list of rate_cards.
- subscription
Id String - filters
List<Get
Ratecards Filter> - part
Number String - Product part numner
- time
From String - time
To String - x
One StringOrigin Region
- compartment
Id string - id string
- The provider-assigned unique ID for this managed resource.
- rate
Cards GetRatecards Rate Card[] - The list of rate_cards.
- subscription
Id string - filters
Get
Ratecards Filter[] - part
Number string - Product part numner
- time
From string - time
To string - x
One stringOrigin Region
- compartment_
id str - id str
- The provider-assigned unique ID for this managed resource.
- rate_
cards Sequence[osubsubscription.Get Ratecards Rate Card] - The list of rate_cards.
- subscription_
id str - filters
Sequence[osubsubscription.
Get Ratecards Filter] - part_
number str - Product part numner
- time_
from str - time_
to str - x_
one_ strorigin_ region
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- rate
Cards List<Property Map> - The list of rate_cards.
- subscription
Id String - filters List<Property Map>
- part
Number String - Product part numner
- time
From String - time
To String - x
One StringOrigin Region
Supporting Types
GetRatecardsFilter
GetRatecardsRateCard
- Currencies
List<Get
Ratecards Rate Card Currency> - Currency details
- Discretionary
Discount stringPercentage - Rate card discretionary discount percentage
- Is
Tier bool - Rate card price tier flag
- Net
Unit stringPrice - Rate card tier net unit price
- Overage
Price string - Rate card tier overage price
- Products
List<Get
Ratecards Rate Card Product> - Product description
- Rate
Card List<GetTiers Ratecards Rate Card Rate Card Tier> - List of tiered rate card prices
- Time
End string - Rate card end date
- Time
Start string - Rate card start date
- Currencies
[]Get
Ratecards Rate Card Currency - Currency details
- Discretionary
Discount stringPercentage - Rate card discretionary discount percentage
- Is
Tier bool - Rate card price tier flag
- Net
Unit stringPrice - Rate card tier net unit price
- Overage
Price string - Rate card tier overage price
- Products
[]Get
Ratecards Rate Card Product - Product description
- Rate
Card []GetTiers Ratecards Rate Card Rate Card Tier - List of tiered rate card prices
- Time
End string - Rate card end date
- Time
Start string - Rate card start date
- currencies
List<Get
Ratecards Rate Card Currency> - Currency details
- discretionary
Discount StringPercentage - Rate card discretionary discount percentage
- is
Tier Boolean - Rate card price tier flag
- net
Unit StringPrice - Rate card tier net unit price
- overage
Price String - Rate card tier overage price
- products
List<Get
Ratecards Rate Card Product> - Product description
- rate
Card List<GetTiers Ratecards Rate Card Rate Card Tier> - List of tiered rate card prices
- time
End String - Rate card end date
- time
Start String - Rate card start date
- currencies
Get
Ratecards Rate Card Currency[] - Currency details
- discretionary
Discount stringPercentage - Rate card discretionary discount percentage
- is
Tier boolean - Rate card price tier flag
- net
Unit stringPrice - Rate card tier net unit price
- overage
Price string - Rate card tier overage price
- products
Get
Ratecards Rate Card Product[] - Product description
- rate
Card GetTiers Ratecards Rate Card Rate Card Tier[] - List of tiered rate card prices
- time
End string - Rate card end date
- time
Start string - Rate card start date
- currencies
Sequence[osubsubscription.
Get Ratecards Rate Card Currency] - Currency details
- discretionary_
discount_ strpercentage - Rate card discretionary discount percentage
- is_
tier bool - Rate card price tier flag
- net_
unit_ strprice - Rate card tier net unit price
- overage_
price str - Rate card tier overage price
- products
Sequence[osubsubscription.
Get Ratecards Rate Card Product] - Product description
- rate_
card_ Sequence[osubsubscription.tiers Get Ratecards Rate Card Rate Card Tier] - 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
- discretionary
Discount StringPercentage - Rate card discretionary discount percentage
- is
Tier Boolean - Rate card price tier flag
- net
Unit StringPrice - Rate card tier net unit price
- overage
Price String - Rate card tier overage price
- products List<Property Map>
- Product description
- rate
Card List<Property Map>Tiers - List of tiered rate card prices
- time
End String - Rate card end date
- time
Start String - Rate card start date
GetRatecardsRateCardCurrency
- Iso
Code string - Currency Code
- Name string
- Product name
- Std
Precision string - Standard Precision of the Currency
- Iso
Code string - Currency Code
- Name string
- Product name
- Std
Precision string - Standard Precision of the Currency
- iso
Code String - Currency Code
- name String
- Product name
- std
Precision String - Standard Precision of the Currency
- iso
Code string - Currency Code
- name string
- Product name
- std
Precision string - Standard Precision of the Currency
- iso_
code str - Currency Code
- name str
- Product name
- std_
precision str - Standard Precision of the Currency
- iso
Code String - Currency Code
- name String
- Product name
- std
Precision String - Standard Precision of the Currency
GetRatecardsRateCardProduct
- Billing
Category string - Metered service billing category
- Name string
- Product name
- Part
Number string - This param is used to get the rate card(s) filterd by the partNumber
- Product
Category string - Product category
- Ucm
Rate stringCard Part Type - Rate card part type of Product
- Unit
Of stringMeasure - Unit of measure
- Billing
Category string - Metered service billing category
- Name string
- Product name
- Part
Number string - This param is used to get the rate card(s) filterd by the partNumber
- Product
Category string - Product category
- Ucm
Rate stringCard Part Type - Rate card part type of Product
- Unit
Of stringMeasure - Unit of measure
- billing
Category String - Metered service billing category
- name String
- Product name
- part
Number String - This param is used to get the rate card(s) filterd by the partNumber
- product
Category String - Product category
- ucm
Rate StringCard Part Type - Rate card part type of Product
- unit
Of StringMeasure - Unit of measure
- billing
Category string - Metered service billing category
- name string
- Product name
- part
Number string - This param is used to get the rate card(s) filterd by the partNumber
- product
Category string - Product category
- ucm
Rate stringCard Part Type - Rate card part type of Product
- unit
Of stringMeasure - 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_ strcard_ part_ type - Rate card part type of Product
- unit_
of_ strmeasure - Unit of measure
- billing
Category String - Metered service billing category
- name String
- Product name
- part
Number String - This param is used to get the rate card(s) filterd by the partNumber
- product
Category String - Product category
- ucm
Rate StringCard Part Type - Rate card part type of Product
- unit
Of StringMeasure - Unit of measure
GetRatecardsRateCardRateCardTier
- Net
Unit stringPrice - Rate card tier net unit price
- Overage
Price string - Rate card tier overage price
- Up
To stringQuantity - Rate card tier quantity range
- Net
Unit stringPrice - Rate card tier net unit price
- Overage
Price string - Rate card tier overage price
- Up
To stringQuantity - Rate card tier quantity range
- net
Unit StringPrice - Rate card tier net unit price
- overage
Price String - Rate card tier overage price
- up
To StringQuantity - Rate card tier quantity range
- net
Unit stringPrice - Rate card tier net unit price
- overage
Price string - Rate card tier overage price
- up
To stringQuantity - Rate card tier quantity range
- net_
unit_ strprice - Rate card tier net unit price
- overage_
price str - Rate card tier overage price
- up_
to_ strquantity - Rate card tier quantity range
- net
Unit StringPrice - Rate card tier net unit price
- overage
Price String - Rate card tier overage price
- up
To StringQuantity - 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.