create_stream
¶
create_stream(
stream_name: StreamName,
*,
config_overrides: Optional[KinesisVideoClientConfig] = None,
device_name: Optional[DeviceName] = None,
media_type: Optional[MediaType] = None,
kms_key_id: Optional[KmsKeyId] = None,
data_retention_in_hours: Optional[DataRetentionInHours] = None,
tags: Optional[ResourceTags] = None,
stream_storage_configuration: Optional[StreamStorageConfiguration] = None,
) -> CreateStreamOutput
Creates a new Kinesis video stream.
When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version.
CreateStream is an asynchronous operation.
For information about how the service works, see How it Works.
You must have permissions for the KinesisVideo:CreateStream action.
Parameters:
-
device_name(Optional[DeviceName], default:None) –The name of the device that is writing to the stream.
In the current implementation, Kinesis Video Streams doesn't use this name.
-
stream_name(StreamName) –A name for the stream that you are creating.
The stream name is an identifier for the stream, and must be unique for each account and region.
-
media_type(Optional[MediaType], default:None) –The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see Media Types. If you choose to specify the
MediaType, see Naming Requirements for guidelines.Example valid values include "video/h264" and "video/h264,audio/aac".
This parameter is optional; the default value is
null(or empty in JSON). -
kms_key_id(Optional[KmsKeyId], default:None) –The ID of the Key Management Service (KMS) key that you want Kinesis Video Streams to use to encrypt stream data.
If no key ID is specified, the default, Kinesis Video-managed key (
aws/kinesisvideo) is used.For more information, see DescribeKey.
-
data_retention_in_hours(Optional[DataRetentionInHours], default:None) –The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream.
The default value is 0, indicating that the stream does not persist data. The minimum is 1 hour.
When the
DataRetentionInHoursvalue is 0, consumers can still consume the fragments that remain in the service host buffer, which has a retention time limit of 5 minutes and a retention memory limit of 200 MB. Fragments are removed from the buffer when either limit is reached. -
tags(Optional[ResourceTags], default:None) –A list of tags to associate with the specified stream. Each tag is a key-value pair (the value is optional).
-
stream_storage_configuration(Optional[StreamStorageConfiguration], default:None) –The configuration for the stream's storage, including the default storage tier for stream data. This configuration determines how stream data is stored and accessed, with different tiers offering varying levels of performance and cost optimization.
If not specified, the stream will use the default storage configuration with HOT tier for optimal performance.
Raises:
-
AccountStreamLimitExceededException–The number of streams created for the account is too high.
-
ClientLimitExceededException–Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.
-
DeviceStreamLimitExceededException–Not implemented.
-
InvalidArgumentException–The value for this input parameter is invalid.
-
InvalidDeviceException–Not implemented.
-
ResourceInUseException–When the input
StreamARNorChannelARNinCLOUD_STORAGE_MODEis already mapped to a different Kinesis Video Stream resource, or if the provided inputStreamARNorChannelARNis not in Active status, try one of the following :-
The
DescribeMediaStorageConfigurationAPI to determine what the stream given channel is mapped to. -
The
DescribeMappedResourceConfigurationAPI to determine the channel that the given stream is mapped to. -
The
DescribeStreamorDescribeSignalingChannelAPI to determine the status of the resource.
-
-
TagsPerResourceExceededLimitException–You have exceeded the limit of tags that you can associate with the resource. A Kinesis video stream can support up to 50 tags.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_kinesis_video/_services/kinesis_video.py
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | |