Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.OneSubsription.getComputedUsage
Explore with Pulumi AI
This data source provides details about a specific Computed Usage resource in Oracle Cloud Infrastructure Onesubscription service.
This is an API which returns Computed Usage corresponding to the id passed
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testComputedUsage = oci.OneSubsription.getComputedUsage({
    compartmentId: compartmentId,
    computedUsageId: testComputedUsageOciOnesubscriptionComputedUsage.id,
    fields: computedUsageFields,
});
import pulumi
import pulumi_oci as oci
test_computed_usage = oci.OneSubsription.get_computed_usage(compartment_id=compartment_id,
    computed_usage_id=test_computed_usage_oci_onesubscription_computed_usage["id"],
    fields=computed_usage_fields)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/onesubsription"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := onesubsription.GetComputedUsage(ctx, &onesubsription.GetComputedUsageArgs{
			CompartmentId:   compartmentId,
			ComputedUsageId: testComputedUsageOciOnesubscriptionComputedUsage.Id,
			Fields:          computedUsageFields,
		}, 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 testComputedUsage = Oci.OneSubsription.GetComputedUsage.Invoke(new()
    {
        CompartmentId = compartmentId,
        ComputedUsageId = testComputedUsageOciOnesubscriptionComputedUsage.Id,
        Fields = computedUsageFields,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.OneSubsription.OneSubsriptionFunctions;
import com.pulumi.oci.OneSubsription.inputs.GetComputedUsageArgs;
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 testComputedUsage = OneSubsriptionFunctions.getComputedUsage(GetComputedUsageArgs.builder()
            .compartmentId(compartmentId)
            .computedUsageId(testComputedUsageOciOnesubscriptionComputedUsage.id())
            .fields(computedUsageFields)
            .build());
    }
}
variables:
  testComputedUsage:
    fn::invoke:
      function: oci:OneSubsription:getComputedUsage
      arguments:
        compartmentId: ${compartmentId}
        computedUsageId: ${testComputedUsageOciOnesubscriptionComputedUsage.id}
        fields: ${computedUsageFields}
