Oracle Cloud Infrastructure Documentation

Using Cost-Tracking Tags

You  can use cost-tracking tags to help manage costs in your tenancy. Use cost-tracking tags to do any of the following:

  • Filter projected costs
  • Set budgets

You can only use cost-tracking tag with defined tags. You cannot specify free-form tags as cost-tracking tags.

Required IAM Policy

Cost tracking is a feature of defined tags. To allow users to work with cost tracking, use the same IAM policy for working with tag namespaces and tags. For more information, see Required Permissions for Working with Defined Tags.

If you're new to policies, see Getting Started with Policies and Common Policies. If you want to dig deeper into writing policies for groups or other IAM components, see Details for IAM.

Working with Cost-Tracking Tags

Suppose you have a defined tag key definition called Finance.CostCenter. You enable this tag definition for cost tracking. You apply the tag with a value of "W1" (Finance.CostCenter="W1") to some resources, and you apply the tag with a value of "C2" (Finance.CostCenter="C2") to some other resources. These tags enable the following scenarios: 

  • When you view your Cost Analysis, you can filter the usage information to show you only the costs generated by the resources tagged with "Finance.CostCenter=W1" . You can then filter your usage summary by "Finance.CostCenter=C2".
  • Create a budget for resources tagged "Finance.CostCenter=W1" and another budget for resources tagged "Finance.CostCenter=C2". If spending surpasses a certain amount or is forecast to exceed a particular threshold, you can set up alerts that notify you.

Use cost-tracking tags to compare and track resource usage based on tags, or to set up budgets based on resources grouped by tags, rather than by compartments.

Viewing Usage by Cost-Tracking Tags

To view usage by filtering projected costs or creating a budget

  • Cost Analysis provides easy-to-use visualization tools to help you track and optimize your spending. For more information, see Checking Your Balance and Usage.
  • Budgets can be used to set thresholds for your spending. You can set alerts on your budget to let you know when you might exceed your budget, and you can view all of your budgets and spending from one single place Console. See Budgets Overview for more information.

Limits on Cost-Tracking Tags

  • You can have a maximum of 10 tags enabled for cost-tracking in your tenancy at a time. This limitation includes both active and retired tags.

Using the Console

You can enable cost-tracking when you create a tag key definition, or you can update an existing tag key definition to enable cost tracking.

To create a key definition
To update a tag key definition

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

  • ListCostTrackingTags - lists the tags that have been enabled for cost-tracking (can be performed in the root compartment only)