Associates a SignalingChannel to a stream to store the media. There are two signaling modes that you can specify :
-
If StorageStatus is enabled, the data will be stored in the StreamARN provided. In order for WebRTC Ingestion to work, the stream must have data retention enabled.
-
If StorageStatus is disabled, no data will be stored, and the StreamARN parameter will not be needed.
If StorageStatus is enabled, direct peer-to-peer (master-viewer) connections no longer occur. Peers connect directly to the storage session. You must call the JoinStorageSession API to trigger an SDP offer send and establish a connection between a peer and the storage session.
Parameters:
-
channel_arn
(ResourceARN)
–
The Amazon Resource Name (ARN) of the channel.
-
media_storage_configuration
(MediaStorageConfiguration)
–
A structure that encapsulates, or contains, the media storage configuration properties.
Raises:
-
AccessDeniedException
–
You do not have required permissions to perform this operation.
-
ClientLimitExceededException
–
Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.
-
InvalidArgumentException
–
The value for this input parameter is invalid.
-
NoDataRetentionException
–
The Stream data retention in hours is equal to zero.
-
ResourceInUseException
–
When the input StreamARN or ChannelARN in CLOUD_STORAGE_MODE is already mapped to a different Kinesis Video Stream resource, or if the provided input StreamARN or ChannelARN is not in Active status, try one of the following :
-
The DescribeMediaStorageConfiguration API to determine what the stream given channel is mapped to.
-
The DescribeMappedResourceConfiguration API to determine the channel that the given stream is mapped to.
-
The DescribeStream or DescribeSignalingChannel API to determine the status of the resource.
-
ResourceNotFoundException
–
Amazon Kinesis Video Streams can't find the stream that you specified.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_kinesis_video/_services/kinesis_video.py
| def update_media_storage_configuration(
self,
channel_arn: "capo_kinesis_video.types.resource_arn.ResourceARN",
media_storage_configuration: "capo_kinesis_video.types.media_storage_configuration.MediaStorageConfiguration",
*,
config_overrides: Optional[KinesisVideoClientConfig] = None,
) -> "capo_kinesis_video.types.update_media_storage_configuration_output.UpdateMediaStorageConfigurationOutput":
"""<p>Associates a <code>SignalingChannel</code> to a stream to store the media. There are two signaling modes that you can specify :</p> <ul> <li> <p>If <code>StorageStatus</code> is enabled, the data will be stored in the <code>StreamARN</code> provided. In order for WebRTC Ingestion to work, the stream must have data retention enabled.</p> </li> <li> <p>If <code>StorageStatus</code> is disabled, no data will be stored, and the <code>StreamARN</code> parameter will not be needed. </p> </li> </ul> <important> <p>If <code>StorageStatus</code> is enabled, direct peer-to-peer (master-viewer) connections no longer occur. Peers connect directly to the storage session. You must call the <code>JoinStorageSession</code> API to trigger an SDP offer send and establish a connection between a peer and the storage session. </p> </important>
Args:
channel_arn: <p>The Amazon Resource Name (ARN) of the channel.</p>
media_storage_configuration: <p>A structure that encapsulates, or contains, the media storage configuration properties.</p>
Raises:
capo_kinesis_video.errors.access_denied_exception.AccessDeniedException: <p>You do not have required permissions to perform this operation.</p>
capo_kinesis_video.errors.client_limit_exceeded_exception.ClientLimitExceededException: <p>Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.</p>
capo_kinesis_video.errors.invalid_argument_exception.InvalidArgumentException: <p>The value for this input parameter is invalid.</p>
capo_kinesis_video.errors.no_data_retention_exception.NoDataRetentionException: <p>The Stream data retention in hours is equal to zero.</p>
capo_kinesis_video.errors.resource_in_use_exception.ResourceInUseException: <p>When the input <code>StreamARN</code> or <code>ChannelARN</code> in <code>CLOUD_STORAGE_MODE</code> is already mapped to a different Kinesis Video Stream resource, or if the provided input <code>StreamARN</code> or <code>ChannelARN</code> is not in Active status, try one of the following : </p> <ol> <li> <p>The <code>DescribeMediaStorageConfiguration</code> API to determine what the stream given channel is mapped to. </p> </li> <li> <p>The <code>DescribeMappedResourceConfiguration</code> API to determine the channel that the given stream is mapped to. </p> </li> <li> <p>The <code>DescribeStream</code> or <code>DescribeSignalingChannel</code> API to determine the status of the resource. </p> </li> </ol>
capo_kinesis_video.errors.resource_not_found_exception.ResourceNotFoundException: <p>Amazon Kinesis Video Streams can't find the stream that you specified.</p>
capo_kinesis_video.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_kinesis_video.types.update_media_storage_configuration_input.UpdateMediaStorageConfigurationInput]",
) -> OperationResponse[
"capo_kinesis_video.types.update_media_storage_configuration_output.UpdateMediaStorageConfigurationOutput"
]:
import capo_kinesis_video._operations.kinesis_video_20170930.update_media_storage_configuration
output, http_response = (
capo_kinesis_video._operations.kinesis_video_20170930.update_media_storage_configuration.update_media_storage_configuration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateMediaStorageConfiguration")
)
input_: capo_kinesis_video.types.update_media_storage_configuration_input.UpdateMediaStorageConfigurationInput = {
"channel_arn": channel_arn,
"media_storage_configuration": media_storage_configuration,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|