Using getComputedUsage
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 getComputedUsage(args: GetComputedUsageArgs, opts?: InvokeOptions): Promise<GetComputedUsageResult>
function getComputedUsageOutput(args: GetComputedUsageOutputArgs, opts?: InvokeOptions): Output<GetComputedUsageResult>def get_computed_usage(compartment_id: Optional[str] = None,
                       computed_usage_id: Optional[str] = None,
                       fields: Optional[Sequence[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetComputedUsageResult
def get_computed_usage_output(compartment_id: Optional[pulumi.Input[str]] = None,
                       computed_usage_id: Optional[pulumi.Input[str]] = None,
                       fields: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetComputedUsageResult]func GetComputedUsage(ctx *Context, args *GetComputedUsageArgs, opts ...InvokeOption) (*GetComputedUsageResult, error)
func GetComputedUsageOutput(ctx *Context, args *GetComputedUsageOutputArgs, opts ...InvokeOption) GetComputedUsageResultOutput> Note: This function is named GetComputedUsage in the Go SDK.
public static class GetComputedUsage 
{
    public static Task<GetComputedUsageResult> InvokeAsync(GetComputedUsageArgs args, InvokeOptions? opts = null)
    public static Output<GetComputedUsageResult> Invoke(GetComputedUsageInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetComputedUsageResult> getComputedUsage(GetComputedUsageArgs args, InvokeOptions options)
public static Output<GetComputedUsageResult> getComputedUsage(GetComputedUsageArgs args, InvokeOptions options)
fn::invoke:
  function: oci:OneSubsription/getComputedUsage:getComputedUsage
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the root compartment.
- ComputedUsage stringId 
- The Computed Usage Id
- Fields List<string>
- Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
- CompartmentId string
- The OCID of the root compartment.
- ComputedUsage stringId 
- The Computed Usage Id
- Fields []string
- Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
- compartmentId String
- The OCID of the root compartment.
- computedUsage StringId 
- The Computed Usage Id
- fields List<String>
- Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
- compartmentId string
- The OCID of the root compartment.
- computedUsage stringId 
- The Computed Usage Id
- fields string[]
- Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
- compartment_id str
- The OCID of the root compartment.
- computed_usage_ strid 
- The Computed Usage Id
- fields Sequence[str]
- Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
- compartmentId String
- The OCID of the root compartment.
- computedUsage StringId 
- The Computed Usage Id
- fields List<String>
- Partial response refers to an optimization technique offered by the RESTful web APIs to return only the information (fields) required by the client. This parameter is used to control what fields to return.
getComputedUsage Result
The following output properties are available:
- CommitmentService stringId 
- Subscribed service commitmentId.
- CompartmentId string
- ComputeSource string
- SPM Internal compute records source .
- ComputedUsage stringId 
- Cost string
- Computed Line Amount not rounded
- CostRounded string
- Computed Line Amount rounded.
- CurrencyCode string
- Currency code
- DataCenter string
- Data Center Attribute as sent by MQS to SPM.
- Id string
- The provider-assigned unique ID for this managed resource.
- IsInvoiced bool
- Invoicing status for the aggregated compute usage
- MqsMessage stringId 
- MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- NetUnit stringPrice 
- Net Unit Price for the product in consideration, price actual.
- OriginalUsage stringNumber 
- SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- ParentProducts List<GetComputed Usage Parent Product> 
- Product description
- ParentSubscribed stringService Id 
- Subscribed service line parent id
- PlanNumber string
- Subscription plan number
- Products
List<GetComputed Usage Product> 
- Product description
- Quantity string
- Total Quantity that was used for computation
- RateCard stringId 
- Ratecard Id at subscribed service level
- RateCard stringTierd Id 
- References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
- TimeCreated string
- Computed Usage created time, expressed in RFC 3339 timestamp format.
- TimeMetered stringOn 
- Metered Service date, expressed in RFC 3339 timestamp format.
- TimeOf stringArrival 
- Usae computation date, expressed in RFC 3339 timestamp format.
- TimeUpdated string
- Computed Usage updated time, expressed in RFC 3339 timestamp format.
- Type string
- Usage compute type in SPM.
- UnitOf stringMeasure 
- Unit of Messure
- UsageNumber string
- SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- Fields List<string>
- CommitmentService stringId 
- Subscribed service commitmentId.
- CompartmentId string
- ComputeSource string
- SPM Internal compute records source .
- ComputedUsage stringId 
- Cost string
- Computed Line Amount not rounded
- CostRounded string
- Computed Line Amount rounded.
- CurrencyCode string
- Currency code
- DataCenter string
- Data Center Attribute as sent by MQS to SPM.
- Id string
- The provider-assigned unique ID for this managed resource.
- IsInvoiced bool
- Invoicing status for the aggregated compute usage
- MqsMessage stringId 
- MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- NetUnit stringPrice 
- Net Unit Price for the product in consideration, price actual.
- OriginalUsage stringNumber 
- SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- ParentProducts []GetComputed Usage Parent Product 
- Product description
- ParentSubscribed stringService Id 
- Subscribed service line parent id
- PlanNumber string
- Subscription plan number
- Products
[]GetComputed Usage Product 
- Product description
- Quantity string
- Total Quantity that was used for computation
- RateCard stringId 
- Ratecard Id at subscribed service level
- RateCard stringTierd Id 
- References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
- TimeCreated string
- Computed Usage created time, expressed in RFC 3339 timestamp format.
- TimeMetered stringOn 
- Metered Service date, expressed in RFC 3339 timestamp format.
- TimeOf stringArrival 
- Usae computation date, expressed in RFC 3339 timestamp format.
- TimeUpdated string
- Computed Usage updated time, expressed in RFC 3339 timestamp format.
- Type string
- Usage compute type in SPM.
- UnitOf stringMeasure 
- Unit of Messure
- UsageNumber string
- SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- Fields []string
- commitmentService StringId 
- Subscribed service commitmentId.
- compartmentId String
- computeSource String
- SPM Internal compute records source .
- computedUsage StringId 
- cost String
- Computed Line Amount not rounded
- costRounded String
- Computed Line Amount rounded.
- currencyCode String
- Currency code
- dataCenter String
- Data Center Attribute as sent by MQS to SPM.
- id String
- The provider-assigned unique ID for this managed resource.
- isInvoiced Boolean
- Invoicing status for the aggregated compute usage
- mqsMessage StringId 
- MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- netUnit StringPrice 
- Net Unit Price for the product in consideration, price actual.
- originalUsage StringNumber 
- SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- parentProducts List<GetComputed Usage Parent Product> 
- Product description
- parentSubscribed StringService Id 
- Subscribed service line parent id
- planNumber String
- Subscription plan number
- products
List<GetComputed Usage Product> 
- Product description
- quantity String
- Total Quantity that was used for computation
- rateCard StringId 
- Ratecard Id at subscribed service level
- rateCard StringTierd Id 
- References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
- timeCreated String
- Computed Usage created time, expressed in RFC 3339 timestamp format.
- timeMetered StringOn 
- Metered Service date, expressed in RFC 3339 timestamp format.
- timeOf StringArrival 
- Usae computation date, expressed in RFC 3339 timestamp format.
- timeUpdated String
- Computed Usage updated time, expressed in RFC 3339 timestamp format.
- type String
- Usage compute type in SPM.
- unitOf StringMeasure 
- Unit of Messure
- usageNumber String
- SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- fields List<String>
- commitmentService stringId 
- Subscribed service commitmentId.
- compartmentId string
- computeSource string
- SPM Internal compute records source .
- computedUsage stringId 
- cost string
- Computed Line Amount not rounded
- costRounded string
- Computed Line Amount rounded.
- currencyCode string
- Currency code
- dataCenter string
- Data Center Attribute as sent by MQS to SPM.
- id string
- The provider-assigned unique ID for this managed resource.
- isInvoiced boolean
- Invoicing status for the aggregated compute usage
- mqsMessage stringId 
- MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- netUnit stringPrice 
- Net Unit Price for the product in consideration, price actual.
- originalUsage stringNumber 
- SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- parentProducts GetComputed Usage Parent Product[] 
- Product description
- parentSubscribed stringService Id 
- Subscribed service line parent id
- planNumber string
- Subscription plan number
- products
GetComputed Usage Product[] 
- Product description
- quantity string
- Total Quantity that was used for computation
- rateCard stringId 
- Ratecard Id at subscribed service level
- rateCard stringTierd Id 
- References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
- timeCreated string
- Computed Usage created time, expressed in RFC 3339 timestamp format.
- timeMetered stringOn 
- Metered Service date, expressed in RFC 3339 timestamp format.
- timeOf stringArrival 
- Usae computation date, expressed in RFC 3339 timestamp format.
- timeUpdated string
- Computed Usage updated time, expressed in RFC 3339 timestamp format.
- type string
- Usage compute type in SPM.
- unitOf stringMeasure 
- Unit of Messure
- usageNumber string
- SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- fields string[]
- commitment_service_ strid 
- Subscribed service commitmentId.
- compartment_id str
- compute_source str
- SPM Internal compute records source .
- computed_usage_ strid 
- cost str
- Computed Line Amount not rounded
- cost_rounded str
- Computed Line Amount rounded.
- currency_code str
- Currency code
- data_center str
- Data Center Attribute as sent by MQS to SPM.
- id str
- The provider-assigned unique ID for this managed resource.
- is_invoiced bool
- Invoicing status for the aggregated compute usage
- mqs_message_ strid 
- MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- net_unit_ strprice 
- Net Unit Price for the product in consideration, price actual.
- original_usage_ strnumber 
- SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- parent_products Sequence[GetComputed Usage Parent Product] 
- Product description
- parent_subscribed_ strservice_ id 
- Subscribed service line parent id
- plan_number str
- Subscription plan number
- products
Sequence[GetComputed Usage Product] 
- Product description
- quantity str
- Total Quantity that was used for computation
- rate_card_ strid 
- Ratecard Id at subscribed service level
- rate_card_ strtierd_ id 
- References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
- time_created str
- Computed Usage created time, expressed in RFC 3339 timestamp format.
- time_metered_ stron 
- Metered Service date, expressed in RFC 3339 timestamp format.
- time_of_ strarrival 
- Usae computation date, expressed in RFC 3339 timestamp format.
- time_updated str
- Computed Usage updated time, expressed in RFC 3339 timestamp format.
- type str
- Usage compute type in SPM.
- unit_of_ strmeasure 
- Unit of Messure
- usage_number str
- SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- fields Sequence[str]
- commitmentService StringId 
- Subscribed service commitmentId.
- compartmentId String
- computeSource String
- SPM Internal compute records source .
- computedUsage StringId 
- cost String
- Computed Line Amount not rounded
- costRounded String
- Computed Line Amount rounded.
- currencyCode String
- Currency code
- dataCenter String
- Data Center Attribute as sent by MQS to SPM.
- id String
- The provider-assigned unique ID for this managed resource.
- isInvoiced Boolean
- Invoicing status for the aggregated compute usage
- mqsMessage StringId 
- MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- netUnit StringPrice 
- Net Unit Price for the product in consideration, price actual.
- originalUsage StringNumber 
- SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- parentProducts List<Property Map>
- Product description
- parentSubscribed StringService Id 
- Subscribed service line parent id
- planNumber String
- Subscription plan number
- products List<Property Map>
- Product description
- quantity String
- Total Quantity that was used for computation
- rateCard StringId 
- Ratecard Id at subscribed service level
- rateCard StringTierd Id 
- References the tier in the ratecard for that usage (OCI will be using the same reference to cross-reference for correctness on the usage csv report), comes from Entity OBSCNTR_IPT_PRODUCTTIER.
- timeCreated String
- Computed Usage created time, expressed in RFC 3339 timestamp format.
- timeMetered StringOn 
- Metered Service date, expressed in RFC 3339 timestamp format.
- timeOf StringArrival 
- Usae computation date, expressed in RFC 3339 timestamp format.
- timeUpdated String
- Computed Usage updated time, expressed in RFC 3339 timestamp format.
- type String
- Usage compute type in SPM.
- unitOf StringMeasure 
- Unit of Messure
- usageNumber String
- SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- fields List<String>
Supporting Types
GetComputedUsageParentProduct    
- BillingCategory string
- Metered service billing category
- Name string
- Product name
- PartNumber string
- Product part number
- ProductCategory string
- Product category
- ProvisioningGroup string
- Product provisioning group
- UcmRate stringCard Part Type 
- Rate card part type of Product
- UnitOf stringMeasure 
- Unit of Messure
- BillingCategory string
- Metered service billing category
- Name string
- Product name
- PartNumber string
- Product part number
- ProductCategory string
- Product category
- ProvisioningGroup string
- Product provisioning group
- UcmRate stringCard Part Type 
- Rate card part type of Product
- UnitOf stringMeasure 
- Unit of Messure
- billingCategory String
- Metered service billing category
- name String
- Product name
- partNumber String
- Product part number
- productCategory String
- Product category
- provisioningGroup String
- Product provisioning group
- ucmRate StringCard Part Type 
- Rate card part type of Product
- unitOf StringMeasure 
- Unit of Messure
- billingCategory string
- Metered service billing category
- name string
- Product name
- partNumber string
- Product part number
- productCategory string
- Product category
- provisioningGroup string
- Product provisioning group
- ucmRate stringCard Part Type 
- Rate card part type of Product
- unitOf stringMeasure 
- Unit of Messure
- billing_category str
- Metered service billing category
- name str
- Product name
- part_number str
- Product part number
- product_category str
- Product category
- provisioning_group str
- Product provisioning group
- ucm_rate_ strcard_ part_ type 
- Rate card part type of Product
- unit_of_ strmeasure 
- Unit of Messure
- billingCategory String
- Metered service billing category
- name String
- Product name
- partNumber String
- Product part number
- productCategory String
- Product category
- provisioningGroup String
- Product provisioning group
- ucmRate StringCard Part Type 
- Rate card part type of Product
- unitOf StringMeasure 
- Unit of Messure
GetComputedUsageProduct   
- BillingCategory string
- Metered service billing category
- Name string
- Product name
- PartNumber string
- Product part number
- ProductCategory string
- Product category
- ProvisioningGroup string
- Product provisioning group
- UcmRate stringCard Part Type 
- Rate card part type of Product
- UnitOf stringMeasure 
- Unit of Messure
- BillingCategory string
- Metered service billing category
- Name string
- Product name
- PartNumber string
- Product part number
- ProductCategory string
- Product category
- ProvisioningGroup string
- Product provisioning group
- UcmRate stringCard Part Type 
- Rate card part type of Product
- UnitOf stringMeasure 
- Unit of Messure
- billingCategory String
- Metered service billing category
- name String
- Product name
- partNumber String
- Product part number
- productCategory String
- Product category
- provisioningGroup String
- Product provisioning group
- ucmRate StringCard Part Type 
- Rate card part type of Product
- unitOf StringMeasure 
- Unit of Messure
- billingCategory string
- Metered service billing category
- name string
- Product name
- partNumber string
- Product part number
- productCategory string
- Product category
- provisioningGroup string
- Product provisioning group
- ucmRate stringCard Part Type 
- Rate card part type of Product
- unitOf stringMeasure 
- Unit of Messure
- billing_category str
- Metered service billing category
- name str
- Product name
- part_number str
- Product part number
- product_category str
- Product category
- provisioning_group str
- Product provisioning group
- ucm_rate_ strcard_ part_ type 
- Rate card part type of Product
- unit_of_ strmeasure 
- Unit of Messure
- billingCategory String
- Metered service billing category
- name String
- Product name
- partNumber String
- Product part number
- productCategory String
- Product category
- provisioningGroup String
- Product provisioning group
- ucmRate StringCard Part Type 
- Rate card part type of Product
- unitOf StringMeasure 
- Unit of Messure
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.