Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
oci.UsageProxy.getSubscriptionRewards
Start a Neo task
Explain and create an oci.UsageProxy.getSubscriptionRewards resource
This data source provides the list of Subscription Rewards 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 testSubscriptionRewards = oci.UsageProxy.getSubscriptionRewards({
subscriptionId: testSubscription.id,
tenancyId: testTenancy.id,
});
import pulumi
import pulumi_oci as oci
test_subscription_rewards = oci.UsageProxy.get_subscription_rewards(subscription_id=test_subscription["id"],
tenancy_id=test_tenancy["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/usageproxy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := usageproxy.GetSubscriptionRewards(ctx, &usageproxy.GetSubscriptionRewardsArgs{
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 testSubscriptionRewards = Oci.UsageProxy.GetSubscriptionRewards.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.GetSubscriptionRewardsArgs;
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 testSubscriptionRewards = UsageProxyFunctions.getSubscriptionRewards(GetSubscriptionRewardsArgs.builder()
.subscriptionId(testSubscription.id())
.tenancyId(testTenancy.id())
.build());
}
}
variables:
testSubscriptionRewards:
fn::invoke:
function: oci:UsageProxy:getSubscriptionRewards
arguments:
subscriptionId: ${testSubscription.id}
tenancyId: ${testTenancy.id}
Using getSubscriptionRewards
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 getSubscriptionRewards(args: GetSubscriptionRewardsArgs, opts?: InvokeOptions): Promise<GetSubscriptionRewardsResult>
function getSubscriptionRewardsOutput(args: GetSubscriptionRewardsOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionRewardsResult>def get_subscription_rewards(filters: Optional[Sequence[GetSubscriptionRewardsFilter]] = None,
subscription_id: Optional[str] = None,
tenancy_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubscriptionRewardsResult
def get_subscription_rewards_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubscriptionRewardsFilterArgs]]]] = None,
subscription_id: Optional[pulumi.Input[str]] = None,
tenancy_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionRewardsResult]func GetSubscriptionRewards(ctx *Context, args *GetSubscriptionRewardsArgs, opts ...InvokeOption) (*GetSubscriptionRewardsResult, error)
func GetSubscriptionRewardsOutput(ctx *Context, args *GetSubscriptionRewardsOutputArgs, opts ...InvokeOption) GetSubscriptionRewardsResultOutput> Note: This function is named GetSubscriptionRewards in the Go SDK.
public static class GetSubscriptionRewards
{
public static Task<GetSubscriptionRewardsResult> InvokeAsync(GetSubscriptionRewardsArgs args, InvokeOptions? opts = null)
public static Output<GetSubscriptionRewardsResult> Invoke(GetSubscriptionRewardsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSubscriptionRewardsResult> getSubscriptionRewards(GetSubscriptionRewardsArgs args, InvokeOptions options)
public static Output<GetSubscriptionRewardsResult> getSubscriptionRewards(GetSubscriptionRewardsArgs args, InvokeOptions options)
fn::invoke:
function: oci:UsageProxy/getSubscriptionRewards:getSubscriptionRewards
arguments:
# arguments dictionaryThe following arguments are supported:
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- Filters
List<Get
Subscription Rewards Filter>
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- Filters
[]Get
Subscription Rewards Filter
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- filters
List<Get
Subscription Rewards Filter>
- subscription
Id string - The subscription ID for which rewards information is requested for.
- tenancy
Id string - The OCID of the tenancy.
- filters
Get
Subscription Rewards Filter[]
- subscription_
id str - The subscription ID for which rewards information is requested for.
- tenancy_
id str - The OCID of the tenancy.
- filters
Sequence[Get
Subscription Rewards Filter]
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- filters List<Property Map>
getSubscriptionRewards Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Reward
Collections List<GetSubscription Rewards Reward Collection> - The list of reward_collection.
- Subscription
Id string - The entitlement ID from MQS, which is the same as the subcription ID.
- Tenancy
Id string - The OCID of the target tenancy.
- Filters
List<Get
Subscription Rewards Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Reward
Collections []GetSubscription Rewards Reward Collection - The list of reward_collection.
- Subscription
Id string - The entitlement ID from MQS, which is the same as the subcription ID.
- Tenancy
Id string - The OCID of the target tenancy.
- Filters
[]Get
Subscription Rewards Filter
- id String
- The provider-assigned unique ID for this managed resource.
- reward
Collections List<GetSubscription Rewards Reward Collection> - The list of reward_collection.
- subscription
Id String - The entitlement ID from MQS, which is the same as the subcription ID.
- tenancy
Id String - The OCID of the target tenancy.
- filters
List<Get
Subscription Rewards Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- reward
Collections GetSubscription Rewards Reward Collection[] - The list of reward_collection.
- subscription
Id string - The entitlement ID from MQS, which is the same as the subcription ID.
- tenancy
Id string - The OCID of the target tenancy.
- filters
Get
Subscription Rewards Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- reward_
collections Sequence[GetSubscription Rewards Reward Collection] - The list of reward_collection.
- subscription_
id str - The entitlement ID from MQS, which is the same as the subcription ID.
- tenancy_
id str - The OCID of the target tenancy.
- filters
Sequence[Get
Subscription Rewards Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- reward
Collections List<Property Map> - The list of reward_collection.
- subscription
Id String - The entitlement ID from MQS, which is the same as the subcription ID.
- tenancy
Id String - The OCID of the target tenancy.
- filters List<Property Map>
Supporting Types
GetSubscriptionRewardsFilter
GetSubscriptionRewardsRewardCollection
- Items
List<Get
Subscription Rewards Reward Collection Item> - The monthly summary of rewards.
- Items
[]Get
Subscription Rewards Reward Collection Item - The monthly summary of rewards.
- items
List<Get
Subscription Rewards Reward Collection Item> - The monthly summary of rewards.
- items
Get
Subscription Rewards Reward Collection Item[] - The monthly summary of rewards.
- items
Sequence[Get
Subscription Rewards Reward Collection Item] - The monthly summary of rewards.
- items List<Property Map>
- The monthly summary of rewards.
GetSubscriptionRewardsRewardCollectionItem
- Items
List<Get
Subscription Rewards Reward Collection Item Item> - The monthly summary of rewards.
- Summaries
List<Get
Subscription Rewards Reward Collection Item Summary> - The overall monthly reward summary.
- Items
[]Get
Subscription Rewards Reward Collection Item Item - The monthly summary of rewards.
- Summaries
[]Get
Subscription Rewards Reward Collection Item Summary - The overall monthly reward summary.
- items
List<Get
Subscription Rewards Reward Collection Item Item> - The monthly summary of rewards.
- summaries
List<Get
Subscription Rewards Reward Collection Item Summary> - The overall monthly reward summary.
- items
Get
Subscription Rewards Reward Collection Item Item[] - The monthly summary of rewards.
- summaries
Get
Subscription Rewards Reward Collection Item Summary[] - The overall monthly reward summary.
- items
Sequence[Get
Subscription Rewards Reward Collection Item Item] - The monthly summary of rewards.
- summaries
Sequence[Get
Subscription Rewards Reward Collection Item Summary] - The overall monthly reward summary.
- items List<Property Map>
- The monthly summary of rewards.
- summaries List<Property Map>
- The overall monthly reward summary.
GetSubscriptionRewardsRewardCollectionItemItem
- Available
Rewards double - The number of rewards available for a specific usage period.
- Earned
Rewards double - The number of rewards earned for the specific usage period.
- Eligible
Usage doubleAmount - The eligible usage amount for the usage period.
- Ineligible
Usage doubleAmount - 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 double - The number of rewards redeemed for a specific month.
- Time
Rewards stringEarned - The date and time when rewards accrue.
- Time
Rewards stringExpired - The date and time when rewards expire.
- Time
Usage stringEnded - The end date and time for the usage period.
- Time
Usage stringStarted - The start date and time for the usage period.
- Usage
Amount double - The usage amount for the usage period.
- Usage
Period stringKey - The usage period ID.
- Available
Rewards float64 - The number of rewards available for a specific usage period.
- Earned
Rewards float64 - The number of rewards earned for the specific usage period.
- Eligible
Usage float64Amount - The eligible usage amount for the usage period.
- Ineligible
Usage float64Amount - 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 float64 - The number of rewards redeemed for a specific month.
- Time
Rewards stringEarned - The date and time when rewards accrue.
- Time
Rewards stringExpired - The date and time when rewards expire.
- Time
Usage stringEnded - The end date and time for the usage period.
- Time
Usage stringStarted - The start date and time for the usage period.
- Usage
Amount float64 - The usage amount for the usage period.
- Usage
Period stringKey - The usage period ID.
- available
Rewards Double - The number of rewards available for a specific usage period.
- earned
Rewards Double - The number of rewards earned for the specific usage period.
- eligible
Usage DoubleAmount - The eligible usage amount for the usage period.
- ineligible
Usage DoubleAmount - The ineligible usage amount for the usage period.
- is
Manual Boolean - The boolean parameter to indicate whether or not the available rewards are manually posted.
- redeemed
Rewards Double - The number of rewards redeemed for a specific month.
- time
Rewards StringEarned - The date and time when rewards accrue.
- time
Rewards StringExpired - The date and time when rewards expire.
- time
Usage StringEnded - The end date and time for the usage period.
- time
Usage StringStarted - The start date and time for the usage period.
- usage
Amount Double - The usage amount for the usage period.
- usage
Period StringKey - The usage period ID.
- available
Rewards number - The number of rewards available for a specific usage period.
- earned
Rewards number - The number of rewards earned for the specific usage period.
- eligible
Usage numberAmount - The eligible usage amount for the usage period.
- ineligible
Usage numberAmount - The ineligible usage amount for the usage period.
- is
Manual boolean - The boolean parameter to indicate whether or not the available rewards are manually posted.
- redeemed
Rewards number - The number of rewards redeemed for a specific month.
- time
Rewards stringEarned - The date and time when rewards accrue.
- time
Rewards stringExpired - The date and time when rewards expire.
- time
Usage stringEnded - The end date and time for the usage period.
- time
Usage stringStarted - The start date and time for the usage period.
- usage
Amount number - The usage amount for the usage period.
- usage
Period 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.
- available
Rewards Number - The number of rewards available for a specific usage period.
- earned
Rewards Number - The number of rewards earned for the specific usage period.
- eligible
Usage NumberAmount - The eligible usage amount for the usage period.
- ineligible
Usage NumberAmount - The ineligible usage amount for the usage period.
- is
Manual Boolean - The boolean parameter to indicate whether or not the available rewards are manually posted.
- redeemed
Rewards Number - The number of rewards redeemed for a specific month.
- time
Rewards StringEarned - The date and time when rewards accrue.
- time
Rewards StringExpired - The date and time when rewards expire.
- time
Usage StringEnded - The end date and time for the usage period.
- time
Usage StringStarted - The start date and time for the usage period.
- usage
Amount Number - The usage amount for the usage period.
- usage
Period StringKey - The usage period ID.
GetSubscriptionRewardsRewardCollectionItemSummary
- Currency string
- The currency unit for the reward amount.
- Redemption
Code string - The redemption code used in the Billing Center during the reward redemption process.
- Rewards
Rate double - The current Rewards percentage in decimal format.
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- Total
Rewards doubleAvailable - The total number of available rewards for a given subscription ID.
- Currency string
- The currency unit for the reward amount.
- Redemption
Code string - The redemption code used in the Billing Center during the reward redemption process.
- Rewards
Rate float64 - The current Rewards percentage in decimal format.
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- Total
Rewards float64Available - The total number of available rewards for a given subscription ID.
- currency String
- The currency unit for the reward amount.
- redemption
Code String - The redemption code used in the Billing Center during the reward redemption process.
- rewards
Rate Double - The current Rewards percentage in decimal format.
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- total
Rewards DoubleAvailable - The total number of available rewards for a given subscription ID.
- currency string
- The currency unit for the reward amount.
- redemption
Code string - The redemption code used in the Billing Center during the reward redemption process.
- rewards
Rate number - The current Rewards percentage in decimal format.
- subscription
Id string - The subscription ID for which rewards information is requested for.
- tenancy
Id string - The OCID of the tenancy.
- total
Rewards 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.
- redemption
Code String - The redemption code used in the Billing Center during the reward redemption process.
- rewards
Rate Number - The current Rewards percentage in decimal format.
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- total
Rewards 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.
