ALTER CONTACT¶

Modifies the properties of an existing contact.

See also:

CREATE CONTACT , DROP CONTACT , SHOW CONTACTS

Syntax¶

ALTER CONTACT [ IF EXISTS ] <name> RENAME TO <new_name>

ALTER CONTACT [ IF EXISTS ] <name> SET
  [ {
    USERS = ( <user_name> [ , <user_name> ... ] )
    | EMAIL_DISTRIBUTION_LIST = '<email>'
    | URL = '<url>'
    } ]
  [ COMMENT = '<string_literal>' ]
Copy

Parameters¶

name

Specifies the identifier for the contact to alter.

If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

For more information, see Identifier requirements.

RENAME TO new_name

Changes the name of the contact to new_name. The new identifier must be unique for the schema.

For more information about identifiers, see Identifier requirements.

You can move the object to a different database and/or schema while optionally renaming the object. To do so, specify a qualified new_name value that includes the new database and/or schema name in the form db_name.schema_name.object_name or schema_name.object_name, respectively.

Note

  • The destination database and/or schema must already exist. In addition, an object with the same name cannot already exist in the new location; otherwise, the statement returns an error.

  • Moving an object to a managed access schema is prohibited unless the object owner (that is, the role that has the OWNERSHIP privilege on the object) also owns the target schema.

When a contact is renamed, other objects that reference it must be updated with the new name.

SET ...

Sets one of the following parameters for the contact:

USERS = ( user_name [ , user_name ... ] )

Comma-delimited list of Snowflake users who can be contacted, specified by the name of their user objects.

EMAIL_DISTRIBUTION_LIST = 'email'

A valid email address, which can be a distribution list if you want users to be able to contact more than one individual.

URL = 'url'

A URL that can be used to contact people about an object.

COMMENT = '<string_literal>'

A user-defined string. Specifies a comment for the contact.

Access control requirements¶

A role used to execute this SQL command must have at least one of the following privileges at a minimum:

Privilege

Object

Notes

MODIFY

Contact

OWNERSHIP

Contact

OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege).

The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes¶

  • Regarding metadata:

    Attention

    Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.

Examples¶

ALTER CONTACT my_contact SET EMAIL_DISTRIBUTION_LIST = 'support@example.com';
Copy