<budget_name>!REMOVE_CUSTOM_ACTIONS

Remove one or more custom actions from a budget.

See also:

<budget_name>!ADD_CUSTOM_ACTION, <budget_name>!GET_CUSTOM_ACTIONS

Syntax

<budget_name>!REMOVE_CUSTOM_ACTIONS()

<budget_name>!REMOVE_CUSTOM_ACTIONS( <threshold> )

<budget_name>!REMOVE_CUSTOM_ACTIONS( <threshold>, '<stored_procedure>' )
Copy

Arguments

threshold

Threshold percentage at which custom actions are triggered. If you don’t specify a procedure name, all custom actions set for this threshold are removed.

'stored_procedure'

Fully qualified name of the stored procedure associated with the custom action. Snowflake removes all custom actions that match the specified stored procedure and threshold.

Note

When passing the fully qualified name of the procedure, use the PROCEDURE_FQN value from the output of the GET_CUSTOM_ACTIONS method.

Returns

Returns a VARCHAR value indicating the number of custom actions that were successfully removed.

Access control requirements

The following privileges and roles are required to call this method for a budget:

  • ADMIN instance role for the budget instance.

  • USAGE privilege on the database and schema that contain the budget instance.

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

Remove all custom actions from budget my_budget in schema budget_db.sch1:

CALL budget_db.sch1.my_budget!REMOVE_CUSTOM_ACTIONS();
Copy

Remove all custom actions that are triggered when consumption reaches 75% of the budget limit:

CALL budget_db.sch1.my_budget!REMOVE_CUSTOM_ACTIONS(75);
Copy

Remove the custom action that calls the code_db.sch1.my_sp stored procedure when consumption reaches 75% of the budget limit:

CALL budget_db.sch1.my_budget!REMOVE_CUSTOM_ACTIONS(75, 'code_db.sch1.my_sp');
Copy
Language: English