<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

语法

<budget_name>!GET_CUSTOM_ACTIONS()

返回

该方法会返回以下列:

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.

访问控制要求

  • 查看 自定义预算 的结果需要以下最低权限和角色:

    • Any instance role for the budget instance.
    • 对包含预算实例的数据库和架构的 USAGE 权限。
  • 需要以下角色才能查看 账户预算 的结果:

For more information, see Budgets roles and privileges.

使用说明

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.

示例

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

CALL budget_db.sch1.my_budget!GET_CUSTOM_ACTIONS();

列出账户预算的所有自定义操作:

CALL snowflake.local.account_root_budget!GET_CUSTOM_ACTIONS();