modify_snapshot_copy_retention_period
¶
modify_snapshot_copy_retention_period(
*,
config_overrides: Optional[RedshiftClientConfig] = None,
cluster_identifier: Optional[String] = None,
retention_period: Optional[Integer] = None,
manual: Optional[Boolean] = None,
) -> ModifySnapshotCopyRetentionPeriodResult
Modifies the number of days to retain snapshots in the destination Amazon Web Services Region after they are copied from the source Amazon Web Services Region. By default, this operation only changes the retention period of copied automated snapshots. The retention periods for both new and existing copied automated snapshots are updated with the new retention period. You can set the manual option to change only the retention periods of copied manual snapshots. If you set this option, only newly copied manual snapshots have the new retention period.
Parameters:
-
cluster_identifier(Optional[String], default:None) –The unique identifier of the cluster for which you want to change the retention period for either automated or manual snapshots that are copied to a destination Amazon Web Services Region.
Constraints: Must be the valid name of an existing cluster that has cross-region snapshot copy enabled.
-
retention_period(Optional[Integer], default:None) –The number of days to retain automated snapshots in the destination Amazon Web Services Region after they are copied from the source Amazon Web Services Region.
By default, this only changes the retention period of copied automated snapshots.
If you decrease the retention period for automated snapshots that are copied to a destination Amazon Web Services Region, Amazon Redshift deletes any existing automated snapshots that were copied to the destination Amazon Web Services Region and that fall outside of the new retention period.
Constraints: Must be at least 1 and no more than 35 for automated snapshots.
If you specify the
manualoption, only newly copied manual snapshots will have the new retention period.If you specify the value of -1 newly copied manual snapshots are retained indefinitely.
Constraints: The number of days must be either -1 or an integer between 1 and 3,653 for manual snapshots.
-
manual(Optional[Boolean], default:None) –Indicates whether to apply the snapshot retention period to newly copied manual snapshots instead of automated snapshots.
Raises:
-
ClusterNotFoundFault–The
ClusterIdentifierparameter does not refer to an existing cluster. -
InvalidClusterStateFault–The specified cluster is not in the
availablestate. -
InvalidRetentionPeriodFault–The retention period specified is either in the past or is not a valid value.
The value must be either -1 or an integer between 1 and 3,653.
-
SnapshotCopyDisabledFault–Cross-region snapshot copy was temporarily disabled. Try your request again.
-
UnauthorizedOperation–Your account is not authorized to perform the requested operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_redshift/_services/redshift.py
9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 | |