update_data_retention
¶
update_data_retention(
current_version: Version,
operation: UpdateDataRetentionOperation,
data_retention_change_in_hours: DataRetentionChangeInHours,
*,
config_overrides: Optional[KinesisVideoClientConfig] = None,
stream_name: Optional[StreamName] = None,
stream_arn: Optional[ResourceARN] = None,
) -> UpdateDataRetentionOutput
Increases or decreases the stream's data retention period by the value that you specify. To indicate whether you want to increase or decrease the data retention period, specify the Operation parameter in the request body. In the request, you must specify either the StreamName or the StreamARN.
This operation requires permission for the KinesisVideo:UpdateDataRetention action.
Changing the data retention period affects the data in the stream as follows:
-
If the data retention period is increased, existing data is retained for the new retention period. For example, if the data retention period is increased from one hour to seven hours, all existing data is retained for seven hours.
-
If the data retention period is decreased, existing data is retained for the new retention period. For example, if the data retention period is decreased from seven hours to one hour, all existing data is retained for one hour, and any data older than one hour is deleted immediately.
Parameters:
-
stream_name(Optional[StreamName], default:None) –The name of the stream whose retention period you want to change.
-
stream_arn(Optional[ResourceARN], default:None) –The Amazon Resource Name (ARN) of the stream whose retention period you want to change.
-
current_version(Version) –The version of the stream whose retention period you want to change. To get the version, call either the
DescribeStreamor theListStreamsAPI. -
operation(UpdateDataRetentionOperation) –Indicates whether you want to increase or decrease the retention period.
-
data_retention_change_in_hours(DataRetentionChangeInHours) –The number of hours to adjust the current retention by. The value you specify is added to or subtracted from the current value, depending on the
operation.The minimum value for data retention is 0 and the maximum value is 87600 (ten years).
Raises:
-
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.
-
NotAuthorizedException–The caller is not authorized to perform this operation.
-
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.
-
-
ResourceNotFoundException–Amazon Kinesis Video Streams can't find the stream that you specified.
-
VersionMismatchException–The stream version that you specified is not the latest version. To get the latest version, use the DescribeStream API.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_kinesis_video/_services/kinesis_video.py
1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 | |