Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.UsageProxy.getSubscriptionProducts
Explore with Pulumi AI
This data source provides the list of Subscription Products 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 testSubscriptionProducts = oci.UsageProxy.getSubscriptionProducts({
subscriptionId: testSubscription.id,
tenancyId: testTenancy.id,
usagePeriodKey: subscriptionProductUsagePeriodKey,
producttype: subscriptionProductProducttype,
});
import pulumi
import pulumi_oci as oci
test_subscription_products = oci.UsageProxy.get_subscription_products(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.GetSubscriptionProducts(ctx, &usageproxy.GetSubscriptionProductsArgs{
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 testSubscriptionProducts = Oci.UsageProxy.GetSubscriptionProducts.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.GetSubscriptionProductsArgs;
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 testSubscriptionProducts = UsageProxyFunctions.getSubscriptionProducts(GetSubscriptionProductsArgs.builder()
.subscriptionId(testSubscription.id())
.tenancyId(testTenancy.id())
.usagePeriodKey(subscriptionProductUsagePeriodKey)
.producttype(subscriptionProductProducttype)
.build());
}
}
variables:
testSubscriptionProducts:
fn::invoke:
Function: oci:UsageProxy:getSubscriptionProducts
Arguments:
subscriptionId: ${testSubscription.id}
tenancyId: ${testTenancy.id}
usagePeriodKey: ${subscriptionProductUsagePeriodKey}
producttype: ${subscriptionProductProducttype}
Using getSubscriptionProducts
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 getSubscriptionProducts(args: GetSubscriptionProductsArgs, opts?: InvokeOptions): Promise<GetSubscriptionProductsResult>
function getSubscriptionProductsOutput(args: GetSubscriptionProductsOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionProductsResult>
def get_subscription_products(filters: Optional[Sequence[_usageproxy.GetSubscriptionProductsFilter]] = None,
producttype: Optional[str] = None,
subscription_id: Optional[str] = None,
tenancy_id: Optional[str] = None,
usage_period_key: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubscriptionProductsResult
def get_subscription_products_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_usageproxy.GetSubscriptionProductsFilterArgs]]]] = None,
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[GetSubscriptionProductsResult]
func GetSubscriptionProducts(ctx *Context, args *GetSubscriptionProductsArgs, opts ...InvokeOption) (*GetSubscriptionProductsResult, error)
func GetSubscriptionProductsOutput(ctx *Context, args *GetSubscriptionProductsOutputArgs, opts ...InvokeOption) GetSubscriptionProductsResultOutput
> Note: This function is named GetSubscriptionProducts
in the Go SDK.
public static class GetSubscriptionProducts
{
public static Task<GetSubscriptionProductsResult> InvokeAsync(GetSubscriptionProductsArgs args, InvokeOptions? opts = null)
public static Output<GetSubscriptionProductsResult> Invoke(GetSubscriptionProductsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubscriptionProductsResult> getSubscriptionProducts(GetSubscriptionProductsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:UsageProxy/getSubscriptionProducts:getSubscriptionProducts
arguments:
# arguments dictionary
The 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.
- Usage
Period stringKey - The SPM Identifier for the usage period.
- Filters
List<Get
Subscription Products Filter> - Producttype string
- The field to specify the type of product.
- Subscription
Id string - The subscription ID for which rewards information is requested for.
- Tenancy
Id string - The OCID of the tenancy.
- Usage
Period stringKey - The SPM Identifier for the usage period.
- Filters
[]Get
Subscription Products Filter - Producttype string
- The field to specify the type of product.
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- usage
Period StringKey - The SPM Identifier for the usage period.
- filters
List<Get
Subscription Products Filter> - producttype String
- The field to specify the type of product.
- subscription
Id string - The subscription ID for which rewards information is requested for.
- tenancy
Id string - The OCID of the tenancy.
- usage
Period stringKey - The SPM Identifier for the usage period.
- filters
Get
Subscription Products Filter[] - 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.
- filters
Sequence[usageproxy.
Get Subscription Products Filter] - producttype str
- The field to specify the type of product.
- subscription
Id String - The subscription ID for which rewards information is requested for.
- tenancy
Id String - The OCID of the tenancy.
- usage
Period StringKey - The SPM Identifier for the usage period.
- filters List<Property Map>
- producttype String
- The field to specify the type of product.
getSubscriptionProducts Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Product
Collections List<GetSubscription Products Product Collection> - The list of product_collection.
- Subscription
Id string - Tenancy
Id string - Usage
Period stringKey - Filters
List<Get
Subscription Products Filter> - Producttype string
- Id string
- The provider-assigned unique ID for this managed resource.
- Product
Collections []GetSubscription Products Product Collection - The list of product_collection.
- Subscription
Id string - Tenancy
Id string - Usage
Period stringKey - Filters
[]Get
Subscription Products Filter - Producttype string
- id String
- The provider-assigned unique ID for this managed resource.
- product
Collections List<GetSubscription Products Product Collection> - The list of product_collection.
- subscription
Id String - tenancy
Id String - usage
Period StringKey - filters
List<Get
Subscription Products Filter> - producttype String
- id string
- The provider-assigned unique ID for this managed resource.
- product
Collections GetSubscription Products Product Collection[] - The list of product_collection.
- subscription
Id string - tenancy
Id string - usage
Period stringKey - filters
Get
Subscription Products Filter[] - producttype string
- id str
- The provider-assigned unique ID for this managed resource.
- product_
collections Sequence[usageproxy.Get Subscription Products Product Collection] - The list of product_collection.
- subscription_
id str - tenancy_
id str - usage_
period_ strkey - filters
Sequence[usageproxy.
Get Subscription Products Filter] - producttype str
- id String
- The provider-assigned unique ID for this managed resource.
- product
Collections List<Property Map> - The list of product_collection.
- subscription
Id String - tenancy
Id String - usage
Period StringKey - filters List<Property Map>
- producttype String
Supporting Types
GetSubscriptionProductsFilter
GetSubscriptionProductsProductCollection
- Items
List<Get
Subscription Products Product Collection Item> - The list of product rewards summaries.
- Items
[]Get
Subscription Products Product Collection Item - The list of product rewards summaries.
- items
List<Get
Subscription Products Product Collection Item> - The list of product rewards summaries.
- items
Get
Subscription Products Product Collection Item[] - The list of product rewards summaries.
- items
Sequence[usageproxy.
Get Subscription Products Product Collection Item] - The list of product rewards summaries.
- items List<Property Map>
- The list of product rewards summaries.
GetSubscriptionProductsProductCollectionItem
- Items
List<Get
Subscription Products Product Collection Item Item> - The list of product rewards summaries.
- Items
[]Get
Subscription Products Product Collection Item Item - The list of product rewards summaries.
- items
List<Get
Subscription Products Product Collection Item Item> - The list of product rewards summaries.
- items
Get
Subscription Products Product Collection Item Item[] - The list of product rewards summaries.
- items
Sequence[usageproxy.
Get Subscription Products Product Collection Item Item] - The list of product rewards summaries.
- items List<Property Map>
- The list of product rewards summaries.
GetSubscriptionProductsProductCollectionItemItem
- Earned
Rewards double - 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 string - The rate card product name.
- Product
Number string - The rate card product number.
- Usage
Amount double - The rate card product usage amount.
- Earned
Rewards float64 - 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 string - The rate card product name.
- Product
Number string - The rate card product number.
- Usage
Amount float64 - The rate card product usage amount.
- earned
Rewards Double - The earned rewards for the product.
- is
Eligible BooleanTo Earn Rewards - The boolean parameter to indicate if the product is eligible to earn rewards.
- product
Name String - The rate card product name.
- product
Number String - The rate card product number.
- usage
Amount Double - The rate card product usage amount.
- earned
Rewards number - The earned rewards for the product.
- is
Eligible booleanTo Earn Rewards - The boolean parameter to indicate if the product is eligible to earn rewards.
- product
Name string - The rate card product name.
- product
Number string - The rate card product number.
- usage
Amount 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.
- earned
Rewards Number - The earned rewards for the product.
- is
Eligible BooleanTo Earn Rewards - The boolean parameter to indicate if the product is eligible to earn rewards.
- product
Name String - The rate card product name.
- product
Number String - The rate card product number.
- usage
Amount 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
oci
Terraform Provider.