steampipe plugin install oci

Table: oci_budget_budget - Query OCI Budgets using SQL

Oracle Cloud Infrastructure's Budgets service allows users to set thresholds that trigger alerts when cost and usage go beyond the set amount. This service helps users to control costs in their tenancy by providing a way to monitor and manage the consumption of resources. It provides a mechanism to keep track of your OCI spending and ensure it stays within the budget.

Table Usage Guide

The oci_budget_budget table provides insights into budget details within Oracle Cloud Infrastructure's Budgets service. As a finance or operations professional, explore budget-specific details through this table, including the amount, actual spend, and forecasted spend. Utilize it to monitor and manage the consumption of OCI resources, ensuring that spending stays within the defined budget.

Examples

Basic info

Gain insights into your budgeting by analyzing the state, amount, and actual spending of your Oracle Cloud Infrastructure resources. This helps in understanding the financial aspects of your resources and planning future expenses accordingly.

select
display_name,
id,
amount,
actual_spend,
lifecycle_state as state
from
oci_budget_budget;
select
display_name,
id,
amount,
actual_spend,
lifecycle_state as state
from
oci_budget_budget;

List budgets that are not active

Discover the segments that are not currently active in your budget. This can be useful to identify areas where resources are being allocated but are not currently in use, helping to optimize your budget distribution.

select
display_name,
id,
amount,
actual_spend,
lifecycle_state as state
from
oci_budget_budget
where
lifecycle_state <> 'ACTIVE';
select
display_name,
id,
amount,
actual_spend,
lifecycle_state as state
from
oci_budget_budget
where
lifecycle_state <> 'ACTIVE';

List budgets with actual spend more than 100 percent

Discover segments where the actual expenditure has exceeded the allocated budget. This is particularly useful for identifying and analyzing areas of overspending to facilitate more effective budget management.

select
display_name,
id,
amount,
actual_spend,
lifecycle_state as state
from
oci_budget_budget
where
actual_spend > amount;
select
display_name,
id,
amount,
actual_spend,
lifecycle_state as state
from
oci_budget_budget
where
actual_spend > amount;

Schema for oci_budget_budget

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
actual_spenddouble precisionThe actual spend in currency for the current budget cycle.
alert_rule_countbigintTotal number of alert rules in the budget.
amountdouble precisionThe amount of the budget expressed in the currency of the customer's rate card.
budget_processing_period_start_offsetbigintThe number of days offset from the first day of the month, at which the budget processing period starts.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
defined_tagsjsonbDefined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources.
descriptiontextThe description of the budget.
display_nametext=The display name of the budget.
forecasted_spenddouble precisionThe forecasted spend in currency by the end of the current budget cycle.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the budget.
lifecycle_statetext=The current state of the budget.
reset_periodtextThe reset period for the budget.
tagsjsonbA map of tags for the resource.
target_compartment_idtextThis is DEPRECATED. For backwards compatability, the property will be populated when targetType is COMPARTMENT AND targets contains EXACT ONE target compartment ocid. For all other scenarios, this property will be left empty.
target_typetextThe type of target on which the budget is applied.
targetsjsonbThe list of targets on which the budget is applied.
tenant_idtextThe OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
time_createdtimestamp with time zoneTime that budget was created.
time_spend_computedtimestamp with time zoneThe time that the budget spend was last computed.
time_updatedtimestamp with time zoneTime that budget was updated.
titletextTitle of the resource.
versionbigintVersion of the budget. Starts from 1 and increments by 1.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci

You can pass the configuration to the command with the --config argument:

steampipe_export_oci --config '<your_config>' oci_budget_budget