<budget_name>!SET_EMAIL_NOTIFICATIONS

Set the email addresses to receive budgets notifications.

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> [ , ... ] ]' )
Copy

Required arguments

'email [ , email [ , ... ] ]'

Specifies the email addresses to receive budget notification emails. Each email address in the list must be verified.

Optional arguments

'notification_integration'

Specifies the identifier for the email notification integration.

If the ALLOWED_RECIPIENTS parameter is set for the notification integration, each email in the notifications list must be included in the ALLOWED_RECIPIENTS list for the notification integration. Otherwise, you can include any verified email address in the notifications list.

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 minimum role required to call this method for the account budget is the BUDGET_ADMIN application role.

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.

  • If you are using a notification integration, the USAGE privilege on the notification integration must be granted to APPLICATION SNOWFLAKE:

    GRANT USAGE ON INTEGRATION budgets_notification_integration
      TO APPLICATION SNOWFLAKE;
    
    Copy

Examples

Send email notifications for budget my_budget in the budgets_db.budgets_schema schema to costadmin@domain.com and budgetadmin@domain.com:

CALL budgets_db.budgets_schema.my_budget!SET_EMAIL_NOTIFICATIONS(
   'costadmin@domain.com, budgetadmin@domain.com');
Copy

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');
Copy

Error messages

For a list of common error messages and their causes and solutions, see You can’t set email notifications for a budget.

Language: English