

# Amazon IVS Real-Time Streaming examples using AWS CLI
<a name="cli_ivs-realtime_code_examples"></a>

次のコード例は、Amazon IVS Real-Time Streaming で AWS Command Line Interface を使用してアクションを実行し、一般的なシナリオを実装する方法を示しています。

*アクション*はより大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。アクションは個々のサービス機能を呼び出す方法を示していますが、コンテキスト内のアクションは、関連するシナリオで確認できます。

各例には完全なソースコードへのリンクが含まれており、コードの設定方法と実行方法に関する手順を確認できます。

**Topics**
+ [アクション](#actions)

## アクション
<a name="actions"></a>

### `create-encoder-configuration`
<a name="ivs-realtime_CreateEncoderConfiguration_cli_topic"></a>

次のコード例は、`create-encoder-configuration` を使用する方法を示しています。

**AWS CLI**  
**コンポジションエンコーダー設定を作成するには**  
次の `create-encoder-configuration` の例では、指定されたプロパティを使用してコンポジションエンコーダー設定を作成します。  

```
aws ivs-realtime create-encoder-configuration \
    --name test-ec --video bitrate=3500000,framerate=30.0,height=1080,width=1920
```
出力:  

```
{
    "encoderConfiguration": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef",
        "name": "test-ec",
        "tags": {},
        "video": {
            "bitrate": 3500000,
            "framerate": 30,
            "height": 1080,
            "width": 1920
        }
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateEncoderConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/create-encoder-configuration.html)」を参照してください。

### `create-ingest-configuration`
<a name="ivs-realtime_CreateIngestConfiguration_cli_topic"></a>

次のコード例は、`create-ingest-configuration` を使用する方法を示しています。

**AWS CLI**  
**取り込み設定を作成するには**  
次の `create-ingest-configuration` の例では、RTMPS プロトコルを使用して取り込み設定を作成します。  

```
aws ivs-realtime create-ingest-configuration \
    --name ingest1 \
    --ingest-protocol rtmps
```
出力:  

```
{
    "ingestConfiguration": {
        "name": "ingest1",
        "arn": "arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234",
        "ingestProtocol": "RTMPS",
        "streamKey": "rt_123456789012_us-west-2_AbCdEfGh1234_abcd1234efgh5678ijkl9012MNOP34",
        "stageArn": "",
        "participantId": "xyZ654abC321",
        "state": "INACTIVE",
        "userId": "",
        "tags": {}
    }
}
```
詳細については、*Amazon Interactive Video Service ユーザーガイド*の「[IVS ストリーム取り込み \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html)」を参照してください。  
+  API の詳細については、*AWS CLI コマンドリファレンス*の「[CreateIngestConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/create-ingest-configuration.html)」を参照してください。

### `create-participant-token`
<a name="ivs-realtime_CreateParticipantToken_cli_topic"></a>

次のコード例は、`create-participant-token` を使用する方法を示しています。

**AWS CLI**  
**ステージ参加者トークンを作成するには**  
次の `create-participant-token` の例では、指定されたステージの参加者トークンを作成します。  

```
aws ivs-realtime create-participant-token \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --user-id bob
```
出力:  

```
{
    "participantToken": {
        "expirationTime": "2023-03-07T09:47:43+00:00",
        "participantId": "ABCDEfghij01234KLMN6789",
        "token": "abcd1234defg5678"
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/userguide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateParticipantToken](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/create-participant-token.html)」を参照してください。

### `create-stage`
<a name="ivs-realtime_CreateStage_cli_topic"></a>

次のコード例は、`create-stage` を使用する方法を示しています。

**AWS CLI**  
**例 1: ステージを作成するには**  
次の `create-stage` の例では、指定されたユーザーのステージとステージ参加者トークンを作成します。  

```
aws ivs-realtime create-stage \
    --name stage1 \
    --participant-token-configurations userId=alice
```
出力:  

```
{
    "participantTokens": [
        {
            "participantId": "ABCDEfghij01234KLMN5678",
            "token": "a1b2c3d4567890ab",
            "userId": "alice"
        }
    ],
    "stage": {
        "activeSessionId": "st-a1b2c3d4e5f6g",
        "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
        "autoParticipantRecordingConfiguration": {
            "storageConfigurationArn": "",
            "mediaTypes": [
                "AUDIO_VIDEO"
            ],
            "thumbnailConfiguration": {
                "targetIntervalSeconds": 60,
                "storage": [
                    "SEQUENTIAL"
                ],
                "recordingMode": "DISABLED"
            },
            "recordingReconnectWindowSeconds": 0,
            "hlsConfiguration": {
                "targetSegmentDurationSeconds": 6
            },
            "recordParticipantReplicas": true
        },
        "endpoints": {
            "events": "wss://global.events.live-video.net",
            "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/",
            "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/",
            "whip": "https://9x0y8z7s6t5u.global-bm.whip.live-video.net"
        },
        "name": "stage1",
        "tags": {}
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
**例 2: ステージを作成し、個々の参加者の録画を設定するには**  
次の `create-stage` の例では、ステージを作成し、個々の参加者の録画を設定します。  

```
aws ivs-realtime create-stage \
    --name stage1 \
    --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "recordingReconnectWindowSeconds": 100, \
        "hlsConfiguration": {"targetSegmentDurationSeconds": 5}}'
```
出力:  

```
{
    "stage": {
        "activeSessionId": "st-a1b2c3d4e5f6g",
        "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
        "autoParticipantRecordingConfiguration": {
            "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh"
            "mediaTypes": [
                "AUDIO_VIDEO"
            ],
            "thumbnailConfiguration": {
                "targetIntervalSeconds": 60,
                "storage": [
                    "SEQUENTIAL"
                ],
                "recordingMode": "DISABLED"
            },
            "recordingReconnectWindowSeconds": 100,
            "hlsConfiguration": {
                "targetSegmentDurationSeconds": 5
            },
            "recordParticipantReplicas": true
        },
        "endpoints": {
            "events": "wss://global.events.live-video.net",
            "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/",
            "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/",
            "whip": "https://9x0y8z7s6t5u.global-bm.whip.live-video.net"
        },
        "name": "stage1",
        "tags": {}
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
**例 3: ステージを作成し、サムネイルの記録が有効になっている個々の参加者の録画を設定するには**  
次の `create-stage` の例では、ステージを作成し、サムネイルの記録が有効になっている個々の参加者の録画を設定します。  

```
aws ivs-realtime create-stage \
    --name stage1 \
    --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", \
        "thumbnailConfiguration": {"recordingMode": "INTERVAL","storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}}'
```
出力:  

```
{
    "stage": {
        "activeSessionId": "st-a1b2c3d4e5f6g",
        "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
        "autoParticipantRecordingConfiguration": {
            "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh",
            "mediaTypes": [
                "AUDIO_VIDEO"
            ],
            "thumbnailConfiguration": {
                "targetIntervalSeconds": 60,
                "storage": [
                    "SEQUENTIAL"
                ],
                "recordingMode": "INTERVAL"
            },
            "recordingReconnectWindowSeconds": 0,
            "hlsConfiguration": {
                "targetSegmentDurationSeconds": 6
            },
            "recordParticipantReplicas": true
        },
        "endpoints": {
            "events": "wss://global.events.live-video.net",
            "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/",
            "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/",
            "whip": "https://9x0y8z7s6t5u.global-bm.whip.live-video.net"
        },
        "name": "stage1",
        "tags": {}
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/create-stage.html)」を参照してください。

### `create-storage-configuration`
<a name="ivs-realtime_CreateStorageConfiguration_cli_topic"></a>

次のコード例は、`create-storage-configuration` を使用する方法を示しています。

**AWS CLI**  
**コンポジションストレージ設定を作成するには**  
次の `create-storage-configuration` の例では、指定されたプロパティを使用してコンポジションストレージ設定を作成します。  

```
aws ivs-realtime create-storage-configuration \
    --name "test-sc" --s3 "bucketName=amzn-s3-demo-bucket"
```
出力:  

```
{
    "storageConfiguration": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/ABabCDcdEFef",
        "name": "test-sc",
        "s3": {
            "bucketName": "amzn-s3-demo-bucket"
        },
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateStorageConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/create-storage-configuration.html)」を参照してください。

### `delete-encoder-configuration`
<a name="ivs-realtime_DeleteEncoderConfiguration_cli_topic"></a>

次のコード例は、`delete-encoder-configuration` を使用する方法を示しています。

**AWS CLI**  
**コンポジションエンコーダー設定を削除するには**  
次の `delete-encoder-configuration` は、指定の ARN (Amazon リソースネーム) で指定されたコンポジションエンコーダー設定を削除します。  

```
aws ivs-realtime delete-encoder-configuration \
    --arn "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
```
このコマンドは何も出力しません。  
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteEncoderConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/delete-encoder-configuration.html)」を参照してください。

### `delete-ingest-configuration`
<a name="ivs-realtime_DeleteIngestConfiguration_cli_topic"></a>

次のコード例は、`delete-ingest-configuration` を使用する方法を示しています。

**AWS CLI**  
**例 1: 非アクティブな取り込み設定を削除するには**  
次の `delete-ingest-configuration` の例では、指定した取り込み設定 ARN (Amazon リソースネーム) の非アクティブな取り込み設定を削除します。  

```
aws ivs-realtime delete-ingest-configuration \
    --arn arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234
```
このコマンドでは何も出力されません。  
詳細については、*Amazon Interactive Video Service ユーザーガイド*の「[IVS ストリーム取り込み \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html)」を参照してください。  
**例 2: アクティブな取り込み設定を強制的に削除するには**  
次の `delete-ingest-configuration` の例では、指定した取り込み設定 ARN (Amazon リソースネーム) のアクティブな取り込み設定を強制的に削除します。  

```
aws ivs-realtime delete-ingest-configuration \
    --arn arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234 \
    --force
```
このコマンドでは何も出力されません。  
詳細については、*Amazon Interactive Video Service ユーザーガイド*の「[IVS ストリーム取り込み \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html)」を参照してください。  
+  API の詳細については、*AWS CLI コマンドリファレンス*の「[DeleteIngestConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/delete-ingest-configuration.html)」を参照してください。

### `delete-public-key`
<a name="ivs-realtime_DeletePublicKey_cli_topic"></a>

次のコード例は、`delete-public-key` を使用する方法を示しています。

**AWS CLI**  
**パブリックキーを削除するには**  
次の `delete-public-key` は、指定されたパブリックキーを削除します。  

```
aws ivs-realtime delete-public-key \
    --arn arn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2
```
このコマンドは何も出力しません。  
詳細については、「*Amazon IVS Real-Time Streaming ユーザーガイド*」の「[参加者トークンを配布する](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/getting-started-distribute-tokens.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeletePublicKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/delete-public-key.html)」を参照してください。

### `delete-stage`
<a name="ivs-realtime_DeleteStage_cli_topic"></a>

次のコード例は、`delete-stage` を使用する方法を示しています。

**AWS CLI**  
**ステージを削除するには**  
次の `delete-stage` の例では、指定されたステージを削除します。  

```
aws ivs-realtime delete-stage \
    --arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh
```
このコマンドは何も出力しません。  
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/userguide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/delete-stage.html)」を参照してください。

### `delete-storage-configuration`
<a name="ivs-realtime_DeleteStorageConfiguration_cli_topic"></a>

次のコード例は、`delete-storage-configuration` を使用する方法を示しています。

**AWS CLI**  
**コンポジションストレージ設定を削除するには**  
次の `delete-storage-configuration` は、指定の ARN (Amazon リソースネーム) で指定されたコンポジションストレージ設定を削除します。  

```
aws ivs-realtime delete-storage-configuration \
    --arn "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/ABabCDcdEFef"
```
このコマンドは何も出力しません。  
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteStorageConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/delete-storage-configuration.html)」を参照してください。

