

サポート終了通知: 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="test-pipeline-role"></a>

**Topics**
+ [説明](#test-pipeline-role-description)
+ [リクエスト](#test-pipeline-role-requests)
+ [レスポンス](#test-pipeline-role-responses)
+ [エラー](#test-pipeline-role-response-errors)
+ [例](#test-pipeline-role-examples)

## 説明
<a name="test-pipeline-role-description"></a>

パイプラインの設定をテストして、Elastic Transcoder がジョブの作成と処理を実行できるかどうかを確認するには、`/2012-09-25/roleTests` リソースに POST リクエストを送信します。

## リクエスト
<a name="test-pipeline-role-requests"></a>

### 構文
<a name="test-pipeline-role-request-syntax"></a>

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

### リクエストパラメータ
<a name="test-pipeline-role-request-parameters"></a>

このオペレーションはリクエストパラメータを使用しません。

### リクエストヘッダー
<a name="test-pipeline-role-request-headers"></a>

このオペレーションは、すべてのオペレーションに共通のリクエストヘッダーのみを使用します。共通のリクエストヘッダーの詳細については、「[HTTP ヘッダーの内容](making-http-requests.md#http-request-header)」を参照してください。

### リクエスト本文
<a name="test-pipeline-role-request-body"></a>

リクエストボディの JSON 文字列には、次のオブジェクトが含まれます。

**InputBucket**  
トランスコードするメディアファイルを保存した Amazon S3 バケット。`Test Role` はこのバケットから読み取りを試行します。

**OutputBucket**  
Elastic Transcoder でトランスコード済みファイルを保存する Amazon S3 バケット。`Test Role` はこのバケットから読み取りを試行します。

**ロール**   
Elastic Transcoder でジョブのトランスコードに使用するロールの IAM Amazon リソースネーム (ARN)。`Test Role` は指定したロールの引き受けを試みます。

**トピック**  
`Test Role` によるテスト通知の送信先となる 1 つ以上の Amazon Simple Notification Service (Amazon SNS) トピックの ARN。Amazon SNS 通知を使用していない場合は、空のリストを指定できます。

## レスポンス
<a name="test-pipeline-role-responses"></a>

### 構文
<a name="test-pipeline-role-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

{
   "Messages": [
      "error messages, if any"
   ],
   "Success": "true | false"
}
```

### レスポンスヘッダー
<a name="test-pipeline-role-response-headers"></a>

この操作はほとんどのレスポンスに共通のレスポンスヘッダーのみを使用します。共通のレスポンスヘッダーの詳細については、「[HTTP レスポンス](making-http-requests.md#http-response-header)」を参照してください。

### レスポンス本文
<a name="test-pipeline-role-response-body"></a>

パイプラインの設定をテストすると、Elastic Transcoder により次の値が返されます。

**メッセージ**  
`Success` の値が `false` の場合、`Messages` には失敗したテストを説明する 1 つ以上メッセージの配列が含まれます。

**Success (成功)**  
オペレーションが成功した場合、この値は `true` になります。それ以外の場合、値は `false` になります。

## エラー
<a name="test-pipeline-role-response-errors"></a>

Elastic Transcoder の例外とエラーメッセージについては、「[Elastic Transcoder でのエラー処理](error-handling.md)」を参照してください。

## 例
<a name="test-pipeline-role-examples"></a>

### リクエスト例
<a name="test-pipeline-role-examples-sample-request"></a>

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

### レスポンス例
<a name="test-pipeline-role-examples-sample-response"></a>

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