Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.UsageProxy.getSubscriptionProducts
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides the list of Subscription Products in Oracle Cloud Infrastructure Usage Proxy service.
Provides product information that is specific to a reward usage period and its usage details.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSubscriptionProducts = oci.UsageProxy.getSubscriptionProducts({
    subscriptionId: testSubscription.id,
    tenancyId: testTenancy.id,
    usagePeriodKey: subscriptionProductUsagePeriodKey,
    producttype: subscriptionProductProducttype,
});
import pulumi
import pulumi_oci as oci
test_subscription_products = oci.UsageProxy.get_subscription_products(subscription_id=test_subscription["id"],
    tenancy_id=test_tenancy["id"],
    usage_period_key=subscription_product_usage_period_key,
    producttype=subscription_product_producttype)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/UsageProxy"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := UsageProxy.GetSubscriptionProducts(ctx, &usageproxy.GetSubscriptionProductsArgs{
			SubscriptionId: testSubscription.Id,
			TenancyId:      testTenancy.Id,
			UsagePeriodKey: subscriptionProductUsagePeriodKey,
			Producttype:    pulumi.StringRef(subscriptionProductProducttype),
		}, 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 testSubscriptionProducts = Oci.UsageProxy.GetSubscriptionProducts.Invoke(new()
    {
        SubscriptionId = testSubscription.Id,
        TenancyId = testTenancy.Id,
        UsagePeriodKey = subscriptionProductUsagePeriodKey,
        Producttype = subscriptionProductProducttype,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.UsageProxy.UsageProxyFunctions;
import com.pulumi.oci.UsageProxy.inputs.GetSubscriptionProductsArgs;
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 testSubscriptionProducts = UsageProxyFunctions.getSubscriptionProducts(GetSubscriptionProductsArgs.builder()
            .subscriptionId(testSubscription.id())
            .tenancyId(testTenancy.id())
            .usagePeriodKey(subscriptionProductUsagePeriodKey)
            .producttype(subscriptionProductProducttype)
            .build());
    }
}
variables:
  testSubscriptionProducts:
    fn::invoke:
      Function: oci:UsageProxy:getSubscriptionProducts
      Arguments:
        subscriptionId: ${testSubscription.id}
        tenancyId: ${testTenancy.id}
        usagePeriodKey: ${subscriptionProductUsagePeriodKey}
        producttype: ${subscriptionProductProducttype}
Using getSubscriptionProducts
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 getSubscriptionProducts(args: GetSubscriptionProductsArgs, opts?: InvokeOptions): Promise<GetSubscriptionProductsResult>
function getSubscriptionProductsOutput(args: GetSubscriptionProductsOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionProductsResult>def get_subscription_products(filters: Optional[Sequence[_usageproxy.GetSubscriptionProductsFilter]] = None,
                              producttype: Optional[str] = None,
                              subscription_id: Optional[str] = None,
                              tenancy_id: Optional[str] = None,
                              usage_period_key: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetSubscriptionProductsResult
def get_subscription_products_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_usageproxy.GetSubscriptionProductsFilterArgs]]]] = None,
                              producttype: Optional[pulumi.Input[str]] = None,
                              subscription_id: Optional[pulumi.Input[str]] = None,
                              tenancy_id: Optional[pulumi.Input[str]] = None,
                              usage_period_key: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionProductsResult]func GetSubscriptionProducts(ctx *Context, args *GetSubscriptionProductsArgs, opts ...InvokeOption) (*GetSubscriptionProductsResult, error)
