import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Usage resource in Oracle Cloud Infrastructure Metering Computation service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/usage/latest/Usage * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/metering_computation * * Returns usage for the given account. * * ## Example Usage * * ```typescript * 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 === "true", * queryType: usageQueryType, * }); * ``` * * ## Import * * Import is not supported for this resource. */ export declare class Usage extends pulumi.CustomResource { /** * Get an existing Usage resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: UsageState, opts?: pulumi.CustomResourceOptions): Usage; /** * Returns true if the given object is an instance of Usage. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Usage; /** * The compartment depth level. */ readonly compartmentDepth: pulumi.Output; /** * The filter object for query usage. */ readonly filter: pulumi.Output; /** * Forecast configuration of usage/cost. */ readonly forecast: pulumi.Output; /** * The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported. */ readonly granularity: pulumi.Output; /** * Aggregate the result by. For example: `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]` */ readonly groupBies: pulumi.Output; /** * 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"]` */ readonly groupByTags: pulumi.Output; /** * Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up. */ readonly isAggregateByTime: pulumi.Output; /** * A list of usage items. */ readonly items: pulumi.Output; /** * 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. Usage_Only - Query the only usage data without cost or currency. */ readonly queryType: pulumi.Output; /** * Tenant ID. */ readonly tenantId: pulumi.Output; /** * The usage end time. */ readonly timeUsageEnded: pulumi.Output; /** * 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 */ readonly timeUsageStarted: pulumi.Output; /** * Create a Usage resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: UsageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Usage resources. */ export interface UsageState { /** * The compartment depth level. */ compartmentDepth?: pulumi.Input; /** * The filter object for query usage. */ filter?: pulumi.Input; /** * Forecast configuration of usage/cost. */ forecast?: pulumi.Input; /** * The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported. */ granularity?: pulumi.Input; /** * Aggregate the result by. For example: `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]` */ groupBies?: pulumi.Input[] | undefined>; /** * 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"]` */ groupByTags?: pulumi.Input[] | undefined>; /** * Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up. */ isAggregateByTime?: pulumi.Input; /** * A list of usage items. */ items?: pulumi.Input[] | undefined>; /** * 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. Usage_Only - Query the only usage data without cost or currency. */ queryType?: pulumi.Input; /** * Tenant ID. */ tenantId?: pulumi.Input; /** * The usage end time. */ timeUsageEnded?: pulumi.Input; /** * 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 */ timeUsageStarted?: pulumi.Input; } /** * The set of arguments for constructing a Usage resource. */ export interface UsageArgs { /** * The compartment depth level. */ compartmentDepth?: pulumi.Input; /** * The filter object for query usage. */ filter?: pulumi.Input; /** * Forecast configuration of usage/cost. */ forecast?: pulumi.Input; /** * The usage granularity. HOURLY - Hourly data aggregation. DAILY - Daily data aggregation. MONTHLY - Monthly data aggregation. TOTAL - Not yet supported. */ granularity: pulumi.Input; /** * Aggregate the result by. For example: `["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]` */ groupBies?: pulumi.Input[] | undefined>; /** * 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"]` */ groupByTags?: pulumi.Input[] | undefined>; /** * Specifies whether aggregated by time. If isAggregateByTime is true, all usage or cost over the query time period will be added up. */ isAggregateByTime?: pulumi.Input; /** * 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. Usage_Only - Query the only usage data without cost or currency. */ queryType?: pulumi.Input; /** * Tenant ID. */ tenantId: pulumi.Input; /** * The usage end time. */ timeUsageEnded: pulumi.Input; /** * 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 */ timeUsageStarted: pulumi.Input; } //# sourceMappingURL=usage.d.ts.map