1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. UsageProxy
  5. getSubscriptionRewards
Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 by Pulumi

oci.UsageProxy.getSubscriptionRewards

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 by Pulumi

    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/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[_usageproxy.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[_usageproxy.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:UsageProxy/getSubscriptionRewards:getSubscriptionRewards
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SubscriptionId string
    The subscription ID for which rewards information is requested for.
    TenancyId string
    The OCID of the tenancy.
    Filters List<GetSubscriptionRewardsFilter>
    SubscriptionId string
    The subscription ID for which rewards information is requested for.
    TenancyId string
    The OCID of the tenancy.
    Filters []GetSubscriptionRewardsFilter
    subscriptionId String
    The subscription ID for which rewards information is requested for.
    tenancyId String
    The OCID of the tenancy.
    filters List<GetSubscriptionRewardsFilter>
    subscriptionId string
    The subscription ID for which rewards information is requested for.
    tenancyId string
    The OCID of the tenancy.
    filters GetSubscriptionRewardsFilter[]
    subscription_id str
    The subscription ID for which rewards information is requested for.
    tenancy_id str
    The OCID of the tenancy.
    filters Sequence[usageproxy.GetSubscriptionRewardsFilter]
    subscriptionId String
    The subscription ID for which rewards information is requested for.
    tenancyId 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.
    RewardCollections List<GetSubscriptionRewardsRewardCollection>
    The list of reward_collection.
    SubscriptionId string
    The entitlement ID from MQS, which is the same as the subcription ID.
    TenancyId string
    The OCID of the target tenancy.
    Filters List<GetSubscriptionRewardsFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    RewardCollections []GetSubscriptionRewardsRewardCollection
    The list of reward_collection.
    SubscriptionId string
    The entitlement ID from MQS, which is the same as the subcription ID.
    TenancyId string
    The OCID of the target tenancy.
    Filters []GetSubscriptionRewardsFilter
    id String
    The provider-assigned unique ID for this managed resource.
    rewardCollections List<GetSubscriptionRewardsRewardCollection>
    The list of reward_collection.
    subscriptionId String
    The entitlement ID from MQS, which is the same as the subcription ID.
    tenancyId String
    The OCID of the target tenancy.
    filters List<GetSubscriptionRewardsFilter>
    id string
    The provider-assigned unique ID for this managed resource.
    rewardCollections GetSubscriptionRewardsRewardCollection[]
    The list of reward_collection.
    subscriptionId string
    The entitlement ID from MQS, which is the same as the subcription ID.
    tenancyId string
    The OCID of the target tenancy.
    filters GetSubscriptionRewardsFilter[]
    id str
    The provider-assigned unique ID for this managed resource.
    reward_collections Sequence[usageproxy.GetSubscriptionRewardsRewardCollection]
    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[usageproxy.GetSubscriptionRewardsFilter]
    id String
    The provider-assigned unique ID for this managed resource.
    rewardCollections List<Property Map>
    The list of reward_collection.
    subscriptionId String
    The entitlement ID from MQS, which is the same as the subcription ID.
    tenancyId String
    The OCID of the target tenancy.
    filters List<Property Map>

    Supporting Types

    GetSubscriptionRewardsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetSubscriptionRewardsRewardCollection

    items List<Property Map>
    The monthly summary of rewards.

    GetSubscriptionRewardsRewardCollectionItem

    items List<Property Map>
    The monthly summary of rewards.
    summaries List<Property Map>
    The overall monthly reward summary.

    GetSubscriptionRewardsRewardCollectionItemItem

    AvailableRewards double
    The number of rewards available for a specific usage period.
    EarnedRewards double
    The number of rewards earned for the specific usage period.
    EligibleUsageAmount double
    The eligible usage amount for the usage period.
    IneligibleUsageAmount double
    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.
    TimeRewardsEarned string
    The date and time when rewards accrue.
    TimeRewardsExpired string
    The date and time when rewards expire.
    TimeUsageEnded string
    The end date and time for the usage period.
    TimeUsageStarted string
    The start date and time for the usage period.
    UsageAmount double
    The usage amount for the usage period.
    UsagePeriodKey string
    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.
    EligibleUsageAmount float64
    The eligible usage amount for the usage period.
    IneligibleUsageAmount float64
    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.
    TimeRewardsEarned string
    The date and time when rewards accrue.
    TimeRewardsExpired string
    The date and time when rewards expire.
    TimeUsageEnded string
    The end date and time for the usage period.
    TimeUsageStarted string
    The start date and time for the usage period.
    UsageAmount float64
    The usage amount for the usage period.
    UsagePeriodKey string
    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.
    eligibleUsageAmount Double
    The eligible usage amount for the usage period.
    ineligibleUsageAmount Double
    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.
    timeRewardsEarned String
    The date and time when rewards accrue.
    timeRewardsExpired String
    The date and time when rewards expire.
    timeUsageEnded String
    The end date and time for the usage period.
    timeUsageStarted String
    The start date and time for the usage period.
    usageAmount Double
    The usage amount for the usage period.
    usagePeriodKey String
    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.
    eligibleUsageAmount number
    The eligible usage amount for the usage period.
    ineligibleUsageAmount number
    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.
    timeRewardsEarned string
    The date and time when rewards accrue.
    timeRewardsExpired string
    The date and time when rewards expire.
    timeUsageEnded string
    The end date and time for the usage period.
    timeUsageStarted string
    The start date and time for the usage period.
    usageAmount number
    The usage amount for the usage period.
    usagePeriodKey string
    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_amount float
    The eligible usage amount for the usage period.
    ineligible_usage_amount float
    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_earned str
    The date and time when rewards accrue.
    time_rewards_expired str
    The date and time when rewards expire.
    time_usage_ended str
    The end date and time for the usage period.
    time_usage_started str
    The start date and time for the usage period.
    usage_amount float
    The usage amount for the usage period.
    usage_period_key str
    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.
    eligibleUsageAmount Number
    The eligible usage amount for the usage period.
    ineligibleUsageAmount Number
    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.
    timeRewardsEarned String
    The date and time when rewards accrue.
    timeRewardsExpired String
    The date and time when rewards expire.
    timeUsageEnded String
    The end date and time for the usage period.
    timeUsageStarted String
    The start date and time for the usage period.
    usageAmount Number
    The usage amount for the usage period.
    usagePeriodKey String
    The usage period ID.

    GetSubscriptionRewardsRewardCollectionItemSummary

    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.
    TotalRewardsAvailable double
    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.
    TotalRewardsAvailable float64
    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.
    totalRewardsAvailable Double
    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.
    totalRewardsAvailable number
    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_available float
    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.
    totalRewardsAvailable Number
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.33.0 published on Thursday, Apr 25, 2024 by Pulumi