func GetSubscriptionProductsOutput(ctx *Context, args *GetSubscriptionProductsOutputArgs, opts ...InvokeOption) GetSubscriptionProductsResultOutput> Note: This function is named GetSubscriptionProducts in the Go SDK.
public static class GetSubscriptionProducts 
{
    public static Task<GetSubscriptionProductsResult> InvokeAsync(GetSubscriptionProductsArgs args, InvokeOptions? opts = null)
    public static Output<GetSubscriptionProductsResult> Invoke(GetSubscriptionProductsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSubscriptionProductsResult> getSubscriptionProducts(GetSubscriptionProductsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:UsageProxy/getSubscriptionProducts:getSubscriptionProducts
  arguments:
    # arguments dictionaryThe following arguments are supported:
- SubscriptionId string
- The subscription ID for which rewards information is requested for.
- TenancyId string
- The OCID of the tenancy.
- UsagePeriod stringKey 
- The SPM Identifier for the usage period.
- Filters
List<GetSubscription Products Filter> 
- Producttype string
- The field to specify the type of product.
- SubscriptionId string
- The subscription ID for which rewards information is requested for.
- TenancyId string
- The OCID of the tenancy.
- UsagePeriod stringKey 
- The SPM Identifier for the usage period.
- Filters
[]GetSubscription Products Filter 
- Producttype string
- The field to specify the type of product.
- subscriptionId String
- The subscription ID for which rewards information is requested for.
- tenancyId String
- The OCID of the tenancy.
- usagePeriod StringKey 
- The SPM Identifier for the usage period.
- filters
List<GetSubscription Products Filter> 
- producttype String
- The field to specify the type of product.
- subscriptionId string
- The subscription ID for which rewards information is requested for.
- tenancyId string
- The OCID of the tenancy.
- usagePeriod stringKey 
- The SPM Identifier for the usage period.
- filters
GetSubscription Products Filter[] 
- producttype string
- The field to specify the type of product.
- subscription_id str
- The subscription ID for which rewards information is requested for.
- tenancy_id str
- The OCID of the tenancy.
- usage_period_ strkey 
- The SPM Identifier for the usage period.
- filters
Sequence[usageproxy.Get Subscription Products Filter] 
- producttype str
- The field to specify the type of product.
- subscriptionId String
- The subscription ID for which rewards information is requested for.
- tenancyId String
- The OCID of the tenancy.
- usagePeriod StringKey 
- The SPM Identifier for the usage period.
- filters List<Property Map>
- producttype String
- The field to specify the type of product.
getSubscriptionProducts Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- ProductCollections List<GetSubscription Products Product Collection> 
- The list of product_collection.
- SubscriptionId string
- TenancyId string
- UsagePeriod stringKey 
- Filters
List<GetSubscription Products Filter> 
- Producttype string
- Id string
- The provider-assigned unique ID for this managed resource.
- ProductCollections []GetSubscription Products Product Collection 
- The list of product_collection.
- SubscriptionId string
- TenancyId string
- UsagePeriod stringKey 
- Filters
[]GetSubscription Products Filter 
- Producttype string
- id String
- The provider-assigned unique ID for this managed resource.
- productCollections List<GetSubscription Products Product Collection> 
- The list of product_collection.
- subscriptionId String
- tenancyId String
- usagePeriod StringKey 
- filters
List<GetSubscription Products Filter> 
- producttype String
- id string
- The provider-assigned unique ID for this managed resource.
- productCollections GetSubscription Products Product Collection[] 
- The list of product_collection.
- subscriptionId string
- tenancyId string
- usagePeriod stringKey 
- filters
GetSubscription Products Filter[] 
- producttype string
- id str
- The provider-assigned unique ID for this managed resource.
- product_collections Sequence[usageproxy.Get Subscription Products Product Collection] 
- The list of product_collection.
- subscription_id str
- tenancy_id str
- usage_period_ strkey 
- filters
Sequence[usageproxy.Get Subscription Products Filter] 
- producttype str
- id String
- The provider-assigned unique ID for this managed resource.
- productCollections List<Property Map>
- The list of product_collection.
- subscriptionId String
- tenancyId String
- usagePeriod StringKey 
- filters List<Property Map>
- producttype String
Supporting Types
GetSubscriptionProductsFilter   
GetSubscriptionProductsProductCollection    
- Items
List<GetSubscription Products Product Collection Item> 
- The list of product rewards summaries.
- Items
[]GetSubscription Products Product Collection Item 
- The list of product rewards summaries.
- items
List<GetSubscription Products Product Collection Item> 
- The list of product rewards summaries.
- items
GetSubscription Products Product Collection Item[] 
- The list of product rewards summaries.
- items
Sequence[usageproxy.Get Subscription Products Product Collection Item] 
- The list of product rewards summaries.
- items List<Property Map>
- The list of product rewards summaries.
GetSubscriptionProductsProductCollectionItem     
- Items
List<GetSubscription Products Product Collection Item Item> 
- The list of product rewards summaries.
- Items
[]GetSubscription Products Product Collection Item Item 
- The list of product rewards summaries.
- items
List<GetSubscription Products Product Collection Item Item> 
- The list of product rewards summaries.
- items
GetSubscription Products Product Collection Item Item[] 
- The list of product rewards summaries.
- items
Sequence[usageproxy.Get Subscription Products Product Collection Item Item] 
- The list of product rewards summaries.
- items List<Property Map>
- The list of product rewards summaries.
GetSubscriptionProductsProductCollectionItemItem      
- EarnedRewards double
- The earned rewards for the product.
- IsEligible boolTo Earn Rewards 
- The boolean parameter to indicate if the product is eligible to earn rewards.
- ProductName string
- The rate card product name.
- ProductNumber string
- The rate card product number.
- UsageAmount double
- The rate card product usage amount.
- EarnedRewards float64
- The earned rewards for the product.
- IsEligible boolTo Earn Rewards 
- The boolean parameter to indicate if the product is eligible to earn rewards.
- ProductName string
- The rate card product name.
- ProductNumber string
- The rate card product number.
- UsageAmount float64
- The rate card product usage amount.
- earnedRewards Double
- The earned rewards for the product.
- isEligible BooleanTo Earn Rewards 
- The boolean parameter to indicate if the product is eligible to earn rewards.
- productName String
- The rate card product name.
- productNumber String
- The rate card product number.
- usageAmount Double
- The rate card product usage amount.
- earnedRewards number
- The earned rewards for the product.
- isEligible booleanTo Earn Rewards 
- The boolean parameter to indicate if the product is eligible to earn rewards.
- productName string
- The rate card product name.
- productNumber string
- The rate card product number.
- usageAmount number
- The rate card product usage amount.
- earned_rewards float
- The earned rewards for the product.
- is_eligible_ boolto_ earn_ rewards 
- The boolean parameter to indicate if the product is eligible to earn rewards.
- product_name str
- The rate card product name.
- product_number str
- The rate card product number.
- usage_amount float
- The rate card product usage amount.
- earnedRewards Number
- The earned rewards for the product.
- isEligible BooleanTo Earn Rewards 
- The boolean parameter to indicate if the product is eligible to earn rewards.
- productName String
- The rate card product name.
- productNumber String
- The rate card product number.
- usageAmount Number
- The rate card product usage amount.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi