<budget_name>!SET_EMAIL_NOTIFICATIONS¶
Set the email address(es) to receive budget notifications. Requires a notification integration that includes the email address(es).
- See also:
<budget_name>!GET_NOTIFICATION_EMAIL, <budget_name>!GET_NOTIFICATION_INTEGRATION_NAME, <budget_name>!GET_NOTIFICATION_MUTE_FLAG, <budget_name>!SET_NOTIFICATION_MUTE_FLAG
Syntax¶
<budget_name>!SET_EMAIL_NOTIFICATIONS('<notification_integration>',
'<email> [ , <email> [ , ... ] ]' )
Arguments¶
notification_integration
Specifies the identifier for the email notification integration. The notification integration must include the
email
for budget notifications.email
Specifies the email address to receive notification emails. The email address(es) must be included in the
allowed_recipients
list of thenotification_integration
.
Returns¶
The email integration is updated.
Access control requirements¶
The following minimum privileges and roles are required to call this method for custom budgets:
ADMIN instance role for the budget instance.
USAGE privilege on the database and schema that contains the budget instance.
The following minimum privileges and roles are required to call this method for the account budget:
BUDGET_ADMIN application role 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¶
Send email notifications for budget my_budget
in the current schema to
costadmin@domain.com and budgetadmin@domain.com:
CALL budget_db.budget_schema.my_budget!SET_EMAIL_NOTIFICATIONS(
'budgets_notification', 'costadmin@domain.com, budgetadmin@domain.com');
Send email notifications for the account budget to budgetadmin@domain.com:
CALL snowflake.local.account_root_budget!SET_EMAIL_NOTIFICATIONS(
'budgets_notification', 'budgetadmin@domain.com');
Error messages¶
For a list of common error messages and their causes and solutions, see You can’t set email notifications for a budget.