Cost and Usage Reports
Cost and usage reports are comma-separated value (CSV) files that are generated daily and stored in an Object Storage bucket. Use the Cost and Usage Reports page to download and access the reports.
Usage reports will be deprecated by January 31, 2025. Instead, you can use cost reports in the OCI proprietary format and FOCUS format to analyze your consumption. For more information, see Cost Reports. You can continue to access your existing usage report CSV files until July 31, 2025.
Usage reports indicate the quantity of what is consumed, while cost reports indicate the cost of resource consumption.
A usage report is a comma-separated value (CSV) file that can be used to get a detailed breakdown of resources in Oracle Cloud Infrastructure for audit or invoice reconciliation.
A cost report is a comma-separated value (CSV) file that's similar to a usage report, but also includes cost columns. The report can be used to obtain a breakdown of your invoice line items at resource-level granularity. As a result, you can optimize your Oracle Cloud Infrastructure spending, and make more informed cloud spending decisions.
Industry-standard FOCUS CSV cost reports, which conform to the FinOps Open Cost & Usage Specification (FOCUS), are also generated and available on the Cost and Usage Reports page. For more information, see FOCUS Cost Report Schema. FOCUS CSV reports are available in all the regions of the commercial realms.
Cost and usage reports don't apply to non-metered tenancies.
Required IAM Policy
To use Oracle Cloud Infrastructure, you must be granted security access in a policy by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don't have permission or are unauthorized, verify with your administrator what type of access you have and which compartment to work in.
If you're new to policies, see Getting Started with Policies and Common Policies.
To use cost and usage reports, the following policy statement is required:
define tenancy usage-report as ocid1.tenancy.oc1..aaaaaaaaned4fkpkisbwjlr56u7cj63lf3wffbilvqknstgtvzub7vhqkggq
endorse group <group> to read objects in tenancy usage-report
This example has a specific tenancy OCID, because the reports are stored in an Oracle-owned Object Storage bucket hosted by Oracle Cloud Infrastructure, and not a customer's tenancy.
Authentication and Authorization
Each service in Oracle Cloud Infrastructure integrates with IAM for authentication and authorization, for all interfaces (the Console, SDK or CLI, and REST API).
An administrator in your organization needs to set up groups , compartments , and policies that control which users can access which services, which resources, and the type of access. For example, the policies control who can create new users, create and manage the cloud network, launch instances, create buckets, download objects, and so on. For more information, see Getting Started with Policies. For specific details about writing policies for each of the different services, see Policy Reference.
If you're a regular user (not an administrator) who needs to use the Oracle Cloud Infrastructure resources that your company owns, contact your administrator to set up a user ID for you. The administrator can confirm which compartment or compartments you should be using.
Cost Reports
Both OCI proprietary cost reports and FOCUS cost reports are available on the Cost and Usage Reports page to download. Cost reports are automatically generated every six hours, and are stored in an Oracle-owned Object Storage bucket. The reports contain one row per each Oracle Cloud Infrastructure resource (such as instance, Object Storage bucket, VNIC) per hour along with consumption information (usage, price, cost), metadata, and tags. Cost reports generally contain six hours of usage data, and occasionally late-arriving data, but the data can be delayed up to 24 hours. Cost reports are retained for one year.
FOCUS (FinOps Open Cost & Usage Specification) is an open source specification and schema for cloud billing data. FOCUS reports in the OCI Console are partitioned by usage date, and they're displayed in a collapsible and expandable folder structure by year, month, and day to aid viewing. For example, reports for usage occurring on May 24, 2024 are found under FOCUS Reports > 2024 > 05 > 24. For more information, see Downloading a Cost or Usage Report.
Cost reports can contain corrections. Corrections are added as new rows to the report, with the lineItem/iscorrection
column set and the referenceNo
value of the corrected line populated in the lineItem/backReference
column.
The file name for each cost report is appended with an automatically incrementing numerical value, and the first file is appended with -00001.csv.gz
. Cost report files are split into multiple files when more than 1 million records are present in the cost report file. When a file split occurs, new successive files are generated and are appended with -00002.csv.gz
, -00003.csv.gz
, and so on, for each file split. If the cost report file size stays under the file size threshold, then file splitting doesn't occur and only a single file is generated.
The file naming for FOCUS reports corresponds to the year, month, and day that the usage occurred.
OCI Proprietary Cost Report Schema
The following table shows the OCI proprietary cost report schema.
Field Name | Description |
---|---|
lineItem/referenceNo
|
Line identifier. Used for debugging and corrections. |
lineItem/TenantId
|
The identifier (OCID) for the Oracle Cloud Infrastructure tenant. |
lineItem/intervalUsageStart
|
The start time of the usage interval for the resource in UTC. |
lineItem/intervalUsageEnd
|
The end time of the usage interval for the resource in UTC. |
product/service
|
The service that the resource is in. |
product/compartmentId
|
The ID of the compartment that contains the resource. |
product/compartmentName
|
The name of the compartment that contains the resource. |
product/region
|
The region that contains the resource. |
product/availabilityDomain
|
The Availability domain that contains the resource. |
product/resourceId
|
The identifier for the resource. |
usage/billedQuantity
|
The quantity of the resource that has been billed over the usage interval. Note:
|
usage/billedQuantityOverage
|
The usage quantity for which you were billed. |
cost/subscriptionId
|
A unique identifier associated with your commitment or subscription. |
cost/productSku
|
The Part Number for the resource in the line. |
product/description
|
The product description for the resource in the line. |
cost/unitPrice
|
The cost billed to you for each unit of the resource used. Note:
|
cost/unitPriceOverage
|
The cost per unit of usage for overage usage of a resource. |
cost/myCost
|
The cost charged for this line of usage. Note:
|
cost/myCostOverage
|
The cost billed for overage usage of a resource. |
cost/currencyCode
|
The currency code for your tenancy. |
cost/billingUnitReadable
|
The unit measure associated with the usage/billedQuantity in the line. This field is structured as: <count>
<GiB/MiB/TiB/PiB>
<HOURS/MILLIS/MONTH/SECOND>
<measure> . For example: ONE GiB MONTH DATA_TRANSFERRED . |
cost/skuUnitDescription |
The usage for a particular SKU. |
cost/overageFlag |
The cost when a customer has exceeded their Oracle Universal Credits |
lineItem/isCorrection
|
Used if the current line is a correction. See the lineitem/backReference column for a reference to the corrected line item. |
lineItem/backReferenceNo
|
Data amendments and corrections reference. If a correction to an existing line item is needed, a new row is added with the corrected values and a reference to the original line. Used with the lineItem/isCorrection field. |
cost/attributedCost |
cost/attributedCost and usage/attributedUsage are the same as cost/myCost and usage/billedQuantity for any non-virtual machine cluster type resource. Otherwise, this field shows the cost for pluggable databases in a virtual machine cluster. For more information, see Viewing Cost and Usage from Virtual Machine Cluster Pluggable Databases. |
usage/attributedUsage |
cost/attributedCost and usage/attributedUsage are the same as cost/myCost and usage/billedQuantity for any non-virtual machine cluster type resource. Otherwise, this field shows the usage for pluggable databases in a virtual machine cluster. For more information, see Viewing Cost and Usage from Virtual Machine Cluster Pluggable Databases. |
tags/
|
The report contains one column per tag definition (includes all tag definitions, not just cost tracking tags). |
FOCUS Cost Report Schema
The following table shows the FOCUS cost report schema, including the mapping to the OCI proprietary cost report schema.
Column ID | Display Name | Proprietary Mapping | Type | Description |
---|---|---|---|---|
AvailabilityZone | Availability Zone | product/availabilityDomain
|
String | Logical Availability domain. |
BilledCost | Billed Cost | cost/myCost
|
BigDecimal | The calculated cost after all discounts have been applied. Note: The Billed Cost doesn't include taxes and might vary from the invoice amount. |
BillingAccountId | Billing Account ID | cost/subscriptionId |
String | Subscription identifier. |
BillingAccountName | Billing Account Name | NONE | String | Null |
BillingCurrency | Billing Currency | cost/currencyCode
|
CurrencyCode | Currency code for the cost. |
BillingPeriodEnd | Billing Period End | NONE | DateTime | The end date and time of the billing period. Note: The billing period start and end is based on the current monthly boundary of usage, and might be different from the date when commitment invoices are issued. |
BillingPeriodStart | Billing Period Start | NONE | DateTime | The start date and time of the billing period. |
ChargeCategory | Charge Category | lineItem/isCorrection |
String | Indicates an upfront or recurring fee, cost of usage that already occurred, an after-the-fact adjustment (credits), or taxes. Cost of usage that already occurred (Usage ), or an after-the-fact adjustment (Adjustment ). |
ChargeDescription | Charge Description | product/description |
String | The SKU description of the charge's purchase and price. |
ChargeFrequency | Charge Frequency | NONE | String | Indicates how often a charge occurs, and is commonly used to understand the recurrence period. Defaults to Usage-based . |
ChargePeriodEnd | Charge Period End | lineItem/intervalUsageEnd |
String | Start time of the usage in milliseconds since epoch. |
ChargePeriodStart | Charge Period Start | lineItem/intervalUsageStart |
String | End time of the usage in milliseconds since epoch. |
ChargeSubcategory | Charge Subcategory | NONE | String | Null |
CommitmentDiscountCategory | Commitment Discount Category | NONE | String | Null |
CommitmentDiscountId | Commitment Discount ID | NONE | String | Null |
CommitmentDiscountName | Commitment Discount Name | NONE | String | Null |
CommitmentDiscountType | Commitment Discount Type | NONE | String | This field is null because OCI doesn't have the concept of reserved instances. |
EffectiveCost | Effective Cost | cost/myCost |
BigDecimal | The calculated cost, inclusive of all applicable discounts. |
InvoiceIssuerName | Invoice Issuer | NONE | String | Defaults to Oracle as the only indicated value. |
ListCost | List Cost | NONE | BigDecimal | Calculated cost based on the current list price. |
ListUnitPrice | List Unit Price | NONE | BigDecimal | Based on the current global list price, the unit price for a single pricing unit of the associated SKU, exclusive of any discounts. |
PricingCategory | Pricing Category | NONE | String | Null |
PricingQuantity | Pricing Quantity | usage/billedQuantity |
BigDecimal | Hourly rounded billable value, if applicable. |
PricingUnit | Pricing Unit | cost/skuUnitDescription |
String | SKU units description. |
ProviderName | Provider | NONE | String | Defaults to Oracle . |
PublisherName | Publisher | NONE | String | Oracle except for third-party marketplace listings. |
Region | Region | product/region |
String | The region associated with the cost entry, indexed together with tenantId, compartmentId, resourceId, and resourceMeter for uniqueness. |
ResourceId | Resource ID | product/resourceId |
String | Unique resource identifier, indexed together with tenantId, compartmentId, region, and resourceMeter for uniqueness. |
ResourceName | Resource Name | NONE | String | This field is null because Oracle doesn't publish this value in its cost reports. |
ResourceType | Resource Type | NONE | String | The kind of resource the charge applies to. For example, Storage . |
ServiceCategory | Service Category | NONE | String | Enum values for a service classification accepted in FOCUS. |
ServiceName | Service Name | product/service |
String | The service associated with the resource, indexed together with tenantId, compartmentId, resourceId, and resourceMeter for uniqueness. |
SkuId | SKU ID | cost/productSku |
String | The unique SKU ID. |
SkuPriceId | SKU Price ID | NONE | String | This field is null because this construct doesn't exist in OCI. |
SubAccountId | Sub Account ID | lineItem/TenantId |
String | The identifier (OCID) for the Oracle Cloud Infrastructure tenant. |
SubAccountName | Sub Account Name | NONE | String | The tenancy name. |
Tags | Tags | tags/ |
JSON | Tags associated with the entry, stored as a byte array. |
UsageQuantity | Usage Quantity | usage/billedQuantity |
BigDecimal | Hourly rounded billable value, if applicable. |
UsageUnit | Usage Unit | cost/skuUnitDescription |
String | SKU units description. |
Usage Reports
Usage reports will be deprecated by January 31, 2025. Instead, you can use cost reports in the OCI proprietary format and FOCUS format to analyze your consumption. For more information, see Cost Reports. You can continue to access your existing usage report CSV files until July 31, 2025.
Usage reports are automatically generated daily, and are stored in an Oracle-owned Object Storage bucket. The reports contain one row per each Oracle Cloud Infrastructure resource (such as instance, Object Storage bucket, VNIC) per hour along with consumption information, metadata, and tags. Usage reports generally contain 24 hours of usage data, although occasionally a usage report can contain late-arriving data that's older than 24 hours. Usage reports are retained for one year.
If you change any cost tracking tags during a particular hour time slot, the last cost tracking tag that's chosen is what gets applied to that hour. For example, if you changed a tag from "AAA" to "BBB" at 10:40, the usage for 10:00-11:00 would reflect "BBB" for the tag. In addition, tags can't be applied retroactively.
Usage reports can contain corrections. Corrections are added as new rows to the report, with the lineItem/iscorrection
column set and the referenceNo
value of the corrected line populated in the lineItem/backReference
column.
File names for each usage report are appended with an automatically incrementing numerical value.
Usage Report Schema
The following table shows the usage report schema.
Field Name | Description |
---|---|
lineItem/referenceNo
|
Line identifier. Used for debugging and corrections. |
lineItem/TenantId
|
The identifier (OCID) for the Oracle Cloud Infrastructure tenant. |
lineItem/intervalUsageStart
|
The start time of the usage interval for the resource in UTC. |
lineItem/intervalUsageEnd
|
The end time of the usage interval for the resource in UTC. |
product/service
|
The service that the resource is in. |
product/resource
|
The resource name used by the metering system. |
product/compartmentId
|
The ID of the compartment that contains the resource. |
product/compartmentName
|
The name of the compartment that contains the resource. |
product/region
|
The region that contains the resource. |
product/availabilityDomain
|
The Availability domain that contains the resource. |
product/resourceId
|
The identifier for the resource. |
usage/consumedQuantity
|
The quantity of the resource that has been consumed over the usage interval. |
usage/billedQuantity
|
The quantity of the resource that has been billed over the usage interval. |
usage/consumedQuantityUnits
|
The unit for the consumed quantity and billed quantity. |
usage/consumedQuantityMeasure
|
The measure for the consumed quantity and billed quantity. |
lineItem/backReference
|
Data amendments and corrections reference. If a correction to an existing line item is needed, a new row is added with the corrected values and a reference to the original line. Used with the lineItem/isCorrection field. |
lineItem/isCorrection
|
Used if the current line is a correction. See the lineitem/backReference column for a reference to the corrected line item. |
tags/
|
The report contains one column per tag definition (includes all tag definitions, not just cost tracking tags). |