使用 節省成本並取得更多功能 AWS Elemental MediaConvert
MediaConvert 是較新的檔案型影片轉碼服務,可提供完整的進階轉碼功能套件,隨需費率為每分鐘 0.0075 美元起。閱讀更多
已使用 Amazon Elastic Transcoder ? 遷移至 很簡單 MediaConvert。如需詳細資訊,請參閱此概觀
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
更新管道
Description (描述)
欲更新管道設定,請將 PUT 請求傳送到 /2012-09-25/pipelines/
pipelineId
資源。
重要
變更管道設定時,變更會立即生效。除了您在變更設定後提交的任務外,您已提交但 Elastic Transcoder 尚未開始處理的任務也會受到影響。
如何更新與刪除值
欲更新值,請指定新的值,例如:
"GranteeType":"Canonical"
若不想變更值,請執行下列操作之一:
指定目前的值。
指定 null 值。此適用於個別物件 (如
"Role":null
) 和陣列 (如"ContentConfig":null
)。省略請求的 JSON 物件。此適用於個別物件 (如
Role
) 和陣列 (如ContentConfig
)。
欲刪除目前的值,請指定空白值。例如,欲刪除通知,請指定空白字串:"Progressing":""
。 欲刪除陣列中的所有值,請指定空陣列:"Permissions":[]
。
例如,若您希望不要再接收處理任務時出現警告的通知,而且您不想變更通知的其他設定,請為Notifications
問號字元 (?):
... "Notifications":{ "Warning":"" }, ...
請求
Syntax (語法)
PUT /2012-09-25/pipelines/
pipelineId
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
", "Name":"pipeline name
", "InputBucket":"Amazon S3 bucket that contains files to transcode and graphics to use as watermarks
", "OutputBucket":"Use this, or use ContentConfig:Bucket plus ThumbnailConfig:Bucket
", "Role":"IAM role ARN
", "AwsKmsKeyArn":"AWS-KMS key arn of the AWS-KMS key you want to use with this 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 encounters a warning condition
" "Error":"SNS topic to notify when Elastic Transcoder encounters an error condition
" }, "ContentConfig":{ "Bucket":"Use this plus ThumbnailConfig:Bucket, or use OutputBucket
", "Permissions":[ { "GranteeType":"Canonical|Email|Group", "Grantee":"AWS user ID or CloudFront origin access identity
"| "registered email address for AWS account
"| AllUsers|AuthenticatedUsers|LogDelivery", "Access":[ "Read|ReadAcp|WriteAcp|FullControl", ... ] }, {...} ], "StorageClass":"Standard|ReducedRedundancy" }, "ThumbnailConfig":{ "Bucket":"Use this plus ContentConfig:Bucket, or use OutputBucket
", "Permissions":[ { "GranteeType":"Canonical|Email|Group", "Grantee":"AWS user ID or CloudFront origin access identity
"| "registered email address for AWS account
"| AllUsers|AuthenticatedUsers|LogDelivery", "Access":[ "Read|ReadAcp|WriteAcp|FullControl", ... ] }, {...} ], "StorageClass":"Standard|ReducedRedundancy" }, "Status":"Active|Paused" }
請求參數
此操作不使用請求參數。
請求標頭
此操作僅使用所有操作常見的請求標頭。如需常見請求標頭的資訊,請參閱 HTTP 標頭內容。
請求主體
請求本文的 JSON 字串包含 UpdatePipeline
操作的輸入物件。如需輸入物件的詳細資訊,請參閱您在建立 Elastic Transcoder 管道時指定的設定。
- Id
-
管道的標識符。您可以使用此值來標識要在其中執行各種操作(例如創建作業或預設)的管道。
- 狀態
-
管道的目前的狀態:
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 new pipeline
", "Name":"pipeline name
", "InputBucket":"Amazon S3 bucket that contains files to transcode and graphics to use as watermarks
", "OutputBucket":"Use this, or use ContentConfig:Bucket plus ThumbnailConfig:Bucket
", "Role":"IAM role ARN
", "AwsKmsKeyArn":"AWS-KMS key id
", "Notifications":{ "Progressing":"SNS topic to notify when 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 when Elastic Transcoder encounters a warning condition
", "Error":"SNS topic to notify when Elastic Transcoder encounters an error condition
" }, "ContentConfig":{ "Bucket":"Use this plus ThumbnailConfig:Bucket, or use OutputBucket
", "Permissions":[ { "GranteeType":"Canonical|Email|Group", "Grantee":"AWS user ID or CloudFront origin access identity
"| "registered email address for AWS account
| AllUsers|AuthenticatedUsers|LogDelivery", "Access":[ "Read|ReadAcp|WriteAcp|FullControl", ... ] }, {...} ], "StorageClass":"Standard|ReducedRedundancy" }, "ThumbnailConfig":{ "Bucket":"Use this plus ContentConfig:Bucket, or use OutputBucket
", "Permissions":[ { "Access":[ "Read|ReadAcp|WriteAcp|FullControl", ... ], "Grantee":"AWS user ID or CloudFront origin access identity
"| "registered email address for AWS account
| AllUsers|AuthenticatedUsers|LogDelivery", "GranteeType":"Canonical|Email|Group" }, {...} ], "StorageClass":"Standard|ReducedRedundancy" }, "Status":"Active|Paused", "(自動) 警告": [ { "Code": "6000|6001|6002|6003|6004|6005|6006|6007|6008", "Message": "The code message
" }, {...} ] }
回應標頭
此操作僅使用大部分回應常見的回應標頭。如需常見回應標頭的資訊,請參閱 HTTP 回應。
回應內文
建立管道時,Elastic Transcoder 會回傳您在請求內指定的值。如需詳細資訊,請參閱 請求主體。
Elastic Transcoder 也包含下列警告 (如適用):
(自動) 警告
當您創建使用其他區域中的資源的管道時,Elastic Transcoder 會返回一個或多個警告。您的管道仍在創建,但可能會增加處理時間並產生跨區域費用。警告的格式如下:
- Code
-
Message― 警告代碼相關聯的訊息。
下列為有效警告代碼與其訊息的清單:
- 6000
-
輸入存儲桶和管道位於不同的區域,這會增加管道中作業的處理時間,並可能產生額外費用。要縮短處理時間並防止跨區域收費,請對輸入存儲桶和管道使用相同的區域。
- 6001
-
CONTENTConfig 存儲桶和管道位於不同的區域,這會增加管道中作業的處理時間,並可能產生額外費用。要縮短處理時間並防止跨區域收費,請對 CONTENTConfig 存儲桶和管道使用相同的區域。
- 6002
-
ThumNailConfig 存儲桶和管道位於不同的區域,這會增加管道中作業的處理時間,並可能產生額外費用。要縮短處理時間並防止跨區域收費,請對 ThunailConfig 存儲桶和管道使用相同的區域。
- 6003
-
正在進行的事件和管道的 SNS 通知主題位於不同區域,這會增加管道中作業的處理時間,並可能產生額外費用。要縮短處理時間並防止跨區域收費,請對 SNS 通知主題和管道使用相同的區域。
- 6004
-
警告事件和管道的 SNS 通知主題位於不同的區域,這會增加管道中作業的處理時間,並可能產生額外費用。要縮短處理時間並防止跨區域收費,請對 SNS 通知主題和管道使用相同的區域。
- 6005
-
完成事件和管道的 SNS 通知主題位於不同的區域,這會增加管道中作業的處理時間,並可能產生額外費用。要縮短處理時間並防止跨區域收費,請對 SNS 通知主題和管道使用相同的區域。
- 6006
-
錯誤事件和管道的 SNS 通知主題位於不同的區域,這會增加管道中作業的處理時間,並可能產生額外費用。要縮短處理時間並防止跨區域收費,請對 SNS 通知主題和管道使用相同的區域。
- 6007
-
為此管道指定的 AWS KMS 密鑰和 CONTENTConfig 存儲桶位於不同的區域,這會導致使用 s3-aws-km 加密模式的輸出失敗。要使用 s3-aws-km 加密模式,請對 KMS 密鑰和內容配置存儲桶使用相同的區域。
- 6008
-
為此管道指定的 AWS KMS 密鑰和縮略圖配置存儲桶位於不同的區域,這會導致使用 s3-aws-km 加密模式的輸出失敗。要使用 s3-aws-km 加密模式,請對 KMS 密鑰和縮略圖配置存儲桶使用相同的區域。
錯誤
欲瞭解 Elastic Transcoder 例外和錯誤訊息的詳細資訊,請參閲處理 Elastic Transcoder 中的錯誤。
範例
下列範例請求會更新 ID 為 1111111111111-abcde1
的管道。
請求範例
PUT /2012-09-25/pipelines/1111111111111-abcde1 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" "Name":"Default", "InputBucket":"salesoffice.example.com-source", "OutputBucket":"salesoffice.example.com-output", "Role":"arn:aws:iam::123456789012:role/Elastic_Transcoder_Default_Role", "AwsKmsKeyArn":"base64 encoded key from KMS
", "Notifications":{ "Progressing":"", "Complete":"", "Warning":"", "Error":"arn:aws:sns:us-east-1:111222333444:ET_Errors" }, "ContentConfig":{ "Bucket":"salesoffice.example.com-public-promos", "Permissions":[ { "GranteeType":"Email", "Grantee":"marketing-promos@example.com", "Access":[ "FullControl" ] } ], "StorageClass":"Standard" }, "ThumbnailConfig":{ "Bucket":"salesoffice.example.com-public-promos-thumbnails", "Permissions":[ { "GranteeType":"Email", "Grantee":"marketing-promos@example.com", "Access":[ "FullControl" ] } ], "StorageClass":"ReducedRedundancy" }, "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", "Name":"Default", "InputBucket":"salesoffice.example.com-source", "OutputBucket":"salesoffice.example.com-output", "Role":"arn:aws:iam::123456789012:role/Elastic_Transcoder_Default_Role", "AwsKmsKeyArn":"base64 encoded key from KMS
", "Notifications":{ "Progressing":"", "Complete":"", "Warning":"", "Error":"arn:aws:sns:us-east-1:111222333444:ET_Errors" }, "ContentConfig":{ "Bucket":"salesoffice.example.com-public-promos", "Permissions":[ { "GranteeType":"Email", "Grantee":"marketing-promos@example.com", "Access":[ "FullControl" ] } ], "StorageClass":"Standard" }, "ThumbnailConfig":{ "Bucket":"salesoffice.example.com-public-promos-thumbnails", "Permissions":[ { "GranteeType":"Email", "Grantee":"marketing-promos@example.com", "Access":[ "FullControl" ] } ], "StorageClass":"ReducedRedundancy" }, "Status":"Active", "Warnings": [ { "Code": "6000", "Message": "The input bucket and the pipeline are in different regions, which increases processing time for jobs in the pipeline and can incur additional charges. To decrease processing time and prevent cross-regional charges, use the same region for the input bucket and the pipeline." }, {...} ] }