

 Amazon Redshift 將不再支援從修補程式 198 開始建立新的 Python UDFs。現有 Python UDF 將繼續正常運作至 2026 年 6 月 30 日。如需詳細資訊，請參閱[部落格文章](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 監控已排程的查詢
<a name="query-editor-v2-schedule-query-sns"></a>

對於您指定要傳送電子郵件通知的 Amazon SNS 主題，請透過導覽至 **SNS 通知**區段、**開啟**監控，然後使用**建立 SNS 主題**建立主題，以使用查詢編輯器 v2 建立 Amazon SNS 主題。查詢編輯器 v2 會建立 Amazon SNS 主題，並將服務主體新增至 Amazon EventBridge 的存取政策。以下是在 Amazon SNS 主題中建立的**存取政策**範例。在此範例中，使用 the AWS 區域 {{us-west-2}}、 AWS 帳戶 {{123456789012}} 和 Amazon SNS 主題 {{select-version-pdx-testunload}}。

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Id": "__default_policy_ID",
  "Statement": [
    {
      "Sid": "Allow_Publish_Events",
      "Effect": "Allow",
      "Principal": {
        "Service": "events.amazonaws.com"
      },
      "Action": "sns:Publish",
      "Resource": "arn:aws:sns:{{us-west-2}}:{{123456789012}}:{{select-version-pdx-testunload}}"
    }
  ]
}
```

------

排程查詢執行時，Amazon SNS 會傳送 AWS 通知電子郵件。下列範例顯示針對在 AWS 帳戶 {{123456789012}} 中的 AWS 區域 {{eu-north-1}} 上執行的已排程查詢 {{QS2-may25a}}，使用 Amazon SNS 通知主題 {{may25a-SNS}} 傳送至 {{myemail@example.com}} 的電子郵件。

```
{"version":"0","id":"8e4323ec-5258-7138-181b-91290e30ff9b","detail-type":"Scheduled Event","source":"aws.events","account":"{{123456789012}}","time":"2023-05-25T15:22:00Z",
                    "region":"{{eu-north-1}}","resources":["arn:aws:events:{{eu-north-1}}:{{123456789012}}:rule/{{QS2-may25a}}"],"detail":{}}

--
If you wish to stop receiving notifications from this topic, please click or visit the link below to unsubscribe:
https://sns.{{eu-north-1}}.amazonaws.com/unsubscribe.html?SubscriptionArn=arn:aws:sns:{{eu-north-1}}:{{123456789012}}:{{may25a-SNS}}:0c1a3d05-39c2-4507-bc3d-47250513d7b0&Endpoint={{myemail@example.com}}

Please do not reply directly to this email. If you have any questions or comments regarding this email, please contact us at https://aws.amazon.com/support
```