def convert_recovery_point_to_snapshot(
self,
recovery_point_id: str,
snapshot_name: str,
*,
config_overrides: Optional[RedshiftServerlessClientConfig] = None,
retention_period: Optional[int] = None,
tags: Optional["capo_redshift_serverless.types.tag_list.TagList"] = None,
) -> "capo_redshift_serverless.types.convert_recovery_point_to_snapshot_response.ConvertRecoveryPointToSnapshotResponse":
"""<p>Converts a recovery point to a snapshot. For more information about recovery points and snapshots, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-snapshots-recovery-points.html">Working with snapshots and recovery points</a>.</p>
Args:
recovery_point_id: <p>The unique identifier of the recovery point.</p>
snapshot_name: <p>The name of the snapshot.</p>
retention_period: <p>How long to retain the snapshot.</p>
tags: <p>An array of <a href="https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_Tag.html">Tag objects</a> to associate with the created snapshot.</p>
Raises:
capo_redshift_serverless.errors.conflict_exception.ConflictException: <p>The submitted action has conflicts.</p>
capo_redshift_serverless.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_redshift_serverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
capo_redshift_serverless.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service limit was exceeded.</p>
capo_redshift_serverless.errors.too_many_tags_exception.TooManyTagsException: <p>The request exceeded the number of tags allowed for a resource.</p>
capo_redshift_serverless.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_redshift_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_redshift_serverless.types.convert_recovery_point_to_snapshot_request.ConvertRecoveryPointToSnapshotRequest]",
) -> OperationResponse[
"capo_redshift_serverless.types.convert_recovery_point_to_snapshot_response.ConvertRecoveryPointToSnapshotResponse"
]:
import capo_redshift_serverless._operations.redshift_serverless.convert_recovery_point_to_snapshot
output, http_response = (
capo_redshift_serverless._operations.redshift_serverless.convert_recovery_point_to_snapshot.convert_recovery_point_to_snapshot(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ConvertRecoveryPointToSnapshot")
)
input_: capo_redshift_serverless.types.convert_recovery_point_to_snapshot_request.ConvertRecoveryPointToSnapshotRequest = {
"recovery_point_id": recovery_point_id,
"snapshot_name": snapshot_name,
}
if retention_period is not None:
input_["retention_period"] = retention_period
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output