Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.UsageProxy.getSubscriptionReward
Explore with Pulumi AI
This data source provides details about a specific Subscription Reward resource in Oracle Cloud Infrastructure Usage Proxy service.
Returns the list of rewards for a subscription ID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSubscriptionReward = oci.UsageProxy.getSubscriptionReward({
    subscriptionId: testSubscription.id,
    tenancyId: testTenancy.id,
});
import pulumi
import pulumi_oci as oci
test_subscription_reward = oci.UsageProxy.get_subscription_reward(subscription_id=test_subscription["id"],
    tenancy_id=test_tenancy["id"])
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.GetSubscriptionReward(ctx, &usageproxy.GetSubscriptionRewardArgs{
			SubscriptionId: testSubscription.Id,
			TenancyId:      testTenancy.Id,
		}, 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 testSubscriptionReward = Oci.UsageProxy.GetSubscriptionReward.Invoke(new()
    {
        SubscriptionId = testSubscription.Id,
        TenancyId = testTenancy.Id,
    });
});
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.GetSubscriptionRewardArgs;
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 testSubscriptionReward = UsageProxyFunctions.getSubscriptionReward(GetSubscriptionRewardArgs.builder()
            .subscriptionId(testSubscription.id())
            .tenancyId(testTenancy.id())
            .build());
    }
}
variables:
  testSubscriptionReward:
    fn::invoke:
      function: oci:UsageProxy:getSubscriptionReward
      arguments:
        subscriptionId: ${testSubscription.id}
        tenancyId: ${testTenancy.id}