### `disconnect-participant`
<a name="ivs-realtime_DisconnectParticipant_cli_topic"></a>

次のコード例は、`disconnect-participant` を使用する方法を示しています。

**AWS CLI**  
**ステージ参加者を切断するには**  
次の `disconnect-participant` の例では、指定された参加者を指定されたステージから切断します。  

```
aws ivs-realtime disconnect-participant \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --participant-id ABCDEfghij01234KLMN5678
```
このコマンドは何も出力しません。  
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/userguide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DisconnectParticipant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/disconnect-participant.html)」を参照してください。

### `get-composition`
<a name="ivs-realtime_GetComposition_cli_topic"></a>

次のコード例は、`get-composition` を使用する方法を示しています。

**AWS CLI**  
**例 1: デフォルトのレイアウト設定でコンポジションを取得するには**  
次の `get-composition` の例では、指定された ARN (Amazon リソースネーム) のコンポジションを取得します。  

```
aws ivs-realtime get-composition \
    --arn "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"
```
出力:  

```
{
    "composition": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh",
        "destinations": [
            {
                "configuration": {
                    "channel": {
                        "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg",
                        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                    },
                    "name": ""
                },
                "id": "AabBCcdDEefF",
                "startTime": "2023-10-16T23:26:00+00:00",
                "state": "ACTIVE"
            },
            {
                "configuration": {
                    "name": "",
                    "s3": {
                        "encoderConfigurationArns": [
                            "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                        ],
                        "recordingConfiguration": {
                            "format": "HLS",
                            "hlsConfiguration": {
                                "targetSegmentDurationSeconds": 2
                            }
                        },
                        "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE",
                    }
                },
                "detail": {
                    "s3": {
                        "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite"
                    }
                },
                "id": "GHFabcgefABC",
                "startTime": "2023-10-16T23:26:00+00:00",
                "state": "STARTING"
            }
        ],
        "layout": {
            "grid": {
                "featuredParticipantAttribute": "",
                "gridGap": 2,
                "omitStoppedVideo": false,
                "participantOrderAttribute": "",
                "videoAspectRatio": "VIDEO",
                "videoFillMode": ""
            }
        },
        "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd",
        "startTime": "2023-10-16T23:24:00+00:00",
        "state": "ACTIVE",
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[IVS Composite Recording \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-composite-recording.html)」を参照してください。  
**例 2: PiP レイアウトのコンポジションを取得するには**  
次の `get-composition` の例では、PiP レイアウトを使用している、指定された ARN (Amazon リソースネーム) のコンポジションを取得します。  

```
aws ivs-realtime get-composition \
    --arn "arn:aws:ivs:ap-northeast-1:123456789012:composition/wxyzWXYZpqrs"
