<budget_name>!GET_CUSTOM_ACTIONS

ListS all custom actions associated with a budget.

See also:

<budget_name>!ADD_CUSTOM_ACTION, <budget_name>!REMOVE_CUSTOM_ACTIONS

Syntax

<budget_name>!GET_CUSTOM_ACTIONS()

Returns

The method returns the following columns:

Column nameData typeDescription
ACTION_IDVARCHARUnique identifier for the combination of the stored procedure fully qualified name, array of arguments, threshold, and trigger type.
PROCEDURE_FQNVARCHARFully qualified name of the stored procedure.
PROCEDURE_ARGSARRAYArray of arguments passed to the stored procedure.
SPEND_STRATEGYVARCHARWhether the custom action is triggered based on projected consumption or actual consumption. Valid values: PROJECTED or ACTUAL.
THRESHOLDNUMBERPercentage of the budget limit that triggers the stored procedure.
LAST_TRIGGER_ATTEMPT_TIMETIMESTAMP_TZLast time the budget attempted to trigger the action, in UTC.
ADDED_TIMESTAMPTIMESTAMP_TZTime when the action was added to the budget, in local time zone.

Access control requirements

  • The following minimum privileges and roles are required to view results for custom budgets:

    • Any instance role for the budget instance.
    • USAGE privilege on the database and schema that contains the budget instance.
  • The following role is required to view results for the account budget:

For more information, see Budgets roles and privileges.

Usage notes

Calling this method does not return the object. Because of this, you can’t use method chaining to call another method on the return value of this method. Instead, call each method in a separate SQL statement.

Examples

List all custom actions for budget my_budget in schema budget_db.sch1:

CALL budget_db.sch1.my_budget!GET_CUSTOM_ACTIONS();

List all custom actions for the account budget:

CALL snowflake.local.account_root_budget!GET_CUSTOM_ACTIONS();