Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getComputedUsage

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

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testComputedUsage = Oci.OneSubsription.GetComputedUsage.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        ComputedUsageId = oci_onesubscription_computed_usage.Test_computed_usage.Id,
        Fields = @var.Computed_usage_fields,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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:   _var.Compartment_id,
			ComputedUsageId: oci_onesubscription_computed_usage.Test_computed_usage.Id,
			Fields:          _var.Computed_usage_fields,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.compartment_id())
            .computedUsageId(oci_onesubscription_computed_usage.test_computed_usage().id())
            .fields(var_.computed_usage_fields())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_computed_usage = oci.OneSubsription.get_computed_usage(compartment_id=var["compartment_id"],
    computed_usage_id=oci_onesubscription_computed_usage["test_computed_usage"]["id"],
    fields=var["computed_usage_fields"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testComputedUsage = oci.OneSubsription.getComputedUsage({
    compartmentId: _var.compartment_id,
    computedUsageId: oci_onesubscription_computed_usage.test_computed_usage.id,
    fields: _var.computed_usage_fields,
});
variables:
  testComputedUsage:
    Fn::Invoke:
      Function: oci:OneSubsription:getComputedUsage
      Arguments:
        compartmentId: ${var.compartment_id}
        computedUsageId: ${oci_onesubscription_computed_usage.test_computed_usage.id}
        fields: ${var.computed_usage_fields}

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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:OneSubsription/getComputedUsage:getComputedUsage
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the root compartment.

ComputedUsageId string

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.

ComputedUsageId string

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.

computedUsageId String

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.

computedUsageId string

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_id str

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.

computedUsageId String

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:

CommitmentServiceId string

Subscribed service commitmentId.

CompartmentId string
ComputeSource string

SPM Internal compute records source .

ComputedUsageId string
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

MqsMessageId string

MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.

NetUnitPrice string

Net Unit Price for the product in consideration, price actual.

OriginalUsageNumber string

SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.

ParentProducts List<GetComputedUsageParentProduct>

Product description

ParentSubscribedServiceId string

Subscribed service line parent id

PlanNumber string

Subscription plan number

Products List<GetComputedUsageProduct>

Product description

Quantity string

Total Quantity that was used for computation

RateCardId string

Ratecard Id at subscribed service level

RateCardTierdId string

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.

TimeMeteredOn string

Metered Service date, expressed in RFC 3339 timestamp format.

TimeOfArrival string

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.

UnitOfMeasure string

Unit of Messure

UsageNumber string

SPM Internal usage Line number identifier in SPM coming from Metered Services entity.

Fields List<string>
CommitmentServiceId string

Subscribed service commitmentId.

CompartmentId string
ComputeSource string

SPM Internal compute records source .

ComputedUsageId string
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

MqsMessageId string

MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.

NetUnitPrice string

Net Unit Price for the product in consideration, price actual.

OriginalUsageNumber string

SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.

ParentProducts []GetComputedUsageParentProduct

Product description

ParentSubscribedServiceId string

Subscribed service line parent id

PlanNumber string

Subscription plan number

Products []GetComputedUsageProduct

Product description

Quantity string

Total Quantity that was used for computation

RateCardId string

Ratecard Id at subscribed service level

RateCardTierdId string

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.

TimeMeteredOn string

Metered Service date, expressed in RFC 3339 timestamp format.

TimeOfArrival string

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.

UnitOfMeasure string

Unit of Messure

UsageNumber string

SPM Internal usage Line number identifier in SPM coming from Metered Services entity.

Fields []string
commitmentServiceId String

Subscribed service commitmentId.

compartmentId String
computeSource String

SPM Internal compute records source .

computedUsageId String
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

mqsMessageId String

MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.

netUnitPrice String

Net Unit Price for the product in consideration, price actual.

originalUsageNumber String

SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.

parentProducts List<GetComputedUsageParentProduct>

Product description

parentSubscribedServiceId String

Subscribed service line parent id

planNumber String

Subscription plan number

products List<GetComputedUsageProduct>

Product description

quantity String

Total Quantity that was used for computation

rateCardId String

Ratecard Id at subscribed service level

rateCardTierdId String

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.

timeMeteredOn String

Metered Service date, expressed in RFC 3339 timestamp format.

timeOfArrival String

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.

unitOfMeasure String

Unit of Messure

usageNumber String

SPM Internal usage Line number identifier in SPM coming from Metered Services entity.

fields List<String>
commitmentServiceId string

Subscribed service commitmentId.

compartmentId string
computeSource string

SPM Internal compute records source .

computedUsageId string
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

mqsMessageId string

MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.

netUnitPrice string

Net Unit Price for the product in consideration, price actual.

originalUsageNumber string

SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.

parentProducts GetComputedUsageParentProduct[]

Product description

parentSubscribedServiceId string

Subscribed service line parent id

planNumber string

Subscription plan number

products GetComputedUsageProduct[]

Product description

quantity string

Total Quantity that was used for computation

rateCardId string

Ratecard Id at subscribed service level

rateCardTierdId string

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.

timeMeteredOn string

Metered Service date, expressed in RFC 3339 timestamp format.

timeOfArrival string

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.

unitOfMeasure string

Unit of Messure

usageNumber string

SPM Internal usage Line number identifier in SPM coming from Metered Services entity.

fields string[]
commitment_service_id str

Subscribed service commitmentId.

compartment_id str
compute_source str

SPM Internal compute records source .

computed_usage_id str
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_id str

MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.

net_unit_price str

Net Unit Price for the product in consideration, price actual.

original_usage_number str

SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.

parent_products GetComputedUsageParentProduct]

Product description

parent_subscribed_service_id str

Subscribed service line parent id

plan_number str

Subscription plan number

products GetComputedUsageProduct]

