測試角色 - Amazon Elastic Transcoder

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

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

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

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

測試角色

Description (描述)

若要測試管道設定以確保 Elastic Transcoder 能夠建立並處理任務,請將 POST 請求傳送至/2012-09-25/roleTests資源。

請求

Syntax (語法)

POST /2012-09-25/roleTests 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 { "InputBucket":"Amazon S3 bucket that contains files to transcode", "OutputBucket":"Amazon S3 bucket in which to save transcoded files", "Role":"IAM ARN for the role to test", "Topics": [ "ARN of SNS topic to test" ] }

請求參數

此操作不使用請求參數。

請求標頭

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

請求主體

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

輸入存儲桶

您將欲轉碼的媒體檔案儲存其中的 Amazon S3 儲存貯體。Test Role嘗試從此存儲桶讀取。

輸出桶

您希望 Elastic Transcoder 在其中儲存轉碼後檔案的 Amazon S3 儲存貯體。Test Role嘗試從此存儲桶讀取。

Role

希望 Elastic Transcoder 用於轉碼的角色 IAM Amazon Resource Name (ARN)。Test Role會嘗試擔任指定角色。

主題

您希望瞭解的一個或多個 Amazon Simple Notification Service (Amazon SNS) 主題之 ARNTest Role以發送測試通知。如果您未使用 Amazon SNS 通知,可指定空白清單。

回應

Syntax (語法)

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 { "Messages": [ "error messages, if any" ], "Success": "true | false" }

回應標頭

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

回應內文

測試管道設定時,Elastic Transcoder 會回傳下列值。

訊息

Success 的值為 false,則 Messages 會包含一個或多個訊息的陣列,說明哪些測試失敗。

Success

若操作成功,此值為 true,否則為 false

錯誤

有關 Elastic Transcoder 例外和錯誤消息的詳細信息,請參閲處理 Elastic Transcoder 中的錯誤

範例

請求範例

POST /2012-09-25/roleTests 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 { "InputBucket":"salesoffice.example.com-source", "OutputBucket":"salesoffice.example.com-public-promos", "Role":"arn:aws:iam::123456789012:role/transcode-service", "Topics": ["arn:aws:sns:us-east-1:111222333444:ETS_Errors", "arn:aws:sns:us-east-1:111222333444:ETS_Progressing"] }

回應範例

Status: 201 Created 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 { "Messages":[ "The role arn:aws:iam::123456789012:role/transcode-service does not have access to the bucket: salesoffice.example.com-source", "The role arn:aws:iam::123456789012:role/transcode-service does not have access to the topic: arn:aws:sns:us-east-1:111222333444:ETS_Errors" ], "Success": "false" }