copy_cluster_snapshot
¶
copy_cluster_snapshot(
*,
config_overrides: Optional[RedshiftClientConfig] = None,
source_snapshot_identifier: Optional[String] = None,
source_snapshot_cluster_identifier: Optional[String] = None,
target_snapshot_identifier: Optional[String] = None,
manual_snapshot_retention_period: Optional[IntegerOptional] = None,
) -> CopyClusterSnapshotResult
Copies the specified automated cluster snapshot to a new manual cluster snapshot. The source must be an automated snapshot and it must be in the available state.
When you delete a cluster, Amazon Redshift deletes any automated snapshots of the cluster. Also, when the retention period of the snapshot expires, Amazon Redshift automatically deletes it. If you want to keep an automated snapshot for a longer period, you can make a manual copy of the snapshot. Manual snapshots are retained until you delete them.
For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Cluster Management Guide.
Parameters:
-
source_snapshot_identifier(Optional[String], default:None) –The identifier for the source snapshot.
Constraints:
-
Must be the identifier for a valid automated snapshot whose state is
available.
-
-
source_snapshot_cluster_identifier(Optional[String], default:None) –The identifier of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.
Constraints:
-
Must be the identifier for a valid cluster.
-
-
target_snapshot_identifier(Optional[String], default:None) –The identifier given to the new manual snapshot.
Constraints:
-
Cannot be null, empty, or blank.
-
Must contain from 1 to 255 alphanumeric characters or hyphens.
-
First character must be a letter.
-
Cannot end with a hyphen or contain two consecutive hyphens.
-
Must be unique for the Amazon Web Services account that is making the request.
-
-
manual_snapshot_retention_period(Optional[IntegerOptional], default:None) –The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.
The value must be either -1 or an integer between 1 and 3,653.
The default value is -1.
Raises:
-
ClusterNotFoundFault–The
ClusterIdentifierparameter does not refer to an existing cluster. -
ClusterSnapshotAlreadyExistsFault–The value specified as a snapshot identifier is already used by an existing snapshot.
-
ClusterSnapshotNotFoundFault–The snapshot identifier does not refer to an existing cluster snapshot.
-
ClusterSnapshotQuotaExceededFault–The request would result in the user exceeding the allowed number of cluster snapshots.
-
InvalidClusterSnapshotStateFault–The specified cluster snapshot is not in the
availablestate, or other accounts are authorized to access the snapshot. -
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.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_redshift/_services/redshift.py
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 | |