Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.
Contoh Real-Time Streaming Amazon IVS menggunakan AWS CLI
Contoh kode berikut menunjukkan cara melakukan tindakan dan menerapkan skenario umum dengan menggunakan AWS Command Line Interface dengan Amazon IVS Real-Time Streaming.
Tindakan merupakan kutipan kode dari program yang lebih besar dan harus dijalankan dalam konteks. Sementara tindakan menunjukkan cara memanggil fungsi layanan individual, Anda dapat melihat tindakan dalam konteks dalam skenario terkait.
Setiap contoh menyertakan tautan ke kode sumber lengkap, di mana Anda dapat menemukan instruksi tentang cara mengatur dan menjalankan kode dalam konteks.
Topik
Tindakan
Contoh kode berikut menunjukkan cara menggunakancreate-encoder-configuration.
- AWS CLI
-
Untuk membuat konfigurasi encoder komposisi
create-encoder-configurationContoh berikut membuat konfigurasi encoder komposisi dengan properti yang ditentukan.aws ivs-realtime create-encoder-configuration \ --nametest-ec--videobitrate=3500000,framerate=30.0,height=1080,width=1920Output:
{ "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 } } }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat CreateEncoderConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-ingest-configuration.
- AWS CLI
-
Untuk membuat konfigurasi ingest
create-ingest-configurationContoh berikut membuat konfigurasi ingest menggunakan protokol RTMPS.aws ivs-realtime create-ingest-configuration \ --nameingest1\ --ingest-protocolrtmpsOutput:
{ "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": {} } }Untuk informasi selengkapnya, lihat IVS Stream Ingest | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat CreateIngestConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-participant-token.
- AWS CLI
-
Untuk membuat token peserta panggung
create-participant-tokenContoh berikut membuat toke peserta untuk tahap yang ditentukan.aws ivs-realtime create-participant-token \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --user-idbobOutput:
{ "participantToken": { "expirationTime": "2023-03-07T09:47:43+00:00", "participantId": "ABCDEfghij01234KLMN6789", "token": "abcd1234defg5678" } }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat CreateParticipantToken
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-stage.
- AWS CLI
-
Contoh 1: Untuk membuat panggung
create-stageContoh berikut membuat token peserta panggung dan panggung untuk pengguna tertentu.aws ivs-realtime create-stage \ --namestage1\ --participant-token-configurationsuserId=aliceOutput:
{ "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": {} } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
Contoh 2: Untuk membuat panggung dan mengonfigurasi rekaman peserta individual
create-stageContoh berikut membuat panggung dan mengonfigurasi rekaman peserta individu.aws ivs-realtime create-stage \ --namestage1\ --auto-participant-recording-configuration '{"mediaTypes": ["AUDIO_VIDEO"],"storageConfigurationArn": "arn:aws:ivs:us-west-2:123456789012:storage-configuration/abcdABCDefgh", "recordingReconnectWindowSeconds": 100, \ "hlsConfiguration": {"targetSegmentDurationSeconds": 5}}'Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
Contoh 3: Untuk membuat panggung dan mengonfigurasi rekaman peserta individual dengan perekaman thumbnail diaktifkan
create-stageContoh berikut membuat panggung dan mengonfigurasi rekaman peserta individu dengan perekaman thumbnail diaktifkan.aws ivs-realtime create-stage \ --namestage1\ --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}}'Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
-
Untuk detail API, lihat CreateStage
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakancreate-storage-configuration.
- AWS CLI
-
Untuk membuat konfigurasi penyimpanan komposisi
create-storage-configurationContoh berikut membuat konfigurasi penyimpanan komposisi dengan properti yang ditentukan.aws ivs-realtime create-storage-configuration \ --name"test-sc"--s3"bucketName=amzn-s3-demo-bucket"Output:
{ "storageConfiguration": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/ABabCDcdEFef", "name": "test-sc", "s3": { "bucketName": "amzn-s3-demo-bucket" }, "tags": {} } }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat CreateStorageConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-encoder-configuration.
- AWS CLI
-
Untuk menghapus konfigurasi encoder komposisi
Berikut ini
delete-encoder-configurationmenghapus konfigurasi encoder komposisi yang ditentukan oleh ARN (Nama Sumber Daya Amazon) yang diberikan.aws ivs-realtime delete-encoder-configuration \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/ABabCDcdEFef"Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat DeleteEncoderConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-ingest-configuration.
- AWS CLI
-
Contoh 1: Untuk menghapus konfigurasi ingest yang tidak aktif
delete-ingest-configurationContoh berikut menghapus konfigurasi ingest tidak aktif untuk ARN konfigurasi ingest-tertentu (Nama Sumber Daya Amazon).aws ivs-realtime delete-ingest-configuration \ --arnarn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat IVS Stream Ingest | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
Contoh 2: Untuk memaksa menghapus konfigurasi ingest aktif
delete-ingest-configurationContoh berikut memaksa penghapusan konfigurasi ingest aktif untuk ARN konfigurasi ingest tertentu (Nama Sumber Daya Amazon).aws ivs-realtime delete-ingest-configuration \ --arnarn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234\ --forcePerintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat IVS Stream Ingest | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat DeleteIngestConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-public-key.
- AWS CLI
-
Untuk menghapus kunci publik
Berikut ini
delete-public-keymenghapus kunci publik yang ditentukan.aws ivs-realtime delete-public-key \ --arnarn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Mendistribusikan Token Pes erta di Panduan Pengguna Amazon IVS Real-Time Streaming.
-
Untuk detail API, lihat DeletePublicKey
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-stage.
- AWS CLI
-
Untuk menghapus panggung
delete-stageContoh berikut menghapus tahap yang ditentukan.aws ivs-realtime delete-stage \ --arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefghPerintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat DeleteStage
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandelete-storage-configuration.
- AWS CLI
-
Untuk menghapus konfigurasi penyimpanan komposisi
Berikut ini
delete-storage-configurationmenghapus konfigurasi penyimpanan komposisi yang ditentukan oleh ARN (Nama Sumber Daya Amazon) yang diberikan.aws ivs-realtime delete-storage-configuration \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/ABabCDcdEFef"Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat DeleteStorageConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakandisconnect-participant.
- AWS CLI
-
Untuk memutuskan sambungan peserta panggung
disconnect-participantContoh berikut memutuskan peserta yang ditentukan dari tahap yang ditentukan.aws ivs-realtime disconnect-participant \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --participant-idABCDEfghij01234KLMN5678Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat DisconnectParticipant
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanget-composition.
- AWS CLI
-
Contoh 1: Untuk mendapatkan komposisi dengan pengaturan tata letak default
get-compositionContoh berikut mendapatkan komposisi untuk ARN (Nama Sumber Daya Amazon) yang ditentukan.aws ivs-realtime get-composition \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Perekaman Komposit IVS | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
Contoh 2: Untuk mendapatkan komposisi dengan tata letak PiP
get-compositionContoh berikut mendapatkan komposisi untuk ARN (Nama Sumber Daya Amazon) yang ditentukan, yang menggunakan tata letak PiP.aws ivs-realtime get-composition \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:composition/wxyzWXYZpqrs"Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Perekaman Komposit IVS | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
Contoh 3: Untuk mendapatkan komposisi dengan perekaman thumbnail diaktifkan
get-compositionContoh berikut mendapatkan komposisi untuk ARN (Nama Sumber Daya Amazon) yang ditentukan, yang mengaktifkan perekaman thumbnail dengan pengaturan default.aws ivs-realtime get-composition \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Perekaman Komposit IVS | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat GetComposition
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanget-encoder-configuration.
- AWS CLI
-
Untuk mendapatkan konfigurasi encoder komposisi
get-encoder-configurationContoh berikut mendapatkan konfigurasi encoder komposisi yang ditentukan oleh ARN (Nama Sumber Daya Amazon) yang diberikan.aws ivs-realtime get-encoder-configuration \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:encoder-configuration/abcdABCDefgh"Output:
{ "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 } } }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat GetEncoderConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanget-ingest-configuration.
- AWS CLI
-
Untuk mendapatkan informasi konfigurasi ingest
get-ingest-configurationContoh berikut mendapatkan konfigurasi ingest untuk ARN konfigurasi ingest-tertentu (Nama Sumber Daya Amazon).aws ivs-realtime get-ingest-configuration \ --arnarn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat IVS Stream Ingest | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat GetIngestConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanget-participant.
- AWS CLI
-
Contoh 1: Untuk mendapatkan peserta panggung
get-participantContoh berikut mendapatkan peserta panggung untuk ID peserta dan ID sesi tertentu di tahap tertentu ARN (Nama Sumber Daya Amazon).aws ivs-realtime get-participant \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIjOutput:
{ "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": "" } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
Contoh 2: Untuk mendapatkan peserta panggung yang telah direplikasi ke tahap lain
get-participantContoh berikut mendapatkan peserta panggung untuk ID peserta dan ID sesi tertentu di tahap ARN (Nama Sumber Daya Amazon) yang ditentukan, ketika peserta juga telah direplikasi ke tahap lain.aws ivs-realtime get-participant \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIjOutput:
{ "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": "" } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
Contoh 3: Untuk mendapatkan peserta panggung yang telah direplikasi dari tahap lain
get-participantContoh berikut mendapatkan peserta panggung untuk ID peserta dan ID sesi tertentu di tahap tertentu ARN (Nama Sumber Daya Amazon), ketika peserta telah direplikasi dari tahap lain.aws ivs-realtime get-participant \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIjOutput:
{ "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": "" } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
-
Untuk detail API, lihat GetParticipant
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanget-public-key.
- AWS CLI
-
Untuk mendapatkan kunci publik yang ada digunakan untuk menandatangani token peserta panggung
get-public-keyContoh berikut mendapatkan kunci publik yang ditentukan oleh ARN yang disediakan, untuk menandatangani token peserta tahap.aws ivs-realtime get-public-key \ --arnarn:aws:ivs:us-west-2:123456789012:public-key/abcdABC1efg2Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Mendistribusikan Token Pes erta di Panduan Pengguna Amazon IVS Real-Time Streaming.
-
Untuk detail API, lihat GetPublicKey
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanget-stage-session.
- AWS CLI
-
Untuk mendapatkan sesi panggung
get-stage-sessionContoh berikut mendapatkan sesi tahap untuk ID sesi tertentu dari ARN tahap tertentu (Nama Sumber Daya Amazon).aws ivs-realtime get-stage-session \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6gOutput:
{ "stageSession": { "endTime": "2023-04-26T20:36:29+00:00", "sessionId": "st-a1b2c3d4e5f6g", "startTime": "2023-04-26T20:30:29.602000+00:00" } }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat GetStageSession
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanget-stage.
- AWS CLI
-
Untuk mendapatkan informasi konfigurasi panggung
get-stageContoh berikut mendapatkan konfigurasi tahap untuk ARN tahap tertentu (Nama Sumber Daya Amazon).aws ivs-realtime get-stage \ --arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefghOutput:
{ "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": {} } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
-
Untuk detail API, lihat GetStage
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanget-storage-configuration.
- AWS CLI
-
Untuk mendapatkan konfigurasi penyimpanan komposisi
get-storage-configurationContoh berikut mendapatkan konfigurasi penyimpanan komposisi yang ditentukan oleh ARN (Nama Sumber Daya Amazon) yang diberikan.aws ivs-realtime get-storage-configuration \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/abcdABCDefgh"Output:
{ "storageConfiguration": { "arn": "arn:aws:ivs:ap-northeast-1:123456789012:storage-configuration/abcdABCDefgh", "name": "test-sc", "s3": { "bucketName": "amzn-s3-demo-bucket" }, "tags": {} } }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat GetStorageConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanimport-public-key.
- AWS CLI
-
Untuk mengimpor kunci publik yang ada untuk digunakan untuk menandatangani token peserta panggung
import-public-keyContoh berikut mengimpor kunci publik dari file material, untuk digunakan untuk menandatangani token peserta tahap.aws ivs-realtime import-public-key \ --public-key-material="`cat public.pem`"Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Mendistribusikan Token Pes erta di Panduan Pengguna Amazon IVS Real-Time Streaming.
-
Untuk detail API, lihat ImportPublicKey
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-compositions.
- AWS CLI
-
Untuk mendapatkan daftar komposisi
Berikut ini
list-compositionsmencantumkan semua komposisi untuk AWS akun Anda, di AWS wilayah tempat permintaan API diproses.aws ivs-realtime list-compositionsOutput:
{ "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": {} } ] }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat ListCompositions
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-encoder-configurations.
- AWS CLI
-
Untuk membuat daftar konfigurasi encoder komposisi
Berikut ini
list-encoder-configurationsmencantumkan semua konfigurasi encoder komposisi untuk AWS akun Anda, di AWS wilayah tempat permintaan API diproses.aws ivs-realtime list-encoder-configurationsOutput:
{ "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": {} } ] }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat ListEncoderConfigurations
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-ingest-configurations.
- AWS CLI
-
Untuk mendapatkan informasi ringkasan tentang semua konfigurasi ingest
list-ingest-configurationsContoh berikut mencantumkan semua konfigurasi ingest untuk AWS akun Anda, di AWS wilayah tempat permintaan API diproses.aws ivs-realtime list-ingest-configurationsOutput:
{ "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": "", } ] }Untuk informasi selengkapnya, lihat IVS Stream Ingest | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat ListIngestConfigurations
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-participant-events.
- AWS CLI
-
Contoh 1: Untuk mendapatkan daftar acara peserta panggung
list-participant-eventsContoh berikut mencantumkan semua acara peserta untuk ID peserta dan ID sesi tertentu dari ARN tahap tertentu (Nama Sumber Daya Amazon).aws ivs-realtime list-participant-events \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIjOutput:
{ "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" } ] }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
Contoh 2: Untuk mendapatkan daftar acara peserta panggung, termasuk berhenti dan mulai replikasi peserta
list-participant-eventsContoh berikut mencantumkan semua acara peserta untuk ID sesi tertentu dari ARN tahap tertentu (Nama Sumber Daya Amazon), di mana peserta direplikasi ke tahap lain.aws ivs-realtime list-participant-events \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6g\ --participant-idabCDEf12GHIjOutput:
{ "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" } ] }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
-
Untuk detail API, lihat ListParticipantEvents
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-participant-replicas.
- AWS CLI
-
Untuk mendapatkan daftar replika peserta panggung
list-participant-replicasContoh berikut mencantumkan semua peserta tahap yang direplikasi dari tahap sumber tertentu ARN (Nama Sumber Daya Amazon) ke tahap lain.aws ivs-realtime list-participant-replicas \ --source-stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --participant-idabCDEf12GHIjOutput:
{ "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" } ] }Untuk informasi selengkapnya, lihat Replikasi Peserta IVS di Panduan Pengguna Real-Time Streaming Amazon IVS.
-
Untuk detail API, lihat ListParticipantReplicas
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-participants.
- AWS CLI
-
Contoh 1: Untuk mendapatkan daftar peserta panggung
list-participantsContoh berikut mencantumkan semua peserta untuk ID sesi tertentu dari ARN tahap tertentu (Nama Sumber Daya Amazon).aws ivs-realtime list-participants \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6gOutput:
{ "participants": [ { "firstJoinTime": "2023-04-26T20:30:34+00:00", "participantId": "abCDEf12GHIj", "published": true, "recordingState": "STOPPED", "state": "DISCONNECTED", "userId": "" } ] }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
Contoh 2: Untuk mendapatkan daftar peserta panggung, ketika peserta telah direplikasi ke tahap lain
list-participantsContoh berikut mencantumkan semua peserta untuk ID sesi tertentu dari ARN tahap tertentu (Nama Sumber Daya Amazon), ketika peserta telah direplikasi ke tahap lain.aws ivs-realtime list-participants \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6gOutput:
{ "participants": [ { "firstJoinTime": "2023-04-26T20:30:34+00:00", "participantId": "abCDEf12GHIj", "published": true, "recordingState": "STOPPED", "state": "DISCONNECTED", "userId": "", "replicationState": "ACTIVE", "replicationType": "SOURCE", "sourceStageArn": "", "sourceSessionId": "" } ] }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
Contoh 3: Untuk mendapatkan daftar peserta panggung, ketika peserta telah direplikasi dari tahap lain
list-participantsContoh berikut mencantumkan semua peserta untuk ID sesi tertentu dari ARN tahap tertentu (Nama Sumber Daya Amazon), ketika peserta telah direplikasi dari tahap lain.aws ivs-realtime list-participants \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --session-idst-a1b2c3d4e5f6gOutput:
{ "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" } ] }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
-
Untuk detail API, lihat ListParticipants
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-public-keys.
- AWS CLI
-
Untuk membuat daftar kunci publik yang ada yang tersedia untuk menandatangani token peserta panggung
list-public-keysContoh berikut mencantumkan semua kunci publik yang tersedia untuk menandatangani token peserta tahap, di AWS wilayah tempat permintaan API diproses.aws ivs-realtime list-public-keysOutput:
{ "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": {} } ] }Untuk informasi selengkapnya, lihat Mendistribusikan Token Pes erta di Panduan Pengguna Amazon IVS Real-Time Streaming.
-
Untuk detail API, lihat ListPublicKeys
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-stage-sessions.
- AWS CLI
-
Untuk mendapatkan daftar sesi panggung
list-stage-sessionsContoh berikut mencantumkan semua sesi untuk tahap tertentu ARN (Nama Sumber Daya Amazon).aws ivs-realtime list-stage-sessions \ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefghOutput:
{ "stageSessions": [ { "endTime": "2023-04-26T20:36:29+00:00", "sessionId": "st-a1b2c3d4e5f6g", "startTime": "2023-04-26T20:30:29.602000+00:00" } ] }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat ListStageSessions
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-stages.
- AWS CLI
-
Untuk mendapatkan informasi ringkasan tentang semua tahapan
list-stagesContoh berikut mencantumkan semua tahapan untuk AWS akun Anda, di AWS wilayah tempat permintaan API diproses.aws ivs-realtime list-stagesOutput:
{ "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": {} } ] }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat ListStages
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanlist-storage-configurations.
- AWS CLI
-
Untuk membuat daftar konfigurasi penyimpanan komposisi
Berikut ini
list-storage-configurationsmencantumkan semua konfigurasi penyimpanan komposisi untuk AWS akun Anda, di AWS wilayah tempat permintaan API diproses.aws ivs-realtime list-storage-configurationsOutput:
{ "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": {} } ] }Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat ListStorageConfigurations
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanstart-composition.
- AWS CLI
-
Contoh 1: Untuk memulai komposisi dengan pengaturan tata letak default
start-compositionContoh berikut memulai komposisi untuk tahap yang ditentukan untuk dialirkan ke lokasi yang ditentukan.aws ivs-realtime start-composition \ --stage-arnarn: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"}}]'Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Perekaman Komposit IVS | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
Contoh 2: Untuk memulai komposisi dengan tata letak PiP
start-compositionContoh berikut memulai komposisi untuk tahap yang ditentukan untuk dialirkan ke lokasi yang ditentukan menggunakan tata letak PiP.aws ivs-realtime start-composition \ --stage-arnarn: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"}'Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Perekaman Komposit IVS | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
Contoh 3: Untuk memulai komposisi dengan perekaman thumbnail diaktifkan
start-compositionContoh berikut memulai komposisi untuk tahap yang ditentukan untuk dialirkan ke lokasi yang ditentukan dengan perekaman thumbnail diaktifkan.aws ivs-realtime start-composition \ --stage-arnarn: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}]}}]'Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Perekaman Komposit (Real-Time Streaming) di Panduan Pengguna Layanan Video Interaktif Amazon.
Contoh 4: Untuk memulai komposisi menggunakan tata letak kisi dengan pemesanan peserta kustom
start-compositionContoh berikut memulai komposisi untuk tahap yang ditentukan untuk dialirkan ke lokasi yang ditentukan menggunakan tata letak grid dengan pemesanan peserta kustom.aws ivs-realtime start-composition \ --stage-arnarn: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"}'Output:
{ "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": {} } }Untuk informasi selengkapnya, lihat Perekaman Komposit IVS | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat StartComposition
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanstart-participant-replication.
- AWS CLI
-
Untuk mulai mereplikasi peserta dari satu tahap ke tahap lain
start-participant-replicationContoh berikut mereplikasi peserta dari tahap sumber ke tahap tujuan, dengan setiap tahap ditentukan oleh ARN-nya (Nama Sumber Daya Amazon).aws ivs-realtime start-participant-replication \ --source-stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --destination-stage-arnarn:aws:ivs:us-west-2:234567890123:stage/bcdABCDefghi\ --participant-idabCDEf12GHIjOutput:
{ "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" }Untuk informasi selengkapnya, lihat Replikasi Peserta IVS di Panduan Pengguna Real-Time Streaming Amazon IVS.
-
Untuk detail API, lihat StartParticipantReplication
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanstop-composition.
- AWS CLI
-
Untuk menghentikan komposisi
Berikut ini
stop-compositionmenghentikan komposisi yang ditentukan oleh ARN (Nama Sumber Daya Amazon) yang diberikan.aws ivs-realtime stop-composition \ --arn"arn:aws:ivs:ap-northeast-1:123456789012:composition/abcdABCDefgh"Perintah ini tidak menghasilkan output.
Untuk informasi selengkapnya, lihat Meng aktifkan Beberapa Host di Amazon IVS Stream di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat StopComposition
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanstop-participant-replication.
- AWS CLI
-
Untuk berhenti mereplikasi peserta dari satu tahap ke tahap lain
stop-participant-replicationContoh berikut berhenti mereplikasi peserta dari tahap sumber ke tahap tujuan, dengan setiap tahap ditentukan oleh ARN-nya (Nama Sumber Daya Amazon).aws ivs-realtime stop-participant-replication \ --source-stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefgh\ --destination-stage-arnarn:aws:ivs:us-west-2:234567890123:stage/bcdABCDefghi\ --participant-idabCDEf12GHIjOutput:
{ "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" }Untuk informasi selengkapnya, lihat Replikasi Peserta IVS di Panduan Pengguna Real-Time Streaming Amazon IVS.
-
Untuk detail API, lihat StopParticipantReplication
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanupdate-ingest-configuration.
- AWS CLI
-
Untuk memperbarui konfigurasi ingest
update-inegst-configurationContoh berikut memperbarui konfigurasi ingest untuk melampirkannya ke panggung.aws ivs-realtime update-ingest-configuration \ --arnarn:aws:ivs:us-west-2:123456789012:ingest-configuration/AbCdEfGh1234\ --stage-arnarn:aws:ivs:us-west-2:123456789012:stage/abcdABCDefghOutput:
{ "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": {} } }Untuk informasi selengkapnya, lihat IVS Stream Ingest | Real-Time Streaming di Panduan Pengguna Layanan Video Interaktif Amazon.
-
Untuk detail API, lihat UpdateIngestConfiguration
di Refer AWS CLI ensi Perintah.
-
Contoh kode berikut menunjukkan cara menggunakanupdate-stage.
- AWS CLI
-
Contoh 1: Untuk memperbarui konfigurasi stage
update-stageContoh berikut memperbarui panggung untuk tahap tertentu ARN untuk memperbarui nama panggung dan mengonfigurasi perekaman peserta individu dengan perekaman thumbnail diaktifkan.aws ivs-realtime update-stage \ --arnarn: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}}' \ --namestage1aOutput:
{ "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": {} } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
Contoh 2: Untuk memperbarui konfigurasi panggung, termasuk menonaktifkan perekaman replika peserta
update-stageContoh berikut memperbarui panggung untuk ARN tahap tertentu untuk memperbarui nama panggung dan mengonfigurasi perekaman peserta individu dengan perekaman thumbnail diaktifkan dan rekaman replika peserta dinonaktifkan.aws ivs-realtime update-stage \ --arnarn: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}}' \ --namestage1aOutput:
{ "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": {} } }Untuk informasi selengkapnya, lihat Mengaktifkan Beberapa Host di Amazon IVS Streaming di Panduan Pengguna Amazon IVS Low-Latency Streaming.
-
Untuk detail API, lihat UpdateStage
di Refer AWS CLI ensi Perintah.
-