

支援終止通知：2025 年 11 月 13 日， AWS 將停止對 Amazon 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="list-jobs-by-pipeline"></a>

**Topics**
+ [描述](#list-jobs-by-pipeline-description)
+ [請求](#list-jobs-by-pipeline-requests)
+ [回應](#list-jobs-by-pipeline-responses)
+ [錯誤](#list-jobs-by-pipeline-response-errors)
+ [範例](#list-jobs-by-pipeline-examples)

## 描述
<a name="list-jobs-by-pipeline-description"></a>

若要取得您指派給管道的任務清單，將 GET 請求傳送 `/2012-09-25/jobsByPipeline/pipelineId` 資源。當您依管道列出任務時，Elastic Transcoder 會列出您最近為指定管道建立的任務。

## 請求
<a name="list-jobs-by-pipeline-requests"></a>

### 語法
<a name="list-jobs-by-pipeline-request-syntax"></a>

若要取得目前管道中任務的相關資訊，請傳送以下 GET 請求。

```
GET /2012-09-25/jobsByPipeline/pipeline Id?
Ascending=true|false&
PageToken=value for accessing the next page of results HTTP/1.1
Content-Type: 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
```

### 請求參數
<a name="list-jobs-by-pipeline-request-parameters"></a>

此操作會採用下列請求參數。Elastic Transcoder 會傳回指定管道中過去六個月的任務。

**PipelineId**  
若要取得您新增到指定管道的任務相關資訊，請為該管道指定 `Id` 物件的值。

**遞增**  
若要依照所提交的日期及時間依序列出任務，請輸入 `true`。若要依照相反的時間順序列出任務，請輸入 `false`。

**PageToken**  
當 Elastic Transcoder 傳回超過一頁的結果時，請在後續`GET`請求`PageToken`中使用 以取得每個連續頁面的結果。

### 請求標頭
<a name="list-jobs-by-pipeline-request-headers"></a>

此操作僅使用所有操作常見的請求標頭。如需常見請求標頭的資訊，請參閱 [HTTP 標頭內容](making-http-requests.md#http-request-header)。

### 請求主體
<a name="list-jobs-by-pipeline-request-body"></a>

此操作不會使用請求內文。

## 回應
<a name="list-jobs-by-pipeline-responses"></a>

### 語法
<a name="list-jobs-by-pipeline-response-syntax"></a>

```
Status: 200 OK
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

{
   "Jobs":[
      {
         "Id":"Id that Elastic Transcoder assigned to the job",
         "Inputs":[{
            "Key":"name of the file to transcode",
            "Encryption":{
               "Mode":"aes-cbc-pkcs7|aes-ctr|aes-gcm",
               "Key":"encrypted and base64-encoded decryption key",
               "KeyMd5":"base64-encoded key digest",
               "InitializationVector":"base64-encoded initialization vector"
            },
            "TimeSpan":{
               "StartTime":"starting place of the clip, in
                  HH:mm:ss.SSS or sssss.SSS",
               "Duration":"duration of the clip, in HH:mm:ss.SSS
                  or sssss.SSS"
            },
            "FrameRate":"auto|10|15|23.97|24|25|29.97|30|50|60",
            "Resolution":"auto|width in pixelsxheight in pixels",
            "AspectRatio":"auto|1:1|4:3|3:2|16:9",
            "Interlaced":"auto|true|false",
            "Container":"auto|aac|asf|avi|divx|flv|m4a|mkv|mov|mp2|mp3|
               mp4|mpeg|mpeg-ps|mpeg-ts|mxf|ogg|vob|wav|webm",
            "DetectedProperties":{
               "Width":"video width in pixels",
               "Height":"video height in pixels",         
               "FrameRate":"video frame rate in fps",
               "FileSize":"file size in bytes",
               "DurationMillis":"file duration in milliseconds"
            },
            "InputCaptions":{
   	       "MergePolicy":"MergeOverride|MergeRetain|Override",
               "CaptionSources":[
                  {
                     "Key":"name of the input caption file",
                     "Language":"language of the input caption file",
                     "TimeOffset":"starting place of the captions, in
                        either [-+]SS.sss or [-+]HH:mm:SS.ss",
                     "Label":"label for the caption"
                     "Encryption":{
                        "Mode":"aes-cbc-pkcs7|aes-ctr|aes-gcm",
                        "Key":"encrypted and base64-encoded decryption key",
                        "KeyMd5":"base64-encoded key digest",
                        "InitializationVector":"base64-encoded initialization 
                           vector"
                     },
                  },
                  {...}
               ]
            }
         },
      {...}],
      "OutputKeyPrefix":"prefix for file names in Amazon S3 bucket",
      "Outputs":[{
            "Id":"sequential counter",
            "Key":"name of the transcoded file",
            "Encryption":{
               "Mode":"s3||aes-cbc-pkcs7|aes-ctr|
                  aes-gcm",
               "Key":"encrypted and base64-encoded encryption key",
               "KeyMd5":"base64-encoded key digest",
               "InitializationVector":"base64-encoded initialization vector"           
            },
            "ThumbnailPattern":""|"pattern",
            "Rotate":"auto|0|90|180|270",
            "PresetId":"preset to use for the job",
            "SegmentDuration":"[1,60]",
            "Watermarks":[
               {
                  "InputKey":"name of the .png or .jpg file",
                  "Encryption":{
                     "Mode":"s3||aes-cbc-pkcs7|
                        aes-ctr|aes-gcm",
                     "Key":"encrypted and base64-encoded encryption key",
                     "KeyMd5":"base64-encoded key digest",
                     "InitializationVector":"base64-encoded initialization 
                        vector"
                  },
                  "PresetWatermarkId":"value of Video:Watermarks:Id in 
                     preset"
               },
               {...}
            ],
            "AlbumArt":[
               {
                  "AlbumArtMerge":"Replace|Prepend|Append|Fallback",
                  "AlbumArtArtwork":"can be empty, but not null":[
                     {
                        "AlbumArtInputKey":"name of the file to use as album 
                           art",
                        "Encryption":{
                           "Mode":"s3||aes-cbc-pkcs7|
                              aes-ctr|aes-gcm",
                           "Key":"encrypted and base64-encoded encryption key",
                           "KeyMd5":"base64-encoded key digest",
                           "InitializationVector":"base64-encoded
                              initialization vector"
                        },
                        "AlbumArtMaxWidth":"maximum width of output album art
                           in pixels",
                        "AlbumArtMaxHeight":"maximum height of output album
                           art in pixels",
                        "AlbumArtSizingPolicy":"Fit|Fill|Stretch|Keep|
                           ShrinkToFit|ShrinkToFill",
                        "AlbumArtPaddingPolicy":"Pad|NoPad",
                        "AlbumArtFormat":"jpg|png"
                     },
                     {...}
                  ]
            },
            {...}], 
            "Duration":"duration in seconds",
            "DurationMillis":"duration in milliseconds",
            "Height":"height in pixels",
            "Width":"width in pixels",
            "FrameRate":"frame rate in fps",
            "FileSize":"file size in bytes",
            "Status":"Submitted|In Progress|Complete|Error",
            "StatusDetail":"detail associated with Status",
            "Captions":{
               "CaptionFormats":[
                  {
                     "Format":"cea-708|dfxp|mov-text|scc|srt|webvtt",
                     "Pattern":"myCaption/file-language",
                     "Encryption":{
                        "Mode":"s3||aes-cbc-pkcs7|
                           aes-ctr|aes-gcm",
                        "Key":"encrypted and base64-encoded encryption key",
                        "KeyMd5":"base64-encoded key digest",
                        "InitializationVector":"base64-encoded 
                           initialization vector"
                     }
                  },
                  {...}
               ]
            },
            "AppliedColorSpaceConversion":"None|Bt601ToBt709|
                  Bt709ToBt601"
         },
         {...}
      ],
      "Playlists":[
         {
            "Format":"HLSv3|HLSv4|MPEG-DASH|Smooth",
            "Name":"name",
            "OutputKeys":[
               "Outputs:Key to include in this playlist",
               {...}
            ],
            "HlsContentProtection":{
                "Method":"aes-128",
                "Key":"encrypted and base64-encoded protection key",
                "KeyMd5":"base64-encoded key digest",
                "InitializationVector":"base64-encoded
                   initialization vector",
                "LicenseAcquisitionUrl":"license acquisition url",
                "KeyStoragePolicy":"NoStore|WithVariantPlaylists"
            },
            "PlayReadyDrm":{
                "Format":"microsoft|discretix-3.0",
                "Key":"encrypted and base64-encoded DRM key",
                "KeyId":"id of the DRM key",
                "KeyMd5":"base64-encoded key digest",
                "InitializationVector":"base64-encoded
                   initialization vector",
                "LicenseAcquisitionUrl":"license acquisition url"
               }
            },
            {...}
         ],
         "UserMetadata":
            {
                "Key":"Value",
                "Second user metadata key":"Second user metadata value"
            },
         "PipelineId":"PipelineId for the job",
         "Status":"Submitted|Progressing|Complete|Canceled|Error",
         "Timing":{
            "SubmitTimeMillis":"job submitted time in epoch milliseconds",
            "StartTimeMillis":"job start time in epoch milliseconds",
            "FinishTimeMillis":"job finish time in epoch milliseconds"
         }
      },
      {...}
   ],
   "NextPageToken":value for accessing the next page of results|null
}
```

### 回應標頭
<a name="list-jobs-by-pipeline-response-headers"></a>

此操作僅使用大部分回應常見的回應標頭。如需常見回應標頭的資訊，請參閱 [HTTP 回應](making-http-requests.md#http-response-header)。

### 回應內文
<a name="list-jobs-by-pipeline-response-body"></a>

每個符合條件之任務的回應內文都包含一個元素，而且每個元素都包含您在建立任務時指定的值。如需任務值的詳細資訊，請參閱[您在建立彈性轉碼器任務時指定的設定](job-settings.md)。

此外，Elastic Transcoder 會傳回下列值。

**（自動） ID**  
Elastic Transcoder 指派給任務的識別符。您可以使用此值來取得任務的設定或刪除任務。

**（自動） 輸入：DetectedProperties**  
偵測到的輸入檔案屬性。Elastic Transcoder 會從輸入檔案識別這些值。

**（自動） 輸入：寬度**  
以像素為單位的輸入檔案偵測到寬度。

**（自動） 輸入：高度**  
偵測到的輸入檔案高度，以像素為單位。

**（自動） 輸入：FrameRate**  
輸入檔案偵測到的影格速率，以每秒影格數為單位。

**（自動） 輸入：FileSize**  
偵測到的輸入檔案大小，以位元組為單位。

**（自動） 輸入：DurationMillis**  
偵測到的輸入檔案持續時間，以毫秒為單位。

**（自動） 輸出：Id**  
從 1 開始的循序計數器，可識別目前任務中輸出之間的輸出。在`Output`語法中，此值一律為 `1`。

**（自動） 輸出：持續時間**  
輸出檔案的持續時間，以秒為單位，四捨五入。

**（自動） 輸出：DurationMillis**  
輸出檔案的持續時間，以毫秒為單位。

**（自動） 輸出：寬度**  
輸出檔案的寬度，以像素為單位。

**（自動） 輸出：高度**  
輸出檔案的高度，以像素為單位。

**（自動） 輸出：FrameRate**  
輸出檔案的影格速率，以每秒影格數為單位。

**（自動） 輸出：FileSize**  
輸出檔案的檔案大小，以位元組為單位。

**（自動） 輸出：狀態**  
任務中一個輸出的狀態。如果您只為任務指定一個輸出， `Outputs:Status` 一律與 相同`Job:Status`。如果您指定多個輸出：  
+ `Job:Status` `Outputs:Status` 對於所有輸出， 和 是`Submitted`直到 Elastic Transcoder 開始處理第一個輸出為止。
+ 當 Elastic Transcoder 開始處理第一個輸出時，`Outputs:Status`該輸出和`Job:Status`兩者都會變更為 `Progressing`。對於每個輸出， 的值會`Outputs:Status`保留`Submitted`到 Elastic Transcoder 開始處理輸出為止。
+ `Job:Status` 會保留，`Progressing`直到所有輸出都達到終端機狀態，`Complete`或 `Error`為止。
+ 當所有輸出都達到終端機狀態時，只有在所有輸出`Outputs:Status`為 時， `Complete`才會`Job:Status`變更為 `Complete`。如果一或多個輸出`Outputs:Status`是 `Error`，則 的終端機狀態`Job:Status`也是 `Error`。
的值`Status`是下列其中一項：`Submitted`、`Progressing`、`Canceled`、 `Complete`或 `Error`。

**（自動） 輸出：StatusDetail**  
進一步說明 的資訊`Outputs:Status`。

** （自動） 輸出：AppliedColorSpaceConversion**  
如果 Elastic Transcoder 搭配 使用預設集`ColorSpaceConversionMode`來轉碼輸出檔案， `AppliedColorSpaceConversion` 參數會顯示使用的轉換。如果預設中`ColorSpaceConversionMode`未定義任何 ，則此參數不會包含在任務回應中。

**（自動） 狀態**  
如果您為任務指定多個輸出，則為整個任務的狀態。當 Elastic Transcoder 開始處理任務時， 的值`Job:Status`會變更為 `Progressing`，且直到 Elastic Transcoder 處理完所有輸出後才會變更。處理完成時， 會`Job:Status`變更為 ，`Complete`如果任何輸出失敗，則會變更為 `Error`。  
如果您只為任務指定一個輸出，`Job:Status`則 與 相同`Outputs:Status`。  
的值`Job:Status`是下列其中一項：`Submitted`、`Progressing`、`Canceled`、 `Complete`或 `Error`。

**（自動） 時間**  
任務時間的詳細資訊。

**（自動） 時間：SubmitTimeMillis**  
將任務提交至 Elastic Transcoder 的時間，以 epoch 毫秒為單位。

**（自動） 時間：StartTimeMillis**  
任務開始轉碼的時間，以 epoch 毫秒為單位。

**（自動） 時間：FinishTimeMillis**  
任務完成轉碼的時間，以 epoch 毫秒為單位。  
若要進一步了解 epoch 時間，請前往 Wikipedia 上的 [ Epoch 運算](https://en.wikipedia.org/wiki/Epoch_%28reference_date%29#Computing)頁面。

**（自動） NextPageToken**  
您用來存取結果第二頁和後續頁面的值，如果有的話。當指定管道中的任務符合一頁，或當您達到結果的最後一頁時， 的值`NextPageToken`為 `null`。

## 錯誤
<a name="list-jobs-by-pipeline-response-errors"></a>

如需 Elastic Transcoder 例外狀況和錯誤訊息的相關資訊，請參閱[處理 Elastic Transcoder 中的錯誤](error-handling.md)。

## 範例
<a name="list-jobs-by-pipeline-examples"></a>

以下範例請求建立任務。

### 請求範例
<a name="list-jobs-by-pipeline-examples-sample-request"></a>

以下範例請求會從您指派給管道 ID `1111111111111-abcde1` 的過去六個月內取得所有任務的清單。

```
GET /2012-09-25/jobsByPipeline/1111111111111-abcde1?Ascending=true HTTP/1.1
Content-Type: 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
```

### 回應範例
<a name="list-jobs-by-pipeline-examples-sample-response"></a>

```
Status: 200 OK
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

{
   "Jobs":[
      {
         "Id":"3333333333333-abcde3",
         "Inputs":[{
            "Key":"cooking/lasagna.mp4",
            "FrameRate":"auto",
            "Resolution":"auto",
            "AspectRatio":"auto",
            "Interlaced":"auto",
            "Container":"mp4",
            "InputCaptions":{
               "MergePolicy":"MergeOverride",
               "CaptionSources":[
                  {
                     "Key":"scc/lasagna-kindlefirehd.scc",
                     "Language":"en",
                     "Label":"English"
                  },
                  {
                     "Key":"srt/lasagna-kindlefirehd.srt",
                     "Language":"fr",
                     "TimeOffset":"1:00:00",
                     "Label":"French"
                  }
               ],
            },
            "DetectedProperties":{
               "Width":"1280",
               "Height":"720",
               "FrameRate":"30.00",
               "FileSize":"5872000",
               "DurationMillis":"1003000"
            }
         }],
         "Outputs":[
            {
               "Id":"1",
               "Key":"cooking/lasagna-KindleFireHD.mp4",
               "ThumbnailPattern":"cooking/lasagna-{count}-KindleFireHD",
               "Rotate":"0",
               "PresetId":"1351620000000-100080",
               "Watermarks":[
                  {
                     "InputKey":"logo/128x64.png",
                     "PresetWatermarkId":"company logo 128x64",
                  }
               ],
               "Duration":"1003",
               "DurationMillis":"1003000",
               "Width":"1280",
               "Height":"720",
               "FrameRate":"30.00",
               "FileSize":"5872000",
               "Status":"Submitted",
               "StatusDetail":"Job has been received.",
               "Captions":{
                  "CaptionFormats":[
                     {
                        "Format":"scc",
                        "Pattern":"scc/lasagna-{language}",
                     },
                     {
                        "Format":"srt",
                        "Pattern":"srt/lasagna-{language}"
                     },
                     {
                        "Format":"mov-text"
                     }
                  ]
               }
            },
            {
               "Id":"2",
               "Key":"cooking/lasagna-iPhone4s.mp4",
               "ThumbnailPattern":"cooking/lasagna-{count}-iPhone4s",
               "Rotate":"0",
               "PresetId":"1351620000000-100020",
               "Watermarks":[
                  {
                     "InputKey":"logo/128x64.png",
                     "PresetWatermarkId":"company logo 128x64"
                  }
               ],
               "Duration":"1003",
               "DurationMillis":"1003000",
               "Width":"1920",
               "Height":"1080",
               "FrameRate":"30.00",
               "FileSize":"4718600",
               "Status":"Submitted",
               "StatusDetail":"Job has been received.",
               "AppliedColorSpaceConversion":"None"
            }
         ],
         "PipelineId":"1111111111111-abcde1",
         "Timing":{
            "SubmitTime":"1427212800000",
            "StartTime":"1427212856000",
            "FinishTime":"1427212875000"
         }
      },
      {
         "Id":"4444444444444-abcde4",
         "Input":{
            "Key":"cooking/baked-ziti.mp4",
            "FrameRate":"auto",
            "Resolution":"auto",
            "AspectRatio":"auto",
            "Interlaced":"auto",
            "Container":"mp4",
            "DetectedProperties":{
               "Width":"1280",
               "Height":"720",
               "FrameRate":"30.00",
               "FileSize":"5872000",
               "DurationMillis":"1003000"
            }
         },
         "Outputs":[
            {
               "Id":"1",
               "Key":"cooking/baked-ziti-KindleFireHD.mp4",
               "ThumbnailPattern":"cooking/baked-ziti-{count}-KindleFireHD",
               "Rotate":"0",
               "PresetId":"1351620000000-100080",
               "Watermarks":[
                  {
                     "InputKey":"logo/128x64.png",
                     "PresetWatermarkId":"company logo 128x64"
                  }
               ],
               "Duration":"596",
               "DurationMillis":"1003000",
               "Width":"1280",
               "Height":"720",
               "FrameRate":"30.00",
               "FileSize":"4718600",
               "Status":"Complete",
               "StatusDetail":""
            }
         ],
         "UserMetadata":
            {
               "Food type":"Italian",
               "Cook book":"recipe notebook"
            },
         "PipelineId":"1111111111111-abcde1",
         "Timing":{
            "SubmitTime":"1427212800000",
            "StartTime":"1427212856000",
            "FinishTime":"1427212875000"
         }
      }
   ],
   "NextPageToken":null
}
```