Product description

quantity str

Total Quantity that was used for computation

rate_card_id str

Ratecard Id at subscribed service level

rate_card_tierd_id str

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_on str

Metered Service date, expressed in RFC 3339 timestamp format.

time_of_arrival str

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_measure str

Unit of Messure

usage_number str

SPM Internal usage Line number identifier in SPM coming from Metered Services entity.

fields Sequence[str]
commitmentServiceId String

Subscribed service commitmentId.

compartmentId String
computeSource String

SPM Internal compute records source .

computedUsageId String
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

mqsMessageId String

MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.

netUnitPrice String

Net Unit Price for the product in consideration, price actual.

originalUsageNumber String

SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.

parentProducts List<Property Map>

Product description

parentSubscribedServiceId String

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

rateCardId String

Ratecard Id at subscribed service level

rateCardTierdId String

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.

timeMeteredOn String

Metered Service date, expressed in RFC 3339 timestamp format.

timeOfArrival String

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.

unitOfMeasure String

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

UcmRateCardPartType string

Rate card part type of Product

UnitOfMeasure string

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

UcmRateCardPartType string

Rate card part type of Product

UnitOfMeasure string

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

ucmRateCardPartType String

Rate card part type of Product

unitOfMeasure String

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

ucmRateCardPartType string

Rate card part type of Product

unitOfMeasure string

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_card_part_type str

Rate card part type of Product

unit_of_measure str

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

ucmRateCardPartType String

Rate card part type of Product

unitOfMeasure String

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

UcmRateCardPartType string

Rate card part type of Product

UnitOfMeasure string

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

UcmRateCardPartType string

Rate card part type of Product

UnitOfMeasure string

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

ucmRateCardPartType String

Rate card part type of Product

unitOfMeasure String

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

ucmRateCardPartType string

Rate card part type of Product

unitOfMeasure string

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_card_part_type str

Rate card part type of Product

unit_of_measure str

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

ucmRateCardPartType String

Rate card part type of Product

unitOfMeasure String

Unit of Messure

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.