```
出力:  

```
{
    "composition": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/wxyzWXYZpqrs",
        "destinations": [
            {
                "configuration": {
                    "channel": {
                        "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg",
                        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                    },
                    "name": ""
                },
                "id": "AabBCcdDEefF",
                "startTime": "2023-10-16T23:26:00+00:00",
                "state": "ACTIVE"
            },
            {
                "configuration": {
                    "name": "",
                    "s3": {
                        "encoderConfigurationArns": [
                            "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                        ],
                        "recordingConfiguration": {
                            "format": "HLS",
                            "hlsConfiguration": {
                                "targetSegmentDurationSeconds": 2
                            }
                        },
                        "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE"
                    }
                },
                "detail": {
                    "s3": {
                        "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite"
                    }
                },
                "id": "GHFabcgefABC",
                "startTime": "2023-10-16T23:26:00+00:00",
                "state": "STARTING"
            }
        ],
        "layout": {
            "pip": {
                "featuredParticipantAttribute": "abcdefg",
                "gridGap": 0,
                "omitStoppedVideo": false,
                "participantOrderAttribute": "",
                "pipBehavior": "STATIC",
                "pipOffset": 0,
                "pipParticipantAttribute": "",
                "pipPosition": "BOTTOM_RIGHT",
                "videoFillMode": "COVER"
            }
        },
        "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd",
        "startTime": "2023-10-16T23:24:00+00:00",
        "state": "ACTIVE",
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[IVS Composite Recording \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-composite-recording.html)」を参照してください。  
**例 3: サムネイルの記録が有効になっているコンポジションを取得するには**  
次の `get-composition` の例では、デフォルト設定でサムネイルの記録が有効になっている、指定された ARN (Amazon リソースネーム) のコンポジションを取得します。  

```
aws ivs-realtime get-composition \
    --arn "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"
```
出力:  

```
{
    "composition": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh",
        "destinations": [
            {
                "configuration": {
                    "channel": {
                        "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg",
                        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                    },
                    "name": ""
                },
                "id": "AabBCcdDEefF",
                "startTime": "2023-10-16T23:26:00+00:00",
                "state": "ACTIVE"
            },
            {
                "configuration": {
                    "name": "",
                    "s3": {
                        "encoderConfigurationArns": [
                            "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                        ],
                        "recordingConfiguration": {
                            "format": "HLS",
                            "hlsConfiguration": {
                                "targetSegmentDurationSeconds": 2
                            }
                        },
                        "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE",
                        "thumbnailConfigurations": [
                           {
                              "targetIntervalSeconds": 60,
                              "storage": [
                                  "SEQUENTIAL"
                              ],
                           }
                        ]
                    }
                },
                "detail": {
                    "s3": {
                        "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite"
                    }
                },
                "id": "GHFabcgefABC",
                "startTime": "2023-10-16T23:26:00+00:00",
                "state": "STARTING"
            }
        ],
        "layout": {
            "grid": {
                "featuredParticipantAttribute": ""
                "gridGap": 2,
                "omitStoppedVideo": false,
                "participantOrderAttribute": "",
                "videoAspectRatio": "VIDEO",
                "videoFillMode": ""                }
        },
        "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd",
        "startTime": "2023-10-16T23:24:00+00:00",
        "state": "ACTIVE",
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[IVS Composite Recording \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-composite-recording.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetComposition](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/get-composition.html)」を参照してください。

### `get-encoder-configuration`
<a name="ivs-realtime_GetEncoderConfiguration_cli_topic"></a>

次のコード例は、`get-encoder-configuration` を使用する方法を示しています。

**AWS CLI**  
**コンポジションエンコーダー設定を取得するには**  
次の `get-encoder-configuration` の例では、指定の ARN (Amazon リソースネーム) で指定されたコンポジションエンコーダー設定を取得します。  

```
aws ivs-realtime get-encoder-configuration \
    --arn "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/abcdABCDefgh"
```
出力:  

```
{
    "encoderConfiguration": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/abcdABCDefgh",
        "name": "test-ec",
        "tags": {},
        "video": {
            "bitrate": 3500000,
            "framerate": 30,
            "height": 1080,
            "width": 1920
        }
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetEncoderConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/get-encoder-configuration.html)」を参照してください。

### `get-ingest-configuration`
<a name="ivs-realtime_GetIngestConfiguration_cli_topic"></a>

次のコード例は、`get-ingest-configuration` を使用する方法を示しています。

**AWS CLI**  
**取り込み設定情報を取得するには**  
次の `get-ingest-configuration` の例では、指定した取り込み設定 ARN (Amazon リソースネーム) の取り込み設定を取得します。  

```
aws ivs-realtime get-ingest-configuration \
    --arn arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234
```
出力:  

```
{
    "ingestConfiguration": {
        "name": "ingest1",
        "arn": "arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234",
        "ingestProtocol": "RTMPS",
        "streamKey": "rt_123456789012_us-west-2_AbCdEfGh1234_abcd1234efgh5678ijkl9012MNOP34",
        "stageArn": "",
        "participantId": "xyZ654abC321",
        "state": "INACTIVE",
        "userId": "",
        "tags": {}
    }
}
```
詳細については、*Amazon Interactive Video Service ユーザーガイド*の「[IVS ストリーム取り込み \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html)」を参照してください。  
+  API の詳細については、*AWS CLI コマンドリファレンス*の「[GetIngestConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/get-ingest-configuration.html)」を参照してください。

### `get-participant`
<a name="ivs-realtime_GetParticipant_cli_topic"></a>

次のコード例は、`get-participant` を使用する方法を示しています。

**AWS CLI**  
**例 1: ステージ参加者を取得するには**  
次の `get-participant` の例では、指定されたステージ ARN (Amazon リソースネーム) で、指定された参加者 ID とセッション ID のステージ参加者を取得します。  

```
aws ivs-realtime get-participant \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g \
    --participant-id abCDEf12GHIj
```
出力:  

```
{
    "participant": {
        "browserName": "Google Chrome",
        "browserVersion": "116",
        "firstJoinTime": "2023-04-26T20:30:34+00:00",
        "ispName": "Comcast",
        "osName": "Microsoft Windows 10 Pro",
        "osVersion": "10.0.19044",
        "participantId": "abCDEf12GHIj",
        "published": true,
        "recordingS3BucketName": "bucket-name",
        "recordingS3Prefix": "abcdABCDefgh/st-a1b2c3d4e5f6g/abCDEf12GHIj/1234567890",
        "recordingState": "ACTIVE",
        "sdkVersion": "",
        "state": "CONNECTED",
        "userId": ""
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
**例 2: 別のステージにレプリケートされたステージ参加者を取得するには**  
次の `get-participant` の例では、参加者が別のステージにも複製されている場合に、指定されたステージ ARN (Amazon リソースネーム) で、指定された参加者 ID とセッション ID のステージ参加者を取得します。  

```
aws ivs-realtime get-participant \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g \
    --participant-id abCDEf12GHIj
```
出力:  

```
{
    "participant": {
        "browserName": "Google Chrome",
        "browserVersion": "116",
        "firstJoinTime": "2023-04-26T20:30:34+00:00",
        "ispName": "Comcast",
        "osName": "Microsoft Windows 10 Pro",
        "osVersion": "10.0.19044",
        "participantId": "abCDEf12GHIj",
        "published": true,
        "recordingS3BucketName": "bucket-name",
        "recordingS3Prefix": "abcdABCDefgh/st-a1b2c3d4e5f6g/abCDEf12GHIj/1234567890",
        "recordingState": "ACTIVE",
        "replicationState": "ACTIVE",
        "replicationType": "SOURCE",
        "sdkVersion": "",
        "state": "CONNECTED",
        "userId": ""
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
**例 3: 別のステージからレプリケートされたステージ参加者を取得するには**  
次の `get-participant` の例では、参加者が別のステージから複製されている場合に、指定されたステージ ARN (Amazon リソースネーム) で、指定された参加者 ID とセッション ID のステージ参加者を取得します。  

```
aws ivs-realtime get-participant \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g \
    --participant-id abCDEf12GHIj
```
出力:  

```
{
    "participant": {
        "browserName": "Google Chrome",
        "browserVersion": "116",
        "firstJoinTime": "2023-04-26T20:30:34+00:00",
        "ispName": "Comcast",
        "osName": "Microsoft Windows 10 Pro",
        "osVersion": "10.0.19044",
        "participantId": "abCDEf12GHIj",
        "published": true,
        "recordingS3BucketName": "bucket-name",
        "recordingS3Prefix": "abcdABCDefgh/st-a1b2c3d4e5f6g/abCDEf12GHIj/1234567890",
        "recordingState": "ACTIVE",
        "replicationState": "ACTIVE",
        "replicationType": "REPLICA",
        "sdkVersion": "",
        "state": "CONNECTED",
        "userId": ""
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetParticipant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/get-participant.html)」を参照してください。

### `get-public-key`
<a name="ivs-realtime_GetPublicKey_cli_topic"></a>

次のコード例は、`get-public-key` を使用する方法を示しています。

**AWS CLI**  
**ステージ参加者トークンの署名に使用される既存のパブリックキーを取得するには**  
次の `get-public-key` の例では、ステージ参加者トークンの署名用に、指定の ARN で指定されたパブリックキーを取得します。  

```
aws ivs-realtime get-public-key \
    --arn arn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2
```
出力:  

```
{
    "publicKey": {
        "arn": "arn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2",
        "name": "",
        "publicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqVWUtqs6EktQMR1sCYmEzGvRwtaycI16\n9pmzcpiWu/uhNStGlteJ5odRfRwVkoQUMnSZXTCcbn9bBTTmiWo4mJcFOOAzsthH\n0UAb8NdD4tUE0At4a9hYP9IETEXAMPLE\n-----END PUBLIC KEY-----",
        "fingerprint": "12:a3:44:56:bc:7d:e8:9f:10:2g:34:hi:56:78:90:12",
        "tags": {}
    }
}
```
詳細については、「*Amazon IVS Real-Time Streaming ユーザーガイド*」の「[参加者トークンを配布する](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/getting-started-distribute-tokens.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetPublicKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/get-public-key.html)」を参照してください。

### `get-stage-session`
<a name="ivs-realtime_GetStageSession_cli_topic"></a>

次のコード例は、`get-stage-session` を使用する方法を示しています。

**AWS CLI**  
**ステージセッションを取得するには**  
次の `get-stage-session` の例では、指定されたステージ ARN (Amazon リソースネーム) の指定されたセッション ID に対するステージセッションを取得します。  

```
aws ivs-realtime get-stage-session \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g
```
出力:  

```
{
    "stageSession": {
        "endTime": "2023-04-26T20:36:29+00:00",
        "sessionId": "st-a1b2c3d4e5f6g",
        "startTime": "2023-04-26T20:30:29.602000+00:00"
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/userguide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetStageSession](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/get-stage-session.html)」を参照してください。

### `get-stage`
<a name="ivs-realtime_GetStage_cli_topic"></a>

次のコード例は、`get-stage` を使用する方法を示しています。

**AWS CLI**  
**ステージの設定情報を取得するには**  
次の `get-stage` の例では、指定されたステージ ARN (Amazon リソースネーム) のステージ設定を取得します。  

```
aws ivs-realtime get-stage \
    --arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh
```
出力:  

```
{
    "stage": {
        "activeSessionId": "st-a1b2c3d4e5f6g",
        "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
        "autoParticipantRecordingConfiguration": {
            "storageConfigurationArn": "",
            "mediaTypes": [
                "AUDIO_VIDEO"
            ],
            "thumbnailConfiguration": {
                "targetIntervalSeconds": 60,
                "storage": [
                    "SEQUENTIAL"
                ],
                "recordingMode": "DISABLED"
            },
            "recordingReconnectWindowSeconds": 0,
            "hlsConfiguration": {
                "targetSegmentDurationSeconds": 6
            },
            "recordParticipantReplicas": true
        },
        "endpoints": {
            "events": "wss://global.events.live-video.net",
            "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/",
            "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/",
            "whip": "https://9x0y8z7s6t5u.global-bm.whip.live-video.net"
        },
        "name": "test",
        "tags": {}
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/get-stage.html)」を参照してください。

### `get-storage-configuration`
<a name="ivs-realtime_GetStorageConfiguration_cli_topic"></a>

次のコード例は、`get-storage-configuration` を使用する方法を示しています。

**AWS CLI**  
**コンポジションストレージ設定を取得するには**  
次の `get-storage-configuration` の例では、指定の ARN (Amazon リソースネーム) で指定されたコンポジションストレージ設定を取得します。  

```
aws ivs-realtime get-storage-configuration \
    --name arn "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/abcdABCDefgh"
```
出力:  

```
{
    "storageConfiguration": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/abcdABCDefgh",
        "name": "test-sc",
        "s3": {
            "bucketName": "amzn-s3-demo-bucket"
        },
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetStorageConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/get-storage-configuration.html)」を参照してください。

### `import-public-key`
<a name="ivs-realtime_ImportPublicKey_cli_topic"></a>

次のコード例は、`import-public-key` を使用する方法を示しています。

**AWS CLI**  
**ステージ参加者トークンの署名に使用される既存のパブリックキーをインポートするには**  
次の `import-public-key` の例では、ステージ参加者トークンの署名に使用されるパブリックキーをマテリアルファイルからインポートします。  

```
aws ivs-realtime import-public-key \
    --public-key-material="`cat public.pem`"
```
出力:  

```
{
    "publicKey": {
        "arn": "arn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2",
        "name": "",
        "publicKeyMaterial": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEqVWUtqs6EktQMR1sCYmEzGvRwtaycI16\n9pmzcpiWu/uhNStGlteJ5odRfRwVkoQUMnSZXTCcbn9bBTTmiWo4mJcFOOAzsthH\n0UAb8NdD4tUE0At4a9hYP9IETEXAMPLE\n-----END PUBLIC KEY-----",
        "fingerprint": "12:a3:44:56:bc:7d:e8:9f:10:2g:34:hi:56:78:90:12",
        "tags": {}
    }
}
```
詳細については、「*Amazon IVS Real-Time Streaming ユーザーガイド*」の「[参加者トークンを配布する](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/getting-started-distribute-tokens.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ImportPublicKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/import-public-key.html)」を参照してください。

### `list-compositions`
<a name="ivs-realtime_ListCompositions_cli_topic"></a>

次のコード例は、`list-compositions` を使用する方法を示しています。

**AWS CLI**  
**コンポジションのリストを取得するには**  
次の `list-compositions` は、API リクエストが処理される AWS リージョンにおける AWS アカウントのすべてのコンポジションを一覧表示します。  

```
aws ivs-realtime list-compositions
```
出力:  

```
{
    "compositions": [
        {
            "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh",
            "destinations": [
                {
                    "id": "AabBCcdDEefF",
                    "startTime": "2023-10-16T23:25:23+00:00",
                    "state": "ACTIVE"
                }
            ],
            "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd",
            "startTime": "2023-10-16T23:25:21+00:00",
            "state": "ACTIVE",
            "tags": {}
        },
        {
            "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/ABcdabCDefgh",
            "destinations": [
                {
                    "endTime": "2023-10-16T23:25:00.786512+00:00",
                    "id": "aABbcCDdeEFf",
                    "startTime": "2023-10-16T23:24:01+00:00",
                    "state": "STOPPED"
                },
                {
                    "endTime": "2023-10-16T23:25:00.786512+00:00",
                    "id": "deEFfaABbcCD",
                    "startTime": "2023-10-16T23:24:01+00:00",
                    "state": "STOPPED"
                }
            ],
            "endTime": "2023-10-16T23:25:00+00:00",
            "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/efghabcdABCD",
            "startTime": "2023-10-16T23:24:00+00:00",
            "state": "STOPPED",
            "tags": {}
        }
    ]
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListCompositions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-compositions.html)」を参照してください。

### `list-encoder-configurations`
<a name="ivs-realtime_ListEncoderConfigurations_cli_topic"></a>

次のコード例は、`list-encoder-configurations` を使用する方法を示しています。

**AWS CLI**  
**コンポジションエンコーダー設定を一覧表示するには**  
次の `list-encoder-configurations` は、API リクエストが処理される AWS リージョンにおける AWS アカウントのすべてのコンポジションエンコーダー設定を一覧表示します。  

```
aws ivs-realtime list-encoder-configurations
```
出力:  

```
{
    "encoderConfigurations": [
        {
            "arn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/abcdABCDefgh",
            "name": "test-ec-1",
            "tags": {}
        },
        {
            "arn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABCefgEFGabc",
            "name": "test-ec-2",
            "tags": {}
        }
    ]
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListEncoderConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-encoder-configurations.html)」を参照してください。

### `list-ingest-configurations`
<a name="ivs-realtime_ListIngestConfigurations_cli_topic"></a>

次のコード例は、`list-ingest-configurations` を使用する方法を示しています。

**AWS CLI**  
**すべての取り込み設定に関する概要情報を取得するには**  
次の `list-ingest-configurations` の例では、API リクエストが処理される AWS リージョン内の AWS アカウントのすべての取り込み設定を一覧表示します。  

```
aws ivs-realtime list-ingest-configurations
```
出力:  

```
{
    "ingestConfigurations": [
        {
            "name": "",
            "arn": "arn:aws:ivs:us-west-2:123456789012:ingest-configuration/XYZuvwSt4567",
            "ingestProtocol": "RTMPS",
            "stageArn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
            "participnatId": "abC789Xyz456",
            "state": "INACTIVE"
            "userId": "",
        }
    ]
}
```
詳細については、*Amazon Interactive Video Service ユーザーガイド*の「[IVS ストリーム取り込み \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html)」を参照してください。  
+  API の詳細については、*AWS CLI コマンドリファレンス*の「[ListIngestConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-ingest-configurations.html)」を参照してください。

### `list-participant-events`
<a name="ivs-realtime_ListParticipantEvents_cli_topic"></a>

次のコード例は、`list-participant-events` を使用する方法を示しています。

**AWS CLI**  
**例 1: ステージ参加者イベントのリストを取得するには**  
次の `list-participant-events` の例では、指定されたステージ ARN (Amazon リソースネーム) の指定された参加者 ID とセッション ID に対するすべての参加者イベントを一覧表示します。  

```
aws ivs-realtime list-participant-events \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g \
    --participant-id abCDEf12GHIj
```
出力:  

```
{
    "events": [
        {
            "eventTime": "2023-04-26T20:36:28+00:00",
            "name": "LEFT",
            "participantId": "abCDEf12GHIj"
        },
        {
            "eventTime": "2023-04-26T20:36:28+00:00",
            "name": "PUBLISH_STOPPED",
            "participantId": "abCDEf12GHIj"
        },
        {
            "eventTime": "2023-04-26T20:30:34+00:00",
            "name": "JOINED",
            "participantId": "abCDEf12GHIj"
        },
        {
            "eventTime": "2023-04-26T20:30:34+00:00",
            "name": "PUBLISH_STARTED",
            "participantId": "abCDEf12GHIj"
        }
    ]
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
**例 2: 参加者のレプリケーションの停止と開始を含むステージ参加者のイベントのリストを取得するには**  
次の `list-participant-events` の例では、参加者が別のステージにレプリケートされている、指定されたステージ ARN (Amazon リソースネーム) の指定された参加者 ID とセッション ID に対するすべての参加者イベントを一覧表示します。  

```
aws ivs-realtime list-participant-events \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g \
    --participant-id abCDEf12GHIj
```
出力:  

```
{
    "events": [
        {
            "eventTime": "2025-04-26T20:36:28+00:00",
            "name": "LEFT",
            "participantId": "abCDEf12GHIj"
        },
        {
            "eventTime": "2025-04-26T20:36:28+00:00",
            "name": "PUBLISH_STOPPED",
            "participantId": "abCDEf12GHIj"
        },
        {
            "eventTime": "2025-04-26T20:30:34+00:00",
            "name": "JOINED",
            "participantId": "abCDEf12GHIj"
        },
        {
            "eventTime": "2025-04-26T20:30:34+00:00",
            "name": "PUBLISH_STARTED",
            "participantId": "abCDEf12GHIj"
        },
        {
            "name": "REPLICATION_STARTED",
            "participantId": "abCDEf12GHIj",
            "eventTime": "2025-04-26T20:30:34+00:00",
            "destinationStageArn": "arn:aws:ivs:us-west-2:12345678901:stage/ABCDabcdefgh",
            "destinationSessionId": "st-b1c2d3e4f5g6a"
        },
        {
            "name": "REPLICATION_STOPPED",
            "participantId": "abCDEf12GHIj",
            "eventTime": "2025-04-26T20:32:34+00:00",
            "destinationStageArn": "arn:aws:ivs:us-west-2:12345678901:stage/ABCDabcdefgh",
            "destinationSessionId": "st-b1c2d3e4f5g6a"
        }
    ]
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListParticipantEvents](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-participant-events.html)」を参照してください。

### `list-participant-replicas`
<a name="ivs-realtime_ListParticipantReplicas_cli_topic"></a>

次のコード例は、`list-participant-replicas` を使用する方法を示しています。

**AWS CLI**  
**ステージ参加者のレプリカのリストを取得するには**  
次の `list-participant-replicas` の例では、指定されたソースステージ ARN (Amazon リソースネーム) から別のステージにレプリケートされたすべてのステージ参加者を一覧表示します。  

```
aws ivs-realtime list-participant-replicas \
    --source-stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --participant-id abCDEf12GHIj
```
出力:  

```
{
    "replicas": [
        {
            "sourceStageArn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
            "participantId": "abCDEf12GHIj",
            "sourceSessionId": "st-a1b2c3d4e5f6g",
            "destinationStageArn": "arn:aws:ivs:us-west-2:012345678901:stage/ABCDabcdefgh",
            "destinationSessionId": "st-b1c2d3e4f5g6a",
            "replicationState": "ACTIVE"
        }
    ]
}
```
詳細については、「*Amazon IVS Real-Time Streaming ユーザーガイド*」の「[IVS 参加者のレプリケーション](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-participant-replication.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListParticipantReplicas](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-participant-replicas.html)」を参照してください。

### `list-participants`
<a name="ivs-realtime_ListParticipants_cli_topic"></a>

次のコード例は、`list-participants` を使用する方法を示しています。

**AWS CLI**  
**例 1: ステージ参加者のリストを取得するには**  
次の `list-participants` の例では、指定されたステージ ARN (Amazon リソースネーム) の指定されたセッション ID に対するすべての参加者を一覧表示します。  

```
aws ivs-realtime list-participants \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g
```
出力:  

```
{
    "participants": [
        {
            "firstJoinTime": "2023-04-26T20:30:34+00:00",
            "participantId": "abCDEf12GHIj",
            "published": true,
            "recordingState": "STOPPED",
            "state": "DISCONNECTED",
            "userId": ""
        }
    ]
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
**例 2: 参加者が別のステージにレプリケートされたときにステージ参加者のリストを取得するには**  
次の `list-participants` の例では、参加者が別のステージにレプリケートされている場合に、指定されたステージ ARN (Amazon リソースネーム) の指定されたセッション ID のすべての参加者を一覧表示します。  

```
aws ivs-realtime list-participants \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g
```
出力:  

```
{
    "participants": [
        {
            "firstJoinTime": "2023-04-26T20:30:34+00:00",
            "participantId": "abCDEf12GHIj",
            "published": true,
            "recordingState": "STOPPED",
            "state": "DISCONNECTED",
            "userId": "",
            "replicationState": "ACTIVE",
            "replicationType": "SOURCE",
            "sourceStageArn": "",
            "sourceSessionId": ""
        }
    ]
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
**例 3: 参加者が別のステージからレプリケートされた場合にステージ参加者のリストを取得するには**  
次の `list-participants` の例では、参加者が別のステージからレプリケートされている場合に、指定されたステージ ARN (Amazon リソースネーム) の指定されたセッション ID のすべての参加者を一覧表示します。  

```
aws ivs-realtime list-participants \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --session-id st-a1b2c3d4e5f6g
```
出力:  

```
{
    "participants": [
        {
            "firstJoinTime": "2023-04-26T20:30:34+00:00",
            "participantId": "abCDEf12GHIj",
            "published": true,
            "recordingState": "STOPPED",
            "state": "DISCONNECTED",
            "userId": "",
            "replicationState": "ACTIVE",
            "replicationType": "REPLICA",
            "sourceStageArn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
            "sourceSessionId": "st-a1b2c3d4e5f6g"
        }
    ]
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListParticipants](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-participants.html)」を参照してください。

### `list-public-keys`
<a name="ivs-realtime_ListPublicKeys_cli_topic"></a>

次のコード例は、`list-public-keys` を使用する方法を示しています。

**AWS CLI**  
**ステージ参加者トークンの署名に使用できる既存のパブリックキーを一覧表示するには**  
次の `list-public-keys` の例では、API リクエストが処理される AWS リージョンで、ステージ参加者トークンの署名に使用できるすべてのパブリックキーを一覧表示します。  

```
aws ivs-realtime list-public-keys
```
出力:  

```
{
    "publicKeys": [
        {
            "arn": "arn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2",
            "name": "",
            "tags": {}
        },
        {
            "arn": "arn:aws:ivs:us-west-2:123456789012:public-key/3bcdABCDefg4",
            "name": "",
            "tags": {}
        }
    ]
}
```
詳細については、「*Amazon IVS Real-Time Streaming ユーザーガイド*」の「[参加者トークンを配布する](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/getting-started-distribute-tokens.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListPublicKeys](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-public-keys.html)」を参照してください。

### `list-stage-sessions`
<a name="ivs-realtime_ListStageSessions_cli_topic"></a>

次のコード例は、`list-stage-sessions` を使用する方法を示しています。

**AWS CLI**  
**ステージセッションのリストを取得するには**  
次の `list-stage-sessions` の例では、指定されたステージ ARN (Amazon リソースネーム) のすべてのセッションを一覧表示します。  

```
aws ivs-realtime list-stage-sessions \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh
```
出力:  

```
{
    "stageSessions": [
        {
            "endTime": "2023-04-26T20:36:29+00:00",
            "sessionId": "st-a1b2c3d4e5f6g",
            "startTime": "2023-04-26T20:30:29.602000+00:00"
        }
    ]
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/userguide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListStageSessions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-stage-sessions.html)」を参照してください。

### `list-stages`
<a name="ivs-realtime_ListStages_cli_topic"></a>

次のコード例は、`list-stages` を使用する方法を示しています。

**AWS CLI**  
**すべてのステージに関する概要情報を取得するには**  
次の `list-stages` の例では、API リクエストが処理される AWS リージョンにおける AWS アカウントのすべてのステージを一覧表示します。  

```
aws ivs-realtime list-stages
```
出力:  

```
{
    "stages": [
        {
            "activeSessionId": "st-a1b2c3d4e5f6g",
            "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
            "name": "stage1",
            "tags": {}
        },
        {
            "activeSessionId": "st-a123bcd456efg",
            "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcd1234ABCD",
            "name": "stage2",
            "tags": {}
        },
        {
            "activeSessionId": "st-abcDEF1234ghi",
            "arn": "arn:aws:ivs:us-west-2:123456789012:stage/ABCD1234efgh",
            "name": "stage3",
            "tags": {}
        }
    ]
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListStages](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-stages.html)」を参照してください。

### `list-storage-configurations`
<a name="ivs-realtime_ListStorageConfigurations_cli_topic"></a>

次のコード例は、`list-storage-configurations` を使用する方法を示しています。

**AWS CLI**  
**コンポジションストレージ設定を一覧表示するには**  
次の `list-storage-configurations` は、API リクエストが処理される AWS リージョンにおける AWS アカウントのすべてのコンポジションストレージ設定を一覧表示します。  

```
aws ivs-realtime list-storage-configurations
```
出力:  

```
{
    "storageConfigurations": [
        {
            "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/abcdABCDefgh",
            "name": "test-sc-1",
            "s3": {
                "bucketName": "amzn-s3-demo-bucket-1"
            },
            "tags": {}
        },
        {
            "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/ABCefgEFGabc",
            "name": "test-sc-2",
            "s3": {
                "bucketName": "amzn-s3-demo-bucket-2"
            },
            "tags": {}
        }
    ]
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ListStorageConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/list-storage-configurations.html)」を参照してください。

### `start-composition`
<a name="ivs-realtime_StartComposition_cli_topic"></a>

次のコード例は、`start-composition` を使用する方法を示しています。

**AWS CLI**  
**例 1: デフォルトのレイアウト設定でコンポジションを開始するには**  
次の `start-composition` の例では、指定された場所にストリーミングされるコンポジションを指定されたステージに対して開始します。  

```
aws ivs-realtime start-composition \
    --stage-arn arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd \
    --destinations '[{"channel": {"channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", \
        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"}}, \
        {"s3":{"encoderConfigurationArns":["arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"], \
        "recordingConfiguration": {"hlsConfiguration": {"targetSegmentDurationSeconds": 5}}, \
        "storageConfigurationArn":"arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE"}}]'
```
出力:  

```
{
    "composition": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh",
        "destinations": [
            {
                "configuration": {
                    "channel": {
                        "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg",
                        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                    },
                    "name": ""
                },
                "id": "AabBCcdDEefF",
                "state": "STARTING"
            },
            {
                "configuration": {
                    "name": "",
                    "s3": {
                        "encoderConfigurationArns": [
                            "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                        ],
                        "recordingConfiguration": {
                            "format": "HLS",
                            "hlsConfiguration": {
                                "targetSegmentDurationSeconds": 5
                            }
                        },
                        "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE"
                    }
                },
                "detail": {
                    "s3": {
                        "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite"
                    }
                },
                "id": "GHFabcgefABC",
                "state": "STARTING"
            }
        ],
        "layout": {
            "grid": {
                "featuredParticipantAttribute": ""
                "gridGap": 2,
                "omitStoppedVideo": false,
                "participantOrderAttribute": "",
                "videoAspectRatio": "VIDEO",
                "videoFillMode": ""
            }
        },
        "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd",
        "startTime": "2023-10-16T23:24:00+00:00",
        "state": "STARTING",
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[IVS Composite Recording \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-composite-recording.html)」を参照してください。  
**例 2: PiP レイアウトのコンポジションを開始するには**  
次の `start-composition` の例では、PiP レイアウトを使用して、指定された場所にストリーミングされるコンポジションを指定されたステージに対して開始します。  

```
aws ivs-realtime start-composition \
    --stage-arn arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd \
    --destinations '[{"channel": {"channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", \
        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"}}, \
        {"s3":{"encoderConfigurationArns":["arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"], \
        "storageConfigurationArn":"arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE"}}]' \
    --layout pip='{featuredParticipantAttribute="abcdefg"}'
```
出力:  

```
{
    "composition": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/wxyzWXYZpqrs",
        "destinations": [
            {
                "configuration": {
                    "channel": {
                        "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg",
                        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                    },
                    "name": ""
                },
                "id": "AabBCcdDEefF",
                "state": "STARTING"
            },
            {
                "configuration": {
                    "name": "",
                    "s3": {
                        "encoderConfigurationArns": [
                            "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                        ],
                        "recordingConfiguration": {
                            "format": "HLS",
                            "hlsConfiguration": {
                                "targetSegmentDurationSeconds": 2
                            }
                        },
                        "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE"
                    }
                },
                "detail": {
                    "s3": {
                        "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite"
                    }
                },
                "id": "GHFabcgefABC",
                "state": "STARTING"
            }
        ],
        "layout": {
            "pip": {
                "featuredParticipantAttribute": "abcdefg",
                "gridGap": 0,
                "omitStoppedVideo": false,
                "participantOrderAttribute": "",
                "pipBehavior": "STATIC",
                "pipOffset": 0,
                "pipParticipantAttribute": "",
                "pipPosition": "BOTTOM_RIGHT",
                "videoFillMode": "COVER"
            }
        },
        "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd",
        "startTime": "2023-10-16T23:24:00+00:00",
        "state": "STARTING",
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[IVS Composite Recording \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-composite-recording.html)」を参照してください。  
**例 3: サムネイルの記録が有効になっているコンポジションを開始するには**  
次の `start-composition` の例では、サムネイルの記録が有効になっており、指定された場所にストリーミングされるコンポジションを、指定されたステージに対して開始します。  

```
aws ivs-realtime start-composition \
    --stage-arn arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd \
    --destinations '[{"channel": {"channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", \
        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"}}, \
        {"s3": {"encoderConfigurationArns": ["arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"], \
        "storageConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE", \
        "thumbnailConfigurations": [{"storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}]}}]'
```
出力:  

```
{
    "composition": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh",
        "destinations": [
            {
                "configuration": {
                    "channel": {
                        "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg",
                        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                    },
                    "name": ""
                },
                "id": "AabBCcdDEefF",
                "state": "STARTING"
            },
            {
                "configuration": {
                    "name": "",
                    "s3": {
                        "encoderConfigurationArns": [
                            "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                        ],
                        "recordingConfiguration": {
                            "format": "HLS",
                            "hlsConfiguration": {
                                "targetSegmentDurationSeconds": 2
                            }
                        },
                        "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE",
                        "thumbnailConfigurations": [
                           {
                              "targetIntervalSeconds": 60,
                              "storage": [
                                  "SEQUENTIAL"
                              ]
                           }
                        ]
                    }
                },
                "detail": {
                    "s3": {
                        "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite"
                    }
                },
                "id": "GHFabcgefABC",
                "state": "STARTING"
            }
        ],
        "layout": {
            "grid": {
                "featuredParticipantAttribute": ""
                "gridGap": 2,
                "omitStoppedVideo": false,
                "participantOrderAttribute": "",
                "videoAspectRatio": "VIDEO",
                "videoFillMode": ""
            }
        },
        "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd",
        "startTime": "2023-10-16T23:24:00+00:00",
        "state": "STARTING",
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Composite Recording (リアルタイムストリーミング)](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-composite-recording.html)」を参照してください。  
**例 4: カスタム参加者の順序でグリッドレイアウトを使用してコンポジションを開始するには**  
次の `start-composition` の例では、カスタム参加者の順序でグリッドレイアウトを使用して、指定された場所にストリーミングされるコンポジションを指定されたステージに対して開始します。  

```
aws ivs-realtime start-composition \
    --stage-arn arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd \
    --destinations '[{"channel": {"channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg", \
        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"}}, \
        {"s3": {"encoderConfigurationArns": ["arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"], \
        "storageConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE", \
        "thumbnailConfigurations": [{"storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}]}}]' \
    --layout grid='{participantOrderAttribute="abcdefg"}'
```
出力:  

```
{
    "composition": {
        "arn": "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh",
        "destinations": [
            {
                "configuration": {
                    "channel": {
                        "channelArn": "arn:aws:ivs:ap-northeast-1:123456789012:channel/abcABCdefDEg",
                        "encoderConfigurationArn": "arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                    },
                    "name": ""
                },
                "id": "AabBCcdDEefF",
                "state": "STARTING"
            },
            {
                "configuration": {
                    "name": "",
                    "s3": {
                        "encoderConfigurationArns": [
                            "arn:aws:ivs:arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"
                        ],
                        "recordingConfiguration": {
                            "format": "HLS",
                            "hlsConfiguration": {
                                "targetSegmentDurationSeconds": 2
                            }
                        },
                        "storageConfigurationArn": "arn:arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/FefABabCDcdE",
                        "thumbnailConfigurations": [
                           {
                              "targetIntervalSeconds": 60,
                              "storage": [
                                  "SEQUENTIAL"
                              ]
                           }
                        ]
                    }
                },
                "detail": {
                    "s3": {
                        "recordingPrefix": "aBcDeFgHhGfE/AbCdEfGhHgFe/GHFabcgefABC/composite"
                    }
                },
                "id": "GHFabcgefABC",
                "state": "STARTING"
            }
        ],
        "layout": {
            "grid": {
                "featuredParticipantAttribute": ""
                "gridGap": 2,
                "omitStoppedVideo": false,
                "participantOrderAttribute": "abcdefg",
                "videoAspectRatio": "VIDEO",
                "videoFillMode": ""
            }
        },
        "stageArn": "arn:aws:ivs:ap-northeast-1:123456789012:stage/defgABCDabcd",
        "startTime": "2023-10-16T23:24:00+00:00",
        "state": "STARTING",
        "tags": {}
    }
}
```
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[IVS Composite Recording \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-composite-recording.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[StartComposition](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/start-composition.html)」を参照してください。

### `start-participant-replication`
<a name="ivs-realtime_StartParticipantReplication_cli_topic"></a>

次のコード例は、`start-participant-replication` を使用する方法を示しています。

**AWS CLI**  
**あるステージから別のステージへの参加者のレプリケートを開始するには**  
次の `start-participant-replication` の例では、参加者をソースステージから宛先ステージにレプリケートし、各ステージを ARN (Amazon リソースネーム) で指定します。  

```
aws ivs-realtime start-participant-replication \
    --source-stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --destination-stage-arn arn:aws:ivs:us-west-2:234567890123:stage/bcdABCDefghi \
    --participant-id abCDEf12GHIj
```
出力:  

```
{
    "accessControlAllowOrigin": "*",
    "accessControlExposeHeaders": "Access-Control-Allow-Origin,Access-Control-Expose-Headers,Cache-Control,Content-Length, \
    Content-Security-Policy,Content-Type,date,Strict-Transport-Security,x-amz-apigw-id,x-amzn-errormessage,x-amzn-errortype, \
    x-amzn-requestid,x-amzn-trace-id,X-Content-Type-Options,X-Frame-Options",
    "cacheControl": "no-store, no-cache",
    "contentSecurityPolicy": "default-src 'self'; upgrade-insecure-requests;",
    "strictTransportSecurity": "max-age:47304000; includeSubDomains",
    "xContentTypeOptions": "nosniff",
    "xFrameOptions": "DENY"
}
```
詳細については、「*Amazon IVS Real-Time Streaming ユーザーガイド*」の「[IVS 参加者のレプリケーション](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-participant-replication.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[StartParticipantReplication](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/start-participant-replication.html)」を参照してください。

### `stop-composition`
<a name="ivs-realtime_StopComposition_cli_topic"></a>

次のコード例は、`stop-composition` を使用する方法を示しています。

**AWS CLI**  
**コンポジションを停止するには**  
次の `stop-composition` は、指定の ARN (Amazon リソースネーム) で指定されたコンポジションを停止します。  

```
aws ivs-realtime stop-composition \
    --arn "arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"
```
このコマンドは何も出力しません。  
詳細については、「*Amazon Interactive Video Service ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[StopComposition](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/stop-composition.html)」を参照してください。

### `stop-participant-replication`
<a name="ivs-realtime_StopParticipantReplication_cli_topic"></a>

次のコード例は、`stop-participant-replication` を使用する方法を示しています。

**AWS CLI**  
**あるステージから別のステージへの参加者のレプリケートを停止するには**  
次の `stop-participant-replication` の例では、ARN (Amazon リソースネーム) で指定された各ステージを使用して、送信元ステージから送信先ステージへの参加者のレプリケートを停止します。  

```
aws ivs-realtime stop-participant-replication \
    --source-stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --destination-stage-arn arn:aws:ivs:us-west-2:234567890123:stage/bcdABCDefghi \
    --participant-id abCDEf12GHIj
```
出力:  

```
{
    "accessControlAllowOrigin": "*",
    "accessControlExposeHeaders": "Access-Control-Allow-Origin,Access-Control-Expose-Headers,Cache-Control,Content-Length, \
    Content-Security-Policy,Content-Type,date,Strict-Transport-Security,x-amz-apigw-id,x-amzn-errormessage,x-amzn-errortype, \
    x-amzn-requestid,x-amzn-trace-id,X-Content-Type-Options,X-Frame-Options",
    "cacheControl": "no-store, no-cache",
    "contentSecurityPolicy": "default-src 'self'; upgrade-insecure-requests;",
    "strictTransportSecurity": "max-age:47304000; includeSubDomains",
    "xContentTypeOptions": "nosniff",
    "xFrameOptions": "DENY"
}
```
詳細については、「*Amazon IVS Real-Time Streaming ユーザーガイド*」の「[IVS 参加者のレプリケーション](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-participant-replication.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[StopParticipantReplication](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/stop-participant-replication.html)」を参照してください。

### `update-ingest-configuration`
<a name="ivs-realtime_UpdateIngestConfiguration_cli_topic"></a>

次のコード例は、`update-ingest-configuration` を使用する方法を示しています。

**AWS CLI**  
**取り込み設定を更新するには**  
次の `update-inegst-configuration` の例では、取り込み設定を更新してステージにアタッチします。  

```
aws ivs-realtime update-ingest-configuration \
    --arn arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234 \
    --stage-arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh
```
出力:  

```
{
    "ingestConfiguration": {
        "name": "ingest1",
        "arn": "arn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234",
        "ingestProtocol": "RTMPS",
        "streamKey": "rt_123456789012_us-west-2_AbCdEfGh1234_abcd1234efgh5678ijkl9012MNOP34",
        "stageArn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
        "participantId": "xyZ654abC321",
        "state": "INACTIVE",
        "userId": "",
        "tags": {}
    }
}
```
詳細については、*Amazon Interactive Video Service ユーザーガイド*の「[IVS ストリーム取り込み \$1 リアルタイムストリーミング](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html)」を参照してください。  
+  API の詳細については、*AWS CLI コマンドリファレンス*の「[UpdateIngestConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/update-ingest-configuration.html)」を参照してください。

### `update-stage`
<a name="ivs-realtime_UpdateStage_cli_topic"></a>

次のコード例は、`update-stage` を使用する方法を示しています。

**AWS CLI**  
**例 1: ステージの設定を更新するには**  
次の `update-stage` の例では、指定されたステージ ARN のステージを更新して、ステージ名を更新し、サムネイルの記録が有効になっている個々の参加者の録画を設定します。  

```
aws ivs-realtime update-stage \
    --arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "recordingReconnectWindowSeconds": 100, \
        "thumbnailConfiguration": {"recordingMode": "INTERVAL","storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}} \
        "hlsConfiguration": {"targetSegmentDurationSeconds": 5}}' \
    --name stage1a
```
出力:  

```
{
    "stage": {
        "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
        "autoParticipantRecordingConfiguration": {
            "mediaTypes": [
                "AUDIO_VIDEO"
            ],
            "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh",
            "thumbnailConfiguration": {
                "targetIntervalSeconds": 60,
                "storage": [
                    "SEQUENTIAL"
                ],
                "recordingMode": "INTERVAL"
            },
            "recordingReconnectWindowSeconds": 100,
            "hlsConfiguration": {
                "targetSegmentDurationSeconds": 5
            },
            "recordParticipantReplicas": true
        },
        "endpoints": {
            "events": "wss://global.events.live-video.net",
            "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/",
            "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/",
            "whip": "https://1a2b3c4d5e6f.global-bm.whip.live-video.net"
        },
        "name": "stage1a",
        "tags": {}
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
**例 2: 参加者のレプリカ記録の無効化を含むステージの設定を更新するには**  
次の `update-stage` の例では、指定されたステージ ARN のステージを更新してステージ名を更新し、個々の参加者の記録を、サムネイルの記録を有効にし、参加者のレプリカ記録を無効にして設定します。  

```
aws ivs-realtime update-stage \
    --arn arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh \
    --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "recordingReconnectWindowSeconds": 100, \
        "thumbnailConfiguration": {"recordingMode": "INTERVAL","storage": ["SEQUENTIAL"],"targetIntervalSeconds": 60}, "recordParticipantReplicas":false} \
        "hlsConfiguration": {"targetSegmentDurationSeconds": 5}}' \
    --name stage1a
```
出力:  

```
{
    "stage": {
        "arn": "arn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh",
        "autoParticipantRecordingConfiguration": {
            "mediaTypes": [
                "AUDIO_VIDEO"
            ],
            "storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh",
            "thumbnailConfiguration": {
                "targetIntervalSeconds": 60,
                "storage": [
                    "SEQUENTIAL"
                ],
                "recordingMode": "INTERVAL"
            },
            "recordingReconnectWindowSeconds": 100,
            "hlsConfiguration": {
                "targetSegmentDurationSeconds": 5
            },
            "recordParticipantReplicas": false
        },
        "endpoints": {
            "events": "wss://global.events.live-video.net",
            "rtmp": "rtmp://9x0y8z7s6t5u.global-contribute-staging.live-video.net/app/",
            "rtmps": "rtmps://9x0y8z7s6t5u.global-contribute-staging.live-video.net:443/app/",
            "whip": "https://1a2b3c4d5e6f.global-bm.whip.live-video.net"
        },
        "name": "stage1a",
        "tags": {}
    }
}
```
詳細については、「*Amazon IVS Low-Latency Streaming ユーザーガイド*」の「[Amazon IVS ストリームで複数ホストを有効にする](https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[UpdateStage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ivs-realtime/update-stage.html)」を参照してください。