

支援終止通知：2025 年 11 月 13 日， AWS 將停止對 Amazon Elastic Transcoder 的支援。2025 年 11 月 13 日之後，您將無法再存取 Elastic Transcoder 主控台或 Elastic Transcoder 資源。

如需轉換至 的詳細資訊 AWS Elemental MediaConvert，請造訪此[部落格文章](https://aws.amazon.com/blogs/media/how-to-migrate-workflows-from-amazon-elastic-transcoder-to-aws-elemental-mediaconvert/)。

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

# 更新管道通知
<a name="update-pipeline-notifications"></a>

**Topics**
+ [描述](#update-pipeline-notifications-description)
+ [請求](#update-pipeline-notifications-requests)
+ [回應](#update-pipeline-notifications-responses)
+ [錯誤](#update-pipeline-notifications-response-errors)
+ [範例](#update-pipeline-notifications-examples)

## 描述
<a name="update-pipeline-notifications-description"></a>

若要僅更新管道的 Amazon Simple Notification Service (Amazon SNS) 通知，請將 POST 請求傳送至 `/2012-09-25/pipelines/pipelineId/notifications` 資源。

**重要**  
變更通知時，變更會立即生效。除了您在變更通知後提交的任務之外，您已提交且 Elastic Transcoder 尚未開始處理的任務也會受到影響。

## 請求
<a name="update-pipeline-notifications-requests"></a>

### 語法
<a name="update-pipeline-notifications-request-syntax"></a>

```
POST /2012-09-25/pipelines/pipelineId/notifications HTTP/1.1
Content-Type: application/json; charset=UTF-8
Accept: */*
Host: elastictranscoder.Elastic Transcoder endpoint.amazonaws.com:443
x-amz-date: 20130114T174952Z
Authorization: AWS4-HMAC-SHA256 
               Credential=AccessKeyID/request-date/Elastic Transcoder endpoint/elastictranscoder/aws4_request,
               SignedHeaders=host;x-amz-date;x-amz-target,
               Signature=calculated-signature
Content-Length: number of characters in the JSON string
{
   "Id":"pipelineId",
   "Notifications":{
      "Progressing":"SNS topic to notify when
         Elastic Transcoder has started to process the job",
      "Complete":"SNS topic to notify when
         Elastic Transcoder has finished processing the job",
      "Warning":"SNS topic to notify when
      	Elastic Transcoder returns a warning",
      "Error":"SNS topic to notify when
         Elastic Transcoder returns an error"
   }
}
```

### 請求參數
<a name="update-pipeline-notifications-request-parameters"></a>

此操作接受下列請求參數。

**pipelineId**  
您欲變更通知設定之管道的識別碼。

### 請求標頭
<a name="update-pipeline-notifications-request-headers"></a>

此操作僅使用所有操作常見的請求標頭。如需常見請求標頭的資訊，請參閱 [HTTP 標頭內容](making-http-requests.md#http-request-header)。

### 請求主體
<a name="update-pipeline-notifications-request-body"></a>

請求內文中的 JSON 字串包含以下物件。

**Id**  
您欲更新之管道的 ID。

**通知：進行中**  
Amazon Simple Notification Service (Amazon SNS) 主題的主題 ARN，當 Elastic Transcoder 開始處理此管道中的任務時，您要通知此主題。這是您建立主題時 Amazon SNS 傳回的 ARN。如需詳細資訊，請參閱 *Amazon Simple Notification Service 開發人員指南*中的[建立主題](https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html)。  
若要接收通知，您還必須在 Amazon SNS 主控台中訂閱新主題。
Amazon SNS 提供各種通知選項，包括將 Amazon SNS 訊息傳送至 Amazon Simple Queue Service 佇列的功能。如需詳細資訊，請參閱《[Amazon Simple Notification Service 開發人員指南](https://docs.aws.amazon.com/sns/latest/dg/)》。

**通知：完成**  
當 Elastic Transcoder 完成處理此管道中的任務時，您要通知的 Amazon SNS 主題的主題 ARN。這是您建立主題時 Amazon SNS 傳回的 ARN。

**通知：警告**  
當 Elastic Transcoder 在此管道中處理任務時遇到警告條件時，您要通知的 Amazon SNS 主題的主題 ARN。這是您建立主題時 Amazon SNS 傳回的 ARN。

**通知：錯誤**  
當 Elastic Transcoder 在此管道中處理任務時遇到錯誤條件時，您要通知之 Amazon SNS 主題的主題 ARN。這是您建立主題時 Amazon SNS 傳回的 ARN。

## 回應
<a name="update-pipeline-notifications-responses"></a>

### 語法
<a name="update-pipeline-notifications-response-syntax"></a>

```
Status: 202 Accepted
x-amzn-RequestId: c321ec43-378e-11e2-8e4c-4d5b971203e9
Content-Type: application/json
Content-Length: number of characters in the response
Date: Mon, 14 Jan 2013 06:01:47 GMT
{
   "Pipeline":{
      "Id":"ID for the new pipeline",
      "Notifications":{
         "Progressing":"SNS topic to notify when Elastic Transcoder has started to process the job",
         "Complete":"SNS topic to notify when Elastic Transcoder has finished processing the job",
         "Warning":"SNS topic to notify when Elastic Transcoder returns a warning",
         "Error":"SNS topic to notify when Elastic Transcoder returns an error"
      }
   }
}
```

### 回應標頭
<a name="update-pipeline-notifications-response-headers"></a>

此操作僅使用大部分回應常見的回應標頭。如需常見回應標頭的資訊，請參閱 [HTTP 回應](making-http-requests.md#http-response-header)。

### 回應內文
<a name="update-pipeline-notifications-response-body"></a>

當您更新管道的通知時，Elastic Transcoder 會傳回您在請求中指定的值。如需詳細資訊，請參閱[請求主體](#update-pipeline-notifications-request-body)。

## 錯誤
<a name="update-pipeline-notifications-response-errors"></a>

如需 Elastic Transcoder 例外狀況和錯誤訊息的相關資訊，請參閱[處理 Elastic Transcoder 中的錯誤](error-handling.md)。

## 範例
<a name="update-pipeline-notifications-examples"></a>

下列範例請求會更新管道的通知。

### 請求範例
<a name="update-pipeline-notifications-examples-sample-request"></a>

```
POST /2012-09-25/pipelines/1111111111111-abcde1/notifications HTTP/1.1
Content-Type: application/json; charset=UTF-8
Accept: */*
Host: elastictranscoder.Elastic Transcoder endpoint.amazonaws.com:443
x-amz-date: 20130114T174952Z
Authorization: AWS4-HMAC-SHA256 
               Credential=AccessKeyID/request-date/Elastic Transcoder endpoint/elastictranscoder/aws4_request,
               SignedHeaders=host;x-amz-date;x-amz-target,
               Signature=calculated-signature
Content-Length: number of characters in the JSON string
{
   "Id":"1111111111111-abcde1",
   "Notifications":{
      "Progressing":"",
      "Complete":"",
      "Warning":"",
      "Error":"arn:aws:sns:us-east-1:111222333444:ETS_Errors"
   }
}
```

### 回應範例
<a name="update-pipeline-notifications-examples-sample-response"></a>

```
Status: 202 Accepted
x-amzn-RequestId: c321ec43-378e-11e2-8e4c-4d5b971203e9
Content-Type: application/json
Content-Length: number of characters in the response
Date: Mon, 14 Jan 2013 06:01:47 GMT

{
   "Id":"1111111111111-abcde1",
   "Notifications":{
      "Progressing":"",
      "Complete":"",
      "Warning":"",
      "Error":"arn:aws:sns:us-east-1:111222333444:ETS_Errors"
   }
}
```