oci.MeteringComputation.Usage
Explore with Pulumi AI
This resource provides the Usage resource in Oracle Cloud Infrastructure Metering Computation service.
Returns usage for the given account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testUsage = new oci.meteringcomputation.Usage("test_usage", {
granularity: usageGranularity,
tenantId: testTenant.id,
timeUsageEnded: usageTimeUsageEnded,
timeUsageStarted: usageTimeUsageStarted,
compartmentDepth: usageCompartmentDepth,
filter: usageFilter,
forecast: {
timeForecastEnded: usageForecastTimeForecastEnded,
forecastType: usageForecastForecastType,
timeForecastStarted: usageForecastTimeForecastStarted,
},
groupBies: usageGroupBy,
groupByTags: [{
key: usageGroupByTagKey,
namespace: usageGroupByTagNamespace,
value: usageGroupByTagValue,
}],
isAggregateByTime: usageIsAggregateByTime,
queryType: usageQueryType,
});
import pulumi
import pulumi_oci as oci
test_usage = oci.metering_computation.Usage("test_usage",
granularity=usage_granularity,
tenant_id=test_tenant["id"],
time_usage_ended=usage_time_usage_ended,
time_usage_started=usage_time_usage_started,
compartment_depth=usage_compartment_depth,
filter=usage_filter,
forecast={
"time_forecast_ended": usage_forecast_time_forecast_ended,
"forecast_type": usage_forecast_forecast_type,
"time_forecast_started": usage_forecast_time_forecast_started,
},
group_bies=usage_group_by,
group_by_tags=[{
"key": usage_group_by_tag_key,
"namespace": usage_group_by_tag_namespace,
"value": usage_group_by_tag_value,
}],
is_aggregate_by_time=usage_is_aggregate_by_time,
query_type=usage_query_type)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/MeteringComputation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := MeteringComputation.NewUsage(ctx, "test_usage", &MeteringComputation.UsageArgs{
Granularity: pulumi.Any(usageGranularity),
TenantId: pulumi.Any(testTenant.Id),
TimeUsageEnded: pulumi.Any(usageTimeUsageEnded),
TimeUsageStarted: pulumi.Any(usageTimeUsageStarted),
CompartmentDepth: pulumi.Any(usageCompartmentDepth),
Filter: pulumi.Any(usageFilter),
Forecast: &meteringcomputation.UsageForecastArgs{
TimeForecastEnded: pulumi.Any(usageForecastTimeForecastEnded),
ForecastType: pulumi.Any(usageForecastForecastType),
TimeForecastStarted: pulumi.Any(usageForecastTimeForecastStarted),
},
GroupBies: pulumi.Any(usageGroupBy),
GroupByTags: meteringcomputation.UsageGroupByTagArray{
&meteringcomputation.UsageGroupByTagArgs{
Key: pulumi.Any(usageGroupByTagKey),
Namespace: pulumi.Any(usageGroupByTagNamespace),
Value: pulumi.Any(usageGroupByTagValue),
},
},
IsAggregateByTime: pulumi.Any(usageIsAggregateByTime),
QueryType: pulumi.Any(usageQueryType),
})
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 testUsage = new Oci.MeteringComputation.Usage("test_usage", new()
{
Granularity = usageGranularity,
TenantId = testTenant.Id,
TimeUsageEnded = usageTimeUsageEnded,
TimeUsageStarted = usageTimeUsageStarted,
CompartmentDepth = usageCompartmentDepth,
Filter = usageFilter,
Forecast = new Oci.MeteringComputation.Inputs.UsageForecastArgs
{
TimeForecastEnded = usageForecastTimeForecastEnded,
ForecastType = usageForecastForecastType,
TimeForecastStarted = usageForecastTimeForecastStarted,
},
GroupBies = usageGroupBy,
GroupByTags = new[]
{
new Oci.MeteringComputation.Inputs.UsageGroupByTagArgs
{
Key = usageGroupByTagKey,
Namespace = usageGroupByTagNamespace,
Value = usageGroupByTagValue,
},
},
IsAggregateByTime = usageIsAggregateByTime,
QueryType = usageQueryType,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.MeteringComputation.Usage;
import com.pulumi.oci.MeteringComputation.UsageArgs;
import com.pulumi.oci.MeteringComputation.inputs.UsageForecastArgs;
import com.pulumi.oci.MeteringComputation.inputs.UsageGroupByTagArgs;
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) {
var testUsage = new Usage("testUsage", UsageArgs.builder()
.granularity(usageGranularity)
.tenantId(testTenant.id())
.timeUsageEnded(usageTimeUsageEnded)
.timeUsageStarted(usageTimeUsageStarted)
.compartmentDepth(usageCompartmentDepth)
.filter(usageFilter)
.forecast(UsageForecastArgs.builder()
.timeForecastEnded(usageForecastTimeForecastEnded)
.forecastType(usageForecastForecastType)
.timeForecastStarted(usageForecastTimeForecastStarted)
.build())
.groupBies(usageGroupBy)
.groupByTags(UsageGroupByTagArgs.builder()
.key(usageGroupByTagKey)
.namespace(usageGroupByTagNamespace)
.value(usageGroupByTagValue)
.build())
.isAggregateByTime(usageIsAggregateByTime)
.queryType(usageQueryType)
.build());
}
}
resources:
testUsage:
type: oci:MeteringComputation:Usage
name: test_usage
properties:
granularity: ${usageGranularity}
tenantId: ${testTenant.id}
timeUsageEnded: ${usageTimeUsageEnded}
timeUsageStarted: ${usageTimeUsageStarted}
compartmentDepth: ${usageCompartmentDepth}
filter: ${usageFilter}
forecast:
timeForecastEnded: ${usageForecastTimeForecastEnded}
forecastType: ${usageForecastForecastType}
timeForecastStarted: ${usageForecastTimeForecastStarted}
groupBies: ${usageGroupBy}
groupByTags:
- key: ${usageGroupByTagKey}
namespace: ${usageGroupByTagNamespace}
value: ${usageGroupByTagValue}
isAggregateByTime: ${usageIsAggregateByTime}
queryType: ${usageQueryType}
Create Usage Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Usage(name: string, args: UsageArgs, opts?: CustomResourceOptions);
@overload
def Usage(resource_name: str,
args: UsageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Usage(resource_name: str,
opts: Optional[ResourceOptions] = None,
granularity: Optional[str] = None,
tenant_id: Optional[str] = None,
time_usage_ended: Optional[str] = None,
time_usage_started: Optional[str] = None,
compartment_depth: Optional[float] = None,
filter: Optional[str] = None,
forecast: Optional[_meteringcomputation.UsageForecastArgs] = None,
group_bies: Optional[Sequence[str]] = None,
group_by_tags: Optional[Sequence[_meteringcomputation.UsageGroupByTagArgs]] = None,
is_aggregate_by_time: Optional[bool] = None,
query_type: Optional[str] = None)
func NewUsage(ctx *Context, name string, args UsageArgs, opts ...ResourceOption) (*Usage, error)
public Usage(string name, UsageArgs args, CustomResourceOptions? opts = null)
type: oci:MeteringComputation:Usage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args UsageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args UsageArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args UsageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UsageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UsageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var usageResource = new Oci.MeteringComputation.Usage("usageResource", new()
{
Granularity = "string",
TenantId = "string",
TimeUsageEnded = "string",
TimeUsageStarted = "string",
CompartmentDepth = 0,
Filter = "string",
Forecast = new Oci.MeteringComputation.Inputs.UsageForecastArgs
{
TimeForecastEnded = "string",
ForecastType = "string",
TimeForecastStarted = "string",
},
GroupBies = new[]
{
"string",
},
GroupByTags = new[]
{
new Oci.MeteringComputation.Inputs.UsageGroupByTagArgs
{
Key = "string",
Namespace = "string",
Value = "string",
},
},
IsAggregateByTime = false,
QueryType = "string",
});
example, err := MeteringComputation.NewUsage(ctx, "usageResource", &MeteringComputation.UsageArgs{
Granularity: pulumi.String("string"),
TenantId: pulumi.String("string"),
TimeUsageEnded: pulumi.String("string"),
TimeUsageStarted: pulumi.String("string"),
CompartmentDepth: pulumi.Float64(0),
Filter: pulumi.String("string"),
Forecast: &meteringcomputation.UsageForecastArgs{
TimeForecastEnded: pulumi.String("string"),
ForecastType: pulumi.String("string"),
TimeForecastStarted: pulumi.String("string"),
},
GroupBies: pulumi.StringArray{
pulumi.String("string"),
},
GroupByTags: meteringcomputation.UsageGroupByTagArray{
&meteringcomputation.UsageGroupByTagArgs{
Key: pulumi.String("string"),
Namespace: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
IsAggregateByTime: pulumi.Bool(false),
QueryType: pulumi.String("string"),
})
var usageResource = new Usage("usageResource", UsageArgs.builder()
.granularity("string")
.tenantId("string")
.timeUsageEnded("string")
.timeUsageStarted("string")
.compartmentDepth(0)
.filter("string")
.forecast(UsageForecastArgs.builder()
.timeForecastEnded("string")
.forecastType("string")
.timeForecastStarted("string")
.build())
.groupBies("string")
.groupByTags(UsageGroupByTagArgs.builder()
.key("string")
.namespace("string")
.value("string")
.build())
.isAggregateByTime(false)
.queryType("string")
.build());
usage_resource = oci.metering_computation.Usage("usageResource",
granularity="string",
tenant_id="string",
time_usage_ended="string",
time_usage_started="string",
compartment_depth=0,
filter="string",
forecast={
"time_forecast_ended": "string",
"forecast_type": "string",
"time_forecast_started": "string",
},
group_bies=["string"],
group_by_tags=[{
"key": "string",
"namespace": "string",
"value": "string",
}],
is_aggregate_by_time=False,
query_type="string")
const usageResource = new oci.meteringcomputation.Usage("usageResource", {
granularity: "string",
tenantId: "string",
timeUsageEnded: "string",
timeUsageStarted: "string",
compartmentDepth: 0,
filter: "string",
forecast: {
timeForecastEnded: "string",
forecastType: "string",
timeForecastStarted: "string",
},
groupBies: ["string"],
groupByTags: [{
key: "string",
namespace: "string",
value: "string",
}],
isAggregateByTime: false,
queryType: "string",
});
type: oci:MeteringComputation:Usage
properties:
compartmentDepth: 0
filter: string
forecast:
forecastType: string
timeForecastEnded: string
timeForecastStarted: string
granularity: string
groupBies:
- string
groupByTags:
- key: string
namespace: string
value: string
isAggregateByTime: false
queryType: string
tenantId: string
timeUsageEnded: string
timeUsageStarted: string
Usage Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Usage resource accepts the following input properties:
- Granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Depth double - The compartment depth level.
- Filter string
- The filter object for query usage.
- Forecast
Usage
Forecast - Forecast configuration of usage/cost.
- Group
Bies List<string> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Usage
Group By Tag> - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- Is
Aggregate boolBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- Query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- Granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Depth float64 - The compartment depth level.
- Filter string
- The filter object for query usage.
- Forecast
Usage
Forecast Args - Forecast configuration of usage/cost.
- Group
Bies []string - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- []Usage
Group By Tag Args - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- Is
Aggregate boolBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- Query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- granularity String
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Depth Double - The compartment depth level.
- filter String
- The filter object for query usage.
- forecast
Usage
Forecast - Forecast configuration of usage/cost.
- group
Bies List<String> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Usage
Group By Tag> - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate BooleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- query
Type String - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- tenant
Id string - Tenant ID.
- time
Usage stringEnded - The usage end time.
- time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Depth number - The compartment depth level.
- filter string
- The filter object for query usage.
- forecast
Usage
Forecast - Forecast configuration of usage/cost.
- group
Bies string[] - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- Usage
Group By Tag[] - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate booleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- granularity str
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- tenant_
id str - Tenant ID.
- time_
usage_ strended - The usage end time.
- time_
usage_ strstarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment_
depth float - The compartment depth level.
- filter str
- The filter object for query usage.
- forecast
meteringcomputation.
Usage Forecast Args - Forecast configuration of usage/cost.
- group_
bies Sequence[str] - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- Sequence[meteringcomputation.
Usage Group By Tag Args] - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is_
aggregate_ boolby_ time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- query_
type str - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- granularity String
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Depth Number - The compartment depth level.
- filter String
- The filter object for query usage.
- forecast Property Map
- Forecast configuration of usage/cost.
- group
Bies List<String> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Property Map>
- GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate BooleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- query
Type String - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
Outputs
All input properties are implicitly available as output properties. Additionally, the Usage resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Usage
Item> - A list of usage items.
- Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Usage
Item - A list of usage items.
- id String
- The provider-assigned unique ID for this managed resource.
- items
List<Usage
Item> - A list of usage items.
- id string
- The provider-assigned unique ID for this managed resource.
- items
Usage
Item[] - A list of usage items.
- id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[meteringcomputation.
Usage Item] - A list of usage items.
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- A list of usage items.
Look up Existing Usage Resource
Get an existing Usage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: UsageState, opts?: CustomResourceOptions): Usage
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_depth: Optional[float] = None,
filter: Optional[str] = None,
forecast: Optional[_meteringcomputation.UsageForecastArgs] = None,
granularity: Optional[str] = None,
group_bies: Optional[Sequence[str]] = None,
group_by_tags: Optional[Sequence[_meteringcomputation.UsageGroupByTagArgs]] = None,
is_aggregate_by_time: Optional[bool] = None,
items: Optional[Sequence[_meteringcomputation.UsageItemArgs]] = None,
query_type: Optional[str] = None,
tenant_id: Optional[str] = None,
time_usage_ended: Optional[str] = None,
time_usage_started: Optional[str] = None) -> Usage
func GetUsage(ctx *Context, name string, id IDInput, state *UsageState, opts ...ResourceOption) (*Usage, error)
public static Usage Get(string name, Input<string> id, UsageState? state, CustomResourceOptions? opts = null)
public static Usage get(String name, Output<String> id, UsageState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Compartment
Depth double - The compartment depth level.
- Filter string
- The filter object for query usage.
- Forecast
Usage
Forecast - Forecast configuration of usage/cost.
- Granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- Group
Bies List<string> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Usage
Group By Tag> - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- Is
Aggregate boolBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- Items
List<Usage
Item> - A list of usage items.
- Query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Depth float64 - The compartment depth level.
- Filter string
- The filter object for query usage.
- Forecast
Usage
Forecast Args - Forecast configuration of usage/cost.
- Granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- Group
Bies []string - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- []Usage
Group By Tag Args - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- Is
Aggregate boolBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- Items
[]Usage
Item Args - A list of usage items.
- Query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- Tenant
Id string - Tenant ID.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Depth Double - The compartment depth level.
- filter String
- The filter object for query usage.
- forecast
Usage
Forecast - Forecast configuration of usage/cost.
- granularity String
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- group
Bies List<String> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Usage
Group By Tag> - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate BooleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- items
List<Usage
Item> - A list of usage items.
- query
Type String - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Depth number - The compartment depth level.
- filter string
- The filter object for query usage.
- forecast
Usage
Forecast - Forecast configuration of usage/cost.
- granularity string
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- group
Bies string[] - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- Usage
Group By Tag[] - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate booleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- items
Usage
Item[] - A list of usage items.
- query
Type string - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- tenant
Id string - Tenant ID.
- time
Usage stringEnded - The usage end time.
- time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment_
depth float - The compartment depth level.
- filter str
- The filter object for query usage.
- forecast
meteringcomputation.
Usage Forecast Args - Forecast configuration of usage/cost.
- granularity str
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- group_
bies Sequence[str] - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- Sequence[meteringcomputation.
Usage Group By Tag Args] - GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is_
aggregate_ boolby_ time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- items
Sequence[meteringcomputation.
Usage Item Args] - A list of usage items.
- query_
type str - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- tenant_
id str - Tenant ID.
- time_
usage_ strended - The usage end time.
- time_
usage_ strstarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Depth Number - The compartment depth level.
- filter String
- The filter object for query usage.
- forecast Property Map
- Forecast configuration of usage/cost.
- granularity String
- The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported.
- group
Bies List<String> - Aggregate the result by. example:
["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]
- List<Property Map>
- GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only supports one tag in the list. For example:
[{"namespace":"oracle", "key":"createdBy"]
- is
Aggregate BooleanBy Time - Whether aggregated by time. If isAggregateByTime is true, all usage/cost over the query time period will be added up.
- items List<Property Map>
- A list of usage items.
- query
Type String - The query usage type. COST by default if it is missing. Usage - Query the usage data. Cost - Query the cost/billing data. Credit - Query the credit adjustments data. ExpiredCredit - Query the expired credits data. AllCredit - Query the credit adjustments and expired credit.
- tenant
Id String - Tenant ID.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Supporting Types
UsageForecast, UsageForecastArgs
- Time
Forecast stringEnded - The forecast end time.
- Forecast
Type string - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- Time
Forecast stringStarted - The forecast start time. Defaults to UTC-1 if not specified.
- Time
Forecast stringEnded - The forecast end time.
- Forecast
Type string - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- Time
Forecast stringStarted - The forecast start time. Defaults to UTC-1 if not specified.
- time
Forecast StringEnded - The forecast end time.
- forecast
Type String - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- time
Forecast StringStarted - The forecast start time. Defaults to UTC-1 if not specified.
- time
Forecast stringEnded - The forecast end time.
- forecast
Type string - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- time
Forecast stringStarted - The forecast start time. Defaults to UTC-1 if not specified.
- time_
forecast_ strended - The forecast end time.
- forecast_
type str - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- time_
forecast_ strstarted - The forecast start time. Defaults to UTC-1 if not specified.
- time
Forecast StringEnded - The forecast end time.
- forecast
Type String - BASIC uses the exponential smoothing (ETS) model to project future usage/costs based on history data. The basis for projections is a periodic set of equivalent historical days for which the projection is being made.
- time
Forecast StringStarted - The forecast start time. Defaults to UTC-1 if not specified.
UsageGroupByTag, UsageGroupByTagArgs
UsageItem, UsageItemArgs
- Ad string
- The availability domain of the usage.
- Attributed
Cost string - The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0.
- Attributed
Usage string - The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0.
- Compartment
Id string - The compartment OCID.
- Compartment
Name string - The compartment name.
- Compartment
Path string - The compartment path, starting from root.
- Computed
Amount double - The computed cost.
- Computed
Quantity double - The usage number.
- Currency string
- The price currency.
- Discount double
- The discretionary discount applied to the SKU.
- Is
Forecast bool - The forecasted data.
- List
Rate double - The SKU list rate (not discount).
- Overage string
- The overage usage.
- Overages
Flag string - The SPM OverageFlag.
- Platform string
- Platform for the cost.
- Region string
- The region of the usage.
- Resource
Id string - The resource OCID that is incurring the cost.
- Resource
Name string - The resource name that is incurring the cost.
- Service string
- The service name that is incurring the cost.
- Shape string
- The resource shape.
- Sku
Name string - The SKU friendly name.
- Sku
Part stringNumber - The SKU part number.
- Subscription
Id string - The subscription ID.
- List<Usage
Item Tag> - For grouping, a tag definition. For filtering, a definition and key.
- Tenant
Id string - Tenant ID.
- Tenant
Name string - The tenancy name.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Unit string
- The usage unit.
- Unit
Price double - The price per unit.
- Weight double
- The resource size being metered.
- Ad string
- The availability domain of the usage.
- Attributed
Cost string - The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0.
- Attributed
Usage string - The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0.
- Compartment
Id string - The compartment OCID.
- Compartment
Name string - The compartment name.
- Compartment
Path string - The compartment path, starting from root.
- Computed
Amount float64 - The computed cost.
- Computed
Quantity float64 - The usage number.
- Currency string
- The price currency.
- Discount float64
- The discretionary discount applied to the SKU.
- Is
Forecast bool - The forecasted data.
- List
Rate float64 - The SKU list rate (not discount).
- Overage string
- The overage usage.
- Overages
Flag string - The SPM OverageFlag.
- Platform string
- Platform for the cost.
- Region string
- The region of the usage.
- Resource
Id string - The resource OCID that is incurring the cost.
- Resource
Name string - The resource name that is incurring the cost.
- Service string
- The service name that is incurring the cost.
- Shape string
- The resource shape.
- Sku
Name string - The SKU friendly name.
- Sku
Part stringNumber - The SKU part number.
- Subscription
Id string - The subscription ID.
- []Usage
Item Tag - For grouping, a tag definition. For filtering, a definition and key.
- Tenant
Id string - Tenant ID.
- Tenant
Name string - The tenancy name.
- Time
Usage stringEnded - The usage end time.
- Time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Unit string
- The usage unit.
- Unit
Price float64 - The price per unit.
- Weight float64
- The resource size being metered.
- ad String
- The availability domain of the usage.
- attributed
Cost String - The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0.
- attributed
Usage String - The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0.
- compartment
Id String - The compartment OCID.
- compartment
Name String - The compartment name.
- compartment
Path String - The compartment path, starting from root.
- computed
Amount Double - The computed cost.
- computed
Quantity Double - The usage number.
- currency String
- The price currency.
- discount Double
- The discretionary discount applied to the SKU.
- is
Forecast Boolean - The forecasted data.
- list
Rate Double - The SKU list rate (not discount).
- overage String
- The overage usage.
- overages
Flag String - The SPM OverageFlag.
- platform String
- Platform for the cost.
- region String
- The region of the usage.
- resource
Id String - The resource OCID that is incurring the cost.
- resource
Name String - The resource name that is incurring the cost.
- service String
- The service name that is incurring the cost.
- shape String
- The resource shape.
- sku
Name String - The SKU friendly name.
- sku
Part StringNumber - The SKU part number.
- subscription
Id String - The subscription ID.
- List<Usage
Item Tag> - For grouping, a tag definition. For filtering, a definition and key.
- tenant
Id String - Tenant ID.
- tenant
Name String - The tenancy name.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- unit String
- The usage unit.
- unit
Price Double - The price per unit.
- weight Double
- The resource size being metered.
- ad string
- The availability domain of the usage.
- attributed
Cost string - The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0.
- attributed
Usage string - The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0.
- compartment
Id string - The compartment OCID.
- compartment
Name string - The compartment name.
- compartment
Path string - The compartment path, starting from root.
- computed
Amount number - The computed cost.
- computed
Quantity number - The usage number.
- currency string
- The price currency.
- discount number
- The discretionary discount applied to the SKU.
- is
Forecast boolean - The forecasted data.
- list
Rate number - The SKU list rate (not discount).
- overage string
- The overage usage.
- overages
Flag string - The SPM OverageFlag.
- platform string
- Platform for the cost.
- region string
- The region of the usage.
- resource
Id string - The resource OCID that is incurring the cost.
- resource
Name string - The resource name that is incurring the cost.
- service string
- The service name that is incurring the cost.
- shape string
- The resource shape.
- sku
Name string - The SKU friendly name.
- sku
Part stringNumber - The SKU part number.
- subscription
Id string - The subscription ID.
- Usage
Item Tag[] - For grouping, a tag definition. For filtering, a definition and key.
- tenant
Id string - Tenant ID.
- tenant
Name string - The tenancy name.
- time
Usage stringEnded - The usage end time.
- time
Usage stringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- unit string
- The usage unit.
- unit
Price number - The price per unit.
- weight number
- The resource size being metered.
- ad str
- The availability domain of the usage.
- attributed_
cost str - The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0.
- attributed_
usage str - The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0.
- compartment_
id str - The compartment OCID.
- compartment_
name str - The compartment name.
- compartment_
path str - The compartment path, starting from root.
- computed_
amount float - The computed cost.
- computed_
quantity float - The usage number.
- currency str
- The price currency.
- discount float
- The discretionary discount applied to the SKU.
- is_
forecast bool - The forecasted data.
- list_
rate float - The SKU list rate (not discount).
- overage str
- The overage usage.
- overages_
flag str - The SPM OverageFlag.
- platform str
- Platform for the cost.
- region str
- The region of the usage.
- resource_
id str - The resource OCID that is incurring the cost.
- resource_
name str - The resource name that is incurring the cost.
- service str
- The service name that is incurring the cost.
- shape str
- The resource shape.
- sku_
name str - The SKU friendly name.
- sku_
part_ strnumber - The SKU part number.
- subscription_
id str - The subscription ID.
- Sequence[meteringcomputation.
Usage Item Tag] - For grouping, a tag definition. For filtering, a definition and key.
- tenant_
id str - Tenant ID.
- tenant_
name str - The tenancy name.
- time_
usage_ strended - The usage end time.
- time_
usage_ strstarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- unit str
- The usage unit.
- unit_
price float - The price per unit.
- weight float
- The resource size being metered.
- ad String
- The availability domain of the usage.
- attributed
Cost String - The attributed cost with a max value of 9999999999.999999999999 and a minimum value of 0.
- attributed
Usage String - The attributed usage with a max value of 9999999999.999999999999 and a minimum value of 0.
- compartment
Id String - The compartment OCID.
- compartment
Name String - The compartment name.
- compartment
Path String - The compartment path, starting from root.
- computed
Amount Number - The computed cost.
- computed
Quantity Number - The usage number.
- currency String
- The price currency.
- discount Number
- The discretionary discount applied to the SKU.
- is
Forecast Boolean - The forecasted data.
- list
Rate Number - The SKU list rate (not discount).
- overage String
- The overage usage.
- overages
Flag String - The SPM OverageFlag.
- platform String
- Platform for the cost.
- region String
- The region of the usage.
- resource
Id String - The resource OCID that is incurring the cost.
- resource
Name String - The resource name that is incurring the cost.
- service String
- The service name that is incurring the cost.
- shape String
- The resource shape.
- sku
Name String - The SKU friendly name.
- sku
Part StringNumber - The SKU part number.
- subscription
Id String - The subscription ID.
- List<Property Map>
- For grouping, a tag definition. For filtering, a definition and key.
- tenant
Id String - Tenant ID.
- tenant
Name String - The tenancy name.
- time
Usage StringEnded - The usage end time.
- time
Usage StringStarted The usage start time.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- unit String
- The usage unit.
- unit
Price Number - The price per unit.
- weight Number
- The resource size being metered.
UsageItemTag, UsageItemTagArgs
Import
Import is not supported for this resource.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.