更新管道通知 - Amazon Elastic Transcoder

節省成本並獲得更多功能 AWS Elemental MediaConvert

MediaConvert 是一項較新的檔案型視訊轉碼服務,提供全方位的進階轉碼功能,按需費率從每分鐘 $0.0075 起。閱讀更多

已經使用 Amazon Elastic Transcoder? 遷移到 MediaConvert. 如需詳細資訊,請參閱此概觀,其中包含有關移轉程序的重要資訊以及其他資源的連結。

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

更新管道通知

Description (描述)

若只須更新 Amazon Simple Notification Service (Amazon SNS) 管道通知,請將 POST 請求傳送到/2012-09-25/pipelines/pipelineId/notifications資源。

重要

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

請求

Syntax (語法)

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

請求參數

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

管道編號

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

請求標頭

此操作僅使用所有操作常見的請求標頭。如需常見請求標頭的資訊,請參閱 HTTP 標頭內容

請求主體

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

Id

您欲更新之管道的 ID。

通知:正在進行

Amazon Simple Notification Service (Amazon SNS) 主題 ARN,您希望在 Elastic Transcoder 開始處理此管道內的任務時通知。這是 Amazon SNS 在您建立主題時會回傳的 ARN。如需詳細資訊,請參閱 Amazon Simple Notification Service 開發人員指南中的建立主題

重要

若要接收通知,您還須訂閲 Amazon SNS 控制台中的新主題。

Amazon SNS 提供各種通知選項,包括能夠將 Amazon SNS 訊息傳送至 Amazon Simple Notification Service 隊列。如需詳細資訊,請參閱《Amazon Simple Notification Service 開發人員指南》。

通知:完成

您希望在 Elastic Transcoder 完成處理此管道中的任務時通知的 Amazon SNS 主題的主題 ARN。這是 Amazon SNS 在您建立主題時會回傳的 ARN。

通知:警告

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

通知:錯誤

當 Elastic Transcoder 在處理此管道中的作業時遇到錯誤條件時要通知的 Amazon SNS 主題的主題 ARN。這是 Amazon SNS 在您建立主題時會回傳的 ARN。

回應

Syntax (語法)

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