1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. UsageProxy
  5. getSubscriptionRedemption
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.UsageProxy.getSubscriptionRedemption

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This data source provides details about a specific Subscription Redemption resource in Oracle Cloud Infrastructure Usage Proxy service.

    Returns the list of redemption for the subscription ID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSubscriptionRedemption = oci.UsageProxy.getSubscriptionRedemption({
        subscriptionId: testSubscription.id,
        tenancyId: testTenancy.id,
        timeRedeemedGreaterThanOrEqualTo: subscriptionRedemptionTimeRedeemedGreaterThanOrEqualTo,
        timeRedeemedLessThan: subscriptionRedemptionTimeRedeemedLessThan,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_subscription_redemption = oci.UsageProxy.get_subscription_redemption(subscription_id=test_subscription["id"],
        tenancy_id=test_tenancy["id"],
        time_redeemed_greater_than_or_equal_to=subscription_redemption_time_redeemed_greater_than_or_equal_to,
        time_redeemed_less_than=subscription_redemption_time_redeemed_less_than)
    
    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.GetSubscriptionRedemption(ctx, &usageproxy.GetSubscriptionRedemptionArgs{
    			SubscriptionId:                   testSubscription.Id,
    			TenancyId:                        testTenancy.Id,
    			TimeRedeemedGreaterThanOrEqualTo: pulumi.StringRef(subscriptionRedemptionTimeRedeemedGreaterThanOrEqualTo),
    			TimeRedeemedLessThan:             pulumi.StringRef(subscriptionRedemptionTimeRedeemedLessThan),
    		}, 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 testSubscriptionRedemption = Oci.UsageProxy.GetSubscriptionRedemption.Invoke(new()
        {
            SubscriptionId = testSubscription.Id,
            TenancyId = testTenancy.Id,
            TimeRedeemedGreaterThanOrEqualTo = subscriptionRedemptionTimeRedeemedGreaterThanOrEqualTo,
            TimeRedeemedLessThan = subscriptionRedemptionTimeRedeemedLessThan,
        });
    
    });
    
    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.GetSubscriptionRedemptionArgs;
    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 testSubscriptionRedemption = UsageProxyFunctions.getSubscriptionRedemption(GetSubscriptionRedemptionArgs.builder()
                .subscriptionId(testSubscription.id())
                .tenancyId(testTenancy.id())
                .timeRedeemedGreaterThanOrEqualTo(subscriptionRedemptionTimeRedeemedGreaterThanOrEqualTo)
                .timeRedeemedLessThan(subscriptionRedemptionTimeRedeemedLessThan)
                .build());
    
        }
    }
    
    variables:
      testSubscriptionRedemption:
        fn::invoke:
          Function: oci:UsageProxy:getSubscriptionRedemption
          Arguments:
            subscriptionId: ${testSubscription.id}
            tenancyId: ${testTenancy.id}
            timeRedeemedGreaterThanOrEqualTo: ${subscriptionRedemptionTimeRedeemedGreaterThanOrEqualTo}
            timeRedeemedLessThan: ${subscriptionRedemptionTimeRedeemedLessThan}
    

    Using getSubscriptionRedemption

    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 getSubscriptionRedemption(args: GetSubscriptionRedemptionArgs, opts?: InvokeOptions): Promise<GetSubscriptionRedemptionResult>
    function getSubscriptionRedemptionOutput(args: GetSubscriptionRedemptionOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionRedemptionResult>
    def get_subscription_redemption(subscription_id: Optional[str] = None,
                                    tenancy_id: Optional[str] = None,
                                    time_redeemed_greater_than_or_equal_to: Optional[str] = None,
                                    time_redeemed_less_than: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetSubscriptionRedemptionResult
    def get_subscription_redemption_output(subscription_id: Optional[pulumi.Input[str]] = None,
                                    tenancy_id: Optional[pulumi.Input[str]] = None,
                                    time_redeemed_greater_than_or_equal_to: Optional[pulumi.Input[str]] = None,
                                    time_redeemed_less_than: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetSubscriptionRedemptionResult]
    func GetSubscriptionRedemption(ctx *Context, args *GetSubscriptionRedemptionArgs, opts ...InvokeOption) (*GetSubscriptionRedemptionResult, error)
    func GetSubscriptionRedemptionOutput(ctx *Context, args *GetSubscriptionRedemptionOutputArgs, opts ...InvokeOption) GetSubscriptionRedemptionResultOutput

    > Note: This function is named GetSubscriptionRedemption in the Go SDK.

    public static class GetSubscriptionRedemption 
    {
        public static Task<GetSubscriptionRedemptionResult> InvokeAsync(GetSubscriptionRedemptionArgs args, InvokeOptions? opts = null)
        public static Output<GetSubscriptionRedemptionResult> Invoke(GetSubscriptionRedemptionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSubscriptionRedemptionResult> getSubscriptionRedemption(GetSubscriptionRedemptionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:UsageProxy/getSubscriptionRedemption:getSubscriptionRedemption
      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.
    TimeRedeemedGreaterThanOrEqualTo string
    The starting redeemed date filter for the redemption history.
    TimeRedeemedLessThan string
    The ending redeemed date filter for the redemption history.
    SubscriptionId string
    The subscription ID for which rewards information is requested for.
    TenancyId string
    The OCID of the tenancy.
    TimeRedeemedGreaterThanOrEqualTo string
    The starting redeemed date filter for the redemption history.
    TimeRedeemedLessThan string
    The ending redeemed date filter for the redemption history.
    subscriptionId String
    The subscription ID for which rewards information is requested for.
    tenancyId String
    The OCID of the tenancy.
    timeRedeemedGreaterThanOrEqualTo String
    The starting redeemed date filter for the redemption history.
    timeRedeemedLessThan String
    The ending redeemed date filter for the redemption history.
    subscriptionId string
    The subscription ID for which rewards information is requested for.
    tenancyId string
    The OCID of the tenancy.
    timeRedeemedGreaterThanOrEqualTo string
    The starting redeemed date filter for the redemption history.
    timeRedeemedLessThan string
    The ending redeemed date filter for the redemption history.
    subscription_id str
    The subscription ID for which rewards information is requested for.
    tenancy_id str
    The OCID of the tenancy.
    time_redeemed_greater_than_or_equal_to str
    The starting redeemed date filter for the redemption history.
    time_redeemed_less_than str
    The ending redeemed date filter for the redemption history.
    subscriptionId String
    The subscription ID for which rewards information is requested for.
    tenancyId String
    The OCID of the tenancy.
    timeRedeemedGreaterThanOrEqualTo String
    The starting redeemed date filter for the redemption history.
    timeRedeemedLessThan String
    The ending redeemed date filter for the redemption history.

    getSubscriptionRedemption Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetSubscriptionRedemptionItem>
    The list of redemption summary.
    SubscriptionId string
    TenancyId string
    TimeRedeemedGreaterThanOrEqualTo string
    TimeRedeemedLessThan string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetSubscriptionRedemptionItem
    The list of redemption summary.
    SubscriptionId string
    TenancyId string
    TimeRedeemedGreaterThanOrEqualTo string
    TimeRedeemedLessThan string
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetSubscriptionRedemptionItem>
    The list of redemption summary.
    subscriptionId String
    tenancyId String
    timeRedeemedGreaterThanOrEqualTo String
    timeRedeemedLessThan String
    id string
    The provider-assigned unique ID for this managed resource.
    items GetSubscriptionRedemptionItem[]
    The list of redemption summary.
    subscriptionId string
    tenancyId string
    timeRedeemedGreaterThanOrEqualTo string
    timeRedeemedLessThan string
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[usageproxy.GetSubscriptionRedemptionItem]
    The list of redemption summary.
    subscription_id str
    tenancy_id str
    time_redeemed_greater_than_or_equal_to str
    time_redeemed_less_than str
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    The list of redemption summary.
    subscriptionId String
    tenancyId String
    timeRedeemedGreaterThanOrEqualTo String
    timeRedeemedLessThan String

    Supporting Types

    GetSubscriptionRedemptionItem

    BaseRewards double
    It provides the redeemed rewards in base/subscription currency.
    FxRate double
    It provides the fxRate between invoice currency and subscription currency.
    InvoiceCurrency string
    The currency associated with invoice.
    InvoiceNumber string
    It provides the invoice number against the redemption.
    InvoiceTotalAmount double
    It provides the invoice total amount of given redemption.
    RedeemedRewards double
    It provides the redeemed rewards in invoice currency.
    RedemptionCode string
    The redemption code used in the Billing Center during the reward redemption process.
    RedemptionEmail string
    It provides the redemption email id.
    TimeInvoiced string
    It provides the invoice date.
    TimeRedeemed string
    It provides redeem date.
    BaseRewards float64
    It provides the redeemed rewards in base/subscription currency.
    FxRate float64
    It provides the fxRate between invoice currency and subscription currency.
    InvoiceCurrency string
    The currency associated with invoice.
    InvoiceNumber string
    It provides the invoice number against the redemption.
    InvoiceTotalAmount float64
    It provides the invoice total amount of given redemption.
    RedeemedRewards float64
    It provides the redeemed rewards in invoice currency.
    RedemptionCode string
    The redemption code used in the Billing Center during the reward redemption process.
    RedemptionEmail string
    It provides the redemption email id.
    TimeInvoiced string
    It provides the invoice date.
    TimeRedeemed string
    It provides redeem date.
    baseRewards Double
    It provides the redeemed rewards in base/subscription currency.
    fxRate Double
    It provides the fxRate between invoice currency and subscription currency.
    invoiceCurrency String
    The currency associated with invoice.
    invoiceNumber String
    It provides the invoice number against the redemption.
    invoiceTotalAmount Double
    It provides the invoice total amount of given redemption.
    redeemedRewards Double
    It provides the redeemed rewards in invoice currency.
    redemptionCode String
    The redemption code used in the Billing Center during the reward redemption process.
    redemptionEmail String
    It provides the redemption email id.
    timeInvoiced String
    It provides the invoice date.
    timeRedeemed String
    It provides redeem date.
    baseRewards number
    It provides the redeemed rewards in base/subscription currency.
    fxRate number
    It provides the fxRate between invoice currency and subscription currency.
    invoiceCurrency string
    The currency associated with invoice.
    invoiceNumber string
    It provides the invoice number against the redemption.
    invoiceTotalAmount number
    It provides the invoice total amount of given redemption.
    redeemedRewards number
    It provides the redeemed rewards in invoice currency.
    redemptionCode string
    The redemption code used in the Billing Center during the reward redemption process.
    redemptionEmail string
    It provides the redemption email id.
    timeInvoiced string
    It provides the invoice date.
    timeRedeemed string
    It provides redeem date.
    base_rewards float
    It provides the redeemed rewards in base/subscription currency.
    fx_rate float
    It provides the fxRate between invoice currency and subscription currency.
    invoice_currency str
    The currency associated with invoice.
    invoice_number str
    It provides the invoice number against the redemption.
    invoice_total_amount float
    It provides the invoice total amount of given redemption.
    redeemed_rewards float
    It provides the redeemed rewards in invoice currency.
    redemption_code str
    The redemption code used in the Billing Center during the reward redemption process.
    redemption_email str
    It provides the redemption email id.
    time_invoiced str
    It provides the invoice date.
    time_redeemed str
    It provides redeem date.
    baseRewards Number
    It provides the redeemed rewards in base/subscription currency.
    fxRate Number
    It provides the fxRate between invoice currency and subscription currency.
    invoiceCurrency String
    The currency associated with invoice.
    invoiceNumber String
    It provides the invoice number against the redemption.
    invoiceTotalAmount Number
    It provides the invoice total amount of given redemption.
    redeemedRewards Number
    It provides the redeemed rewards in invoice currency.
    redemptionCode String
    The redemption code used in the Billing Center during the reward redemption process.
    redemptionEmail String
    It provides the redemption email id.
    timeInvoiced String
    It provides the invoice date.
    timeRedeemed String
    It provides redeem date.

    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.41.0 published on Wednesday, Jun 19, 2024 by Pulumi