更新管道通知 - Amazon Elastic Transcoder

通过以下方式节省成本并获得更多功能 AWS Elemental MediaConvert

MediaConvert 是一项较新的基于文件的视频转码服务,它提供了一套全面的高级转码功能,按需费率起价为每分钟 0.0075 美元。阅读更多

已经在使用 Amazon Elastic Transcoder? 迁移到很简单 MediaConvert。有关更多信息,请参阅本概述,其中包含有关迁移过程的重要信息以及指向其他资源的链接。

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

更新管道通知

描述

要仅更新管道的 Amazon Simple Notification Service (Amazon SNS) 通知,请将 POST 请求发送到 /2012-09-25/pipelines/pipelineId/notifications 资源。

重要

在更改通知时,您的更改会立即生效。除了您在更改通知以后提交的任务外,还会影响您已提交但 Elastic Transcoder 尚未开始处理的任务。

请求

语法

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" } }

请求参数

此操作接受以下请求参数。

pipelineId

要为其更改通知设置的管道的标识符。

请求标头

此操作仅使用所有操作通用的请求标头。有关通用请求标头的信息,请参阅 HTTP 标头内容

请求正文

请求正文中的 JSON 字符串包含以下对象。

Id

要更新的管道的 ID。

Notifications:Progressing

当 Elastic Transcoder 开始处理此管道中的任务时,您要通知的 Amazon Simple Notification Service (Amazon SNS) 主题的 ARN。这是创建主题时 Amazon SNS 返回的 ARN。有关更多信息,请参阅《Amazon Simple Notification Service 开发人员指南》中的创建主题

重要

要接收通知,您还必须在 Amazon SNS 控制台中订阅该新主题。

Amazon SNS 提供多种通知选项,包括能够将 Amazon SNS 消息发送到 Amazon Simple Queue Service 队列。有关更多信息,请参阅《Amazon Simple Notification Service 开发人员指南》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。

响应

语法

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" } } }

响应标头

此操作仅使用大多数响应通用的响应标头。有关通用响应标头的信息,请参阅 HTTP 响应

响应正文

更新管道的通知时,Elastic Transcoder 将返回在请求中指定的值。有关更多信息,请参见 请求正文

错误

有关 Elastic Transcoder 异常和错误消息的信息,请参阅 处理 Elastic Transcoder 中的错误

示例

以下示例请求为管道更新通知。

示例请求

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" } }

示例响应

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" } }