Notification Integration
You can provide configuration to Snowflake Object Lifecycle Engine for the following operations with notification integration:
- Manage the lifecycle of new and existing notification integrations
- Manage grants of notification integration
Usage
- Classic Configuration
- Data Products Configuration
notification_integrations:
  <notification_integrations-name>:
    <configuration-key>: <value>
    grants:
      <privilege>:
        - <role-name>
        - <role-name>
- notification_integration:
    name: <notification_integrations-name>
    <configuration-key>: <value>
    grants:
      <privilege>:
        - rel(role.<role-name>)
        - rel(role.<role-name>)
Supported parameters
The engine supports the parameters listed below.
| Configuration Key | Required/Optional | Data Types and Values | Description | 
|---|---|---|---|
| aws_sns_role_arn | Required - if notification_providerset toAWS_SNS | String | AWS IAM role ARN for notification integration to assume | 
| aws_sns_topic_arn | Required - if notification_providerset toAWS_SNS | String | AWS SNS Topic ARN for notification integration to connect to | 
| aws_sqs_arn | Required - if notification_providerset toAWS_SQS | String | AWS SQS queue ARN for notification integration to connect to | 
| aws_sqs_role_arn | Required - if notification_providerset toAWS_SQS | String | AWS IAM role ARN for notification integration to assume | 
| azure_storage_queue_primary_uri | Required - if notification_providerset toAZURE_STORAGE_QUEUE | String | The queue ID for the Azure Queue Storage queue created for Event Grid notifications. Caution: Changing the value of this parameter will lead to failure due to recent updates in Snowflake releases. | 
| azure_tenant_id | Required - if notification_providerset toAZURE_STORAGE_QUEUE | String | The ID of the Azure Active Directory tenant used for identity management | 
| direction | Required - if notification_providerset toAWS_SQSorAWS_SNS | String: INBOUND,OUTBOUND | Direction of the cloud messaging with respect to Snowflake | 
| gcp_pubsub_subscription_name | Required - if notification_providerset toAZURE_STORAGE_QUEUE | String | Pub/Sub topic subscription ID used to allow Snowflake access to event messages. Caution: Changing the value of this parameter will lead to failure due to recent updates in Snowflake releases. | 
| notification_provider | Required | String: AZURE_STORAGE_QUEUE,AWS_SQS,AWS_SNS,GCP_PUBSUB | The third-party cloud message queuing service. Caution: Currently AWS_SQSisn't supported in Snowflake. | 
| comment | Optional | String | A comment for the integration | 
| deleted | Optional | Boolean: Trueenables deletion prevention,Falsedoes nothing | Specifies what objects are allowed to be deleted | 
| depends_on | Optional | List of String: See Object Dependencies for a definition of depends_on | List of SOLE-managed objects that this notification integration depends on. Objects defined in the list will be added to the generated HCL dependencies list to ensure proper creation order. | 
| enabled | Optional | Boolean | Specifies whether to initiate the operation of the integration or suspend it. TRUEenables the integration.FALSEdisables the integration for maintenance. Any integration between Snowflake and a third-party service fails to work. | 
| environment | Optional | String | Specifies the environment in which the notification integration is managed. Regex can be provided as well. | 
| grants | Optional | Map: See Supported Notification Integration Grants to Roles | List of Privileges and Roles to which privileges are granted on the current notification integration | 
| manage_mode | Optional | String: all(default),none,grants | Configures what properties to manage for the notification integration. See Changing Manage Mode before changing the value. | 
| namespacing | Optional | String: both(default),none,prefix,suffix | Specifies whether prefix or suffix or both are to be added to notification integration name | 
| type | Optional | String: QUEUE(default) | A type of integration | 
Supported notification integration grants to roles
Following are the privileges you can grant to roles in the notification integration definition:
- USAGE
- OWNERSHIP
Examples
- Notification Integration example with notification_providerasAZURE_STORAGE_QUEUE
- Classic Configuration
- Data Products Configuration
notification_integrations:
  NOTIFICATION_INTEGRATION_AZURE:
    comment: "test notification"
    enabled: true
    type: "QUEUE"
    notification_provider: "AZURE_STORAGE_QUEUE"
    azure_storage_queue_primary_uri: "https://myqueue.queue.core.windows.net/mystoragequeue"
    azure_tenant_id: "a123bcde-1234-5678-abc1-9abc12345678"
- notification_integration:
    name: NOTIFICATION_INTEGRATION_AZURE
    comment: "test notification"
    enabled: true
    type: "QUEUE"
    notification_provider: "AZURE_STORAGE_QUEUE"
    azure_storage_queue_primary_uri: "https://myqueue.queue.core.windows.net/mystoragequeue"
    azure_tenant_id: "a123bcde-1234-5678-abc1-9abc12345678"
- Notification Integration example with notification_providerasAWS_SNS
- Classic Configuration
- Data Products Configuration
notification_integrations:
  NOTIFICATION_INTEGRATION_AWS_SNS:
    comment: "test notification"
    enabled: true
    type: "QUEUE"
    direction: "OUTBOUND"
    notification_provider: "AWS_SNS"
    aws_sns_topic_arn: "arn:aws:sns:us-west-2:432981146916:user-updates-topic"
    aws_sns_role_arn: "arn:aws:iam::209163973960:role/S3Full_Access"
    grants:
      USAGE:
        - SYSADMIN
- notification_integration:
    name: NOTIFICATION_INTEGRATION_AWS_SNS
    comment: "test notification"
    enabled: true
    type: "QUEUE"
    direction: "OUTBOUND"
    notification_provider: "AWS_SNS"
    aws_sns_topic_arn: "arn:aws:sns:us-west-2:432981146916:user-updates-topic"
    aws_sns_role_arn: "arn:aws:iam::209163973960:role/S3Full_Access"
    grants:
      USAGE:
        - SYSADMIN
- Notification Integration example with notification_providerasGCP_PUBSUB
- Classic Configuration
- Data Products Configuration
notification_integrations:
  NOTIFICATION_INTEGRATION_GCP_PUBSUB:
    comment: "test notification"
    notification_provider: "GCP_PUBSUB"
    gcp_pubsub_subscription_name: "projects/project-1234/subscriptions/sub2"
    grants:
      USAGE:
        - SYSADMIN
- notification_integration:
    name: NOTIFICATION_INTEGRATION_GCP_PUBSUB
    comment: "test notification"
    notification_provider: "GCP_PUBSUB"
    gcp_pubsub_subscription_name: "projects/project-1234/subscriptions/sub2"
    grants:
      USAGE:
        - SYSADMIN