Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.UsageProxy.getSubscriptionProduct
Explore with Pulumi AI
This data source provides details about a specific Subscription Product resource 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 testSubscriptionProduct = oci.UsageProxy.getSubscriptionProduct({
    subscriptionId: testSubscription.id,
    tenancyId: testTenancy.id,
    usagePeriodKey: subscriptionProductUsagePeriodKey,
    producttype: subscriptionProductProducttype,
});
import pulumi
import pulumi_oci as oci
test_subscription_product = oci.UsageProxy.get_subscription_product(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/v2/go/oci/usageproxy"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := usageproxy.GetSubscriptionProduct(ctx, &usageproxy.GetSubscriptionProductArgs{
			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 testSubscriptionProduct = Oci.UsageProxy.GetSubscriptionProduct.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.GetSubscriptionProductArgs;
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 testSubscriptionProduct = UsageProxyFunctions.getSubscriptionProduct(GetSubscriptionProductArgs.builder()
            .subscriptionId(testSubscription.id())
            .tenancyId(testTenancy.id())
            .usagePeriodKey(subscriptionProductUsagePeriodKey)
            .producttype(subscriptionProductProducttype)
            .build());
    }
}
variables:
  testSubscriptionProduct:
    fn::invoke:
      function: oci:UsageProxy:getSubscriptionProduct
      arguments:
        subscriptionId: ${testSubscription.id}
        tenancyId: ${testTenancy.id}
        usagePeriodKey: ${subscriptionProductUsagePeriodKey}
        producttype: ${subscriptionProductProducttype}
Using getSubscriptionProduct
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 getSubscriptionProduct(args: GetSubscriptionProductArgs, opts?: InvokeOptions): Promise<GetSubscriptionProductResult>
function getSubscriptionProductOutput(args: GetSubscriptionProductOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionProductResult>def get_subscription_product(producttype: Optional[str] = None,
                             subscription_id: Optional[str] = None,
                             tenancy_id: Optional[str] = None,
                             usage_period_key: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetSubscriptionProductResult
def get_subscription_product_output(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[GetSubscriptionProductResult]func GetSubscriptionProduct(ctx *Context, args *GetSubscriptionProductArgs, opts ...InvokeOption) (*GetSubscriptionProductResult, error)
func GetSubscriptionProductOutput(ctx *Context, args *GetSubscriptionProductOutputArgs, opts ...InvokeOption) GetSubscriptionProductResultOutput> Note: This function is named GetSubscriptionProduct in the Go SDK.
public static class GetSubscriptionProduct 
{
    public static Task<GetSubscriptionProductResult> InvokeAsync(GetSubscriptionProductArgs args, InvokeOptions? opts = null)
    public static Output<GetSubscriptionProductResult> Invoke(GetSubscriptionProductInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSubscriptionProductResult> getSubscriptionProduct(GetSubscriptionProductArgs args, InvokeOptions options)
public static Output<GetSubscriptionProductResult> getSubscriptionProduct(GetSubscriptionProductArgs args, InvokeOptions options)
fn::invoke:
  function: oci:UsageProxy/getSubscriptionProduct:getSubscriptionProduct
  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.
- 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.
- 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.
- 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.
- 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.
- 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.
- producttype String
- The field to specify the type of product.
getSubscriptionProduct Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<GetSubscription Product Item> 
- The list of product rewards summaries.
- SubscriptionId string
- TenancyId string
- UsagePeriod stringKey 
- Producttype string
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]GetSubscription Product Item 
- The list of product rewards summaries.
- SubscriptionId string
- TenancyId string
- UsagePeriod stringKey 
- Producttype string
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<GetSubscription Product Item> 
- The list of product rewards summaries.
- subscriptionId String
- tenancyId String
- usagePeriod StringKey 
- producttype String
- id string
- The provider-assigned unique ID for this managed resource.
- items
GetSubscription Product Item[] 
- The list of product rewards summaries.
- subscriptionId string
- tenancyId string
- usagePeriod stringKey 
- producttype string
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[GetSubscription Product Item] 
- The list of product rewards summaries.
- subscription_id str
- tenancy_id str
- usage_period_ strkey 
- producttype str
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- The list of product rewards summaries.
- subscriptionId String
- tenancyId String
- usagePeriod StringKey 
- producttype String
Supporting Types
GetSubscriptionProductItem   
- 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.