snowflake.core.notification_integration.NotificationIntegrationResource¶

class snowflake.core.notification_integration.NotificationIntegrationResource(name: str, collection: NotificationIntegrationCollection)¶

Bases: ObjectReferenceMixin[NotificationIntegrationCollection]

Represents a reference to a Snowflake Notification Integration resource.

With this notification integration reference you can delete, and fetch information about them.

Attributes

root¶

Methods

drop(if_exists: bool | None = None) → None¶

Drop this notification integration.

Parameters:

if_exists (bool, optional) – Check the existence of this notification integration before dropping it. Default is None, which is equivalent to False.

Examples

Deleting a notification integration using its reference:

>>> ni_reference.drop()
Copy

Deleting a notification integration using its reference if it exists:

>>> ni_reference.drop(if_exists=True)
Copy
fetch() → NotificationIntegration¶

Fetch the details of a notification integration.

Examples

Fetching a notification integration reference to print its name, whether it’s enabled and some information about its hook:

>>> my_ni = ni_reference.fetch()
>>> print(my_ni.name, my_ni.enabled, repr(my_ni.notification_hook))
Copy