Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:OneSubsription/getComputedUsage:getComputedUsage
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the root compartment.
- Computed
Usage 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.
- Compartment
Id string - The OCID of the root compartment.
- Computed
Usage 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 String - The OCID of the root compartment.
- computed
Usage 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.
- compartment
Id string - The OCID of the root compartment.
- computed
Usage 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.
- compartment
Id String - The OCID of the root compartment.
- computed
Usage 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:
- Commitment
Service stringId - Subscribed service commitmentId.
- Compartment
Id string - Compute
Source string - SPM Internal compute records source .
- Computed
Usage stringId - Cost string
- Computed Line Amount not rounded
- Cost
Rounded string - Computed Line Amount rounded.
- Currency
Code string - Currency code
- Data
Center string - Data Center Attribute as sent by MQS to SPM.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Invoiced bool - Invoicing status for the aggregated compute usage
- Mqs
Message stringId - MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- Net
Unit stringPrice - Net Unit Price for the product in consideration, price actual.
- Original
Usage stringNumber - SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- Parent
Products List<GetComputed Usage Parent Product> - Product description
- Parent
Subscribed stringService Id - Subscribed service line parent id
- Plan
Number string - Subscription plan number
- Products
List<Get
Computed Usage Product> - Product description
- Quantity string
- Total Quantity that was used for computation
- Rate
Card stringId - Ratecard Id at subscribed service level
- Rate
Card 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.
- Time
Created string - Computed Usage created time, expressed in RFC 3339 timestamp format.
- Time
Metered stringOn - Metered Service date, expressed in RFC 3339 timestamp format.
- Time
Of stringArrival - Usae computation date, expressed in RFC 3339 timestamp format.
- Time
Updated string - Computed Usage updated time, expressed in RFC 3339 timestamp format.
- Type string
- Usage compute type in SPM.
- Unit
Of stringMeasure - Unit of Messure
- Usage
Number string - SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- Fields List<string>
- Commitment
Service stringId - Subscribed service commitmentId.
- Compartment
Id string - Compute
Source string - SPM Internal compute records source .
- Computed
Usage stringId - Cost string
- Computed Line Amount not rounded
- Cost
Rounded string - Computed Line Amount rounded.
- Currency
Code string - Currency code
- Data
Center string - Data Center Attribute as sent by MQS to SPM.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Invoiced bool - Invoicing status for the aggregated compute usage
- Mqs
Message stringId - MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- Net
Unit stringPrice - Net Unit Price for the product in consideration, price actual.
- Original
Usage stringNumber - SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- Parent
Products []GetComputed Usage Parent Product - Product description
- Parent
Subscribed stringService Id - Subscribed service line parent id
- Plan
Number string - Subscription plan number
- Products
[]Get
Computed Usage Product - Product description
- Quantity string
- Total Quantity that was used for computation
- Rate
Card stringId - Ratecard Id at subscribed service level
- Rate
Card 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.
- Time
Created string - Computed Usage created time, expressed in RFC 3339 timestamp format.
- Time
Metered stringOn - Metered Service date, expressed in RFC 3339 timestamp format.
- Time
Of stringArrival - Usae computation date, expressed in RFC 3339 timestamp format.
- Time
Updated string - Computed Usage updated time, expressed in RFC 3339 timestamp format.
- Type string
- Usage compute type in SPM.
- Unit
Of stringMeasure - Unit of Messure
- Usage
Number string - SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- Fields []string
- commitment
Service StringId - Subscribed service commitmentId.
- compartment
Id String - compute
Source String - SPM Internal compute records source .
- computed
Usage StringId - cost String
- Computed Line Amount not rounded
- cost
Rounded String - Computed Line Amount rounded.
- currency
Code String - Currency code
- data
Center String - Data Center Attribute as sent by MQS to SPM.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Invoiced Boolean - Invoicing status for the aggregated compute usage
- mqs
Message StringId - MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- net
Unit StringPrice - Net Unit Price for the product in consideration, price actual.
- original
Usage StringNumber - SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- parent
Products List<GetComputed Usage Parent Product> - Product description
- parent
Subscribed StringService Id - Subscribed service line parent id
- plan
Number String - Subscription plan number
- products
List<Get
Computed Usage Product> - Product description
- quantity String
- Total Quantity that was used for computation
- rate
Card StringId - Ratecard Id at subscribed service level
- rate
Card 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.
- time
Created String - Computed Usage created time, expressed in RFC 3339 timestamp format.
- time
Metered StringOn - Metered Service date, expressed in RFC 3339 timestamp format.
- time
Of StringArrival - Usae computation date, expressed in RFC 3339 timestamp format.
- time
Updated String - Computed Usage updated time, expressed in RFC 3339 timestamp format.
- type String
- Usage compute type in SPM.
- unit
Of StringMeasure - Unit of Messure
- usage
Number String - SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- fields List<String>
- commitment
Service stringId - Subscribed service commitmentId.
- compartment
Id string - compute
Source string - SPM Internal compute records source .
- computed
Usage stringId - cost string
- Computed Line Amount not rounded
- cost
Rounded string - Computed Line Amount rounded.
- currency
Code string - Currency code
- data
Center string - Data Center Attribute as sent by MQS to SPM.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Invoiced boolean - Invoicing status for the aggregated compute usage
- mqs
Message stringId - MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- net
Unit stringPrice - Net Unit Price for the product in consideration, price actual.
- original
Usage stringNumber - SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- parent
Products GetComputed Usage Parent Product[] - Product description
- parent
Subscribed stringService Id - Subscribed service line parent id
- plan
Number string - Subscription plan number
- products
Get
Computed Usage Product[] - Product description
- quantity string
- Total Quantity that was used for computation
- rate
Card stringId - Ratecard Id at subscribed service level
- rate
Card 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.
- time
Created string - Computed Usage created time, expressed in RFC 3339 timestamp format.
- time
Metered stringOn - Metered Service date, expressed in RFC 3339 timestamp format.
- time
Of stringArrival - Usae computation date, expressed in RFC 3339 timestamp format.
- time
Updated string - Computed Usage updated time, expressed in RFC 3339 timestamp format.
- type string
- Usage compute type in SPM.
- unit
Of stringMeasure - Unit of Messure
- usage
Number 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[onesubsription.Get Computed Usage Parent Product] - Product description
- parent_
subscribed_ strservice_ id - Subscribed service line parent id
- plan_
number str - Subscription plan number
- products
Sequence[onesubsription.
Get Computed 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]
- commitment
Service StringId - Subscribed service commitmentId.
- compartment
Id String - compute
Source String - SPM Internal compute records source .
- computed
Usage StringId - cost String
- Computed Line Amount not rounded
- cost
Rounded String - Computed Line Amount rounded.
- currency
Code String - Currency code
- data
Center String - Data Center Attribute as sent by MQS to SPM.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Invoiced Boolean - Invoicing status for the aggregated compute usage
- mqs
Message StringId - MQS Identfier send to SPM , SPM does not transform this attribute and is received as is.
- net
Unit StringPrice - Net Unit Price for the product in consideration, price actual.
- original
Usage StringNumber - SPM Internal Original usage Line number identifier in SPM coming from Metered Services entity.
- parent
Products List<Property Map> - Product description
- parent
Subscribed StringService Id - Subscribed service line parent id
- plan
Number String - Subscription plan number
- products List<Property Map>
- Product description
- quantity String
- Total Quantity that was used for computation
- rate
Card StringId - Ratecard Id at subscribed service level
- rate
Card 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.
- time
Created String - Computed Usage created time, expressed in RFC 3339 timestamp format.
- time
Metered StringOn - Metered Service date, expressed in RFC 3339 timestamp format.
- time
Of StringArrival - Usae computation date, expressed in RFC 3339 timestamp format.
- time
Updated String - Computed Usage updated time, expressed in RFC 3339 timestamp format.
- type String
- Usage compute type in SPM.
- unit
Of StringMeasure - Unit of Messure
- usage
Number String - SPM Internal usage Line number identifier in SPM coming from Metered Services entity.
- fields List<String>
Supporting Types
GetComputedUsageParentProduct
- Billing
Category string - Metered service billing category
- Name string
- Product name
- Part
Number string - Product part number
- Product
Category string - Product category
- Provisioning
Group string - Product provisioning group
- Ucm
Rate stringCard Part Type - Rate card part type of Product
- Unit
Of stringMeasure - Unit of Messure
- Billing
Category string - Metered service billing category
- Name string
- Product name
- Part
Number string - Product part number
- Product
Category string - Product category
- Provisioning
Group string - Product provisioning group
- Ucm
Rate stringCard Part Type - Rate card part type of Product
- Unit
Of stringMeasure - Unit of Messure
- billing
Category String - Metered service billing category
- name String
- Product name
- part
Number String - Product part number
- product
Category String - Product category
- provisioning
Group String - Product provisioning group
- ucm
Rate StringCard Part Type - Rate card part type of Product
- unit
Of StringMeasure - Unit of Messure
- billing
Category string - Metered service billing category
- name string
- Product name
- part
Number string - Product part number
- product
Category string - Product category
- provisioning
Group string - Product provisioning group
- ucm
Rate stringCard Part Type - Rate card part type of Product
- unit
Of 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
- billing
Category String - Metered service billing category
- name String
- Product name
- part
Number String - Product part number
- product
Category String - Product category
- provisioning
Group String - Product provisioning group
- ucm
Rate StringCard Part Type - Rate card part type of Product
- unit
Of StringMeasure - Unit of Messure
GetComputedUsageProduct
- Billing
Category string - Metered service billing category
- Name string
- Product name
- Part
Number string - Product part number
- Product
Category string - Product category
- Provisioning
Group string - Product provisioning group
- Ucm
Rate stringCard Part Type - Rate card part type of Product
- Unit
Of stringMeasure - Unit of Messure
- Billing
Category string - Metered service billing category
- Name string
- Product name
- Part
Number string - Product part number
- Product
Category string - Product category
- Provisioning
Group string - Product provisioning group
- Ucm
Rate stringCard Part Type - Rate card part type of Product
- Unit
Of stringMeasure - Unit of Messure
- billing
Category String - Metered service billing category
- name String
- Product name
- part
Number String - Product part number
- product
Category String - Product category
- provisioning
Group String - Product provisioning group
- ucm
Rate StringCard Part Type - Rate card part type of Product
- unit
Of StringMeasure - Unit of Messure
- billing
Category string - Metered service billing category
- name string
- Product name
- part
Number string - Product part number
- product
Category string - Product category
- provisioning
Group string - Product provisioning group
- ucm
Rate stringCard Part Type - Rate card part type of Product
- unit
Of 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
- billing
Category String - Metered service billing category
- name String
- Product name
- part
Number String - Product part number
- product
Category String - Product category
- provisioning
Group String - Product provisioning group
- ucm
Rate StringCard Part Type - Rate card part type of Product
- unit
Of StringMeasure - Unit of Messure
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.