

终止支持通知：2025 年 11 月 13 日， AWS 我们将停止对亚马逊 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。

** Notifications:Progressing**  
当 Elastic Transcoder 开始处理此管道中的任务时，您要通知的 Amazon Simple Notiﬁcation Service (Amazon SNS) 主题的 ARN。这是创建主题时 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/](https://docs.aws.amazon.com/sns/latest/dg/)。

** Notifications:Completed**  
当 Elastic Transcoder 完成处理此管道中的任务时，您希望通知的 Amazon SNS 主题的 ARN。这是创建主题时 Amazon SNS 返回的 ARN。

** Notifications:Warning**  
当 Elastic Transcoder 在此管道中处理任务时遇到警告情况时，您要通知的 Amazon SNS 主题的 ARN。这是创建主题时 Amazon SNS 返回的 ARN。

** Notifications:Error**  
当 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"
   }
}
```