Using getSubscriptionReward
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 getSubscriptionReward(args: GetSubscriptionRewardArgs, opts?: InvokeOptions): Promise<GetSubscriptionRewardResult>
function getSubscriptionRewardOutput(args: GetSubscriptionRewardOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionRewardResult>def get_subscription_reward(subscription_id: Optional[str] = None,
                            tenancy_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetSubscriptionRewardResult
def get_subscription_reward_output(subscription_id: Optional[pulumi.Input[str]] = None,
                            tenancy_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionRewardResult]func GetSubscriptionReward(ctx *Context, args *GetSubscriptionRewardArgs, opts ...InvokeOption) (*GetSubscriptionRewardResult, error)
func GetSubscriptionRewardOutput(ctx *Context, args *GetSubscriptionRewardOutputArgs, opts ...InvokeOption) GetSubscriptionRewardResultOutput> Note: This function is named GetSubscriptionReward in the Go SDK.
public static class GetSubscriptionReward 
{
    public static Task<GetSubscriptionRewardResult> InvokeAsync(GetSubscriptionRewardArgs args, InvokeOptions? opts = null)
    public static Output<GetSubscriptionRewardResult> Invoke(GetSubscriptionRewardInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSubscriptionRewardResult> getSubscriptionReward(GetSubscriptionRewardArgs args, InvokeOptions options)
public static Output<GetSubscriptionRewardResult> getSubscriptionReward(GetSubscriptionRewardArgs args, InvokeOptions options)
fn::invoke:
  function: oci:UsageProxy/getSubscriptionReward:getSubscriptionReward
  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.
- SubscriptionId string
- The subscription ID for which rewards information is requested for.
- TenancyId string
- The OCID of the tenancy.
- subscriptionId String
- The subscription ID for which rewards information is requested for.
- tenancyId String
- The OCID of the tenancy.
- subscriptionId string
- The subscription ID for which rewards information is requested for.
- tenancyId string
- The OCID of the tenancy.
- subscription_id str
- The subscription ID for which rewards information is requested for.
- tenancy_id str
- The OCID of the tenancy.
- subscriptionId String
- The subscription ID for which rewards information is requested for.
- tenancyId String
- The OCID of the tenancy.
getSubscriptionReward Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<GetSubscription Reward Item> 
- The monthly summary of rewards.
- SubscriptionId string
- The entitlement ID from MQS, which is the same as the subcription ID.
- Summaries
List<GetSubscription Reward Summary> 
- The overall monthly reward summary.
- TenancyId string
- The OCID of the target tenancy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]GetSubscription Reward Item 
- The monthly summary of rewards.
- SubscriptionId string
- The entitlement ID from MQS, which is the same as the subcription ID.
- Summaries
[]GetSubscription Reward Summary 
- The overall monthly reward summary.
- TenancyId string
- The OCID of the target tenancy.
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<GetSubscription Reward Item> 
- The monthly summary of rewards.
- subscriptionId String
- The entitlement ID from MQS, which is the same as the subcription ID.
- summaries
List<GetSubscription Reward Summary> 
- The overall monthly reward summary.
- tenancyId String
- The OCID of the target tenancy.
- id string
- The provider-assigned unique ID for this managed resource.
- items
GetSubscription Reward Item[] 
- The monthly summary of rewards.
- subscriptionId string
- The entitlement ID from MQS, which is the same as the subcription ID.
- summaries
GetSubscription Reward Summary[] 
- The overall monthly reward summary.
- tenancyId string
- The OCID of the target tenancy.
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[GetSubscription Reward Item] 
- The monthly summary of rewards.
- subscription_id str
- The entitlement ID from MQS, which is the same as the subcription ID.
- summaries
Sequence[GetSubscription Reward Summary] 
- The overall monthly reward summary.
- tenancy_id str
- The OCID of the target tenancy.
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- The monthly summary of rewards.
- subscriptionId String
- The entitlement ID from MQS, which is the same as the subcription ID.
- summaries List<Property Map>
- The overall monthly reward summary.
- tenancyId String
- The OCID of the target tenancy.
Supporting Types
GetSubscriptionRewardItem   
- AvailableRewards double
- The number of rewards available for a specific usage period.
- EarnedRewards double
- The number of rewards earned for the specific usage period.
- EligibleUsage doubleAmount 
- The eligible usage amount for the usage period.
- IneligibleUsage doubleAmount 
- The ineligible usage amount for the usage period.
- IsManual bool
- The boolean parameter to indicate whether or not the available rewards are manually posted.
- RedeemedRewards double
- The number of rewards redeemed for a specific month.
- TimeRewards stringEarned 
- The date and time when rewards accrue.
- TimeRewards stringExpired 
- The date and time when rewards expire.
- TimeUsage stringEnded 
- The end date and time for the usage period.
- TimeUsage stringStarted 
- The start date and time for the usage period.
- UsageAmount double
- The usage amount for the usage period.
- UsagePeriod stringKey 
- The usage period ID.
- AvailableRewards float64
- The number of rewards available for a specific usage period.
- EarnedRewards float64
- The number of rewards earned for the specific usage period.
- EligibleUsage float64Amount 
- The eligible usage amount for the usage period.
- IneligibleUsage float64Amount 
- The ineligible usage amount for the usage period.
- IsManual bool
- The boolean parameter to indicate whether or not the available rewards are manually posted.
- RedeemedRewards float64
- The number of rewards redeemed for a specific month.
- TimeRewards stringEarned 
- The date and time when rewards accrue.
- TimeRewards stringExpired 
- The date and time when rewards expire.
- TimeUsage stringEnded 
- The end date and time for the usage period.
- TimeUsage stringStarted 
- The start date and time for the usage period.
- UsageAmount float64
- The usage amount for the usage period.
- UsagePeriod stringKey 
- The usage period ID.
- availableRewards Double
- The number of rewards available for a specific usage period.
- earnedRewards Double
- The number of rewards earned for the specific usage period.
- eligibleUsage DoubleAmount 
- The eligible usage amount for the usage period.
- ineligibleUsage DoubleAmount 
- The ineligible usage amount for the usage period.
- isManual Boolean
- The boolean parameter to indicate whether or not the available rewards are manually posted.
- redeemedRewards Double
- The number of rewards redeemed for a specific month.
- timeRewards StringEarned 
- The date and time when rewards accrue.
- timeRewards StringExpired 
- The date and time when rewards expire.
- timeUsage StringEnded 
- The end date and time for the usage period.
- timeUsage StringStarted 
- The start date and time for the usage period.
- usageAmount Double
- The usage amount for the usage period.
- usagePeriod StringKey 
- The usage period ID.
- availableRewards number
- The number of rewards available for a specific usage period.
- earnedRewards number
- The number of rewards earned for the specific usage period.
- eligibleUsage numberAmount 
- The eligible usage amount for the usage period.
- ineligibleUsage numberAmount 
- The ineligible usage amount for the usage period.
- isManual boolean
- The boolean parameter to indicate whether or not the available rewards are manually posted.
- redeemedRewards number
- The number of rewards redeemed for a specific month.
- timeRewards stringEarned 
- The date and time when rewards accrue.
- timeRewards stringExpired 
- The date and time when rewards expire.
- timeUsage stringEnded 
- The end date and time for the usage period.
- timeUsage stringStarted 
- The start date and time for the usage period.
- usageAmount number
- The usage amount for the usage period.
- usagePeriod stringKey 
- The usage period ID.
- available_rewards float
- The number of rewards available for a specific usage period.
- earned_rewards float
- The number of rewards earned for the specific usage period.
- eligible_usage_ floatamount 
- The eligible usage amount for the usage period.
- ineligible_usage_ floatamount 
- The ineligible usage amount for the usage period.
- is_manual bool
- The boolean parameter to indicate whether or not the available rewards are manually posted.
- redeemed_rewards float
- The number of rewards redeemed for a specific month.
- time_rewards_ strearned 
- The date and time when rewards accrue.
- time_rewards_ strexpired 
- The date and time when rewards expire.
- time_usage_ strended 
- The end date and time for the usage period.
- time_usage_ strstarted 
- The start date and time for the usage period.
- usage_amount float
- The usage amount for the usage period.
- usage_period_ strkey 
- The usage period ID.
- availableRewards Number
- The number of rewards available for a specific usage period.
- earnedRewards Number
- The number of rewards earned for the specific usage period.
- eligibleUsage NumberAmount 
- The eligible usage amount for the usage period.
- ineligibleUsage NumberAmount 
- The ineligible usage amount for the usage period.
- isManual Boolean
- The boolean parameter to indicate whether or not the available rewards are manually posted.
- redeemedRewards Number
- The number of rewards redeemed for a specific month.
- timeRewards StringEarned 
- The date and time when rewards accrue.
- timeRewards StringExpired 
- The date and time when rewards expire.
- timeUsage StringEnded 
- The end date and time for the usage period.
- timeUsage StringStarted 
- The start date and time for the usage period.
- usageAmount Number
- The usage amount for the usage period.
- usagePeriod StringKey 
- The usage period ID.
GetSubscriptionRewardSummary   
- Currency string
- The currency unit for the reward amount.
- RedemptionCode string
- The redemption code used in the Billing Center during the reward redemption process.
- RewardsRate double
- The current Rewards percentage in decimal format.
- SubscriptionId string
- The subscription ID for which rewards information is requested for.
- TenancyId string
- The OCID of the tenancy.
- TotalRewards doubleAvailable 
- The total number of available rewards for a given subscription ID.
- Currency string
- The currency unit for the reward amount.
- RedemptionCode string
- The redemption code used in the Billing Center during the reward redemption process.
- RewardsRate float64
- The current Rewards percentage in decimal format.
- SubscriptionId string
- The subscription ID for which rewards information is requested for.
- TenancyId string
- The OCID of the tenancy.
- TotalRewards float64Available 
- The total number of available rewards for a given subscription ID.
- currency String
- The currency unit for the reward amount.
- redemptionCode String
- The redemption code used in the Billing Center during the reward redemption process.
- rewardsRate Double
- The current Rewards percentage in decimal format.
- subscriptionId String
- The subscription ID for which rewards information is requested for.
- tenancyId String
- The OCID of the tenancy.
- totalRewards DoubleAvailable 
- The total number of available rewards for a given subscription ID.
- currency string
- The currency unit for the reward amount.
- redemptionCode string
- The redemption code used in the Billing Center during the reward redemption process.
- rewardsRate number
- The current Rewards percentage in decimal format.
- subscriptionId string
- The subscription ID for which rewards information is requested for.
- tenancyId string
- The OCID of the tenancy.
- totalRewards numberAvailable 
- The total number of available rewards for a given subscription ID.
- currency str
- The currency unit for the reward amount.
- redemption_code str
- The redemption code used in the Billing Center during the reward redemption process.
- rewards_rate float
- The current Rewards percentage in decimal format.
- subscription_id str
- The subscription ID for which rewards information is requested for.
- tenancy_id str
- The OCID of the tenancy.
- total_rewards_ floatavailable 
- The total number of available rewards for a given subscription ID.
- currency String
- The currency unit for the reward amount.
- redemptionCode String
- The redemption code used in the Billing Center during the reward redemption process.
- rewardsRate Number
- The current Rewards percentage in decimal format.
- subscriptionId String
- The subscription ID for which rewards information is requested for.
- tenancyId String
- The OCID of the tenancy.
- totalRewards NumberAvailable 
- The total number of available rewards for a given subscription ID.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.