Skip to content

Updated CLI examples for IVS and Verified Permissions #9521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions awscli/examples/ivs-realtime/create-stage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Output::
"recordingReconnectWindowSeconds": 0,
"hlsConfiguration": {
"targetSegmentDurationSeconds": 6
}
},
"recordParticipantReplicas": true
},
"endpoints": {
"events": "wss://global.events.live-video.net",
Expand Down Expand Up @@ -79,7 +80,8 @@ Output::
"recordingReconnectWindowSeconds": 100,
"hlsConfiguration": {
"targetSegmentDurationSeconds": 5
}
},
"recordParticipantReplicas": true
},
"endpoints": {
"events": "wss://global.events.live-video.net",
Expand Down Expand Up @@ -124,7 +126,8 @@ Output::
"recordingReconnectWindowSeconds": 0,
"hlsConfiguration": {
"targetSegmentDurationSeconds": 6
}
},
"recordParticipantReplicas": true
},
"endpoints": {
"events": "wss://global.events.live-video.net",
Expand Down
130 changes: 99 additions & 31 deletions awscli/examples/ivs-realtime/get-participant.rst
Original file line number Diff line number Diff line change
@@ -1,31 +1,99 @@
**To get a stage participant**

The following ``get-participant`` example gets the stage participant for a specified participant ID and session ID in the specified stage ARN (Amazon Resource Name). ::

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

Output::

{
"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": "",
}
}

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon Interactive Video Service User Guide*.
**Example 1: To get a stage participant**

The following ``get-participant`` example gets the stage participant for a specified participant ID and session ID in the specified stage ARN (Amazon Resource Name). ::

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

Output::

{
"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": ""
}
}

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon IVS Low-Latency Streaming User Guide*.

**Example 2: To get a stage participant that has been replicated to another stage**

The following ``get-participant`` example gets the stage participant for a specified participant ID and session ID in the specified stage ARN (Amazon Resource Name), when the participant has also been replicated to another stage. ::

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

Output::

{
"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": ""
}
}

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon IVS Low-Latency Streaming User Guide*.

**Example 3: To get a stage participant that has been replicated from another stage**

The following ``get-participant`` example gets the stage participant for a specified participant ID and session ID in the specified stage ARN (Amazon Resource Name), when the participant has been replicated from another stage. ::

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

Output::

{
"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": ""
}
}

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon IVS Low-Latency Streaming User Guide*.
5 changes: 3 additions & 2 deletions awscli/examples/ivs-realtime/get-stage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ Output::
"storage": [
"SEQUENTIAL"
],
"recordingMode": "DISABLED",
"recordingMode": "DISABLED"
},
"recordingReconnectWindowSeconds": 0,
"hlsConfiguration": {
"targetSegmentDurationSeconds": 6
}
},
"recordParticipantReplicas": true
},
"endpoints": {
"events": "wss://global.events.live-video.net",
Expand Down
56 changes: 54 additions & 2 deletions awscli/examples/ivs-realtime/list-participant-events.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**To get a list of stage participant events**
**Example 1: To get a list of stage participant events**

The following ``list-participant-events`` example lists all participant events for a specified participant ID and session ID of a specified stage ARN (Amazon Resource Name). ::

Expand Down Expand Up @@ -34,4 +34,56 @@ Output::
]
}

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/userguide/multiple-hosts.html>`__ in the *Amazon Interactive Video Service User Guide*.
For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon IVS Low-Latency Streaming User Guide*.

**Example 2: To get a list of stage participant events, including participant replication stop and start**

The following ``list-participant-events`` example lists all participant events for a specified session ID of a specified stage ARN (Amazon Resource Name), where a participant is replicated to another stage. ::

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

Output::

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

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon IVS Low-Latency Streaming User Guide*.
24 changes: 24 additions & 0 deletions awscli/examples/ivs-realtime/list-participant-replicas.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**To get a list of stage participant replicas**

The following ``list-participant-replicas`` example lists all stage participants replicated from the specified source stage ARN (Amazon Resource Name) to another stage. ::

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

Output::

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

For more information, see `IVS Participant Replication <https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-participant-replication.html>`__ in the *Amazon IVS Real-Time Streaming User Guide*.
64 changes: 61 additions & 3 deletions awscli/examples/ivs-realtime/list-participants.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**To get a list of stage participants**
**Example 1: To get a list of stage participants**

The following ``list-participants`` example lists all participants for a specified session ID of a specified stage ARN (Amazon Resource Name). ::

Expand All @@ -12,7 +12,7 @@ Output::
"participants": [
{
"firstJoinTime": "2023-04-26T20:30:34+00:00",
"participantId": "abCDEf12GHIj"
"participantId": "abCDEf12GHIj",
"published": true,
"recordingState": "STOPPED",
"state": "DISCONNECTED",
Expand All @@ -21,4 +21,62 @@ Output::
]
}

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon Interactive Video Service User Guide*.
For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon IVS Low-Latency Streaming User Guide*.

**Example 2: To get a list of stage participants, when a participant has been replicated to another stage**

The following ``list-participants`` example lists all participants for a specified session ID of a specified stage ARN (Amazon Resource Name), when a participant has been replicated to another stage. ::

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

Output::

{
"participants": [
{
"firstJoinTime": "2023-04-26T20:30:34+00:00",
"participantId": "abCDEf12GHIj",
"published": true,
"recordingState": "STOPPED",
"state": "DISCONNECTED",
"userId": "",
"replicationState": "ACTIVE",
"replicationType": "SOURCE",
"sourceStageArn": "",
"sourceSessionId": ""
}
]
}

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon IVS Low-Latency Streaming User Guide*.

**Example 3: To get a list of stage participants, when a participant has been replicated from another stage**

The following ``list-participants`` example lists all participants for a specified session ID of a specified stage ARN (Amazon Resource Name), when a participant has been replicated from another stage. ::

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

Output::

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

For more information, see `Enabling Multiple Hosts on an Amazon IVS Stream <https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/multiple-hosts.html>`__ in the *Amazon IVS Low-Latency Streaming User Guide*.
24 changes: 24 additions & 0 deletions awscli/examples/ivs-realtime/start-participant-replication.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**To start replicating a participant from one stage to another stage**

The following ``start-participant-replication`` example replicates a participant from a source stage to a destination stage, with each stage specified by its ARN (Amazon Resource Name). ::

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

Output::

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

For more information, see `IVS Participant Replication <https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-participant-replication.html>`__ in the *Amazon IVS Real-Time Streaming User Guide*.
Loading