Using Cost-Tracking Tags
Cost-tracking tags are only relevant when you set budgets.
- You can only use a cost-tracking tag with defined tags.
- You cannot specify free-form tags as cost-tracking tags.
- You do not have to designate a tag as cost-tracking, in order for it to be exposed in Cost Analysis or Cost and Usage Reports.
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 without Identity Domains.
Working with Cost-Tracking Tags
Suppose you have a defined tag key definition called Finance.CostCenter. You enable this tag key 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 other resources. These tags enables the following scenario:
- Create one budget for resources tagged "Finance.CostCenter=W1" and a second 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.
Limits on Cost-Tracking Tags
- You can have a maximum of 10 tag key definitions enabled for cost-tracking in your tenancy at a time. For example, you could enable the Project tag key as a cost-tracking tag and have 75 different departments, but it only takes up 1 tag.
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. For more information on creating and updating tag key definition, see Creating a Tag Key Definition and Updating a Tag Key Definition.
Using the API
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.
- ListCostTrackingTags - lists the tags that have been enabled for cost-tracking (can be performed in the root compartment only)