Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.UsageProxy.getSubscriptionProduct
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides details about a specific Subscription Product resource 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 testSubscriptionProduct = oci.UsageProxy.getSubscriptionProduct({
subscriptionId: testSubscription.id,
tenancyId: testTenancy.id,
usagePeriodKey: subscriptionProductUsagePeriodKey,
producttype: subscriptionProductProducttype,
});
import pulumi
import pulumi_oci as oci
test_subscription_product = oci.UsageProxy.get_subscription_product(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/go/oci/UsageProxy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := UsageProxy.GetSubscriptionProduct(ctx, &usageproxy.GetSubscriptionProductArgs{
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 testSubscriptionProduct = Oci.UsageProxy.GetSubscriptionProduct.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.GetSubscriptionProductArgs;
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 testSubscriptionProduct = UsageProxyFunctions.getSubscriptionProduct(GetSubscriptionProductArgs.builder()
.subscriptionId(testSubscription.id())
.tenancyId(testTenancy.id())
.usagePeriodKey(subscriptionProductUsagePeriodKey)
.producttype(subscriptionProductProducttype)
.build());
}
}
variables:
testSubscriptionProduct:
fn::invoke:
Function: oci:UsageProxy:getSubscriptionProduct
Arguments:
subscriptionId: ${testSubscription.id}
tenancyId: ${testTenancy.id}
usagePeriodKey: ${subscriptionProductUsagePeriodKey}
producttype: ${subscriptionProductProducttype}
Using getSubscriptionProduct
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 getSubscriptionProduct(args: GetSubscriptionProductArgs, opts?: InvokeOptions): Promise<GetSubscriptionProductResult>
function getSubscriptionProductOutput(args: GetSubscriptionProductOutputArgs, opts?: InvokeOptions): Output<GetSubscriptionProductResult>
def get_subscription_product(producttype: Optional[str] = None,
subscription_id: Optional[str] = None,
tenancy_id: Optional[str] = None,
usage_period_key: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSubscriptionProductResult
def get_subscription_product_output(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[GetSubscriptionProductResult]
func GetSubscriptionProduct(ctx *Context, args *GetSubscriptionProductArgs, opts ...InvokeOption) (*GetSubscriptionProductResult, error)
func GetSubscriptionProductOutput(ctx *Context, args *GetSubscriptionProductOutputArgs, opts ...InvokeOption) GetSubscriptionProductResultOutput
> Note: This function is named GetSubscriptionProduct
in the Go SDK.
public static class GetSubscriptionProduct
{
public static Task<GetSubscriptionProductResult> InvokeAsync(GetSubscriptionProductArgs args, InvokeOptions? opts = null)
public static Output<GetSubscriptionProductResult> Invoke(GetSubscriptionProductInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubscriptionProductResult> getSubscriptionProduct(GetSubscriptionProductArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:UsageProxy/getSubscriptionProduct:getSubscriptionProduct
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- producttype String
- The field to specify the type of product.
getSubscriptionProduct Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Subscription Product Item> - The list of product rewards summaries.
- Subscription
Id string - Tenancy
Id string - Usage
Period stringKey - Producttype string
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Subscription Product Item - The list of product rewards summaries.
- Subscription
Id string - Tenancy
Id string - Usage
Period stringKey - Producttype string
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Subscription Product Item> - The list of product rewards summaries.
- subscription
Id String - tenancy
Id String - usage
Period StringKey - producttype String
- id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Subscription Product Item[] - The list of product rewards summaries.
- subscription
Id string - tenancy
Id string - usage
Period stringKey - producttype string
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[usageproxy.
Get Subscription Product Item] - The list of product rewards summaries.
- subscription_
id str - tenancy_
id str - usage_
period_ strkey - producttype str
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- The list of product rewards summaries.
- subscription
Id String - tenancy
Id String - usage
Period StringKey - producttype String
Supporting Types
GetSubscriptionProductItem
- 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.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi