更新管道狀態 - Amazon Elastic Transcoder

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

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

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

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

更新管道狀態

Description (描述)

欲暫停或重新啟動管道,讓管道停止或重新開始處理任務,請更新管道的狀態。請將 POST 請求傳送到 /2012-09-25/pipelines/pipelineId/status 資源。

若您希望取消一個或多個任務,變更管道狀態十分實用。Elastic Transcoder 開始處理任務後就無法取消;若您將任務提交的管道暫停,即有更多時間取得欲取消任務的任務 ID,並傳送Delete Job請求。

請求

Syntax (語法)

POST /2012-09-25/pipelines/pipelineId/status 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 { "Status":"new status for the pipeline" }

請求參數

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

管道編號

欲暫停或重新啟動之管道的識別碼。

請求標頭

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

請求主體

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

狀態

管道的新狀態:

  • Active:啟用管道,將開始處理任務。

  • Paused:停用管道,將停止處理任務。

回應

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 { "Id":"ID for the pipeline", "Status":"new status for the pipeline" }

回應標頭

此操作僅使用大部分回應常見的回應標頭。如需常見回應標頭的資訊,請參閱 HTTP 回應

回應內文

更新管道的狀態時,會回傳您在請求內指定的值。如需詳細資訊,請參閱 請求主體

錯誤

如需 Elastic Transcoder 例外和錯誤訊息的詳細資訊,請參處理 Elastic Transcoder 中的錯誤

範例

下列範例請求會啟用 ID 為 1111111111111-abcde1 的管道。

請求範例

POST /2012-09-25/pipelines/1111111111111-abcde1/status 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 { "Status":"Active" }

回應範例

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", "Status":"Active" }