Gets a summary of current and previous streams for a specified channel in your account, in the AWS region where the API request is processed.
Parameters:
-
channel_arn
(ChannelArn)
–
Channel ARN used to filter the list.
-
next_token
(Optional[PaginationToken], default:
None
)
–
The first stream to retrieve. This is used for pagination; see the nextToken response field.
-
max_results
(Optional[MaxStreamResults], default:
None
)
–
Maximum number of streams to return. Default: 100.
Raises:
Source code in docs_src/capo_ivs/_services/ivs.py
| def list_stream_sessions(
self,
channel_arn: "capo_ivs.types.channel_arn.ChannelArn",
*,
config_overrides: Optional[ivsClientConfig] = None,
next_token: Optional["capo_ivs.types.pagination_token.PaginationToken"] = None,
max_results: Optional[
"capo_ivs.types.max_stream_results.MaxStreamResults"
] = None,
) -> "capo_ivs.types.list_stream_sessions_response.ListStreamSessionsResponse":
"""<p>Gets a summary of current and previous streams for a specified channel in your account, in the AWS region where the API request is processed.</p>
Args:
channel_arn: <p>Channel ARN used to filter the list.</p>
next_token: <p>The first stream to retrieve. This is used for pagination; see the <code>nextToken</code> response field.</p>
max_results: <p>Maximum number of streams to return. Default: 100.</p>
Raises:
capo_ivs.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_ivs.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
capo_ivs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_ivs.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ivs.types.list_stream_sessions_request.ListStreamSessionsRequest]",
) -> OperationResponse[
"capo_ivs.types.list_stream_sessions_response.ListStreamSessionsResponse"
]:
import capo_ivs._operations.amazon_interactive_video_service.list_stream_sessions
output, http_response = (
capo_ivs._operations.amazon_interactive_video_service.list_stream_sessions.list_stream_sessions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListStreamSessions")
)
input_: capo_ivs.types.list_stream_sessions_request.ListStreamSessionsRequest = {
"channel_arn": channel_arn
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|